I figured it out. I had to remove a command sleeping event 1022 in event 1022, in fact it's not necessary. It looks like sleeping events make them removed from memory and annihilated within game engine, so they no longer exist, therefore they cannot be used in triggers. I'm not sure if this should be considered as a bug, i suppose it shouldn't, however sometimes may be some limitation.
There is full text for mobilization events i made:
Code:
#########################################################################
# Mobilization events
#########################################################################
event = {
id = 1022
persistent = yes
random = 100
trigger = {
ai = no
atwar = yes
NOT = { local_flag = PartMob
manpower = 200 }
}
name = "partial mobilization"
desc = "Do we need to mobilize our army ?"
picture = "Reinforcements"
style = 0
date = { day = 0 month = january year = 1936 }
offset = 1
deathdate = { day = 30 month = december year = 1999 }
action_a = {
name = "partial mobilization"
command = { type = manpowerpool which = 1 value = 50000 }
command = { type = belligerence value = 5 }
command = { type = dissent value = 1 }
command = { type = local_setflag which = PartMob }
}
action_b = {
name = "no need now"
command = { type = local_setflag which = Mobstate }
command = { type = local_setflag which = PartMob }
}
}
event = {
id = 1023
persistent = yes
random = 100
trigger = {
ai = no
atwar = yes
NOT = { manpower = 30
local_flag = TotalMob }
}
name = "total mobilization"
desc = "Do we need total mobilization of our armies ?"
picture = "Reinforcements"
style = 0
date = { day = 0 month = january year = 1936 }
offset = 7
deathdate = { day = 30 month = december year = 1999 }
action_a = {
name = "total mobilization"
command = { type = manpowerpool which = 1 value = 200000 }
command = { type = resource which = money value = -300 }
command = { type = dissent value = 3 }
command = { type = belligerence value = 5 }
command = { type = local_setflag which = TotalMob }
}
action_b = {
name = "no need now"
command = {}
}
}
event = {
id = 1024
persistent = yes
random = 100
trigger = {
ai = no
atwar = no
OR = { local_flag = PartMob
local_flag = TotalMob
}
}
name = "demobilization"
desc = "Is it time to demobilization ?"
picture = "Reinforcements"
style = 0
date = { day = 0 month = january year = 1936 }
offset = 10
deathdate = { day = 30 month = december year = 1999 }
action_a = {
name = "demobilization"
command = { type = manpowerpool which = 1 value = -200000 }
command = { type = belligerence value = -5 }
command = { type = manpowerpool which = 1 value = 10000 }
command = { type = local_clrflag which = PartMob }
}
action_b = {
name = "not yet"
command = { type = dissent value = 1 }
}
}
event = {
id = 1025
persistent = yes
random = 100
trigger = {
ai = no
atwar = yes
local_flag = Mobstate
}
name = "partial mobilization"
desc = "Do we need to mobilize our army ?"
picture = "Reinforcements"
style = 0
date = { day = 0 month = january year = 1936 }
offset = 30
deathdate = { day = 30 month = december year = 1999 }
action_a = {
name = "mobilize"
command = { type = manpowerpool which = 1 value = 50000 }
command = { type = belligerence value = 5 }
command = { type = dissent value = 1 }
command = { type = local_clrflag which = Mobstate }
}
action_b = {
name = "not yet"
command = {}
}
}
just paste it to "randomevents.txt" file and You should be able check how it works.
Note, that those events are for human player only. I will try to add ai version soon. Also i recommend to lower both manpower growth and aging penalty for better effects in "misc.txt" file.
Feel free to write any suggestion about values used in triggers/events and of course about events itself.
I would forgot to add - there are conditions for events to fire:
for partial mobilization - manpower <= 200, demobilized or not mobilized, at war
for total mobilization - manpower <= 30, demobilized or not totally mobilized, at war
for demobilization - mobilized, at peace