View Single Post
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 14th, 2020, 08:26 AM
The before and after are tools to help you pick the right phase and priority for a script, and to keep track of which scripts depend on values generated by other scripts. If you've set a reminder that X must come before this, and then you change the phase and priority of X so that it's now after the script with the before, HL will notify you of that at compile time - helps you keep track of your dependencies when you've got hundreds of them, and really helps when you end up with a dependency chain that's 3 or 4 items long, and you find you need to modify the timing of the second one in the chain, because a new script needs to be inserted in the middle of the chain.

The default phase and priority varies by game (it's set in definition.def), but it's usually ultra-early, like it's First/100 in PF1 and d20 and First/1000 in Shadowrun. I consider it very bad practice to ever make use of those defaults, though - it causes so many problems with scripts depending on the results of other scripts to have a group of scripts bunched up at the same phase/priority - it makes it a real hassle to de-tangle timing dependencies once you end up adding something else that has to make use of the results of one of those scripts, and another thing that is needed by that same script.

Last edited by Mathias; October 14th, 2020 at 08:44 AM.
Mathias is online now   #2 Reply With Quote