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.
Is it possible to add modded weapons to NPC's without making significant overrides?
I recently made a weapon mod with a single weapon, and I tried to make an NPC patch that adds it to station security, pirates and bandits, but to no avail.
I tried making a new type of NPC and modifying mission data to include them in spawning, but either I did something wrong or it's not possible (Probably did something wrong, but I can't figure it out.).
Trying to override only the specific NPC you want to (Like securitynpccoalition) results in a bunch of errors cause it also deletes all the other entries.

So, is there any way I can do this without making literally everything else in the file incompatible with other NPCPrefab overrides? (Seems like the first method is the most promising.)

Thanks!
< >
Showing 1-1 of 1 comments
I managed to figure it out after trying from scratch again. Went with what I tried to do before, I'll post the code for anyone that is running into the same problem.
For the Sub vs Sub override, I did something like this in the characters section:
<Characters> <Character typeidentifier="separatistcaptain" minamount="1" maxamount="1"/> <Character typeidentifier="separatistsecurity" minamount="2" maxamount="5" /> <Character typeidentifier="separatistsuppressor" minamount="0" maxamount="2" /> <Character typeidentifier="separatistmechanic" minamount="1" maxamount="1" /> <Character typeidentifier="separatistengineer" minamount="1" maxamount="1" /> </Characters> [...] <CharacterType typeidentifier="separatistsuppressor"> <Character identifier="separatistsecuritysuppressor" from="custom_NPC" preferreddifficulty="50"/> </CharacterType> [...]
The separatistsecuritysuppressor is the custom npc prefab, I'm not sure if just placing it into separatistsecurity is fine or not, so you'll probably have to figure that one out.

For the abanoned outposts override in the Characters section:
<Character identifier="bandit" from="abandonedoutpostnpcs" moduleflags="crewmodule"/> <Character identifier="bandit_suppressor" from="custom_NPC" moduleflags="crewmodule" /> <Character identifier="bandit" from="abandonedoutpostnpcs" moduleflags="researchmodule" multiplayeronly="true"/> <Character identifier="bandit_suppressor" from="custom_NPC" moduleflags="engineeringmodule"/> <Character identifier="bandit" from="abandonedoutpostnpcs" moduleflags="engineeringmodule" multiplayeronly="true"/> <Character identifier="bandit" from="abandonedoutpostnpcs" moduleflags="securitymodule" /> <Character identifier="bandit_suppressor" from="custom_NPC" moduleflags="securitymodule" multiplayeronly="true" /> <Character identifier="bandit" from="abandonedoutpostnpcs" moduleflags="seccrewmodule" /> <Character identifier="bandit" from="abandonedoutpostnpcs" moduleflags="seccrewmodule" multiplayeronly="true"/> <Character identifier="banditleader" from="abandonedoutpostnpcs" spawnpointtags="banditleader"/>
The bandit_suppressor is the custom class. It's simpler than submarines, as I think it's just the spawn list.

For the npc prefabs themselves, I just made a custom NPC set and put all the prefabs in that, so it should be coflictless. Well, at least with NPC prefabs, this overrides mission data, so that could just be shoving the problem in another direction. At least it's compatible with NPC health mods.
< >
Showing 1-1 of 1 comments
Per page: 1530 50