Page 1 of 1

Question for Bill/hubert concerning order of scripts execution

Posted: Sat Oct 03, 2026 3:35 pm
by welk
The script system is really cool, a great tool ;)

Working in scripting (I just begin my studies :mrgreen: ), I did find a little tip to allow users of my ASL Tactic mod (in work) to decide to lunch air supply in some definite drop zones during battle (they appears under mouse). It will be usefull in tactical airborne scenarios, by example.

It's not a "false air supply" based on a general MPP bonus when some hex are controled by a side, but I will use real localized tactical supply depots (dropped by aircrafts).

In this matter, I need please to have precisions concerning this question : Program reads and execute the scripts contained in each file scripts in the order of their redaction, ok.

But in wich order does the program read (= open = exécute) the file themselves ? Is it the order we can see when we go in Editor/Campaign/Scripts/Events ?


Or another order ? (alphabétic, etc)
Or simultaneous action ?
SCRIPTS.jpg
SCRIPTS.jpg (42.6 KiB) Viewed 292 times

Re: Question for Bill/hubert concerning order of scripts execution

Posted: Sat Oct 03, 2026 4:17 pm
by Nginear
I'm not addressing your question, so much as giving a general suggestion. If you are aiming for "airborne" drops, there is a way to make the resource hidden. Neither side can see the resource, but it will give supply to the side that controls it. You could use hidden resources with a RESOURCE script or SUPPLY script, combined with GV settings, to create random supply drop zones that will be different each game. I personally have not heavily experimented with them, but just kind of checked them out one time. They also are used in Pacific's Solomons scenarios.

Re: Question for Bill/hubert concerning order of scripts execution

Posted: Sat Oct 03, 2026 5:30 pm
by welk
Thanks for infos about this "hex system".
I did effectively found an example in templates (SC WIE), but no any example in salomon campaign scripts of WITP (Perhaps in a DLC ? I have yet not them for WITP)

Concerning scripts, it seems that only resource script may be used, because supply scripts never increase supply, they can just decrease it (at least in SC WIE)

My tips is a little bit different : it's not based on hex that provides MPP/Supply, it's based on a real unit's air drop : My supply depots will be real supply units dropped on map by a combination of scripts, and this unit (with high supply parameters) will immediatly distribute supply to another units of it's side.

But your infos will be very usefull in addition of this system, as efficient complement : I will combine my dropped supply units depots with resources scripts (to do what you indicated me), and I will use also masked resources + GV, very interesting suggestion. ;)

In this goal, I need to know the exact order of scripts files execution

Re: Question for Bill/hubert concerning order of scripts execution

Posted: Sat Oct 03, 2026 5:35 pm
by BillRunacre
welk wrote: Sat Oct 03, 2026 3:35 pm The script system is really cool, a great tool ;)

Working in scripting (I just begin my studies :mrgreen: ), I did find a little tip to allow users of my ASL Tactic mod (in work) to decide to lunch air supply in some definite drop zones during battle (they appears under mouse). It will be usefull in tactical airborne scenarios, by example.

It's not a "false air supply" based on a general MPP bonus when some hex are controled by a side, but I will use real localized tactical supply depots (dropped by aircrafts).

In this matter, I need please to have precisions concerning this question : Program reads and execute the scripts contained in each file scripts in the order of their redaction, ok.

But in wich order does the program read (= open = exécute) the file themselves ? Is it the order we can see when we go in Editor/Campaign/Scripts/Events ?


Or another order ? (alphabétic, etc)
Or simultaneous action ?

SCRIPTS.jpg
Decisions will be read first, the others following. I don't have a list of their order, though I have had to occasionally use a dummy National Morale script instead of a POP UP script to ensure things appear to the player in the right sequence.

Re: Question for Bill/hubert concerning order of scripts execution

Posted: Sat Oct 03, 2026 5:39 pm
by welk
Ok, thanks for infos. I noticed also this kind of strange situations, where a decision is executed before it's notification to player :lol:, but with some tips it may be solved .