Part of issue #5304, but deserving his own ticket:
When generating a new game a GameScript should have 2500 ticks to initialize everything it wants as long as it doesn't call Sleep(). However this is currently broken since not only a sleep but also any DoCommand will stop the initialization and start the game. These 2500 ticks could be increased easily, it then doesn't take any time at all to call SetCargoGoal on all towns. I've discussed this with frosch and we both think this is a better solution than introducing a function that works on all towns since such a function would be pretty limited.
This issue has been automatically marked as stale because it has not had any activity in the last two months.
If you believe the issue is still relevant, please test on the latest nightly and report back.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.