• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Gringoesteban

Major
5 Badges
Jan 29, 2008
699
2
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • Hearts of Iron III: Their Finest Hour
  • 500k Club
The following event trigger check is not working.

garrison = { country = GER province = 44 type = land size = 0 area = no }


I am attempting to set up a series of events to randomly land Allied paratroopers in French provinces if the Germans do not have them garrisoned. You can see an example below. The way things happen in the v1.04 release, the event triggers even if the Germans have land units in the province.


###################################################
# Check provinces Lille 44
###################################################
event = {
id = 79928
random = no
persistent = yes

country = GER

name = "Airborne Raid"
desc = "Allied paratroopers have landed in Lille!"
picture = "paratroopers_normandy"
style = 0


trigger = {
war = { country = GER country = ENG }
control = { province = 19 data = ENG } #London
control = { province = 44 data = GER }
garrison = { country = GER province = 44 type = land size = 0 area = no }
random = 20 # 20% chance every 120 days based on the offset below

}

date = { day = 20 month = march year = 1943 }
offset = 120 # how often to check whether the event fires
deathdate = { day = 30 month = december year = 1999 }

action_a = {
name = "We will wipe them out"
command = { type = secedeprovince which = ENG value = 44 }
command = { type = trigger which = 79927 }
}
}

###################################################
# Airborne Raid Lille 44
###################################################
event = {
id = 79927
random = no
country = ENG

# triggered by event 79928

name = "Paradrop Raid!"
desc = "Drop into France"
style = 0

action_a = {
name = "They were expendable..."
command = { type = supplies value = 30 where = 44 } # enough supplies for 4 days of combat
command = { type = add_corps which = "Lille Air Marauders" value = land where = 44 }
command = { type = add_division which = "3rd Air Assault Division" value = paratrooper when = 2 where = artillery }
}
}
 
Upvote 0
You don't understand how the trigger works and so your trigger is wrong.

Code:
garrison = { country = GER province = 44 type = land size = 0 area = no }
Is true if 0 or more units are in the province.

Code:
not = { garrison = { country = GER province = 44 type = land size = 1 area = no } }
Is true if less than 1 unit is in the province.
 
You don't understand how the trigger works and so your trigger is wrong.

Code:
garrison = { country = GER province = 44 type = land size = 0 area = no }
Is true if 0 or more units are in the province.

Code:
not = { garrison = { country = GER province = 44 type = land size = 1 area = no } }
Is true if less than 1 unit is in the province.


If I don't understand how the trigger works then it is because the HOI2 Wiki provided me with incorrect information.


_____________

http://www.paradoxian.org/hoi2wiki/index.php/Event_Commands#Province_checks

Under the category Military Unit Condition Checks

garrison = { country = [country tag] province = [province id] type = [air/land/naval] size = [number of divisions] area = [yes/no] } - tests if [country tag] has troops in the specified [province id]. If no type is specified, this means "all division types". Size is the number of division, and "area = yes" means that divisions in all provinces in this controlled area are counted. Do not use "area = yes" for sea provinces!
___________



If "size is the number of division(s)" and in the event trigger check I type "size = 0" then then the event should only trigger if zero land units are in the province.

Could one of the devs please clarify this. If ADukes is right then it will be quite easy to fix the trigger.
 
Most of that page's content is taken from db\events\event commands.txt

There seem to be some incorrect information or insufficient explanation (f.e., I modified the delete_unit command explanation which was unclear). Testing and fixing any eventual inaccuracy would be appreciated.