sadger / CorsixTH

Open source clone of Theme Hospital
Other
1 stars 0 forks source link

Config option for evacuating hospital #25

Open sadger opened 10 years ago

sadger commented 10 years ago

Currently the hospital will be evacuated when more than 10 patients are still infected. Perhaps we should make this a variable in the config if people want to make the epidemic easier or harder.

The value 10 I just made up as it sounded reasonable.

MarkL1961 commented 10 years ago

What about changing it to a percentage of the current visitors? 20% or more of them infected leads to evacuation. This too could be an option in the config, but I think a percentage is a little better than an actual number.

sadger commented 10 years ago

Yeah a percentage could work, I'll have a play with it and see if I can get a decent balance. How does one go about adding a config option these days?

MarkL1961 commented 10 years ago

Look at config_finder.lua

They are in two parts, there is a list of all the options and then each one has its own section further down. More to it if you want to add the option to a menu, but that can come later on

MarkL1961 commented 10 years ago

Had a thought about this too, the above would set a default config for the game that the player could change if they wanted (if the can find the config file). Perhaps though it would be better to set this up in the level file so that the map maker decides, but the player can still change if they wanted. I think if it is added into the level file, you would have to have alternate the game could use if it was not found.

At what point will the inspector evacuate your hospital. This percentage of all the patients or more in your hospital have to contagious when he arrives.

gbv.Evacuation_Minimum 10

sadger commented 9 years ago

I have added two config variables

Testing would be appreciated. Note, this will only work for new games, no saves!

Typically RepLossMinimum is less than EvacMinimum or will be ignored - the hospital will be evacuated anyway. If the total infected is less than both these variables but still > 0 i.e someone is still infected then just a fine will be applied with no reputation loss. This fits in with the fine strings from the original. This should give users flexibility about exactly when rep loss and evacuations are happening.

MarkL1961 commented 9 years ago

Not seeing any change to the config file, did you add them to config finder?

sadger commented 9 years ago

I did not put them in the config finder just added new config values to base_config.lua is this incorrect?

sadger commented 9 years ago

If you look at the commits I have been making you can see where it's changed.

MarkL1961 commented 9 years ago

If you have added them to base config that means there is no real option for the player to change the values unless they edit the lua file. If you were to also add them to config finder then the config text file gets updated and this is then easier for a player to make changes. Or is the intention that the player does not change these values, only the map maker? If that is the case then maybe you are right as you are.

sadger commented 9 years ago

Yes map maker, for all config values for epidemics I think we should only let the map maker change them then they can tweak the difficulty for potential players. Having it in the main config doesn't really make sense.

MarkL1961 commented 9 years ago

Okay, I'll update my epidemics map - the one I sent you - with these at some point and that way map makers can refer to it when creating their own.