Delete or Update?

Jabarto

Emperor
Joined
May 15, 2007
Messages
1,025
Location
Colorado, U.S.
I'm making a mod that redesigns the game's policies, and I've come across an odd problem. See, my mod doesn't actually add or remove any of the policies; it just gives the existing ones different effects. For example, I changed "Citizenship" to give a 25% combat bonus when inside cultural borders, instead of increasing worker speed by 25%.

So what I need to do is get rid of the <WorkerSpeedModifier> tag. What I'm unsure of is whether I need to use the Delete function or the Update function to accomplish this. Should I use Update to set the modifier to zero? Or do I need to use Delete to erase the field? Because I read the modding guide and I don't see how to delete a field for one specific policy.
 
I'd like to know if using <delete> would render that null, to me the way this game is structured with mods, the default value would come back? I'd say use the <update> command.
 
I'd like to know if using <delete> would render that null, to me the way this game is structured with mods, the default value would come back? I'd say use the <update> command.

That's what I was thinking. Kael, in his guide, recommended disabling assets rather than deleting them, so I thought the Update function might be better, but I wanted to make sure that an empty field wouldn't cause any issues first.
 
I'd like to know if using <delete> would render that null, to me the way this game is structured with mods, the default value would come back? I'd say use the <update> command.

The default value is zero, so delete and update would do the same thing.
 
Just what Morlark said. The values are simply a table with tons of 0's for most of the fields... setting it to 0 will simply make it default again and have no effect.
 
Thanks guys. I've decided to use Delete because I don't know how else to remove a free promotion from a policy. I wanted to know, though, if the Where condition will work with Delete. I want to get rid of the <WorkerSpeedModifier> from Citizenship, for example, not delete every instance of it in the entire file.
 
Back
Top Bottom