PLS how to change mortar attack time.

Started by kaiserle, March 21, 2017, 12:51:40 AM

Previous topic - Next topic

kaiserle

PLS is anyone knows how to change mortar attack time.i wanner change the time between two shoot.

RawCode


Apfelkuchenbemme

The easiest way to change that would be to go to the "Buildings_Security.xml" file under the path "Steam\steamapps\common\RimWorld\Mods\Core\Defs\ThingDefs_Buildings" and directly change the <turretBurstCooldownTime> in row 221.



On a sidenote, someone on the forum has advised against directly changing things in the core because that can lead to incompatibilities with other mods. I'd guess that directly changing the cooldown of a mortar isn't exactly that gamebreaking, but how would you implement this change otherwise?

I mean, the <turretBurstCooldownTime> is defined in the <ThingDef Name="BaseArtilleryBuilding" ...>, so I can't just smack a file in a mod that says

<?xml version="1.0" encoding="utf-8" ?>
<Defs>
   <ThingDef Name="BaseArtilleryBuilding" ParentName="BuildingBase" Abstract="True">
     <turretBurstCooldownTime>3.5</turretBurstCooldownTime>
   </ThingDef>
</Defs>


because there ALREADY IS a <ThingDef Name"BaseArtilleryBuilding" ...>.

Sooo, how do you add a file that changes a value by editing only this value for an existing def?

Granitecosmos

Quote from: Apfelkuchenbemme on March 21, 2017, 03:35:32 AM
Sooo, how do you add a file that changes a value by editing only this value for an existing def?

You can't do that with xml. You'll have to copy-paste the whole def, change that one line, then make a mod for it if you don't want to edit Core files. Incompatibilities would be an issue only if you radically change an existing thing in Core. A simple cooldown timer change shouldn't be a problem. It is best to always make a mod for whatever changes you want to implement simply because screwing up the Core too much leads to reinstallation (unless you have a backup copy of your Core, obviously) and it's a lot easier to manage a mod with a few files than to remember which files you changed in Core.

Since your mod changes an existing thing it'll be incompatible with any other mod that changes the same thing.

kaiserle

Thx  everyone for help.i am making my own mod.So i need change this.
And i have found <turretBurstCooldownTime> in Buildings_Security.xml.
Thx a lot. Especially Apfelkuchenbemme.