Scripts that fire on BOTH the Axis and Allied turns?

Post bug reports and ask for help with other issues here.
Post Reply
User avatar
Elessar2
Posts: 1482
Joined: Wed Nov 30, 2016 12:35 am

Scripts that fire on BOTH the Axis and Allied turns?

Post by Elessar2 »

Ran into this during testing for my scenario awhile back, and it has confused me a bit. I was under the impression that script would fire EITHER on the Allied turn, or the Axis turn. But testing has revealed several types which end up firing on BOTH turns. These would include National Morale and all four types of Mobilization (at least some). The thing is, since a lot of the scripts I am using are legacy ones (either from the default scenarios or other modders), the way that they were constructed seems to indicate that the person who made them assumed that they indeed DID fire on just the Axis or Allied turns, as their texts for the player to make an informed decision would often say something like "Lose 500 National Morale a turn" when the script in question indeed says -500, not -250 (to account for the double-firing).

Needless to say this has caused a bit of confusion for both me and my testers and has thrown off game balance in these areas.

So, am I losing my mind or was this changed at some point? Yes, I know, I can make a dummy DE since those can be set to specifically fire on either the Axis or Allied turn, but would require a large amount of scripting.
User avatar
Taxman66
Posts: 2315
Joined: Tue Mar 18, 2008 10:28 pm
Location: Columbia, MD. USA

Re: Scripts that fire on BOTH the Axis and Allied turns?

Post by Taxman66 »

Check Discord.

Beriand found a script setting/indicator that tells when to fire scripts.
"Part of the $10 million I spent on gambling, part on booze and part on women. The rest I spent foolishly." - George Raft
User avatar
welk
Posts: 1287
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Scripts that fire on BOTH the Axis and Allied turns?

Post by welk »

Could you please continue the discussion here, and to give informations about this way that
Beriand found (a script setting/indicator that tells when to fire scripts) ?

It's very interessant and I have not access to discord (too complicated for me)

I also noticed that scripts fire on the Axis and Allied turns the both, and I search a way to avoid that in some cases, because it's for my work usefull in some cases, but in other cases it's a problem

EDIT : I just examined that (perhaps am I wrong, I am newbe in scripting) :mrgreen: :

This parameter line named
#AI=

Concerning this line, documentation scripts gives these informations :

0 = Event fires whenever all fields are satisfied for any game type
1 = Event fires whenever all fields are satisfied, for Single Player games only, and only when the AI is Axis
2 = Event fires whenever all fields are satisfied, for Single Player games only, and only when the AI is Allied
3 = Event fires whenever all fields are satisfied, for any game type, and only when the AI is Axis in Single Player, or on Allied Multiplayer turns
4 = Event fires whenever all fields are satisfied, for any game type, and only when the AI is Allied in Single Player, or on Axis Multiplayer turns

I did not see that before, I always used 0

But could not 3 or 4 be usefull in place of 0 ?

3 = Event fires whenever all fields are satisfied, for any game type, and (...) only on Allied Multiplayer turns
4 = Event fires whenever all fields are satisfied, for any game type, and (...) only on Axis Multiplayer turns

I suppose that your scenarios are multiplayer's scenarios
Could you please give a detailled example of on of your scripts that was firing the both turns ? (Axis and Allie turns)
We could examine what is set for the parameter line #AI= in the example script
User avatar
welk
Posts: 1287
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Scripts that fire on BOTH the Axis and Allied turns?

Post by welk »

I did search in the scripts of your campaign "Crusade in Europe" (you did send it to me, to see it), and I did see (as example) this event script :

{
#NAME= UK - Loss of Gibraltar
#POPUP= The Loss Of Gibraltar Impacts British National Morale
#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]
#COUNTRY_ID= 112
#TRIGGER= 100
; Set how many NM points should be gained or lost over X turns
#NM_UPDOWN= -8000
#NM_TURNS= 1
#DATE= 1939/09/01
#OBJECTIVE_TEXT_POSITION= 214,180
; Set alignment position and controller's political alignment:
; Gibraltar is in Axis hands
#ALIGNMENT_POSITION= 214,180 [1]
; Set variable conditions:
; 1st Line - UK politically aligned with the Allies and not surrendered
#VARIABLE_CONDITION= 112 [2] [100] [0]
; Dummy condition position (always satisfied)
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}

Perhaps could you try to replace 0 by 3 or 4 in the "#AI=" line, and to see what happends

I did a fast verification, and I did see that in National moral.txt, all your scripts are set like that : #AI= 0
User avatar
Taxman66
Posts: 2315
Joined: Tue Mar 18, 2008 10:28 pm
Location: Columbia, MD. USA

Re: Scripts that fire on BOTH the Axis and Allied turns?

Post by Taxman66 »

You found what Beriand found.
"Part of the $10 million I spent on gambling, part on booze and part on women. The rest I spent foolishly." - George Raft
User avatar
welk
Posts: 1287
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Re: Scripts that fire on BOTH the Axis and Allied turns?

Post by welk »

I have not enough money to buy the copyright, I'm going to steal Beriand's idea :twisted:

Very usefull, I did never take this in mind, I did just let always AI=0 like it was in ordinary other script, without thinking about another possibility
User avatar
Elessar2
Posts: 1482
Joined: Wed Nov 30, 2016 12:35 am

Re: Scripts that fire on BOTH the Axis and Allied turns?

Post by Elessar2 »

Thanks for the clarification welk, guess I'll have to use that then.
Post Reply

Return to “Tech Support”