After roughly 5 years of lurking through this forum, i registered today to say: Thanks for creating this
For me it's one of the best additions to OTTD for uhm... years
I decided to look into the API after i stumbled across the "Neighbors are important" Script, as my pals all agreed that growing cities was far to easy. The description of the script and the way Goals work were confusing to us, so i took a look at the code and edited the script to fit our needs (If Zuu reads this... now that i have registered: thanks for the script! prepare to get a list of suggestions soon too).
As for Thinkbrain: I hope you're still motivated to extend the API and here is my short list of suggestions.
Script Setting Categories
When modding/scripting I like to offer users a wide variety of options so it's comfortable and understandable for them to adjust the game to their liking. I really like how the AddSetting and AddLabel functions work right now, but i'd love to be able to sort my Settings into Categories (and possible Subcategories) similar to the ext.GameOptions to keep things in order
Town Growth with unreached CargoGoal
Maybe implement a way to have Towns grow even without CargoGoals having been reached. Possibly an optional third value to pass to
GSTown::SetGrowthRate( TownID town_id, uint16 days_between_town_growth, uint16 days_between_town_growth_without_cargo )
or something alike
As of now i either have to set all town cargo goals to 0 and therefor disabling them or "show" them and growing stops instantly. If i want a town to grow really slow, while having goals that are unfullfilled, i am out of options.
Town Growth Rate NONE-Setting
Currently if a script wants to stop a town from growing it can either set the growrate to something like 100 years or set an unreachable Goal. I would like an option to simply set the TownGrowth to nothing as it will be less confusing for the users. Alternatively a town which grows less often then X is considered not growing, but i'd prefer setting GrowRate to 0, null, -1 or something similar.
Industry Adjustments
Similar to the city adjustments it would be wonderful if GSIndustry had functions to adjust the overall production of the industries. This would open lots of possibilities for economy scripting like recessions, rewards, "missions", etc. As a bonus GRFs like FIRS could get a lot spicier
As for an extension wishlist i'd say:
- GSIndustry::SetProduction(industry, value)/FactorizeProduction(industry, factor)
- GSIndustry::SpawnNearTile(tile, ind_type)
- GSIndustry::SpawnNearTown(town, ind_type)
- GSIndustry::SpawnRandom(ind_type)
- GSIndustry::GetLastSpawned()
- GSIndustry::Close(industry)/Remove(industry)
Boolean Settings Buttons
Would love to have Red/Green Boolean Buttons for added settings. It's mostly eyecandy and usercomfort, but would be a nice addition nonetheless.
Comments and Feedback appreciated. List will probably grow larger over time, but for now: Work is done!
I'll head home now and eat a steak