Page 1 of 1

Problem with Events

Posted: Wed Nov 25, 2020 1:54 pm
by Tidavis
Will events set before 1939/09/01 fire when they are supposed to? I have tried but have not been able to get them working. Is this a hard coding issue or is there a setting I am missing.

I am just playing around with a mod that starts the war in April of 1939.

Thank You for any help.

[:)]

RE: Problem with Events

Posted: Thu Nov 26, 2020 7:16 am
by BillRunacre
If the campaign starts earlier, and the date of the scripts has been set to start earlier, then the only thing I can think of is that the scripts need to be recompiled.

To do this, in the editor go to Campaign -> Edit AI Scripts and press the button at the bottom to Update all with an *.

Then do the same for Campaign -> Edit Event Scripts.

Then save, and you will be able to start playing with the scripts compiled and hopefully they will now work as intended. [:)]

RE: Problem with Events

Posted: Sat Nov 28, 2020 1:12 pm
by Tidavis
Thank You Sir! That was problem. I think I will have another question real soon about events. As soon as I run out of different things to try and make the event work.

:)

RE: Problem with Events

Posted: Sun Nov 29, 2020 3:24 am
by Tidavis
Here is what I am trying to do. Reform Czechoslovakia and bring it into the war when Presov is recaptured.

{
#NAME= DE 800 - Czechoslovak National Council.
#POPUP= Czechoslovak National Council arrives in Presov.
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 800[0]
#COUNTRY_ID= 30
#TRIGGER= 100
#ALIGNMENT= 2
#DATE= 1939/04/01
;Set variable conditions:
;Germany politically aligned with Axis and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
}

{
#NAME= DE 800 - The Czechoslovak National Council reforms in Presov.
#POPUP= The Czechoslovak National Council reforms in Presov.
#IMAGE= slovakrising1.png, slovakrising2.png, slovakrising3.png
#SOUND= battle2.ogg
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#COUNTRY_ID= 96
#RECIPIENT_ID= 30
#REMOVE= 0
#TRIGGER= 100
#DATE= 1939/04/01
#VARIABLE_CONDITION= 45 [1] [100] [0]
#MAP_POSITION= 110,43
}

The event fires fine. Presov is now the capitol of CZ But it reforms as 0% allied and not at war. Do I need another event to automatically be at war with the axis when this event fires?

RE: Problem with Events

Posted: Sun Nov 29, 2020 10:54 am
by Tidavis
This does not fire at all.

{
#NAME= Czechoslovakia Enters War With Germany
#POPUP= Czechoslovakia declares war on Germany.
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
; Set link value to always trigger (dummy value)
#LINK= 0[0]
#TRIGGER= 100
#COUNTRY_ID= 45
#BELLIGERENCE_ID= 30
#DATE= 1939/04/01
#FAILSAFE_DATE= 1948/01/01
; 1st Line - Poland politically aligned with the Allies and not surrendered AND
; 2nd Line - Germany politically aligned with the Axis and not surrendered
#VARIABLE_CONDITION= 85 [2] [100] [0]
#VARIABLE_CONDITION= 45 [1] [100] [0]
; 1st Line - Poland and Germany are belligerent
#BELLIGERENCE_CONDITION= [85,45]
; Dummy condition position (always satisfied)
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}

I guess I need a better guide for writing events. :(

RE: Problem with Events

Posted: Sun Nov 29, 2020 4:49 pm
by BillRunacre
ORIGINAL: Tidavis

The event fires fine. Presov is now the capitol of CZ But it reforms as 0% allied and not at war. Do I need another event to automatically be at war with the axis when this event fires?

Yes, use a Mobilization_2 or Mobilization_3 script, depending on what triggers you want to swing CZ into entering the war. Set it to a high percentage, e.g. 100% if you want it to enter immediately upon being formed.

If CZ is a Minor then this should be all you need.

RE: Problem with Events

Posted: Mon Nov 30, 2020 5:10 am
by Tidavis
Thanks Bill!. I was trying a mobilization 1 script with predictable results. The mob 2 script worked just fine and now my chain of events are working as intended.

:)

RE: Problem with Events

Posted: Mon Nov 30, 2020 8:50 am
by BillRunacre
Excellent! [:)]

RE: Problem with Events

Posted: Mon Nov 30, 2020 11:23 am
by Tidavis
One last question, for now at least. Which event sections handles the transfer of a capital? I've been looking through and maybe I missed it.

RE: Problem with Events

Posted: Mon Nov 30, 2020 5:44 pm
by BillRunacre
Do you mean when a capital is lost and it transfers to another location?

If so, that is not scripted, but instead the alternative capitals have to be set as such in Campaign -> Edit Country Data.

RE: Problem with Events

Posted: Mon Nov 30, 2020 11:19 pm
by Tidavis
That's not it. For my mod, the first city of Czechoslovakia to be liberated is Presov, should the Allies regain Prauge, how do I move the capital there or once the territory is re owned/annexed into Czechoslovakia, will auto move there?

RE: Problem with Events

Posted: Tue Dec 01, 2020 7:07 am
by BillRunacre
Ah, I see. The only way to have Prague be the capital would be to have it be the first hex listed in the TERRITORY script that creates Czechoslovakia.