Below is a patch for the Data/scripts/Events.BSF file that replaces the loop over all region capitals with selecting the current faction capital.
Most of the functions are defined per game. See http://archonwiki.slitherine.com/index. ... es_Modding for the generic engine modding guide.
Code: Select all
diff -r S:\Events.BSF D:\SteamLibrary\steamapps\common\Field of Glory Empires\Data\scripts\nppBackup\Events.BSF.2020-05-26_104835.bak
4098,4100c4098,4099
< // Change to only test/create Legion Camp in faction capital (i.e. Rome):
< regionID = Faction_Politic_MainCapitalRgnID(factionID)
< if (Evt_Rome_ImperialLegion_Tracker && (regionID > -1))
---
> regCount = GetNumOwnedRegions(factionID);
> if (Evt_Rome_ImperialLegion_Tracker)
4102,4105c4101,4111
< if (Region_Structures_HasThisOne(regionID, $ID_STRUC_IMPERIAL_LEGION_CAMP) == FALSE)//
< {
< StructureTpl_Name($ID_STRUC_IMPERIAL_LEGION_CAMP);
< Structure_CreateEx(factionID, regionID, $ID_STRUC_IMPERIAL_LEGION_CAMP, TRUE, gString);
---
> for (reg = 0; reg < regCount; reg++)
> {
> regionID = GetOwnedRegionID(factionID, reg);
> if (Region_Population_Count(regionID) >= 10 && Dice(100) <= GetDiffMode() * 5) // less onerous tests first
> {
> if ( (Region_Province_IsLocalCapital(regionID)) && (Region_Structures_HasThisOne(regionID, $ID_STRUC_IMPERIAL_LEGION_CAMP) == FALSE && Region_IsBesieged(regionID) == FALSE) )
> {
> StructureTpl_Name($ID_STRUC_IMPERIAL_LEGION_CAMP);
> Structure_CreateEx(factionID, regionID, $ID_STRUC_IMPERIAL_LEGION_CAMP, TRUE, gString);
> }
> }
4108c4114
< else if (Evt_Rome_Marian_Tracker && (regionID > -1))
---
> else if (Evt_Rome_Marian_Tracker)
4110c4116
< if (Region_Structures_HasThisOne(regionID, $ID_STRUC_LEGION_CAMP) == FALSE)
---
> for (reg = 0; reg < regCount; reg++)
4112,4113c4118,4126
< StructureTpl_Name($ID_STRUC_LEGION_CAMP);
< Structure_CreateEx(factionID, regionID, $ID_STRUC_LEGION_CAMP, TRUE, gString);
---
> regionID = GetOwnedRegionID(factionID, reg);
> if (Region_Population_Count(regionID) >= 5 && Dice(100) <= GetDiffMode() * 5) // less onerous tests first
> {
> if ( (Region_Province_IsLocalCapital(regionID)) && (Region_Structures_HasThisOne(regionID, $ID_STRUC_LEGION_CAMP) == FALSE && Region_IsBesieged(regionID) == FALSE) )
> {
> StructureTpl_Name($ID_STRUC_LEGION_CAMP);
> Structure_CreateEx(factionID, regionID, $ID_STRUC_LEGION_CAMP, TRUE, gString);
> }
> }


