Поиск по STEAMB

Игры по онлайну и скины по объёму продаж

Ничего не найдено

Попробуйте другое название или переключите категорию.

Меню

Affliction 描述优化-[Affliction Text Framework]

Положительные голоса100%35 голосов игроков
Подписчики4,7 тыс.4 700 в Steam Workshop
Размер файла148,54 КБЗагрузка через Steam
Обновление автора19 апр. 2026 г.Дата обновления материала
Affliction 描述优化-[Affliction Text Framework]

Изображение 1 из 3. Материалы автора из Steam Workshop.

Добавить в игру через Steam

  1. Перейдите в Steam

    Откроется страница именно этого материала.

    Открыть в Steam Workshop
  2. Нажмите «Подписаться»

    На странице Steam войдите в аккаунт, если потребуется.

    Подписаться

О материале

«Affliction 描述优化-[Affliction Text Framework]» — материал мастерской Barotrauma. Моды, подлодки, предметы и новые задания для экипажа. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.

Описание автора

Affliction Text Framework (ATF)

这是一个提供给MOD作者使用的底层前置框架,用于扩展和优化潜渊症的 Affliction 文本描述功能。 This is a core framework for modders to expand and optimize Affliction descriptions.

**普通玩家:**如果其他MOD提示需要此项,直接订阅并在模组列表中启用即可。

然后你可以离开此页面了,享受渊深。

For Players: Just subscribe and enable it if required by other mods.

Then you can leave this page and enjoy games.


对于MOD作者 / For Modders:

⚠️ [b]重要声明 (Important Note): [/b] 1.由于Steam简介的系统限制,下文演示中的大括号 { } ,在你的实际XML代码中请务必替换为标准的英文中括号 [ ] !! Due to Steam formatting limits, please replace all curly braces { } below with standard square brackets [ ] in your actual XML code!!

  1. 游戏本身并不会对未使用的文本或额外的 XML 文件类型做检测:被声明为 ** Other ** 类型的 ** BuffRelations.xml ** 文件,以及本地化文本中本模组用于适配的 ** <..._cs> ** 标签,绝对不会引发任何形式的红字报错。 也就是说:即使你的 MOD 适配了本 ATF 框架,但玩家并没有订阅本框架,你的 MOD 依然能原样正常运行,不会产生报错。 The base game does not check for unused texts or extra XML file types. Therefore, the ** BuffRelations.xml ** file declared as ** Other **, and the custom ** <..._cs> ** tags in your localization, will NEVER cause any red error logs. In other words: Even if your mod is fully adapted to the ATF framework, if a player hasn't subscribed to this framework, your mod will also run perfectly without any errors.

本框架为原版 Affliction 系统提供了以下扩展功能: This framework provides the following features:

1. 动态变量与数学运算 / Dynamic Variables & Math 允许直接在 <afflictiondescription> 文本中使用表达式进行计算: Allows using expressions directly in <afflictiondescription> text:

  • {amount} 或 {=int_strength}:Affliction强度的整数(向下取整) / Affliction Int Strength (rounded down)。

  • {=strength}:带小数的精确强度。 / Float Strength

  • {=strength * 2.5}:支持简单的四则运算(+ - * /)。 / Simple arithmetic operations (+ - * /).

<!-- 示例(来自 `浊心斯卡蒂` MOD ) -->
<!-- Example (From `Skadi the Corrupting Heart` MOD) -->
<afflictiondescription.AgorSkadi_cs>‖color:gui.green‖+{amount}%‖end‖ ‖color:gui.orange‖游泳速度‖end‖</afflictiondescription.AgorSkadi_cs>

2. 三元条件判断 / Ternary Conditions 支持根据强度动态改变输出的文本。格式:{=条件 ? 真值 : 假值} Supports dynamic text output based on strength. Format: {=condition ? true : false}

为了防止XML标签报错,请使用英文缩写代替符号:lt(<), lte(<=), gt(>), gte(>=), eq(==), neq(!=)。 To prevent XML tag errors, please use English abbreviations instead of symbols: lt (<), lte (<=), gt (>), gte (>=), eq (==), neq (!=).

<!-- 示例:当强度等于100时显示MAX,否则显示具体数字 -->
<!-- Example: Display MAX when the Strength is 100, otherwise display the specific number. -->
<afflictiondescription.Example1_cs>强度:{=strength eq 100 ? MAX : strength}</afflictiondescription.Example1_cs>

<!-- 示例:当强度等于100时显示ON,否则不显示 -->
<!-- Example: Display "ON" when Strength is 100; otherwise, the output is empty. -->
<afflictiondescription.Example1_cs>{=strength eq 100 ? ON : }</afflictiondescription.Example1_cs>
<afflictiondescription.Example1_cs>{=strength eq 100 ? ON : Null}</afflictiondescription.Example1_cs>
<afflictiondescription.Example1_cs>{=strength eq 100 ? ON : Empty}</afflictiondescription.Example1_cs>
<!-- 留空、NULL 或 Empty 均可 / Leaving blank, or NULL or Empty, are all acceptable. -->

<!-- 示例:根据强度改变文字颜色 -->
<!-- <!-- Example: Change text color based on Strength --> -->
<afflictiondescription.Example2_cs>状态:{=strength gt 50 ? ‖color:gui.green‖安全‖color:end‖ : ‖color:gui.red‖危险‖color:end‖}</afflictiondescription.Example2_cs>

<!-- 示例(来自 `浊心斯卡蒂` MOD ) -->
<!-- Example (From `Skadi the Corrupting Heart` MOD) -->
<afflictiondescription.WaveSaltWind_cs>抵抗‖color:gui.green‖{=int_strength}%‖end‖ ‖color:gui.orange‖水流冲击‖end‖,‖color:gui.green‖+{=strength lt 15f ? 50% : 100%}%‖end‖ ‖color:gui.orange‖游泳速度‖end‖</afflictiondescription.WaveSaltWind_cs>

3. 子状态合并与UI图标隐藏 / Sub-affliction Merging & UI Hiding 可以将多个附属 Buff 的文本自动拼接到主 Buff 的描述中,并在游戏界面彻底隐藏这些子 Buff 的图标,保持UI整洁。 Automatically appends sub-affliction texts to the main affliction and hides their HUD icons to keep the UI clean.

如何接入 / How to integrate : 在你自己的MOD中新建一个以 BuffRelations.xml 结尾的文件(例如 MyMod_BuffRelations.xml)。 Create a file ending with "BuffRelations.xml" in your mod.

<?xml version="1.0" encoding="utf-8"?>
<BuffRelations>
    <!-- identifier填主Buff,subbuffs填子Buff,separator为拼接符(留空默认换行) override则用于覆盖(不写或者为false则默认向`主buff`追加) -->
    <MainBuff identifier="你的主Buff_ID" subbuffs="子Buff_1, 子Buff_2" separator=" " override="true"/>
</BuffRelations>
<!-- 示例(来自 `浊心斯卡蒂` MOD ) -->
<!-- Example (From `Skadi the Corrupting Heart` MOD) -->
<?xml version="1.0" encoding="utf-8"?>
<BuffRelations>
    <!-- 同葬无光之愿(腐化之心-无限) -->
    <MainBuff identifier="CorruptedHeart_Active" subbuffs="NamelessSea, LostFlagship, TideShadow" />
    <!-- 同葬无光之愿(普通) -->
    <MainBuff identifier="Skadi_CH_buff_SkadiWishes" subbuffs="NamelessSea, LostFlagship, TideShadow" />
    <!-- 同归殊途之吟 -->
    <MainBuff identifier="SkadiChant_TidalMemories" subbuffs="WaveSaltWind, ProfoundMourning" />
</BuffRelations>

⚠️ 注意:必须在你的 filelist.xml 中将其作为 引用,否则框架无法读取BuffRelations.xml文件! Note: You must reference it as in your filelist.xml file; otherwise, the framework will not be able to read BuffRelations.xml!

<Other file="%ModDir%/MyMod_BuffRelations.xml" />

范例文件以及更多说明请参考本MOD目录下的 Example_BuffRelations.xml 和 Example_Localization_zh.xml,当然,你也可以看看上面提示到的[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3578142305] 浊心斯卡蒂 [/url] MOD。 For example files and further instructions, please refer to Example_BuffRelations.xml and Example_Localization_en.xml in the MOD directory, and you can also check out the [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3578142305] Skadi the Corrupting Heart [/url] MOD mentioned above.


联机水群:770395108 模组造船:200300947

Оригинал в Steam Workshop

Как установить и запустить

Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.

Настройки cookies

Вы можете изменить выбор в любой момент. Отказ от аналитики не ограничивает доступ к сайту.

Технологии, провайдеры и сроки хранения