Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Non-Human Races Base

This mod uses Client-Side lua, see the Lua for Barotrauma page for how to install it.

You must enable "C# Scripting" in LuaForBarotrauma's client settings, or else bugs may occur if you have other mods enabled.

You cannot select a non-human character when creating a singleplayer campaign. This is a limitation of LuaForBarotrauma.

Configures the game to allow players to select custom non-human characters

The mod loading order

'
ExoticRaces being whatever species mods you want

Any conflicts with other mods?

idk, probably


For Developers:

This mod is currently very untested, if you run into any issues or technical limitations please let me know

How do I get started making a human character?

As of writing, Barotrauma doesn't support human variants yet. So, if you want to create a human-like character, you'd have to copy-paste the Human character from your contents folder to your mod folder

Sadly, I cannot guide you on how to fully create a character, but what I can do is tell you to add UseHumanAI="True" to the Character tag's attributes (it is completely undocumented)

How do I set up my character with this?

Because of my lack of knowledge on custom content types technical limitations, this mod requires you to make a Lua file to register your character as a playable species. It's not as hard as you think it will be
Creating the files needed

  • Once you've finished creating your character, go into your mod's main folder
  • Create a folder named "Lua"
  • Create another folder inside of the "Lua" folder named "Autorun"
  • Create a new file and change it's file extension to .lua (you can name the file anything, it doesn't matter)

After that, your filepath should look like this:

Registering the species

Now, open the lua file you've created in any text-editing program (really, any!), and paste this code snippet into it.
local NHR = require("tonty.NonHumanRaces")

NHR.RegisterSpecies("species name here")

Here's an example of what it would look like if you had a character with the species name "Lizardperson":

And now you should be done. Starting a new server with all the mods enabled should list the species in your menu

Parameters (advanced case)

Some species may have special behaviour that requires them to be opted out of some NHR features. They can do so using a parameter table as a second argument when registering a species.
These are the current parameters:

  • uses_default_husk: (bool, true) If the registered species should also opt-in for Human affliction targeting. If false, they will not be able to gain the base game husk afflictions (husk, spineling spines, mudraptor beak). Useful if you have your own implementation.

Known Issues

  • Trying to join a server that doesn’t have this mod enabled could crash your game. Maybe
  • Certain UI elements won't update correctly
  • Yes, registering species is not the most developer-friendly experience. I'm looking for a better method
  • Saving characters could break... really badly
  • Mods that alter the default human character currently have broken sprites if they are loaded after (under) NHR. Loading it before NHR will make them appear correctly.