Why my popup script does not fire ?

Please post here for questions and discussion about modding for Strategic Command.
Post Reply
User avatar
welk
Posts: 1122
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Why my popup script does not fire ?

Post by welk »

I am trying to implement a popup message script in my mod.
The function of the popup is to ask player to verify victory conditions (These conditions are special, and explained in the readme : they are external of the game, because in battles, victory conditions depend of moral + losses)

I have written this script :
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; POPUP EVENTS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;VICTORY CONDITIONS VERIFICATION
;
{
#NAME= VICTORY CONDITIONS VERIFICATION
#POPUP= <<TAG_1>>
#MESSAGE= VERIFY IF VICTORY CONDITIONS OF CURRENT ARE SATISFIED (See readme of the mod)
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0 ; Level game has to be at least "green"
#GV= 1[1,100]
#LINK= 0[0]
#COUNTRY_ID= 59 ; Italy is Roman army
#TRIGGER= 100
#PRIVATE= 0
#DISPLAY_ORDER= 1
#DISPLAY_TURN= 1
#DISPLAY_STYLE= 0
#MESSAGE_STYLE= 0
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
#MAP_POSITION=25,25 ; center of screen
#DATE= 0001/05/1
#ALIGNMENT_POSITION= 50,10 [1] ; coordinates of the army roman camp, that is Italy (Axis)
#VARIABLE_CONDITION= 59 [1] [100] [0] ; Italy in Axis side and not surrended
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0] ; dummy condition, always satisfied
}

But it does not "fire". What is wrong in my text script ? (I suspect that my date is wrong : I should have set the date of beginning and not the date of end battle. But when I change the date and set 1 in place of 3, I have same result : script does not "fire", and it should, I think)
I have verified thet the box of the script was checked in scripts window : it's not the origin of pb
I tried to change the type of the script (3 in place of 2, but same result : script does not fire

The script appears ok in the editor when I use the button "View"
CAPTURE_SCRIPTS.png
CAPTURE_SCRIPTS.png (2.04 MiB) Viewed 369 times
User avatar
BillRunacre
Posts: 6827
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why my popup script does not fire ?

Post by BillRunacre »

Does it work if you change this:

#COUNTRY_ID= 59 ; Italy is Roman army

to this:

#COUNTRY_ID= 59
; Italy is Roman army

Same with the alignment, variable and condition positions one (this may not make any difference, but just in case...).

#DISPLAY_TURN= 1 means it will only appear on the Axis turn.

For testing purposes I would definitely have the date as the first turn of the campaign.

TYPE= 2 means it will pop up every turn that its conditions are met, once you've got it working you may wish to change this to TYPE= 1.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
welk
Posts: 1122
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Why my popup script does not fire ?

Post by welk »

It's curious : I tried that and the script does not fire
50,10 is the position of Roman camp (Italy, under Axis control)
ID 59 is ITALY (Roman army)
#DATE= 0001/05/01 is the beginning of the campaign (first turn)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; POPUP EVENTS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;VICTORY CONDITIONS VERIFICATION
;
{
#NAME= VICTORY CONDITIONS VERIFICATION
#POPUP= <<TAG_1>>
#MESSAGE= VERIFY IF VICTORY CONDITIONS OF CURRENT ARE SATISFIED
#IMAGE= yamamoto.png
#SOUND= victory_march.ogg
#FLAG= 0
#TYPE= 2
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#COUNTRY_ID= 59
#TRIGGER= 100
#PRIVATE= 0
#DISPLAY_ORDER= 1
#DISPLAY_TURN= 0
#DISPLAY_STYLE= 0
#MESSAGE_STYLE= 0
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
#MAP_POSITION= 25,25
#DATE= 0001/05/01
#ALIGNMENT_POSITION= 50,10 [1]
#VARIABLE_CONDITION= 59 [1] [100][0]
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}
User avatar
BillRunacre
Posts: 6827
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why my popup script does not fire ?

Post by BillRunacre »

welk wrote: Sun Dec 07, 2025 7:21 pm
#FLAG= 0
This needs to be #FLAG= 1 to fire, or you can manually turn it on in the Options -> Advanced -> Scripts, but for testing purposes I would definitely have it set to #FLAG= 1.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
welk
Posts: 1122
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Why my popup script does not fire ?

Post by welk »

The script is now that (#FLAG= 1), but it does not work. Very curious, I verified all parameters, and this script is very simple and clear : in logic, it should normally fire at the first turn (the first turn is for red side and the campaign begin 1 may of year 1) :shock:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; POPUP EVENTS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;VICTORY CONDITIONS VERIFICATION
;
{
#NAME= VICTORY CONDITIONS VERIFICATION
#POPUP= <<TAG_1>>
#MESSAGE= VERIFY IF VICTORY CONDITIONS OF CURRENT ARE SATISFIED
#IMAGE= yamamoto.png
#SOUND= victory_march.ogg
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#COUNTRY_ID= 59
#TRIGGER= 100
#PRIVATE= 0
#DISPLAY_ORDER= 1
#DISPLAY_TURN= 0
#DISPLAY_STYLE= 0
#MESSAGE_STYLE= 0
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
#MAP_POSITION= 25,25
#DATE= 0001/05/01
#ALIGNMENT_POSITION= 50,10 [1]
#VARIABLE_CONDITION= 59 [1] [100][0]
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}
User avatar
BillRunacre
Posts: 6827
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why my popup script does not fire ?

Post by BillRunacre »

Email me the campaign and I'll have a look. It might not be for another 24 hours though.

bill.runacre@furysoftware.com
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
welk
Posts: 1122
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Why my popup script does not fire ?

Post by welk »

Ok, thanks a lot, I will do that (I will use dropbox because the file is too heavy for my mail : More than 200 mo)

Sounds and music will be joined in the directory of campaign : you will discover "Ancient Battlefield" in prime time ;) (some parameters have nore to be adjusted in details but mod is almost in the final way)
User avatar
welk
Posts: 1122
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Why my popup script does not fire ?

Post by welk »

Links is here : I suppressed the link (no more utility now), mod will soon be finalized
Last edited by welk on Mon Dec 08, 2025 6:03 pm, edited 1 time in total.
User avatar
BillRunacre
Posts: 6827
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why my popup script does not fire ?

Post by BillRunacre »

I ran the campaign without making any changes, and the POP UP has appeared at the start of the first turn.

Could it be that you had "Messages" disabled in the Options screen within the game?

PS I laughed on seeing the designer's names in the credits! :D

And the battle itself looks marvellous. 8-)
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
welk
Posts: 1122
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Why my popup script does not fire ?

Post by welk »

You are right :lol: I am the most dummy modder I never seen :mrgreen: : I had unchecked "messages" option in options, all thnigs work perfect now

The battle otself (and following battles) will be improved to be more interessant in terms of tactic/strategy, at this time it's just a quick test battle to verify if all functions work correctly
User avatar
BillRunacre
Posts: 6827
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why my popup script does not fire ?

Post by BillRunacre »

Excellent, I would have been really confused if it hadn't been that! :D

Sometimes the simplest solutions are the best, for after the frustration, they put a smile on our faces.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
Post Reply

Return to “Scenario Design and Modding”