This thread will be to hold scripting ideas/progress... I have added a few scripts, totaling about 15,000 lines of code thus far. Working smoothly. I am putting together the Trade and Supply script which is more or less made up of chunks of code and then a variable taken from each chunk ties all the chunks together. So its possible to test each chunk individually without the need for other parts. Much like my recruitment limitation mod how all the parts work individually but make up a bigger 'whole'. The trade and supply script will affect both AI and the player and trade agreements will be affected as planned... The hunting EDB-Event building will be not used as after writing the script it will slow end turn down just by itself as it needs to be far too detailed to work as i was hoping. Instead, hunting will be offered as a random interactive event.
The Trade and supply script is complete more or less. All that is needed is adding the event_counters to the EDB which limits construction/recruitment which i will do over the weekend. Grain production is dependent on the season (winter, spring, summer, autumn). The script runs with no turn lag, but only slightly affects the AI. More restrictions on the player. Depending on how the campaign_script runs once all scripts are completed i might have it affect AI as it does the player. At the moment the AI and Player gain resources from regions with the resource. the player can construct buildings to increase this, the AI gains bonuses each season as a substitute. The script runs with no turn lag, about 18,000 lines of code.
The script is now over 100,000 lines of code and end turn takes about 2-3 seconds on my crappy laptop. I am estimating some where around 250,000 lines by completion. to be honest, it is handling better than i had expected with 162 settlements as i originally intended only 60 settlements.
script is now at 150,000+ lines and running at about 5-7 seconds (on a crappy laptop). I am guessing around 12 seconds by its completion which will increase as turns increase depending on living factions. If i stuck with the original plan of 60 max settlements there wouldn't be any turn lag. But i quite like the many micro regions...