Advertisement
Kaedys

Untitled

Apr 24th, 2024 (edited)
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.17 KB | None | 0 0
  1. * Create your custom xenotype in-game, give it a name and icon, and save it.
  2.  
  3. * Go to Steam\steamapps\common\RimWorld.  If there's a "Mods" folder, enter it.  If not, create it first.  Inside this folder, make a new directory with your name or similar (ex. mine is called "Kaedys_Misc_Patches").  This folder will be your personal local mod.  I will refer to this directory below as the "local mod root folder".
  4.  
  5. * Inside that folder, make a new subfolder called "About".
  6.  
  7. * Inside /About, create a new file called About.xml.
  8.   * Give it the following content, filling in the Name and Author field (Name is how the mod will show up in-game).
  9.   * Give it a packageId as well, this simply needs to be something unique.  The packageId must be alphanumeric and must contain at least one period in the middle. The most common format is YourName.ModName.
  10.     * For example, mine is "kaedys.miscpatches"
  11.   * More information on this file can be found at https://rimworldwiki.com/wiki/Modding_Tutorials/About.xml
  12.  
  13. --- About.xml
  14. <?xml version="1.0" encoding="utf-8"?>
  15. <ModMetaData>
  16.   <name>INSERT MOD NAME HERE</name>
  17.   <author>INSERT YOUR NAME HERE</author>
  18.   <packageId>PACKAGE.ID</packageId>
  19.   <description>[...]</description>
  20.   <supportedVersions>
  21.     <li>1.2</li>
  22.     <li>1.3</li>
  23.     <li>1.4</li>
  24.     <li>1.5</li>
  25.   </supportedVersions>
  26.   <loadAfter>
  27.     <li>brrainz.harmony</li>
  28.     <li>Ludeon.RimWorld</li>
  29.     <li>Ludeon.RimWorld.Royalty</li>
  30.     <li>Ludeon.RimWorld.Ideology</li>
  31.     <li>Ludeon.RimWorld.Biotech</li>
  32.     <li>Ludeon.RimWorld.Anomaly</li>
  33.     <li>UnlimitedHugs.HugsLib</li>
  34.   </loadAfter>
  35. </ModMetaData>
  36. ---
  37.  
  38. * You have now successfully created your own local mod, though it is currently empty.
  39.  
  40. * In your local mod root folder (the one you created in /Rimworld/Mods in bullet 2 above, the one containing the About/ directory), create a new directory "Defs".
  41.  
  42. * Inside Defs/, create a new file called "yourxenotypename.xml", replacing it with the name of the xenotype you want exported.
  43.  
  44. * In this file, paste the following def template:
  45.   * The "defName" field must be filled with a UNIQUE name, global across the entire game.  This name will not appear in the game, it is simply used to identify your XenotypeDef as unique, and for patching it if you ever publish it.  Recommend prefixing your name to this to ensure uniqueness.  Example, one of mine is "KaedysAdamanten"
  46.   * The "label" field is the name for your xenotype in game.
  47.   * The two description fields are simply the description of the xenotype as it shows up in the Show Info window and in various tooltips (such as when mousing over the xenotype icon in the pawn's Info page)
  48.   * "inheritable" defines whether the xenotype is considered a germline/endogenes (true) or not.  If this is false, the only way to get more of that xenotype is if pawns spawn with it or if the xenotype has some form of injector or xenotype copy or similar.
  49.   * "displayPriority" doesn't really matter.  The value I included below means that it should appear at the end of the list, behind most any other mod-added xenotype.
  50.   * "iconPath" is tricky:
  51.     * For custom xenotypes, the files saves the icon defName, rather than the path, so if you're using a mod-added xenotype icon, you'll need to find the XenotypeIconDef for that icon in that mod's files.
  52.     * For core game icons, or if in doubt, the path is "UI/Icons/Xenotypes/Custom/CustomXenotypeIcon#", with "#" being 1-10.
  53.   * "genes" will be handled below.
  54.  
  55. --- XenotypeTemplate.xml
  56. <?xml version="1.0" encoding="UTF-8"?>
  57.  
  58. <Defs>
  59.   <XenotypeDef>
  60.     <defName>XenotypeDefName</defName>
  61.     <label>Xenotype Name</label>
  62.     <description>Xenotype long description.  Use \n to add new lines.</description>
  63.     <descriptionShort>Xenotype short description.</descriptionShort>
  64.     <inheritable>True/False</inheritable>
  65.     <displayPriority>-1003</displayPriority>
  66.     <iconPath>Icon/Path/See/Above</iconPath>
  67.     <genes></genes>
  68.   </XenotypeDef>
  69. </Defs>
  70. ---
  71.  
  72. * Go to AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Xenotypes.  Find the .xtp file with the name of your xenotype that you saved in-game in step 1.
  73.  
  74. * Open it in a text editor or IDE (ex. Notepad++).  Scroll down to the bottom of the file and find the "<genes>" block.  Copy the entire thing, include the opening and closing "<genes>" tags, and then replace the "<genes></genes>" line in your mod xenotype file with that block.
  75.  
  76. * IMPORTANT: To avoid confusion, rename this ".xtp" file to something like ".xtp.bak", to prevent the game from loading it as a custom xenotype, or you'll end up with two, your mod xenotype and your custom one of the same.
  77.  
  78. * Save the mod xenotype xml file and load up Rimworld.  In-game, go to the mod manager, find your new local mod in the list, and add it to your mod set, recommend at the bottom of the load order.
  79.  
  80. * Restart Rimworld, your xenotype is now a proper modded xenotype rather than a custom one.  It can also be referenced, via the defName above, for things like patches and other mod interactions.
  81.  
  82. * If you wish to add other custom xenotypes, they can all be in the same mod, so just start from the point where you created "yourxenotypename.xml" and work downward from there.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement