I don't see any restriction besides general's age and rank (I thought they were obvious since they should be described in the tooltip's text). I don't really think there is a battle threshold.
If you try with this PIGS cheat pack (where you can enact freely any political button) you'll see that you can hit the max cursus honorum in 1 turn (the cheat pack also modded both age and rank).
You should be able to use the cheat pack without having PIGS, I think.
https://www.mediafire.com/file/5jtlp...PIGS.pack/file
The political intrigues are a sort of hardcoded events, meaning that an hardcoded script (specific for every intrigue) is triggered as soon as you push the button.
I've tried to change this behaviour (for example by assigning a different event outcome to the political event itself) but had no luck, I think they are simply hardcoded and that there is not much doable (except the things I've modded through PIGS).
Can you build a new scripted system for them? Well, yes and no. The main problem is that in Rome 2 you can't directly assign effects to characters, you can only do that through armies meaning that it is impossible to give effects to non deployed characters (only through cdir events but the possibilites for linking scripts and cdir events aren't 360° degrees wide)
You can roll dices simply by doing something similar (DeI used to have a dice rolls system for a couple of features but since rolls aren't MP friendly Dresden decided to remove them).
I'm using them in a lot of scripts (down below I've extracted the script assigning random incidents to the political promotion intrigue)
Code:
-- 000---------------------
--******* Current script and concepts modded by: Jake Armitage and ivanpera from TWC
--******* Mod "PIGS INTRIGUES" - for DeI
--******* November 2019
-- 000---------------------
module(..., package.seeall)
_G.main_env = getfenv(1);
-- ###------------------------- START *******
-- LIBRARIES REQUIRED ---------------------------------------------------------------------
-- ###-------------------------
events = require "data.lua_scripts.events"
require "data.lua_scripts.lib_export_triggers"
require "data.lua_scripts.politics"
-- ###---------------------------------- END*
-- ###------------------------- START *******
-- RANDOMSEED ---------------------------------------------------------------------
-- ###-------------------------
local function PIGS_Intr_CallMathRandom(cont)
local i = cont;
while ( i > 0 )
do
math.random(1,100);
i = i - 1;
end
end
local function PIGS_Intr_Random_seed(context)
if context:faction():is_human() == true
then
faction_name = context:faction():name();
math.randomseed(os.clock());
end
end
-- ###---------------------------------- END*
-- ###------------------------- START *******
-- TRIGGER DECLARATIONS ---------------------------------------------------------------------
-- ###-------------------------
--########################
--######## GREEN INTRIGUES
--########################
-- *** PROMOTE POLITICIAN
events.CharacterPoliticalPromotion[#events.CharacterPoliticalPromotion+1] =
function (context)
if conditions.FactionIsHuman(context)
then
local random_number = math.random(1, 100)
if random_number >= 1 and random_number <= 2
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_-3_VB_pop")
elseif random_number >= 3 and random_number <= 4
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_-3_VB_mil")
elseif random_number >= 5 and random_number <= 6
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_-3_VB_rul")
elseif random_number >= 7 and random_number <= 8
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_-3_VB_oth")
elseif random_number >= 9 and random_number <= 15
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_-2_B_oth")
elseif random_number >= 16 and random_number <= 30
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_-1_SB_oth")
elseif random_number >= 31 and random_number <= 70
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_0_AV")
elseif random_number >= 71 and random_number <= 85
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_1_SG_oth")
elseif random_number >= 86 and random_number <= 92
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_2_G_oth")
elseif random_number >= 93 and random_number <= 94
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_3_VG_pop")
elseif random_number >= 95 and random_number <= 96
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_3_VG_mil")
elseif random_number >= 97 and random_number <= 98
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_3_VG_rul")
elseif random_number >= 99 and random_number <= 100
then
scripting.game_interface:trigger_custom_incident(tostring(faction_name), "PIGS_Intr_PoliticalPromotion_inc_3_VG_oth")
end
end
end
-- ###---------------------------------- END*
-- ###------------------------- START *******
-- CALLBACKS ---------------------------------------------------------------------
-- ###-------------------------
scripting.AddEventCallBack("FactionTurnStart", PIGS_Intr_Random_seed);
scripting.AddEventCallBack("FactionTurnEnd", PIGS_Intr_Random_seed);
-- ###---------------------------------- END*
Keep in mind that the RANDOMSEED function (and its callbacks) are 100% necessary, otherwise the randomness will always have the same path.
You can use this template outside "event scripts", you can use dice rolls for any type of script.
Inside "local random_number = math.random(1, 100)" you can put the range you want (I think they must be integer numbers though).
For example (in the kill script) I've used a 1000 dice to have 0,X% probability: "local random_number = math.random(1, 1000)"