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

PackMan

Code Monkey
14 Badges
Sep 29, 2003
1.573
0
www.modhoi.com
  • Hearts of Iron Anthology
  • Europa Universalis III
  • Europa Universalis IV
  • Hearts of Iron III
  • 500k Club
  • Cities: Skylines
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
Hello everyone!

I started learning writing events a few weeks ago so don't take me for an expert in the field (I'm far from it). However, as I was learning I had to type down a lot and it became apparent to me that much information on the subject was spread out here and there. There for I compiled a helpfile with all the triggers and commands available for HoI2/Hoi2 : DD. I would appreciate if you report back any mistakes you may find so that they can be corrected.

Thank you once again Baylox, Luxor, Yukala and Wobbler for sharing your ideas and spreading light on some of the trickier parts.

Get your copy here!

Sourcefiles is here (if you feel like working on the project yourself).

Version: 0.1.8
- Added the command province_manpower
- Changed the data type description for the field value for the command free_manpower.
- Added more text to the Getting Started section.

hoi_event_help_img.jpg
 
Last edited:

ADukes

Major
Apr 16, 2007
782
0
www.madminutegames.com
Mistake in the NOT example:
NOT = { control = { province = 300 data = GER } # Berlin }
NOT = { control = { province = 300 data = GER } } # Berlin

Missing:
day = x and month = x triggers
 

PackMan

Code Monkey
14 Badges
Sep 29, 2003
1.573
0
www.modhoi.com
  • Hearts of Iron Anthology
  • Europa Universalis III
  • Europa Universalis IV
  • Hearts of Iron III
  • 500k Club
  • Cities: Skylines
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
ADukes said:
Mistake in the NOT example:
NOT = { control = { province = 300 data = GER } } # Berlin

Missing:
day = x and month = x triggers
Thanks for your comment Adukes.

This is only a brief line of how the trigger 'NOT' works, not to show a complete event. I may have misunderstood you though? Do you mean the trigger day and month need to be included inside the NOT bracket?

In a perfect world, each unique event and command should have it's own complete event example...
 

unmerged(42223)

Imperial Minister
Mar 28, 2005
3.437
0
This is some beautiful work everyone, much deserviing of keen support.

:D
 

ADukes

Major
Apr 16, 2007
782
0
www.madminutegames.com
PackMan said:
This is only a brief line of how the trigger 'NOT' works, not to show a complete event.
The problem is that this trigger doesn't work, because the game ignores the "}" after the "# Berlin" comment.

PackMan said:
Do you mean the trigger day and month need to be included inside the NOT bracket?
No, I mean that they are missing in the trigger command list.
 

PackMan

Code Monkey
14 Badges
Sep 29, 2003
1.573
0
www.modhoi.com
  • Hearts of Iron Anthology
  • Europa Universalis III
  • Europa Universalis IV
  • Hearts of Iron III
  • 500k Club
  • Cities: Skylines
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
ADukes said:
The problem is that this trigger doesn't work, because the game ignores the "}" after the "# Berlin" comment.


No, I mean that they are missing in the trigger command list.
*slaps forehead*
How right you are, that will be fixed right away.

@Yukala: Thank you, hopefully we'll get one updated nice source of this.
I'll make sure to publish all the files that make up the helpfile as well.

Edit: Something like perhaps?

Code:
date = { day = [number] month = [month] year = [year] }

[b]Explanation[/b]
This trigger is [i]true[/i] if the in game date is equal or greater then the specified.
Valid days are: 1-29
Valid months are: january - december (can also be represented with a number)

[b]Example[/b]
date = { day = 5 month = april year = 1936 }
 
Last edited:

Gen. Skobelev

Werewolf therapist
81 Badges
May 9, 2005
3.387
242
  • Victoria: Revolutions
Excellent! Very applauded.
 

ADukes

Major
Apr 16, 2007
782
0
www.madminutegames.com
Oh, didn't notice the edit.
PackMan said:
Edit: Something like perhaps?

Code:
date = { day = [number] month = [month] year = [year] }

[b]Explanation[/b]
This trigger is [i]true[/i] if the in game date is equal or greater then the specified.
Valid days are: 1-29
Valid months are: january - december (can also be represented with a number)

[b]Example[/b]
date = { day = 5 month = april year = 1936 }
No, I also don't mean the date thing.
I mean the trigger commands day and month, like you already have the year trigger (Triggers -> General -> year).
Code:
year



year = [number]


Explanation
This trigger is true if the current year is equal to or later than the one specified.




Related


Example


year = 1938
 

unmerged(58571)

Field Marshal
Jul 1, 2006
6.288
0
PackMan said:
b]Explanation[/b]
This trigger is true if the in game date is equal or greater then the specified.
Valid days are: 1-29
Valid months are: january - december (can also be represented with a number)

Example
This syntax is for the date range specification, not for the trigger.
Valid days are 0 to whatever the max for the data type used internally is; anything higher than 29 will be interpreted as 29.
The months are numbered 0 - 11; I have never tested with a value > 11.
The default values for both are 0.

Example (trigger):
Code:
trigger = {
	# True if it is at least May but not yet October.
	month = 4
	NOT = { month = 9 }
}

Example (date range):
Code:
# Check the trigger conditions every 3 days from June 22, 1941 to January 1, 1999:
date = { year = 1941 month = 5 day = 21 }
offset = 3
deathdate = { year = 1999 }
 

PackMan

Code Monkey
14 Badges
Sep 29, 2003
1.573
0
www.modhoi.com
  • Hearts of Iron Anthology
  • Europa Universalis III
  • Europa Universalis IV
  • Hearts of Iron III
  • 500k Club
  • Cities: Skylines
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
Totally missed out on these last posts.

IndoEsia45 said:
Maybe for next stop you can make event editor/maker, and what programming language do you use ??
I have too many projects going on at the same time now for squizing in another one, oh and I'm using C# for my programs :)
Would you be willing to help out on such a project perhaps?

I have called out for shared projects here before but to no avail.

Thank you Wobbler and ADukes for those expressive examples (I'll update the file tonight).
 

unmerged(58571)

Field Marshal
Jul 1, 2006
6.288
0
Yes. It is only one value, although stored in two places in the savefiles.
 

PackMan

Code Monkey
14 Badges
Sep 29, 2003
1.573
0
www.modhoi.com
  • Hearts of Iron Anthology
  • Europa Universalis III
  • Europa Universalis IV
  • Hearts of Iron III
  • 500k Club
  • Cities: Skylines
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
Wobbler said:
Yes. It is only one value, although stored in two places in the savefiles.
Ah, cool!
I'm working on a mini project and was afraid I had to do make "reply events".
Say Italy invite Romania into an alliance and Romania declines. A drop in relation would be in place (for both countries). Now I know I only need to set that in the decline action in the Romanian event for both countries to get a slight drop :), thanks!