-
Notifications
You must be signed in to change notification settings - Fork 24
Traits Creation
Traits are located in json files in game/content/db/traits folder. You can add new traits to the files, or create a new json file for your traits, it doesn't matter. However, considering the game updates may rewrite existing json files, it's probably better to create your own files. Files names should start with "traits_".
Not all traits can be created easily.
-
Main personality traits control how character speaks. So if you create a new one it means you need to add lots of new dialogues to the game, which is way too much for a simple modding. Main personality traits are located in traits_personality.json. These traits have a special field, "personality", to separate them from others.
-
Base elemental traits are hardcoded. You can find them in traits_elements.json, in the beginning of the file. In order to add new elements you need to make them meaningful by adding spells and skills using them, so it's a lot of work. Base elemental traits have a few special fields: "font_color" controls the color of text when we show damage dealt by this element; and "elemental" should be true for base elemental traits.
Additionally, they use field like "el_damage" and "el_defence" to affect elemental attack and defence, but these fields can be freely used by any traits. There are plenty of other traits related to elemental damage, but they are not base elemental traits and don't have the "elemental" field. For example Fire Immunity.
- Race traits can be created freely, but they require icons. Races are located in traits_races.json, if you open it you will see that every trait has "icon" field. This way you specify the icon for your trait. These traits have a special field, "race", to separate them from others.
All other traits can be added easily.
Now let's talk about traits fields meaning.
-
"id" is a trait name. It will be used in interface as trait name, and it must be unique. This field is the only one that is absolutely required.
-
"desc" is description shown in the game. Can be any text.
-
"icon": path to trait icon. Only personality, elements and race traits use it at the moment.
-
"blocks" is the list of traits that characters cannot have no matter what as long as they have the trait.
-
"min" and "max": how trait modifies min and max values of stats, such as charisma.
-
"mod_stats": controls how trait changes current stats. It has two meanings: for most stats
"charisma": [1, 2]means that trait gives +1 to charisma every 2 levels. But for upkeep and disposition the second number is ignored, and the value applies only once. So you can write"upkeep": [10, 0]to increase upkeep by 10 as long as characters have this trait. Note that even though the second number is ignored, it still should be there for the sake of readable json file. -
"mod_skills": how trait affects skills. It expects 3 numbers. The first number controls speed of improving practical part of a skill, the second one controls speed of improving theoretical part of a skill. The third number increases or decreases skill value itself. If you want to change only one value, others should be 0, you can't just skip them. For example
"mod_skills": {"strip": [0, 0, 0.25]}will increase strip skill by 25%, and"mod_skills": {"strip": [-.05, 0.05, 0]}slows down speed of improving practical by 5%, but increases speed for theoretical part of skill. To learn more about skills check the ingame encyclopedia. -
"effects": effects added by the trait. Effects are hardcoded and have unique logic, so using them in modding won't be simple unless you use already existing ones. You can check traits json files to see what kinds of effects we use, or read more about them in ingame encyclopedia.
-
"character_trait": should be true for all traits that girls can use.
-
"MC_only_trait": should be true for all traits that only the main character can use.
-
"permanent": if true, trait cannot be removed without using cheats.
-
"market": if true, the trait is visible when you look at the character before buying her on the slave market. Traits without this field will be visible only after you buy the character.
-
"breasts": should be true for breasts traits. Character can have only one "breasts" trait.
-
"body": should be true for body traits (such as Slim). Character can have only one "body" trait.
-
"el_damage": changes elemental damage dealt by a character with this trait. For example
"el_damage": {"fire": 0.15}increases all fire damage by 15%. -
"el_defence": changes elemental damage dealt to a character with this trait.
-
"mod_ap": changes the amount of character's action points.
-
"client": should be true for traits available for clients generated by the game.
-
"evasion_bonus": modifies the chance of evasion, expects three numbers. First number is modifier at level one, third number is level, second is modifier at the level set by third number. So with
"evasion_bonus": [-5, 5, 10]character will have 5% less chance of evasion, but with every level the chance will increase, until it becomes +5% at level 10. You can skip levelling by setting the level to 1, for example"evasion_bonus": [5, 5, 1]will give +5% chance immediately at level one. -
"defence_bonus": gives flat bonus to defence from a certain delivery type. Existing types are "melee", "ranged", "magic" and "status". For example, bow attacks are ranged, and poison attacks are status.
-
"defence_multiplier": multiplies defence from a certain delivery type.
-
"delivery_multiplier": multiplies damage dealt by character depending on delivery type.
-
"delivery_bonus": gives flat bonus to attack of a certain delivery type.
-
"damage_multiplier": multiplies all damage dealt by a character, no matter its element and delivery type.
-
"ch_multiplier": changes the base chance of critical hit.
-
"resist": makes character completely immune to a certain element no matter what.
-
"el_absorbs": in addition to immunity, a character restores health if attacked by this element.