The International Simutrans Forum

Development => Technical Documentation => Topic started by: Matthew on March 10, 2026, 10:09:56 PM

Title: When should parameters be stored in cityrules.tab?
Post by: Matthew on March 10, 2026, 10:09:56 PM
I am deciding where to store a new parameter and I can't find any explanation of why some parameters are stored in cityrules.tab (and accessed in simcity.cc) and some are stored in simuconf.tab (and accessed in settings.cc).

Based on the code, I think that the values of cityrules.tab parameters are not saved in the savegame, except by network servers (so that clients all have the same values), whereas the values of simuconf.tab parameters are saved in the savegame. But I might have misunderstood, because I don't see why this is a useful thing to do.

The other factor is that cityrule.tab only contains parameters that are used in stadt_t, but it's not obvious to me why this class gets its own file, given that simuconf.tab has many parameters used all over the game. Is it just an accident of history or does this solve a problem?