So, I've already coded this feature (except for some GUI stuff that shouldn't be too hard), I just want to see what feedback there is before adding it.
The idea is to have a familiarScript (name subject to feedback) that runs when you switch familiars to determine what equipment to switch to, to augment or override KoLmafia's built-in equipment switching. An example script:
Returning false means that normal equipment switching should happen after the script finishes, while true means it should be skipped, so the script has to have a boolean main() function. This isn't actually limited to switching familiar equipment, obviously, but that would be its primary purpose. The GUI part that needs coding still is a box in the Automation section of Preferences.
The idea is to have a familiarScript (name subject to feedback) that runs when you switch familiars to determine what equipment to switch to, to augment or override KoLmafia's built-in equipment switching. An example script:
Code:
boolean main()
{
if ( !can_interact() ) return false;
switch ( my_familiar() )
{
case $familiar[stocking mimic]:
equip( $item[bag of many confections] );
return true;
case $familiar[artistic goth kid]:
equip( $item[little wooden mannequin] );
return true;
case $familiar[Disembodied Hand]:
case $familiar[Mad Hatrack]:
case $familiar[Fancypants Scarecrow]:
case $familiar[Comma Chameleon]:
return true;
default:
equip( $item[li'l businessman kit] );
}
return false;
}
Returning false means that normal equipment switching should happen after the script finishes, while true means it should be skipped, so the script has to have a boolean main() function. This isn't actually limited to switching familiar equipment, obviously, but that would be its primary purpose. The GUI part that needs coding still is a box in the Automation section of Preferences.