Editing Modding Tutorials/Xenotypes

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 299: Line 299:
  
 
== Adding xenotypes to generated pawns ==
 
== Adding xenotypes to generated pawns ==
{{Stub|section=1|reason=More details on how pawnkind and ideoligion generation affects xenotype selection. Information on <code>MustBeCapableOfViolence</code> flag on pawn generation request.}}
+
{{Stub|section=1|reason=More details on how pawnkind and ideoligion generation affects xenotype selection}}
 
[[Factions]] have their distribution of xenotypes set in their faction def at the top level by the following:  
 
[[Factions]] have their distribution of xenotypes set in their faction def at the top level by the following:  
 
<pre>
 
<pre>
Line 311: Line 311:
 
</pre>
 
</pre>
 
<small>Note: The above is for a faction that is not defined by the [[Biotech DLC]], hence the may require. This difference is irrelevant to the interpretation method chosen.</small>
 
<small>Note: The above is for a faction that is not defined by the [[Biotech DLC]], hence the may require. This difference is irrelevant to the interpretation method chosen.</small>
These values are then interpreted one of two ways.
+
These values are then interpretted one of two ways.
 
First:
 
First:
 
If the values add up to less than 1.0, then they are interpreted as percentage chances for a pawn, absent any other xenotype selections, to be that xenotype, with the remainder being the chance to be a baseliner. In the above example, as the sum of 0.05, 0.15, and 0.10 is only 0.30. As this is less than 1.0, there is a 5% chance for a pawn from that faction to be a [[neanderthal]], a 15% chance to be a [[hussar]], a 10% chance to be a genie, and a 70% chance to be baseliner.  
 
If the values add up to less than 1.0, then they are interpreted as percentage chances for a pawn, absent any other xenotype selections, to be that xenotype, with the remainder being the chance to be a baseliner. In the above example, as the sum of 0.05, 0.15, and 0.10 is only 0.30. As this is less than 1.0, there is a 5% chance for a pawn from that faction to be a [[neanderthal]], a 15% chance to be a [[hussar]], a 10% chance to be a genie, and a 70% chance to be baseliner.  
Line 329: Line 329:
 
Neanderthals have a (999/999)*100%, or a 100% chance to be selected.
 
Neanderthals have a (999/999)*100%, or a 100% chance to be selected.
  
Additional xenotypeSet definitions can be made in [[memes]]{{Hover title|link=no|At the time of writing (version 1.4.3704), no memes in the official content contain xenotypeSet definitions.|<sup>[Note]</sup>}} and PawnKinds. Whenever a pawn generation request is made, the generator sums the xenotype chances from the faction, the PawnKind, and each meme of the faction's primary ideoligion. The totals are then interpreted as either probabilities or weights, as described above.
+
Additional xenotype definitions can be made in the ideoligion and pawnkind. Whenever a particular pawn generation request is made, it adds up all the xenotype chances from its Faction, Ideology, and PawnKind together, in that order.
 
 
For example, suppose a pawn is generated using the faction at the top of this section and a PawnKind with the following configuration:
 
<pre>
 
    <xenotypeSet>
 
      <xenotypeChances>
 
        <Highmate>0.25</Highmate>
 
        <Genie>0.15</Genie>
 
      </xenotypeChances>
 
    </xenotypeSet>
 
</pre>
 
The chances will be added together, resulting in Neaderthal=0.05, Hussar=0.15, Genie=0.25 (from adding 0.10 and 0.15), and Highmate=0.25. The total of all of these is 0.7, leaving baseliners with a chance of 0.3.
 
 
 
Note that a PawnKind may have <code><useFactionXenotypes>false</useFactionXenotypes></code>, which causes the faction's xenotypeSet to be ignored.
 
 
 
 
[[Category: Modding tutorials]]
 
[[Category: Modding tutorials]]

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)