modifier is now a reserved word in ASH scripts

Ryo_Sangnoir

Developer
Staff member
Much like $path before it, we've added a $modifier type. This is to be used as $modifier[Meat Drop] or $modifier[Four Songs] (for example), to use in functions like numeric_modifier(item, modifier) or effect_modifier and so on.

There is now also a function split_modifiers(string) that takes a $modifier[Modifiers] string and splits it into a map of modifiers to strings.

Some existing scripts may break. Most should be fixed quickly. If one you are using is not fixed, you can examine the error message for a message like:

> Reserved word 'modifier' cannot be a variable name (bastille.ash, line 2337, char 52 to char 60)

and find the relevant line and character, and adjust the variable "modifier" to be anything except "modifier" (for example, "mod").
 

Ryo_Sangnoir

Developer
Staff member
If you have Gain, Bastille, Helix-Fossil, Genie or Asdon-Martin-GUI installed, you may want to install my forks over the top (if you delete them, they may get re-installed as dependencies of other scripts you're using):

git checkout midgleyc/Gain Release
git checkout midgleyc/Bastille Release
git checkout midgleyc/Helix-Fossil Release
git checkout midgleyc/Genie Release
git checkout midgleyc/Asdon-Martin-GUI Release
 
Last edited:

fronobulax

Developer
Staff member
Some existing scripts may break.

This broke a bunch of my scripts.

Are you questioning the wisdom of the change or the speed with which it was rolled out or will you follow up with the script authors of your scripts?

I confess I was surprised at how quickly this was implemented and how it little it was discussed in the places I monitor prior to rollout, but I'm not going to advocate for a rollback. Indeed all of the scripts I use either still work or were updated so they work and the only "cost" to me was fetching the updates.
 

Ryo_Sangnoir

Developer
Staff member
bastille still works, PirateRealm and FantasyRealm don't.

thanks for this.
Both of these depend on Gain, so if you run "git checkout midgleyc/Gain Release" you'll get my forked version with the fixes.

Don't delete the existing Ezandora version of Gain, as both PirateRealm and FantasyRealm depend on it -- if you delete it, they'll install it again, and then you'll be back to the broken version.
 

Crowther

Active member
I didn't want to spend my weekend fixing scripts, so I just reverted the change and went about my day.

Using a massive "grep" command I discovered which scripts had modifier used as a variable.

Ignoring the ones related to Gelatinous Noob and Crimbo 2014, I came up with just these:

UberPvPOptimizer and bastille

I actually thought it would be more given how quickly my daily routine was stopped.

Edit: Oh, I didn't list gain, because I didn't think anything I had used it.
 
Last edited:
Top