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

First Lieutenant
Dec 24, 2008
217
0
Yeah...how do you set flags in events?
Let's say I play as Austria, and I want to put in an event, that when player or ai controls certain provinces, they change flag, how do I write that in the event?
If the flagname is, let's say, "flag_habImperial", do I write that in event?
command = { type = setflag which = flag_habImperial } ?
Or is that completely wrong?
 
That would set a "flag" in the AI file which you can use as a trigger later on. It has nothing to do with a visual flag in that sense. As you yourself put it it's flagname.

command = { type = flagname which = Imperial }

flag_xxx may not be in the name. it reads it as flag_habImperial if HAB gets the event. If ENG gets it then it will read as flag_engImperial. ;)
 
That would set a "flag" in the AI file which you can use as a trigger later on. It has nothing to do with a visual flag in that sense. As you yourself put it it's flagname.

command = { type = flagname which = Imperial }

flag_xxx may not be in the name. it reads it as flag_habImperial if HAB gets the event. If ENG gets it then it will read as flag_engImperial. ;)

Aha! I believe I do understand :) So, if the flagname is flag_european_union (from AoI, I'm using it for my own, I'm not using it in a mod or something), would it say..
command = { type = flagname which = European Union } ?
Oh, and with shields, is it the same there? You remove shield_ and the name of country?

And oh again, I almost forgot to thank you :)
 
Aha! I believe I do understand :) So, if the flagname is flag_european_union (from AoI, I'm using it for my own, I'm not using it in a mod or something), would it say..
command = { type = flagname which = European Union } ?
Oh, and with shields, is it the same there? You remove shield_ and the name of country?

And oh again, I almost forgot to thank you :)
The flag file itself should be called "flag_XXXEuropeanUnion.bmp", where instead of XXX you insert the tag of the country you're playing, e.g. FRA for France or HAB for Austria. The game won't recognise and/or use a file that doesn't have a tag in it, as far as I know (so, they all have to be called shield_XXX.bmp, smallshield_XXX.bmp, flag_XXX.bmp in the Gfx\map\shields and Gfx\map\flags folders).

Then, in the event, the command should read:
Code:
command = { type = flagname which = EuropeanUnion }

I hope this helps :).
 
Yeah it does, thanks :) I'm still wondering about the shield though xD Maybe you answered that and I'm just to blind to see it
 
Yeah it does, thanks :) I'm still wondering about the shield though xD Maybe you answered that and I'm just to blind to see it
Oh, sorry. Didn't notice it. The 'flagname' command changes everything - shield, smallshield and flag of the country. If you have the files shield_XXXEuropeanUnion.bmp, smallshield_XXXEuropeanUnion.bmp and flag_XXXEuropeanUnion.bmp in the correct places, the 'flagname' command will change your basic XXX set to XXXEuropeanUnion set.
 
Oh, sorry. Didn't notice it. The 'flagname' command changes everything - shield, smallshield and flag of the country. If you have the files shield_XXXEuropeanUnion.bmp, smallshield_XXXEuropeanUnion.bmp and flag_XXXEuropeanUnion.bmp in the correct places, the 'flagname' command will change your basic XXX set to XXXEuropeanUnion set.

Great :D Thank you very much :)
 
For information, don't forget flagname attribute is not removed when changing tag. Always add a flagname which = "" command before the command that will change the tag.