Paradox Interactive Forums  


Go Back   Paradox Interactive Forums > WW2 Games > Hearts of Iron 2 > HoI2 - Scenarios and modifications

Reply
 
Thread Tools
Old 14-05-2006, 17:29   #1
flock
Major
 
flock's Avatar
 
Join Date: May 2005
Location: Yorkshire, UK
Posts: 686
Is this the correct for a trigger to fire if any things are NOT true?

I want an event to fire if Germany loses control of any of the Atlantic coast of France. Will this do it?

Trigger = {

or = {

not = control = { province = 43 data = GER } #Dunkerque
not = control = { province = 18 data = GER } #Calais
not = control = { province = 42 data = GER } #Dieppe
not = control = { province = 41 data = GER } #Le Harve
not = control = { province = 39 data = GER } #Caen
not = control = { province = 38 data = GER } #Cherbourg
not = control = { province = 37 data = GER } #Avranches
not = control = { province = 33 data = GER } #Rennes
not = control = { province = 32 data = GER } #Brest
not = control = { province = 34 data = GER } #Lorient
not = control = { province = 35 data = GER } #Nantes
not = control = { province = 59 data = GER } #Cholet
not = control = { province = 323 data = GER } #La Rochelle
not = control = { province = 325 data = GER } #Bordeaux
not = control = { province = 326 data = GER } #Dax

}

}



or should it have more brackets like this?

Trigger = {

or = {

{not = control = { province = 43 data = GER }} #Dunkerque
{not = control = { province = 18 data = GER }} #Calais
{not = control = { province = 42 data = GER }} #Dieppe
{not = control = { province = 41 data = GER }} #Le Harve
{not = control = { province = 39 data = GER }} #Caen
{not = control = { province = 38 data = GER }} #Cherbourg
{not = control = { province = 37 data = GER }} #Avranches
{not = control = { province = 33 data = GER }} #Rennes
{not = control = { province = 32 data = GER }} #Brest
{not = control = { province = 34 data = GER }} #Lorient
{not = control = { province = 35 data = GER }} #Nantes
{not = control = { province = 59 data = GER }} #Cholet
{not = control = { province = 323 data = GER }} #La Rochelle
{not = control = { province = 325 data = GER }} #Bordeaux
{not = control = { province = 326 data = GER }} #Dax

}

}


or should the or and the not be the other way round?

Thanks in advance for your help
flock is online now   Reply With Quote
Old 14-05-2006, 17:35   #2
Black Guardian
Major
 
Black Guardian's Avatar
Hearts of Iron III
 
Join Date: Dec 2005
Location: Dresden (Germany)
Posts: 538
Blog Entries: 1
Code:
Trigger = {

                   or = {
NOT = {

                          control = { province = 43 data = GER } #Dunkerque
                        control = { province = 18 data = GER } #Calais
                        control = { province = 42 data = GER } #Dieppe
                         control = { province = 41 data = GER } #Le Harve
                         control = { province = 39 data = GER }
#Caen
                          control = { province = 38 data = GER } #Cherbourg
                          control = { province = 37 data = GER } #Avranches
                          control = { province = 33 data = GER } #Rennes
                          control = { province = 32 data = GER } #Brest
                          control = { province = 34 data = GER } #Lorient
                          control = { province = 35 data = GER } #Nantes
                          control = { province = 59 data = GER } #Cholet
                          control = { province = 323 data = GER }  #La Rochelle
                          control = { province = 325 data = GER } #Bordeaux
                          control = { province = 326 data = GER } #Dax

                }

                        }
                  
                  }


It should work that way... if not, try this:



Code:
Trigger = {

                   or = {

                     not = { control = { province = 43 data = GER }} #Dunkerque
                    not = { control = { province = 18 data = GER }} #Calais
                     not ={ control = { province = 42 data = GER }} #Dieppe
                       not ={ control = { province = 41 data = GER }} #Le Harve
                        not ={ control = { province = 39 data = GER }}
#Caen
                         not ={ control = { province = 38 data = GER }} #Cherbourg
                          not ={ control = { province = 37 data = GER }} #Avranches
                        not ={ control = { province = 33 data = GER }} #Rennes
                        not ={ control = { province = 32 data = GER }} #Brest
                         not ={ control = { province = 34 data = GER }} #Lorient
                         not ={ control = { province = 35 data = GER }} #Nantes
                        not ={ control = { province = 59 data = GER }} #Cholet
                        not ={ control = { province = 323 data = GER }}  #La Rochelle
                        not ={ control = { province = 325 data = GER }} #Bordeaux
                       not ={ control = { province = 326 data = GER }} #Dax

                }

                        }
Black Guardian is offline   Reply With Quote
Old 14-05-2006, 20:01   #3
flock
Major
 
flock's Avatar
 
Join Date: May 2005
Location: Yorkshire, UK
Posts: 686
Black Guardian's 2nd suggestion is the one that works.

Thank you Black Guardian


So I now have


################################################## ################################################## ####################
#
# Events to show effects on Vichy of D-day and Overlord
#
################################################## ################################################## ####################

#############################################
# After D-day, Vichy begins to slowly implode
#############################################

event = {
id = 800100
random = no
country = VIC
persistent = no

Trigger = {
or = {
not = { control = { province = 43 data = GER }} #Dunkerque
not = { control = { province = 18 data = GER }} #Calais
not = { control = { province = 42 data = GER }} #Dieppe
not = { control = { province = 41 data = GER }} #Le Harve
not = { control = { province = 39 data = GER }} #Caen
not = { control = { province = 38 data = GER }} #Cherbourg
not = { control = { province = 37 data = GER }} #Avranches
not = { control = { province = 33 data = GER }} #Rennes
not = { control = { province = 32 data = GER }} #Brest
not = { control = { province = 34 data = GER }} #Lorient
not = { control = { province = 35 data = GER }} #Nantes
not = { control = { province = 59 data = GER }} #Cholet
not = { control = { province = 323 data = GER }} #La Rochelle
not = { control = { province = 325 data = GER }} #Bordeaux
not = { control = { province = 326 data = GER }} #Dax
}
random = 50
}

date = { day = 1 month = january year = 1941 }
offset = 1
deathdate = { day = 29 month = december year = 1947 }

name = "After the successful Allied landing on the coast of France, Vichy starts to slowly implode."
desc = ""
style = 0

action_a = {
name = "OK"
command = { type = dissent value = 4 }
command = { type = manpowerpool value = -12 }
command = { type = money value = -70 }
#command = { type = trigger which = 800116 }
#command = { type = trigger which = 800117 }
#command = { type = trigger which = 800118 }
#command = { type = trigger which = 800119 }
}
}



Lots more things left to discover yet!
flock is online now   Reply With Quote
Old 14-05-2006, 20:25   #4
HMS Enterprize
On loan to the C.S Navy
Hearts of Iron 2: ArmageddonVictoria: RevolutionsEU3 Complete
 
Join Date: Jun 2004
Location: Great Britain
Posts: 4,327
The basic rule is for every '{' there has to be a '}'

And you only need one NOT command when specifying provinces in a trigger.
__________________
NEW! Stable test version of Harry Turtledove's 'How Few Remain' & 'American Empire' mod for Victoria Revolutions now available. Get it HERE

Settling Accounts mod v3.0 for HOI2: DD. Get it HERE
HMS Enterprize is offline   Reply With Quote
Old 14-05-2006, 21:13   #5
flock
Major
 
flock's Avatar
 
Join Date: May 2005
Location: Yorkshire, UK
Posts: 686
Hmmh, I expect you are correct, but I can't get it to fire only 1 NOT command, must be doing something wrong. But the way I have it now, it does fire.

Can you show an example please? Thanks.
flock is online now   Reply With Quote
Old 14-05-2006, 21:40   #6
HMS Enterprize
On loan to the C.S Navy
Hearts of Iron 2: ArmageddonVictoria: RevolutionsEU3 Complete
 
Join Date: Jun 2004
Location: Great Britain
Posts: 4,327
This is the trigger for one of my events, it uses the OR command but the principle is the same-

event = {
id = 50007
random = no
country = USA

trigger = {
atwar = no
exists = U00
OR = {
control = { province = 640 data = USA }
control = { province = 641 data = USA }
control = { province = 720 data = USA }
control = { province = 721 data = USA }
control = { province = 713 data = USA }
control = { province = 714 data = USA }
}
NOT = {
OR = {
ispuppet = USA
puppet = { country = U00 country = USA }
}
}
}
__________________
NEW! Stable test version of Harry Turtledove's 'How Few Remain' & 'American Empire' mod for Victoria Revolutions now available. Get it HERE

Settling Accounts mod v3.0 for HOI2: DD. Get it HERE
HMS Enterprize is offline   Reply With Quote
Old 23-05-2006, 00:59   #7
jdrou
Field Marshal
 
jdrou's Avatar
EU3 Collectors Edition OwnerHoI AnthologyNapoleonic MarshalDeus Vult!Hearts of Iron 2: Armageddon
Victoria: RevolutionsEuropa Universalis III: In NomineEU3 CompleteRome GoldHearts of Iron III
For The GloryHeir to the Throne
 
Join Date: Jun 2002
Location: Michigan, USA
Posts: 13,924
Quote:
Originally Posted by flock
Trigger = {
or = {
not = { control = { province = 43 data = GER }} #Dunkerque
not = { control = { province = 18 data = GER }} #Calais
not = { control = { province = 42 data = GER }} #Dieppe
not = { control = { province = 41 data = GER }} #Le Harve
not = { control = { province = 39 data = GER }} #Caen
not = { control = { province = 38 data = GER }} #Cherbourg
not = { control = { province = 37 data = GER }} #Avranches
not = { control = { province = 33 data = GER }} #Rennes
not = { control = { province = 32 data = GER }} #Brest
not = { control = { province = 34 data = GER }} #Lorient
not = { control = { province = 35 data = GER }} #Nantes
not = { control = { province = 59 data = GER }} #Cholet
not = { control = { province = 323 data = GER }} #La Rochelle
not = { control = { province = 325 data = GER }} #Bordeaux
not = { control = { province = 326 data = GER }} #Dax
}
random = 50
}
To simplify slightly, this is equivalent to:
Trigger = {
not = { and = {
control = { province = 43 data = GER } #Dunkerque
control = { province = 18 data = GER } #Calais
control = { province = 42 data = GER } #Dieppe
control = { province = 41 data = GER } #Le Harve
control = { province = 39 data = GER } #Caen
control = { province = 38 data = GER } #Cherbourg
control = { province = 37 data = GER } #Avranches
control = { province = 33 data = GER } #Rennes
control = { province = 32 data = GER } #Brest
control = { province = 34 data = GER } #Lorient
control = { province = 35 data = GER } #Nantes
control = { province = 59 data = GER } #Cholet
control = { province = 323 data = GER } #La Rochelle
control = { province = 325 data = GER } #Bordeaux
control = { province = 326 data = GER } #Dax
} }
random = 50
}

De Morgan's laws in Paradox event trigger language:
not = { and = { triggerA triggerB } }
is equivalent to
or = { not = { triggerA } not = { triggerB } }

and

not = { or = { triggerA triggerB } }
is equivalent to
and = { not = { triggerA } not = { triggerB } }
__________________
"The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." --H. L. Mencken

Victoria: Revolutions 2.01 (+new VIPR 0.3)
HoI2 Anthology w/Mod34
EU3 Heir to the Throne beta patch 4.1b

Download the Fix-it-Yourself Pack for HoI 1.06c (updated 11/14/05)
jdrou is online now   Reply With Quote
Old 23-05-2006, 09:37   #8
Ayeshteni
Jehanne's Slave
 
Ayeshteni's Avatar
EU3 Collectors Edition OwnerNapoleonic MarshalDeus Vult!Europa Universalis: RomeHearts of Iron 2: Armageddon
Europa Universalis III: In NomineRome: Vae VictisFor The GloryHeir to the Throne
 
Join Date: Jul 2002
Location: One step further away from finding the key to Jehanne's chastity belt
Posts: 5,944
Quote:
Originally Posted by jdrou
De Morgan's laws in Paradox event trigger language:
not = { and = { triggerA triggerB } }
is equivalent to
or = { not = { triggerA } not = { triggerB } }

and

not = { or = { triggerA triggerB } }
is equivalent to
and = { not = { triggerA } not = { triggerB } }


well you learn something new every day on this forum.

Ayeshteni
__________________
GLORIANA - A For the Glory Mod And no it isn't about Queen Lizzy before you ask
Discussion thread for Gloriana Here

Owner of a Golden Phoenix cookie! Extremely Proud owner of a BiB cookie! I also have a very special Johan cookie as well
Owner of 7 2Coaties
"Why not? The primary causes for union are, thankfully, long gone. So why are we hanging on to it? For the sake of sentimentality? An uncertain economic argument that's easily dismissed? Nah. Go forth, Scots. All power to your elbow. You'll take the oil and we'll take the nukes, and we'll be in Brussels afore ye. And so on." - Rabid Bogling
Ayeshteni is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT +1. The time now is 23:37.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© Copyright 2001-2009 Paradox Interactive