• 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.

unmerged(61671)

Second Lieutenant
Oct 12, 2006
132
0
Hello fellow warriors,

I am having a desperate problem that I just cannot get to the root of. It stems from the

trigger = { Tid'sFrustration = 10000 }

portion of the event.

I have created a new file and written a bunch of new events. They run fine when called individually (through f12) but when the trigger condition is tested in-game it freezes the game. Well, it actually stops time dead, since I can still access all the screens, give orders etc.

When I remove the trigger line, all is fine. When I leave it in, everything goes tits up. I don't think it is a syntax problem - I've even copied triggers from other events and I get the same problem.

Here is one of the events - very innocuous. With the trigger commented out, it works fine.

#########################################################################
# 49502 Establishment of Peenemunde
#########################################################################
event = {
id = 49502
country = GER
random = no
picture = automedon

trigger = { supplies = 3000 }

name = "Establish rocket test site at Peenemunde"
desc = "An important army base for the research of weapons is proposed at Peenemunde"
style = 0

date = { day = 1 month = january year = 1936 }
deathdate = { day = 30 month = december year = 1954 }

action_a = {
name = "Green light the Peenemunde project"
command = { type = money value = -250 }
command = ( type = supplies value = -3000 )
command = { type = trigger which = 49510}
}

action_b = {
name = "Hmmmm, come back later"
command = { }
}

action_c = {
name = "Nein, danke!"
command = { type = sleepevent which = 49502 }
}
}


Any ideas?

Love,
Tiddums
 

HalfTon Midget

First Lieutenant
32 Badges
Jan 23, 2006
296
2
  • Hearts of Iron IV: Colonel
  • Battle for Bosporus
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron Anthology
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis III: Collection
  • 500k Club
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
another item that may help is that if you don't play as GER the event will still fire for the AI. Which if it is ok in your situation then you don't have any thing telling which option the ai to choose ( ai chance = X )

If you don't want to fire for the ai then be sure to put in ai = no
 

Gormadoc

Darkest Hour Developer (Semi-Retired)
19 Badges
Sep 1, 2004
3.765
4
  • Hearts of Iron II: Beta
  • Battle for Bosporus
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Hearts of Iron II: Armageddon
  • 500k Club
  • Semper Fi
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis III Complete
  • Deus Vult
ai_chance = x is optional it does not need to be there. If no ai_chance = x is set, then the AI will chose action with default chances. Cant remember the excat numbers but action_a is around 90% depending on number of actions.

There are a problem with one of the commands aswell

command = ( type = supplies value = -3000 )
 

unmerged(61671)

Second Lieutenant
Oct 12, 2006
132
0
For Jarno's benefit...

offset goes between the start date and death date, and is a value that, well, offsets the triggering of the event from the start date, by days. So if an event is triggered with a start date of 1st January 1936 and has an offset of 7, then it will trigger at some point within those first 7 days.

It looks like this ...

date = { day = 1 month = january year = 1936 }
offset = 7
deathdate = { day = 30 month = december year = 1954 }
 

Jarno

The end.
17 Badges
Feb 21, 2008
700
13
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • Hearts of Iron III
  • Iron Cross
  • Hearts of Iron Anthology
  • 500k Club
  • Hearts of Iron IV: La Resistance
  • Imperator: Rome Sign Up
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Steel Division: Normand 44 Sign-up
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • 200k Club
Tid said:
For Jarno's benefit...

offset goes between the start date and death date, and is a value that, well, offsets the triggering of the event from the start date, by days. So if an event is triggered with a start date of 1st January 1936 and has an offset of 7, then it will trigger at some point within those first 7 days.

It looks like this ...

date = { day = 1 month = january year = 1936 }
offset = 7
deathdate = { day = 30 month = december year = 1954 }
oh ok thanks :D
 

xtfoster

Field Marshal
57 Badges
Feb 8, 2006
5.874
2.209
  • Shadowrun Returns
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • BATTLETECH - Digital Deluxe Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • BATTLETECH
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Age of Wonders: Planetfall Sign Up
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: No Step Back
  • Stellaris: Galaxy Edition
  • Deus Vult
  • Europa Universalis III
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Majesty 2
  • Europa Universalis III Complete
  • Semper Fi
  • Supreme Ruler 2020
  • 500k Club
  • Hearts of Iron II: Beta
  • Stellaris
  • Hearts of Iron II: Armageddon
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
Tid said:
For Jarno's benefit...

offset goes between the start date and death date, and is a value that, well, offsets the triggering of the event from the start date, by days. So if an event is triggered with a start date of 1st January 1936 and has an offset of 7, then it will trigger at some point within those first 7 days.

It looks like this ...

date = { day = 1 month = january year = 1936 }
offset = 7
deathdate = { day = 30 month = december year = 1954 }
Actually that is wrong.
The offset tells the engine how often to check to see if the event triggers.
So in your example, the event would check on January 1st, then the 8th, 15th, etc.
If you load a save game in the middle of those dates, it will check on the next day after you reload and then every 7 days.
 

Karagin

Colonel
4 Badges
Jan 30, 2005
975
0
  • Arsenal of Democracy
  • Hearts of Iron III
  • Victoria 2
  • 500k Club
Tid said:
Hello fellow warriors,

I am having a desperate problem that I just cannot get to the root of. It stems from the

trigger = { Tid'sFrustration = 10000 }

portion of the event.

I have created a new file and written a bunch of new events. They run fine when called individually (through f12) but when the trigger condition is tested in-game it freezes the game. Well, it actually stops time dead, since I can still access all the screens, give orders etc.

When I remove the trigger line, all is fine. When I leave it in, everything goes tits up. I don't think it is a syntax problem - I've even copied triggers from other events and I get the same problem.

Here is one of the events - very innocuous. With the trigger commented out, it works fine.

#########################################################################
# 49502 Establishment of Peenemunde
#########################################################################
event = {
id = 49502
country = GER
random = no
picture = automedon

trigger = { supplies = 3000 }

name = "Establish rocket test site at Peenemunde"
desc = "An important army base for the research of weapons is proposed at Peenemunde"
style = 0

date = { day = 1 month = january year = 1936 }
deathdate = { day = 30 month = december year = 1954 }

action_a = {
name = "Green light the Peenemunde project"
command = { type = money value = -250 }
command = ( type = supplies value = -3000 )
command = { type = trigger which = 49510}
}

action_b = {
name = "Hmmmm, come back later"
command = { }
}

action_c = {
name = "Nein, danke!"
command = { type = sleepevent which = 49502 }
}
}


Any ideas?

Love,
Tiddums


So does it work now? Could you post the workable event please? This one sounds interesting...
 

unmerged(61671)

Second Lieutenant
Oct 12, 2006
132
0
It worked an absolute treat.

Here is the event. Pretty basic, though I'm thinking about creating a souped up Von Braun tech team to be activated upon construction.

#########################################################################
# 49502 Establishment of Peenemunde
#########################################################################
event = {
id = 49502
country = GER
random = no
persistent = yes


trigger = { supplies = 3000
}

name = "Establish rocket test site at Peenemunde"
desc = "An important army base for the research of weapons is proposed at Peenemunde"
style = 0

date = { day = 1 month = january year = 1937 }
offset = 30
deathdate = { day = 30 month = december year = 1954 }

action_a = {
name = "Green light the Peenemunde project"
command = { type = money value = -250 }
command = ( type = supplies value = -1500 )
command = { type = sleepevent which = 49502 }
command = { type = trigger which = 49510}
}

action_b = {
name = "Hmmmm, come back later"
command = { }
}

action_c = {
name = "Nein, danke!"
command = { type = sleepevent which = 49502 }
}
}

event = {
id = 49510
country = GER
random = no

name = "Begin construction of Peenemunde"
desc = "Construction begins at Peenemunde. The lorries and tractors are there, and already some egghead has a bright idea."
style = 0

action_a = {
name = "Construction begins"
command = { }
}
}

event = {
id = 49511
country = GER
random = no

trigger = { event = 49510 }

date = { day = 15 month = january year = 1938 }
offset = 100
deathdate = { day = 30 month = december year = 1954 }

name = "Peenemunde is complete"
desc = "The advanced research facility at Peenemunde has been completed."
style = 0

action_a = {
name = "Wunderbar!"
command = { type = construct which = rocket_test where = 301 value = 2 }
}
}