News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

When should parameters be stored in cityrules.tab?

Started by Matthew, Yesterday at 10:09:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthew

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?
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。