How do you disable settlers and razing cities?

samthedagger

Warlord
Joined
Jul 8, 2009
Messages
134
I have absolutely no idea how to do any of this modding business so I figured I would consult with the experts. What I want to do doesn't seem to be possible through the World Builder and it is pretty simple so hopefully I don't have to learn a whole lot to do it. As is, the Next War Mod allows settlers to be built and cities to be razed, meaning in theory, you could tear up the whole map and wind up with something completely different from what you started by the end. It's also disconcerting for me to play an alternate reality Earth map when the AI starts putting cities named Novgorod where Amsterdam should be. All I want to do is disable the settler unit and the option of razing cities, hence you are stuck with the cities you begin with from the get-go, making this more of the strategy war mod it was intended to be rather than a race to colonize the gaps left on the map. How would I go about this? Thanks in advance for helping a n00b.
 
Code:
		<GameOptionInfo>
			<Type>GAMEOPTION_NO_CITY_RAZING</Type>
			<Description>TXT_KEY_GAME_OPTION_NO_CITY_RAZING</Description>
			<Help>TXT_KEY_GAME_OPTION_NO_CITY_RAZING_HELP</Help>
[B]			<bDefault>1</bDefault>
			<bVisible>0</bVisible> (optional)[/B]
		</GameOptionInfo>
 
That looks like it will turn off city razing. TYVM for that. :)

Can anyone help me with disabling settlers?
 
Easy to disable settlers. I'm presuming you know how to create a mod folder and all that. Don't alter the original game files.

In civ4unitinfos.xml (you can open it in notepad), find the settler and change it's cost to -1. It will be unavailable, although some may still be popped from huts. But you can remove that too, in civ4handicapinfo.xml you just remove all references to GOODY_SETTLER.
 
I've got the settlers to work. Thank you, frekk. I presume I could use the same method to disable any unit in the game. A useful tool to have in my modding box.

Into which file do I put a GameOptionInfo? I would guess in the Game Info folder for the mod, but there doesn't seem to be a similar reference within any files. Help would be much appreciated. By the way, does anyone know of an article somewhere that explains the basics of modifying XML and Python (I understand Python is more difficult)? I've been lurking around the site for a while but I haven't seen anything of that nature. I did see a Python for Dummies book at Barnes and Noble the other day and thought about picking it up...
 
NM, I figured it out by looking at another mod that had a gameoptioninfo file. Thx again to all who helped!
 
NM, I figured it out by looking at another mod that had a gameoptioninfo file. Thx again to all who helped!
Dear, for the code to turn off the city razing, how to find or enter the code? in the database folder? Could you elaborate on it? I am totally new. Thanks!
 
Dear, for the code to turn off the city razing, how to find or enter the code? in the database folder? Could you elaborate on it? I am totally new. Thanks!

If you start a custom game or custom scenario you can simply turn on the "No City Razing" game option during game setup.
You can also permanently turn on that option in your mod named mod_name by editing ...\mod_name\Assets\XML\GameInfo\CIV4GameOptionInfos.xml and setting
Code:
       <GameOptionInfo>
           <Type>GAMEOPTION_NO_CITY_RAZING</Type>
           <Description>TXT_KEY_GAME_OPTION_NO_CITY_RAZING</Description>
           <Help>TXT_KEY_GAME_OPTION_NO_CITY_RAZING_HELP</Help>
           <bDefault>1</bDefault>
           <bVisible>0</bVisible>
       </GameOptionInfo>
 
If you start a custom game or custom scenario you can simply turn on the "No City Razing" game option during game setup.
You can also permanently turn on that option in your mod named mod_name by editing ...\mod_name\Assets\XML\GameInfo\CIV4GameOptionInfos.xml and setting
Code:
       <GameOptionInfo>
           <Type>GAMEOPTION_NO_CITY_RAZING</Type>
           <Description>TXT_KEY_GAME_OPTION_NO_CITY_RAZING</Description>
           <Help>TXT_KEY_GAME_OPTION_NO_CITY_RAZING_HELP</Help>
           <bDefault>1</bDefault>
           <bVisible>0</bVisible>
       </GameOptionInfo>
Is it the same to do it in Civ 6? or how to disable the razing cities in Civ 6? Thank you for answering!
 
Is it the same to do it in Civ 6? or how to disable the razing cities in Civ 6? Thank you for answering!
You should ask that in their modding section. Most of us are here because we don't like games newer than 4 and thus don't know anything about modding them. :)
 
Back
Top Bottom