Barotrauma 潜渊症

Barotrauma 潜渊症

Barotrauma Workshop
You can build your own submarines and monsters with in-game editors and share your creations with other players. Imagine and experiment.
 此主题已被置顶,因此可能具有重要性
Vihis  [开发者] 2023 年 1 月 27 日 上午 4:30
Information for modders regarding the 0.21.6.0 update (1.0. Pre-patch)
Hello all mod makers!

The upcoming Barotrauma update will change some aspects of the status effect and poison systems. These changes will unfortunately cause issues with some existing mods, but we felt these improvements were important to make: the functionality of status effects has been lacking and inconsistent in many ways. Now they function more uniformly and predictably, hopefully making them nicer to use for existing and new mod makers alike.

To mitigate the inconvenience for authors of existing mods, we wanted to make sure to get these changes done before leaving early access. Below is a summary on what has changed and what to do to make mods compatible. After this rework, we aim not to make any mod-breaking changes to the game, so hopefully it will be the last time you need to fix your mods.

Status effect changes:

We've addressed various inconsistencies in how the status effects are used.

  • Firstly, there are changes to the targeting logic. Previously, status effects with the target type "Character" targeted either the user (e.g. of an item or an attack) or the target character inconsistently. The item components affected were Projectile and MeleeWeapon. Attack definitions also suffered from this issue.

    This is now changed so that in these contexts, "Character" always refers to the user and "UseTarget" refers to the target. So, if your mod uses the status effect target "Character" to refer to the target, change this to "UseTarget".

  • Status effects can now consistently target a character, an item, or a structure, depending on the context. This allows for example triggering effects when a melee weapon hits a wall.

  • In some cases we'll now need to introduce restrictions in the definitions. For example, using a conditional to check whether the target is of the right type before triggering the status effect (<Conditional entitytype="eq Character"/>).

  • The MeleeWeapon component has a new attribute, "HitOnlyCharacters". By enabling this, the weapon doesn't register hits to walls or items at all. So if you want to use different effects on different targets, use the status effect conditionals.

  • In addition, all the status effects treating "OnUse" as the success state (as the counterpart for "OnFailure"), should now use "OnSuccess" instead. "OnUse" still works, but it will always trigger regardless of the skill or item requirement checks. In addition, If no skill or item requirements are defined, both OnUse and OnSuccess will trigger. Also note that status effects of type "OnUse" now trigger when the projectile is launched, not when it hits the target. For the latter, use "OnImpact".

Poisons rework:

Our primary goal was to make the poisons work on monsters, to make the Medic a more combat-capable job and on the whole increase the effectiveness of poisons in combat.

Specifically for modders, we've reworked how the skills are gained from doing damage or healing.
  • Instead of only using the universal multipliers defined in the SkillSettings.xml, there are now two new attributes for the afflictions: "WeaponsSkillGain" and "MedicalSkillGain".
    These should be used for defining how much the weapons or the medical skill is increased when the affliction is applied. Both default to 0, so be sure to define them for your custom afflictions.

  • Consequently, applying organ damage, which is the main source of poison damage on monsters, now boosts the medical skill instead of weapons skill like it used to. And due to this, applying buffs now also increases the medical skill of the applier.

Again, we apologize for the inconvenience, but by making these changes your mods will be compatible with Barotrauma 1.0 once it releases, and you should not need to change them again for the foreseeable future. Happy modding!
最后由 Vihis 编辑于; 2023 年 2 月 17 日 上午 5:14
< >
正在显示第 1 - 8 条,共 8 条留言
Lagmanor 10 2023 年 1 月 27 日 上午 10:41 
That's really great thing to know about in advance, thanks for the heads-up!
Lennic 2023 年 1 月 27 日 上午 10:57 
Awesome changes overal
Pulsarion 3 2023 年 1 月 27 日 下午 7:48 
Will these changes actually allow my characters to increase Afflictions on themselves upon attacking something? I couldn't increase my "Evolution" Affliction when attacking, while I see the Husk healing itself in nearly the exact same way I am attempting to alter my status.
Vihis  [开发者] 2023 年 1 月 30 日 上午 3:19 
引用自 Pulsarion
Will these changes actually allow my characters to increase Afflictions on themselves upon attacking something? I couldn't increase my "Evolution" Affliction when attacking, while I see the Husk healing itself in nearly the exact same way I am attempting to alter my status.

Hi!
I asked a dev who worked with the status effect rework and here's what they said:

The current husk attack has this definition which reduces affliction:

<StatusEffect type="OnUse" target="This" disabledeltatime="true"> <ReduceAffliction type="damage" strength="5" /> </StatusEffect>

In it, "this" refers to the head of the husk, which it uses to attack. If it were "limb" it would be the target limb, if it was "UseTarget" it would be the target character and if it were "Character" it would target the husk itself.
So it should work if it was something like:

<StatusEffect type="OnUse" target="Character"> <Affliction type="evolution" strength="1" /> </StatusEffect>

Previously that would have targeted the "target" but now it should make the custom effect possible.

Hope this helps!
Shnorfpph 5 2023 年 2 月 1 日 上午 1:16 
Hello everyone! I've got small prob:
I wanted to make the knife that after hitting character few times it drops several items(in this case meats) depending on the species. I tried to make my own knife and then took some code from thalassophobia, but it still didn't worked. Any tips about it? I'll be very grateful!
Vihis  [开发者] 2023 年 2 月 2 日 上午 3:20 
Hello everyone! I've got small prob:
I wanted to make the knife that after hitting character few times it drops several items(in this case meats) depending on the species. I tried to make my own knife and then took some code from thalassophobia, but it still didn't worked. Any tips about it? I'll be very grateful!
Hi!
Unfortunately I don't know enough about modding to answer, but you could try making your own post about this issue on this forum, that way more people will see it. Or join our Discord server and ask for help in the #baro-modding -channel. Link to our discord server: https://discord.gg/undertow
TheRestartPrincess 2023 年 6 月 2 日 上午 5:35 
引用自 Vihis
Hello all mod makers!
Is it possible to add more animations to the game, Because I cant seem to be able to find an .xml file where I can add additional animations using the NotDefined tag? I have copy and pasted an animation file and renamed all the important parts and added NotDefined to the type of animation part and put it in the animation file, but it does nothing.
最后由 TheRestartPrincess 编辑于; 2023 年 6 月 2 日 上午 5:37
NothingSuS 2023 年 12 月 8 日 下午 10:42 
Hello can you fix hostages because I have to stun them to get them in my sub and its annoying
< >
正在显示第 1 - 8 条,共 8 条留言
每页显示数: 1530 50