apologies for this question. If i make changes to campaign script will it load in a current game or do i need to start a new game. i have modified an effect to increase upkeep as empire expands and it doesnt seem to be doing anything in an already running game. here is the script
Code:
local function kk_count_regions(context)
local regioncount = context:faction():region_list():num_items()
return regioncount
end
local function increase_upkeep(context)
if context:faction():is_human() == true then
local region_count = kk_count_regions(context)
if region_count >= 75 then
scripting.game_interface:apply_effect_bundle("kk_growth_army_upkeep_3" ,context, 1)
end
if region_count >= 40 and region_count < 75 then
scripting.game_interface:apply_effect_bundle("kk_growth_army_upkeep_2" ,context, 1)
end
if region_count >= 15 and region_count < 40 then
scripting.game_interface:apply_effect_bundle("kk_growth_army_upkeep_1" ,context, 1)
end
end
end
--------------------------------------------------------------------------------------------------------------------
-- Add event callbacks
-- For a list of all events supported create a "documentation" directory in your empire directory, run a debug build of the game and see
-- the events.txt file
--------------------------------------------------------------------------------------------------------------------
scripting.AddEventCallBack("NewCampaignStarted", OnNewCampaignStarted)
scripting.AddEventCallBack("UICreated", OnUICreated)
scripting.AddEventCallBack("AdviceIssued", OnAdviceIssued)
scripting.AddEventCallBack("AdviceDismissed", OnAdviceDismissed)
scripting.AddEventCallBack("CameraMoverFinished", OnCameraMoverFinished)
scripting.AddEventCallBack("FactionTurnStart", OnFactionTurnStart)
scripting.AddEventCallBack("ComponentLClickUp", OnComponentLClickUp)
scripting.AddEventCallBack("TimeTrigger", OnTimeTrigger)
--------------------------------------------------------------------------------------
-- Kankrusha custom callbacks
--------------------------------------------------------------------------------------
scripting.AddEventCallBack("FactionTurnStart", increase_upkeep)