• 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(71191)

Private
Mar 9, 2007
16
0
Sorry if these have been asked before

So I wrote a custom event, hoping to add better (imaginary) leaders to our poor China who really lacked them:
##################################################
#########Wake Leader Test#########################
#################################################

event = {
id = 9505
random = no
country = CHI

name = "Wake Leader Command Test"
desc = "If successful, test I test II and test III will appear."
picture = "transfer"
style = 0

trigger = { }

date = { day = 0 month = february year = 1936 }
offset = 1
deathdate = { day = 29 month = december year = 1936 }

action_a = {
name = "Check and see if command works"

command = { type = wakeleader which = 50370 } #this is Chennault, I just took him out to also test Pitman Act...
command = { type = wakeleader which = 582018 } #Air named Test I
command = { type = wakeleader which = 582019 } #Navy Test II
command = { type = wakeleader which = 582020 } #Army Test III
}

}

But when the event fired, it gave me a message saying something like "New Leader "Test I" awaits your command at (EMBARKED)"..... and that was all ... they are nowhere to be found in the list :wacko:
is this a bug of the command? if yes, does that mean there is no way to add leaders via an event?

Also some minor questions...
1. The command for command = { relation which = XXX = -30 } does not work for some reason... in the game it gave me "no immediate effect", and so does for belligerence...

2. Under desc, is there a limit on how many characters you can input? I once wrote an approx. 150 words paragraph to explain the event, but the game failed to load, calling it an unknown trigger type, but after I trimmed it down it suddenly worked...

3. This one is not event related---> are underscores not recognized by HOI? I once named a mp3 file something_something and it did not play, but when I removed it, it played in the game... :wacko:

4. If I want an event to fire at a 100% chance on a certain date, do I still need the offset and death date command? I am asking this because I kind of "copied" the format of existing events, and try to alter them without understanding what is important and what is not...

[edit]
5. Is there a trigger command that checks if a country still exists?
 
Last edited:

unmerged(42223)

Imperial Minister
Mar 28, 2005
3.437
0
Why not just go here to this file:

db/leaders/natinalistchina.csv

And amend start dates to 1930 and promotion dates accordantly?
 

unmerged(71191)

Private
Mar 9, 2007
16
0
Why not just go here to this file:
db/leaders/natinalistchina.csv
And amend start dates to 1930 and promotion dates accordantly?

That would have been a good idea if I were only trying to get access to stronger leaders early :)

But my plan is actually more like this... let's say China annexes Japan, but because Japan has got some famous and very competent leaders (ie Yamamoto), I would be more than happy to see them fighting for the Chinese (unrealistic you might say, but that is what I want to do...), as if they have been convinced and invited into the ROCA after having served as POWs.

So I thought in order to do that I should create these new leaders and only wake them via an event... which did not work the way I had expected... :(
 

unmerged(42223)

Imperial Minister
Mar 28, 2005
3.437
0
Yep that would be tricky.
Never done it, but someone probably has.
 

unmerged(58571)

Field Marshal
Jul 1, 2006
6.288
0
The wake_leader command is indeed buggy.
I'm surprised you received a message at all.
 

unmerged(71191)

Private
Mar 9, 2007
16
0
Wobbler said:
The wake_leader command is indeed buggy.
I'm surprised you received a message at all.

So I just tested this command again and I got the following conclusion (correct me if I am wrong):

wakeleader command does not work at all :mad: !

I set my leaders at start year 1960 -------> EMBARKED message pops up and nothing else showed up, so I assumed even you wake them, you still have to wait until their actual start year...

by default Claire Chennault is set at start year 1930 ---> but when the event fired not even a message mentioned him... so I must say that the system assumed that he already exists and did not even bother putting a message... and voila he is lost forever :eek:

combining these 2 traits, the wakeleader command is pointless because I can just add new leaders and assign a late start year... the only effect it does is an event screen telling me "who is available as a leader"...

No offense to HOI2 staff, but did they not know about this at all? Or was it so bad that they found it impossible to fix?
 
Last edited:

unmerged(42223)

Imperial Minister
Mar 28, 2005
3.437
0
UNSF said:
So I just tested this command again and I got the following conclusion (correct me if I am wrong):

wakeleader command does not work at all :mad: !

No offense to HOI2 staff, but did they not know about this at all? Or was it so bad that they found it impossible to fix?

Well to fair about it, most things work and as well for modding purposes there are usually two or three ways to achieve one goals.

Case in point: see this new thread
 

HistoryMan

Colonel
14 Badges
Jun 1, 2004
1.066
0
  • Hearts of Iron Anthology
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • East India Company Collection
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Majesty 2
  • Victoria: Revolutions
  • Semper Fi
  • 500k Club
  • Rise of Prussia
  • Mount & Blade: Warband
  • Achtung Panzer
UNSF said:
1. The command for command = { relation which = XXX = -30 } does not work for some reason... in the game it gave me "no immediate effect", and so does for belligerence...
You have the format of the command wrong - it must be as follows :-

command = { type = relation country = XXX value = X }
command = { type = belligerence country = XXX value = X }

IIRC, the limit on a description is something like 255 characters - any more, and you need to export it to a text file in order for it to display in game properly.

Tim
 

unmerged(58571)

Field Marshal
Jul 1, 2006
6.288
0
HistoryMan said:
YIIRC, the limit on a description is something like 255 characters - any more, and you need to export it to a text file in order for it to display in game properly.
I use longer descriptions without any problem.
 

unmerged(71191)

Private
Mar 9, 2007
16
0
Yukala said:
Well to fair about it, most things work and as well for modding purposes there are usually two or three ways to achieve one goals.

Case in point: see this new thread

Hmm... interesting...
but is it possible to use it as an event command? because according to HistoryMan it is used only at the start of a battle scenario...

Actually I just tried to stick it into the action_a of the event ---> and as I had expected it failed to load :p
 

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
UNSF said:
Hmm... interesting...
but is it possible to use it as an event command? because according to HistoryMan it is used only at the start of a battle scenario...

Actually I just tried to stick it into the action_a of the event ---> and as I had expected it failed to load :p
Actually, I think he was talking about my comment that it (the steal_leader command) wasn't needed.

If you assign a leader via event or *.inc file, they will be stolen...even without this command.

This is a workaround for the 'broken' wake_leader command.

Say during the Anschluss event you wanted to add the Austrian leaders to Germany, you could create a bunch of empty Corps (add_corps command) to Germany with the Austrian leaders defined, then Germany gets the leaders. Not sure if they survive a save-reload though.
 

unmerged(71191)

Private
Mar 9, 2007
16
0
xtfoster said:
Actually, I think he was talking about my comment that it (the steal_leader command) wasn't needed.

If you assign a leader via event or *.inc file, they will be stolen...even without this command.

This is a workaround for the 'broken' wake_leader command.

Say during the Anschluss event you wanted to add the Austrian leaders to Germany, you could create a bunch of empty Corps (add_corps command) to Germany with the Austrian leaders defined, then Germany gets the leaders. Not sure if they survive a save-reload though.

Wow, thank you so much for this tip! ;) because I never knew that add_corps could assign leaders so I never though of it...
because I learn commands via the default events, none of them seemed to have ever done that in the add_corp command...
It worked perfectly now and I could just rip leaders from other countries :D

As for the last part, do you mean like if I save the game and reload, they may disappear?
If yes, then my tests showed that they will survive (well, at least for 1 month, as I don't have the patience for a year :p ), even if you drop them from command... they will be fighting for your country forever ... (but there might be a cloning issue if the country you play DoW on the country where you ripped the leader :rofl: )


But the problem I am having is that I am not sure about the correct input value for value and where(this one is for brigade right?)
command = { type = add_division which = "Tsundere Tojo's HQ" value = hq when = 3 }
I mean, is value just simply the name of the unit? say, battleship is battleship, escort carrier is escort_carrier (where spaces are replaced by underscores)...
If yes, then brigades would follow the same rule, right? so for example carrier air group becomes carrier_air_group ...

And last but not least, does letter case matter?
 

unmerged(19841)

Lt. General
Sep 19, 2003
1.296
0
Visit site
UNSF said:
But the problem I am having is that I am not sure about the correct input value for value and where(this one is for brigade right?)

I mean, is value just simply the name of the unit? say, battleship is battleship, escort carrier is escort_carrier (where spaces are replaced by underscores)...
If yes, then brigades would follow the same rule, right? so for example carrier air group becomes carrier_air_group ...

And last but not least, does letter case matter?

command = { type = add_corps which = "Lederhosen Armeegruppe" value = land when = 230 where = 376 }# Comments!


the When is the leader, every leader in the game has his own id number,it can be found in the leader files.
 

unmerged(71191)

Private
Mar 9, 2007
16
0
Ranger mike said:
command = { type = add_corps which = "Lederhosen Armeegruppe" value = land when = 230 where = 376 }# Comments!
the When is the leader, every leader in the game has his own id number,it can be found in the leader files.
No, add_corps is not what I am asking

I am asking about the add_division command... I don't really know how to specify the type of the unit that's being added
command = { type = add_division which = "put name here" value = hq when = 3 }
under value, so far I have only tested "hq", "infantry", and "carrier", which all worked... but as I tried to put "medium_tank" it failed to load... :wacko:

and also I would like to know how to attach, and specify the type of brigade on the added unit using this command...
 

HistoryMan

Colonel
14 Badges
Jun 1, 2004
1.066
0
  • Hearts of Iron Anthology
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • East India Company Collection
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Majesty 2
  • Victoria: Revolutions
  • Semper Fi
  • 500k Club
  • Rise of Prussia
  • Mount & Blade: Warband
  • Achtung Panzer
command = { type = add_division which = "name" value = [division type] when = model where = [brigade type] }

"division type" can be any of the names used in the db/units/division folder.

(armor, battlecruiser, battleship, bergsjaeger, carrier, cas, cavalry, destroyer, escort, escort_carrier, flying_bomb, flying_rocket, garrison, heavy_cruiser, hq, infantry, interceptor, light_armor, light_cruiser, marine, mechanized, militia, motorized, multi_role, naval_bomber, nuclear_submarine, paratrooper, strategic_bomber, submarine, tactical_bomber, transport, transport_plane)

"brigade type" can (similarly) be any of the names used in the db/units/brigades folder.

(anti-air, anti_tank, armored_car, artillery, cag, engineer, escort, heavy_armor, light_armor_brigade, naval_anti_air_l, naval_anti_air_s, naval_asw, naval_fire_controll_l, naval_fire_controll_s, naval_improved_hull_l, naval_improved_hull_s, naval_radar_l, naval_radar_s, naval_torpedoes_l, naval_torpedoes_s, police, rocket_artillery, sp_artillery, sp_rct_artillery, super_heavy_armor, tank_destroyer)

Hope that answers your query. Note that some of the relevant Divisions & Brigades only exist in DD or ARM (naval brigades being the obvious item, but also see how the escort (fighter) unit goes from Division to Brigade, depending on which version of the game you are using).

Tim
 

unmerged(71191)

Private
Mar 9, 2007
16
0
HistoryMan said:
command = { type = add_division which = "name" value = [division type] when = model where = [brigade type] }

Hope that answers your query. Note that some of the relevant Divisions & Brigades only exist in DD or ARM (naval brigades being the obvious item, but also see how the escort (fighter) unit goes from Division to Brigade, depending on which version of the game you are using).

Tim
Thank you a lot! This definitely helps... :)

As for the last part, yes, I am aware of that... but thanks for the reminder, anyway... :p