Modding:Mutations: Difference between revisions

1,455 bytes added ,  00:29, 26 June 2019
Added some more details
mNo edit summary
(Added some more details)
Line 418: Line 418:
</syntaxhighlight>
</syntaxhighlight>


== Additional Details ==
== XML Parameters and Additional Details ==


You may add the following elements to a <mutation> tag in Mutations.xml
You may add the following elements to a <mutation> tag in Mutations.xml
* Name
* Class
* Cost
* MaxSelected
* Constructor ''(optional)''
* Constructor ''(optional)''
* Exclusions ''(optional)''
* Exclusions ''(optional)''
* BearerDescription
* Code
* Code
=== Name ===
Name of the mutation as it appears in the character creation screen.
=== Class ===
The name of the .cs Class object that is used to instantiate your mutation object.
=== Cost ===
The mutation costs this many mutation points when a character selects it during the character creation process.
=== MaxSelected ===
The maximum number of copies of this mutation that can be selected during character creation.
Currently this is only used for Unstable Mutation and there is some hard-coded special handling of that mutation when it comes to details such as constructing a Build Library code for builds that include Unstable Mutation. It is not clear if this value can be set to more than 1 for a modded mutation without causing some problems.


=== Constructor ===
=== Constructor ===
Line 467: Line 486:
<mutation Name="Stinger (Confusing Venom)" Cost="3" MaxSelected="1" Class="Stinger" Constructor="Confuse" Exclusions="Stinger (Paralyzing Venom),Stinger (Poisoning Venom),Wings" BearerDescription="those with stingers tipped with confusing venom" Code="bx"></mutation>
<mutation Name="Stinger (Confusing Venom)" Cost="3" MaxSelected="1" Class="Stinger" Constructor="Confuse" Exclusions="Stinger (Paralyzing Venom),Stinger (Poisoning Venom),Wings" BearerDescription="those with stingers tipped with confusing venom" Code="bx"></mutation>
</syntaxhighlight>
</syntaxhighlight>
=== BearerDescription ===
It appears that this description is used in some of the random generation algorithms for villages and history in the game. For example, if a village reveres mutants with the Multiple Arms mutation, they might use the string defined in Mutations.xml ("the many-armed") to describe them in their praises or monuments.


=== Code ===
=== Code ===
The Code element value is used when constructing a Build Library code for characters you create.


The Code element value is used when constructing a Build Library code for characters you create.
It is unclear if there is really a "best practice" for codes. Probably one should avoid using the codes used by base game mutations, but conflict with other mods may be inevitable. It would appear that this code can be longer than 2 characters, but that is an untested hypothesis.