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

Legolas

Colonel
66 Badges
Oct 23, 2001
1.012
2
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Surviving Mars: First Colony Edition
  • Europa Universalis III Complete
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2 Collection
Hello,

I am trying to mod some events for Doomsday, but I couldn't find several features noted in any of the existing FAQs or even in Wiki. So I hope someone on the boards will know, or be able to refer me to where all that is written.

a) if I have an event A which is directly triggered by another event B, can I have event A fire a set amount of time after event B, as opposed to immediately afterwards? Will the offset trigger work? Or should I use "sleepevent" commands instead of "trigger" commands in event B?
b) is it possible to use IF logic within commands? As in, IF {condition} THEN {command [blah] } else {command [blah]}. This would greatly reduce the amount of nearly duplicate events in some cases.
c) is it possible to create any modifiers to ai_chance for an action?
d) is there a command that would allow country X to ban country Y from its alliance (provided that X and Y are allied and X is the alliance leader)?
e) most importantly, is there a tool I could use to check the syntax of my events without loading the game and waiting for an error message?

That's all for now, thank you for any replies :)
 

Gen. Skobelev

Werewolf therapist
81 Badges
May 9, 2005
3.387
251
  • Victoria: Revolutions
Legolas said:
Hello,

I am trying to mod some events for Doomsday, but I couldn't find several features noted in any of the existing FAQs or even in Wiki. So I hope someone on the boards will know, or be able to refer me to where all that is written.

a) if I have an event A which is directly triggered by another event B, can I have event A fire a set amount of time after event B, as opposed to immediately afterwards? Will the offset trigger work? Or should I use "sleepevent" commands instead of "trigger" commands in event B?

Use the event B as trigger in the event A. Like
Code:
	trigger = {
		event = B
And then set the trigger time to whatever you want. If you use sleepevent it will prevent event from happening.

b) is it possible to use IF logic within commands? As in, IF {condition} THEN {command [blah] } else {command [blah]}. This would greatly reduce the amount of nearly duplicate events in some cases.

No.

c) is it possible to create any modifiers to ai_chance for an action?

You can edit the AI chance but not really make it different unless you do duplicate events with slighty different triggers and AI chances.

d) is there a command that would allow country X to ban country Y from its alliance (provided that X and Y are allied and X is the alliance leader)?

Use
Code:
		command = { type = leave_alliance }
command. Remember to add proper peace commands if you want the country to be at peace.

e) most importantly, is there a tool I could use to check the syntax of my events without loading the game and waiting for an error message?

That's all for now, thank you for any replies :)

There used to be some event parser tools but I don't know if they are still around. Good way is to keep the intendation as that helps in tracking missing brackets.
 

Legolas

Colonel
66 Badges
Oct 23, 2001
1.012
2
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris Sign-up
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Surviving Mars: First Colony Edition
  • Europa Universalis III Complete
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2 Collection
Gen. Skobelev said:
Use the event B as trigger in the event A. Like
Code:
	trigger = {
		event = B
And then set the trigger time to whatever you want. If you use sleepevent it will prevent event from happening.

Ok, thanks.

Use
Code:
		command = { type = leave_alliance }
command. Remember to add proper peace commands if you want the country to be at peace.

Do I have to make a separate event for the country leaving the alliance? Or is it possible to code the alliance leaving command for another country?



There used to be some event parser tools but I don't know if they are still around. Good way is to keep the intendation as that helps in tracking missing brackets.

That's what I'm trying to do. Thank you for the replies.

Oh, and another question - are flag names limited in any way? Or do any alphanumeric characters work as parts of their names?
 
Last edited:

Gen. Skobelev

Werewolf therapist
81 Badges
May 9, 2005
3.387
251
  • Victoria: Revolutions
Legolas said:
Do I have to make a separate event for the country leaving the alliance? Or is it possible to code the alliance leaving command for another country?

Make separate event. The command does not define which country leaves the alliance so separate event specifically for that country is needed.