FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.77k stars 408 forks source link

Modding issue: <Character speciesname=""> turns anything to humans #12533

Closed Alpharius-30-milenium closed 1 year ago

Alpharius-30-milenium commented 1 year ago

Disclaimers

What happened?

So, basically this thing turns any race that is in "" to human. It gives the character ability to use items and inventory (what I wanted to get) but at the same time it turns character to regular human in it's properties. It makes your character needs air, vulnerable to pressure but resists to damage from ragdoll file are still work. I guess it overrides only character.xml

I also want to show what exactly happening because in text I might explain not good enough what I mean.

https://youtu.be/vFvtxgRX2Yg

  1. In 1-st part of the video I spawn character via console in sub editor and it have normal properties (like no suffocation in water)
  2. In 2-nd part of the video same character gets spawn via NPC set and... He suffocates and vulnerable for water pressure, and also seems that it have lower resists.

I tried dealing with this thing by myself by adding some immunity afflictions but it's not working because if character spawns as NPC he simply not getting afflictions that he supposed to have.

Reproduction steps

  1. Create character that have HasInfo set to true
  2. Set up option like NeedsAir="" to whatever you want
  3. Create NPC with usage of that code block:
      <Character speciesname="YourCharacter">
        <job name="YourJob" identifier="YourJob">
          <skill identifier="electrical" level="55" />
          <skill identifier="mechanical" level="55" />
          <skill identifier="weapons" level="75" />
          <skill identifier="medical" level="55" />
          <skill identifier="helm" level="55" />
        </job>
      </Character>
      <ItemSet commonness="1">
        <Item identifier="idcard" equip="true"/>
      </ItemSet>
  4. Add this NPC to outpost config/random events of campaign/single missions
  5. See the result

Bug prevalence

Happens every time I play

Single player or multiplayer?

Happens in both single player and multiplayer

-

No response

Version

v1.0.21.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

Alpharius-30-milenium commented 1 year ago

Oh, code didn't get copied... Well, I will send zip with all files from example then. Necronwarrior.zip

NilanthAnimosus commented 1 year ago

Tested against Release/traitor-update commit https://github.com/Regalis11/Barotrauma-development/commit/bfc61bdccee7567cee8afe3a0a471d562c2d1196

Modified the provided files to work as a loadable mod (with anything extra removed/changed to not throw different kinds of errors) which can quickly be used in an outpost via leveleditor to spawn a necronwarrior and compare the two different spawn methods.

Necronwarrior.zip

Noticed some peculiarities with this when its spawned from npc sets over spawn commands, Indeed the ragdoll's damage modifiers are not whats set in the ragdoll limbs, nor the oxygen or pressure aspects of the character.

The species is clearly used graphically and not simply set to human limb graphics (Which should be tied to the ragdoll's defined sprite textures, which should imply it should have used those damage modifiers as their set in the limbs too?)

Given the above, not sure if their turned to "Human" or something unusual is occuring in the method used to spawn them (Such as ignoring aspects of the ragdoll or changing the species partway into spawning the character?)

Regalis11 commented 1 year ago

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/3646a93d0e482474660d04b00ccb4699de0529b9

Jasontti commented 1 year ago

Tested with Nilanths file and similarly as in video from original ticket. Creature retained it's properties no matter how it was spawned. Closing ticket.