Rules_GetSettingNumber

In the AI scope there are these functions which can used to retrieve game rule settiings:

StartWithMode = Rules_GetSettingString("startwith", 1.0)
ResearchMode = Rules_GetSettingNumber("research", 1.0)
ResourceMode = Rules_GetSettingNumber("resstart", 1.0)
HyperspaceMode = Rules_GetSettingNumber("hyperspace", 1.0)
print("SETTINGS: " .. StartWithMode .. "; " .. ResearchMode .. "; " .. ResourceMode .. "; " .. HyperspaceMode)

They seem to work, but what are the numbers for at the end each function call? I can’t seem to figure out their purpose.

If the setting doesn’t exist, it defaults to that number.

2 Likes