Ramstormp
Warlord
- Joined
- Jan 13, 2020
- Messages
- 266
If you want to change the default settings of a random map like FaireWeatherTweakEx:Is there a way to save a setup configuration so you can do a re-roll without having to set up all the settings again? I would like the same settings but a different map generated.
Thanks!
-Go to the WeThePeople mod folder/PublicMaps and open FaireWeatherTweakEx.py with Notepad (or similar)
it is a bit confusing and counterintuintive but anyobody should be able to do it.
-Find the line which holds the word(s) 'getCustomMapOptionDefault' (use Ctr-F to popup a search box and write at least some of that in the box, click find next).
This is what you should see:
Code:
def getCustomMapOptionDefault(argsList):
"""
Returns default value of specified option
argsList[0] is Option ID (int)
Return an integer
"""
optionID = argsList[0]
if mc.mapOptionNames[optionID] == "distance":
return 1
elif mc.mapOptionNames[optionID] == "border north":
return 0
elif mc.mapOptionNames[optionID] == "border south":
return 12
elif mc.mapOptionNames[optionID] == "land allocation":
return 0
# TAC - Map scripts - koma13 - START
elif mc.mapOptionNames[optionID] == "regularity":
return 1
# TAC - Map scripts - koma13 - END
elif mc.mapOptionNames[optionID] == "colony catchment radius":
return CyGlobalContext().getDefaultCityCatchmentRadius()-1
return 0
The various numbers after the word 'return' corresponds to the item index value in the different option lists.
The counterintuitive and confusing part is that the index value of the top item in every list is a 'zero' and not a '1' like you would perhaps have expected.
So the first value is found at address '0', the 2nd item at '1', the 3rd line is at index '2' etc,
If you need to know what each value is in more detail, and don't want to start the game to find out, scroll up to to the previous function 'getCustomMapOptionDescAt(argsList)'
You will see:
Code:
def getCustomMapOptionDescAt(argsList):
"""
Returns name of value of option at specified row
argsList[0] is Option ID (int)
argsList[1] is Selection Value ID (int)
Return a Unicode string
"""
optionID = argsList[0]
selectionID = argsList[1]
if mc.mapOptionNames[optionID] == "distance":
if selectionID == 0:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_3_FIELDS", ())
elif selectionID == 1:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_4_FIELDS", ())
elif selectionID == 2:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_6_FIELDS", ())
elif selectionID == 3:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_8_FIELDS", ())
# TAC - Map scripts - koma13 - START
elif mc.mapOptionNames[optionID] == "border north":
if selectionID == 0:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_SELECT_NORTHERN_BORDER_0", ())
elif selectionID == 1:
return "75°N "
elif selectionID == 2:
return "60°N"
elif selectionID == 3:
return "45°N"
elif selectionID == 4:
return "30°N"
elif selectionID == 5:
return "15°N"
elif selectionID == 6:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_SELECT_EQUATOR", ())
elif selectionID == 7:
return "15°S"
elif selectionID == 8:
return "30°S"
elif selectionID == 9:
return "45°S"
elif selectionID == 10:
return "60°S"
elif selectionID == 11:
return "75°S"
elif selectionID == 12:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_SELECT_NORTHERN_BORDER_1", ())
elif mc.mapOptionNames[optionID] == "border south":
if selectionID == 0:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_SELECT_SOUTHERN_BORDER_0", ())
elif selectionID == 1:
return "75°N "
elif selectionID == 2:
return "60°N"
elif selectionID == 3:
return "45°N"
elif selectionID == 4:
return "30°N"
elif selectionID == 5:
return "15°N"
elif selectionID == 6:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_SELECT_EQUATOR", ())
elif selectionID == 7:
return "15°S"
elif selectionID == 8:
return "30°S"
elif selectionID == 9:
return "45°S"
elif selectionID == 10:
return "60°S"
elif selectionID == 11:
return "75°S"
elif selectionID == 12:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_SELECT_SOUTHERN_BORDER_1", ())
# TAC - Map scripts - koma13 - END
elif mc.mapOptionNames[optionID] == "land allocation":
if selectionID == 0:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_MANY_ISLES_0", ())
elif selectionID == 1:
return localText.getText("TXT_KEY_MAP_FAIRE_WEATHER_MANY_ISLES_1", ())
elif mc.mapOptionNames[optionID] == "regularity":
if selectionID == 0:
return "Very Irregular"
elif selectionID == 1:
return "Quite Irregular (Default)"
elif selectionID == 2:
return "Regular"
elif mc.mapOptionNames[optionID] == "colony catchment radius":
if selectionID == 0:
return localText.getText("TXT_KEY_MAP_CUSTOM_OPTION_CITY_CATCHMENT_RADIUS_1_PLOT", ())
elif selectionID == 1:
return localText.getText("TXT_KEY_MAP_CUSTOM_OPTION_CITY_CATCHMENT_RADIUS_2_PLOT", ())
return u""
So if you find your way back down to 'getCustomMapOptionDefault' again, you could for example write:
Code:
"if mc.mapOptionNames[optionID] == "distance":
return 3 ##(to make 8 Fields to Europe default)
elif mc.mapOptionNames[optionID] == "border north":
return 1 ##(to make the 75th parallel north the default northern limit)
elif mc.mapOptionNames[optionID] == "border south":
return 6 ##(to make the Equator the default southern limit)
elif mc.mapOptionNames[optionID] == "land allocation":
return 1 ##(to have many islands)
elif mc.mapOptionNames[optionID] == "regularity":
return 2 ##(to make the landmass somewhat Norwegian)"
Now, with the default radius Nightinggale has set it up so you change that in the file UserSettings.txt at the bottom of the WeThePeople mod folder.
but you could be lazy and dumb and change it here instead (you really should change it in UserSettings)
elif mc.mapOptionNames[optionID] == "colony catchment radius":
return 0 ##(if you want default to be 1 plot radius) .
Hope that was clear enough.
Last edited: