Choose Best Familiar Script

SeiferTim

New member
I was playing with Izchak's awesome Outfit changer script, and thought it would be great to be able to change familiars in a similar way.
First, I tried to add a function to his script that would do it, but it just wasn't viable, so I wrote my own which has some of the simpler elements borrowed from his script.
Any feedback, suggestions, or comments are welcome!
Let me explain a bit of what I did:
First, I made a tab-delemited file which has all the different familiars, placed into different categories based on what they do: meat drop %+, item drop %+, etc. Each familiar has a value attached to it to define how much usefulness it has per pound for each category.
For instance, the Baby Gravy Fairy, under "items" has a value of 1.0
Then I wrote a little script that would pull this file in, and map it, then pick out the best familiar for a particular job, and equip it.
The script takes a string that corresponds to the familiar list, and will look at each of the familiars, look in your terrarium to see if you have that familiar, and if you do, then it multiplies your the weight to the value defined in the list.
For example:
Lets say you have a list that looks like this:
Code:
items	Baby Gravy Fairy	1.0
items	Flaming Gravy Fairy	1.1
items	Frozen Gravy Fairy	1.1
items	Stinky Gravy Fairy	1.1
items	Spooky Gravy Fairy	1.1
items	Sleazy Gravy Fairy	1.1
items	Green Pixie	1.1
items	Wizard Action Figure	0.7
items	Pygmy Bugbear Shaman	0.9
And you own a Baby Gravy Fairy who is 20 pounds, a Frozen Gravy Fairy who is 10 pounds, and a Wizard Action Figure who is 20 pounds. When you run the script for "items", it will come up with the following for the value of each familiar:
Code:
Baby Gravy Fairy = 20
Frozen Gravy Fairy = 11
Wizard Action Figure = 14
It would see that the Baby Gravy Fairy is the best one for the job and equip it.
The whole point of having the values it to handle familiars who perform certain functions randomly, or less frequently than other familiars.
There is a huge hole in the logic when it comes to special familiars, such as the Wizard Action Figure, who is better with his wand, the Sombrero vs Volleyball because one is sometimes better than the other, and familars like the Grue who is stronger on certain days. Perhaps in a later version I will address this... but for now, this is pretty simple, and you can change your values for familiars you like better.

Anyway, let me know if you like/dislike this script!
Thanks!
 

Attachments

  • familiars.txt
    5 KB · Views: 99
  • ChooseFamiliar.ash
    845 bytes · Views: 77
Top