Hello, I am again working on my resource mod...was just checking on the efficiency of some scripts...first of all here is the goal of script 1:
1. The script will check when a building is built
2. The building must be built by the faction turks
3. When the building is built it will lower the 3 resources(counters) just for turks
4. I want this to work somewhat for the AI at somepoint
5. I will have to do this for every building that the faction turks uses
Key Question: Is there a way to cut down on the monitors...right now I think I have 60 monitors just for the faction turks.
Code:
monitor_event BuildingCompleted SettlementBuildingFinished = town_watch
and FactionType turks
inc_counter turks_iron_available -200
inc_counter turks_wood_available -1500
inc_counter turks_leather_available -200
end_monitor
Script #2:
1. This script will run after each turn to check what buildings exist for turks
2. If the building exists it will add or subtract resource counters based on logic...ie..ports need upkeep wood but give fish(food).
3. I want this to eventually work in some capacity for the AI..
4. This will have to be done for every building
Is there a way to cut down on monitors? Maybe if, end if with settlementbuildingexists....list each building with counters under one monitor? Thanks
Code:
monitor_event SettlementTurnEnd SettlementBuildingExists = port
and FactionType turks
inc_counter turks_wood_available -50
inc_counter turks_food_available 300
end_monitor