How can I config my mod's default "New Game" settings?

jerrybp

Chieftain
Joined
May 17, 2010
Messages
20
My problem is simple: I created a Mod and I have successfully defined the default settings for a "Custom Game". What I want is, in the mod's main menu, when the user hits "New Game", the games launches immediately a game with the mentioned Custom Game default settings without any further questions. How do I do it?

I suppose this is explained somewhere in the forums, but I can't seem to find it. Directions are appreciated.
 
Really??
So I'm basically forced to give the player the liberty to change settings, change maps, etc? I'm surprised!
 
Well, as the J said, you can force-load a world-builder save from your mods .ini (look Charlemagne mod\scenario for reference) - if you want your mod only have a single, pre-created map anyway, it's exactly what you need.

But i think there might be other options as well. For example the Final Frontier mod only allows to take it's own map-script. I am not sure, how it is defined, but you might want to dig there. That mods ini has this:
Code:
; Always start in the standard era
ForceStandardEra = 1
; Read Game options from XML, not .ini
ForceGameOptions = 1
; Allow public maps to be used with this mod
AllowPublicMaps = 0
NoCustomScenario = 1
So if you are able to hunt down that XML file, maybe you get some insight. Probably in the GameInfo folder. (The Civ4GameOptionInfos.xml there has tags for <bDefault>, <bVisible> possibly allowing to fix and hide at least the checkbox-options).

For Civs and Leaders at least, there is the <bPlayable>/<bAiPlayeable> tag in the XML, so you can lock players and or AI out from taking them.

Also, if anything else fails, i suppose, you could just delete all the unwanted difficulties from the Civ4HandicapInfos.xml, leaving the player with only one option to choose from (you will have to hunt down some dead references, but it should work). Probably similar things can be done to the CIV4WorldInfo.xml for size, and possible CIV4GameSpeedInfo.xml (tho i seem to vaguely remember, that adding or removing gamespeeds might cause some trouble with culture).

You should however also consider, if forcing players to certain restrictions would be a good design choice for a mod - it sounds like getting trough a lot of work, only to make your "customers" mad, because not being able to play the game in the way they want :rolleyes:
 
For ordinary game options, like "unrestricted Leaders" or "Raging Barbarians", you can set their default value and then set them to be hidden. SInce they are hidden, they won't show up on the list of options for a customs game and will therefore use the default value.

The main problem with this is that games can inherit option settings from other mods. The last used settings are stored in the CivilizationIV.ini file. This is why if you switch mods you can see that various options can start as selected. If you have hidden options there is no way for the player to know if they have inherited an incorrect setting for a hidden option, or change it back if it is. This might be avoided if the setting to force the XML options to be used is enabled. They also tend to get reset to the defaults if you run a game via "Play Now" instead of "Custom Game", so that is a way to avoid the "bad hidden settings" issue.
 
For example the Final Frontier mod only allows to take it's own map-script. I am not sure, how it is defined, but you might want to dig there. That mods ini has this:
Code:
; Always start in the standard era
ForceStandardEra = 1
; Read Game options from XML, not .ini
ForceGameOptions = 1
; Allow public maps to be used with this mod
AllowPublicMaps = 0

The last option is doing that. It essentially only allows maps/mapscripts which are delivered with the mod. Very handy, especially when you need to make adjustments there.
 
Top Bottom