Automatic Flavour Tuning

soolar

Member
I've been working on a script that takes care of tuning flavour of magic optimally for me automatically and a couple people expressed interest, so I guess I'm sharing it with the world!

By default, it will set you to whatever element will be super effective against the most enemies in the zone, as long as no enemies in that zone will resist it. In the case of ties, it uses whatever element you have the most elemental spell damage for. If you have no elemental spell damage, and none of the enemies in the zone are elemental, it'll just set you to cold, since you still get the +10 spell damage that way!

How to install:
Code:
svn checkout https://github.com/soolar/flavour/trunk/

How to use:
Once you have it checked out, add "call flavour.ash" as an unconditional trigger to a mood, and it'll work it's magic for you!

How to configure:
There's only one configurable setting at the moment, the zlib variable flavour.perfectonly. If you change it to true, you will only be automatically tuned when that flavour will be super effective against every enemy in your current zone.

Still to come:
  • Some sort of accounting for wandering monsters, somehow?
  • Some convenient way of briefly disabling it when you want manual control, like for hobo killing.
 
I'm going to have to look that over very carefully and figure out how it compares to the function I use in my between battle script!
 
The things I see in my current (probably posted by Bale years ago) script is that it had two locations being handled specially:
Code:
        switch(my_location()) {
        case $location[The Ancient Hobo Burial Ground]: // Everything here is immune to elemental dmg
            if(have_spirit())
                use_skill(1, $skill[spirit of nothing]);
        case $location[Hobopolis Town Square]: // Don't interfere with Scarehobos
            return;
        }
There was also a bit about OCRS:
Code:
        if(my_path() == "One Crazy Random Summer")
            vulns[$element[cold]] -= 0.5;
 
Both great additions to the script! I also added some tunings for speeding up some of walford's bucket quests.
 
On thing I notice is the entire script is in main(). I believe that is an issue for importing it, so multiple between battle scripts can be combined. For example, BBB's main is this:
Code:
void main() { bbb(); }
 
I hadn't even considered using it as a between battle script, I'd just plopped it in my mood, but that's definitely a good policy. Done!
 
On thing I notice is the entire script is in main(). I believe that is an issue for importing it, so multiple between battle scripts can be combined. For example, BBB's main is this:
Code:
void main() { bbb(); }

More of a historical point, as now we can do things like main@BestBetweenBattle()
 
Back
Top