shann_ Posted April 9, 2020 Share Posted April 9, 2020 I felt like the pregnancy duration is a little long, I tried changing it from the mod's code but since I am an average person with 0 programming experience, I just managed to give myself a headache. Help would be appreciated. Link to comment
nugerumon Posted April 10, 2020 Share Posted April 10, 2020 I haven't tested it, but I assume you only need to change the gestationPeriodDays property of whatever race you want to change: Humans: <?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationSequence"> <success>Normal</success> <operations> <li Class="PatchOperationReplace"> <xpath>/Defs/ThingDef[defName="Human"]/race/gestationPeriodDays</xpath> <value> <gestationPeriodDays>45</gestationPeriodDays> <!-- change this number --> </value> </li> </operations> </Operation> </Patch> "BasePawn" - not sure what this entails, definitely humans, very likely other playable races, but don't know about animals. Animals probably require other patches. <?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationSequence"> <success>Normal</success> <operations> <li Class="PatchOperationReplace"> <xpath>/Defs/ThingDef[@ParentName="BasePawn"]/race/gestationPeriodDays</xpath> <value> <gestationPeriodDays>45</gestationPeriodDays> <!-- change this number --> </value> </li> </operations> </Operation> </Patch> Also it's not necessary to make it a PatchOperationSequence if you only do one patch but meh. Further reading: https://www.rimworldwiki.com/wiki/Modding_Tutorials/XML_file_structure https://www.rimworldwiki.com/wiki/Modding_Tutorials/PatchOperations So far, no C# or compiling required. 2 Link to comment
shann_ Posted April 10, 2020 Author Share Posted April 10, 2020 4 hours ago, nugerumon said: I haven't tested it, but I assume you only need to change the gestationPeriodDays property of whatever race you want to change: Humans: <?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationSequence"> <success>Normal</success> <operations> <li Class="PatchOperationReplace"> <xpath>/Defs/ThingDef[defName="Human"]/race/gestationPeriodDays</xpath> <value> <gestationPeriodDays>45</gestationPeriodDays> <!-- change this number --> </value> </li> </operations> </Operation> </Patch> "BasePawn" - not sure what this entails, definitely humans, very likely other playable races, but don't know about animals. Animals probably require other patches. <?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationSequence"> <success>Normal</success> <operations> <li Class="PatchOperationReplace"> <xpath>/Defs/ThingDef[@ParentName="BasePawn"]/race/gestationPeriodDays</xpath> <value> <gestationPeriodDays>45</gestationPeriodDays> <!-- change this number --> </value> </li> </operations> </Operation> </Patch> Also it's not necessary to make it a PatchOperationSequence if you only do one patch but meh. Further reading: https://www.rimworldwiki.com/wiki/Modding_Tutorials/XML_file_structure https://www.rimworldwiki.com/wiki/Modding_Tutorials/PatchOperations So far, no C# or compiling required. You're a life saver! Thank you! 1 Link to comment
dantman12321 Posted September 7, 2020 Share Posted September 7, 2020 sorry if its obvious and im just blind but what file is this in as i searched though the files but couldn't find anything thank you in advance Link to comment
nugerumon Posted September 7, 2020 Share Posted September 7, 2020 13 minutes ago, dantman12321 said: sorry if its obvious and im just blind but what file is this in as i searched though the files but couldn't find anything thank you in advance You have to put it in your own file. Mini-Tutorial (of sorts - I'm sure there are better to be found): In your mod directory, make a new folder for your mod. In that folder make two folders: "About" and "Patches" In the "About" folder, you need an "About.xml" - probably easiest to copy one from another mod and edit all the things. In the "Patches" folder, make a new file, name it anything you want (just make sure it ends in ".xml") and paste whatever patch operation you want. See above for examples and refer to the wiki (and original Rimworld Defs) for more information. Link to comment
dantman12321 Posted September 8, 2020 Share Posted September 8, 2020 thank you i thought i was being blind glad to know thats not the case Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now