[ default ]
special action
consult SmartishStasis.ash
attack with weapon
[957] Haunted Library
Encounter: bookbat
Round 0: y0u wins initiative!
Evaluator syntax error: can't understand myhp)
Evaluator syntax error: expected ), found
Round 1: y0u casts SAUCY SALVE!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
You gain 10 hit points
Evaluator syntax error: can't understand myhp)
Evaluator syntax error: expected ), found
[...skipping some rounds]
Round 6: y0u casts SAUCY SALVE!
KoLmafia thinks it is round 7 but KoL thinks it is round 4
You gain 15 hit points
Round 7: bookbat takes 24 damage.
You gain 24 Mana Points
Round 7: bookbat takes 31 damage.
Round 7: y0u wins the fight!
You acquire an item: tattered scrap of paper
You acquire an item: Game Grid token
You gain 4 Strengthliness
You gain 6 Mysteriousness
You gain 6 Sarcasm
Evaluator syntax error: can't understand myhp)
Evaluator syntax error: expected ), found
Evaluator syntax error: can't understand myhp)
Evaluator syntax error: expected ), found
I've written a few utilities for myself that will help me identify anything missing from the data files. However, since "update" no longer downloads mafia's internal data files (I used to d/l them and then "update clear" afterwards), I'm not sure how to access these files anymore. Basically I'm looking for a way to find out in ASH if a given item is a combat item. Anyone know how I could get this info from within ASH?
Works for me.However, since "update" no longer downloads mafia's internal data files (I used to d/l them and then "update clear" afterwards), I'm not sure how to access these files anymore.
> update data
Downloading adventures.txt...
Downloading buffbots.txt...
Downloading classskills.txt...
Downloading combats.txt...
Downloading concoctions.txt...
Downloading consequences.txt...
Downloading defaults.txt...
Downloading equipment.txt...
Downloading familiars.txt...
Downloading foldgroups.txt...
Downloading fullness.txt...
Downloading inebriety.txt...
Downloading itemdescs.txt...
Downloading modifiers.txt...
Downloading monsters.txt...
Downloading nonfilling.txt...
Downloading npcstores.txt...
Downloading outfits.txt...
Downloading packages.txt...
Downloading pulverize.txt...
Downloading spleenhit.txt...
Downloading statuseffects.txt...
Downloading tradeitems.txt...
Downloading zapgroups.txt...
Downloading zonelist.txt...
Please restart KoLmafia to complete the update.
> update clear
Please restart KoLmafia to complete the update.
I see that item_type() exists - but, that returns "food" or "zap wand" or "familiar larva" or "shield" or "accessory" or "shirt" - which are all primary uses for items. "combat" is (often) a secondary use for a "usable" item, and I don't see anything that checks for that.Basically I'm looking for a way to find out in ASH if a given item is a combat item. Anyone know how I could get this info from within ASH?
so, one might think that a $item should have a proxy record associated with it too, for such uses. But, no. Instead, we have things like is_tradeable(), is_giftable(), autosell_price(), and so on. In retrospect, all of those should just have been proxy fields of a $item, rather than special functions. But for some reason, Jason didn't implement proxy records back when ASH was being designed, years before he joined the team.> ash $skill[stream of sauce].combat
Returned: true
> ash $skill[cocoon].combat
Returned: false
Works for me.
and followed it up with:r9028 | jasonharper | 2011-02-09 19:33:29 -0600 (Wed, 09 Feb 2011) | 13 lines
ASH item and familiar values (and more types in the future) can now be
treated as read-only records, to access various attributes that previously
required reading a data file with file_to_map(). Example: for any item X,
X.inebriety is its amount of drunkenness, 0 for non-booze items. This
approach avoids the inevitable breakage of existing scripts that would have
occurred if I had added global functions for each of these attributes.
To find out what attribute fields are implemented for some datatype, just
display an arbitrary example of that type via the gCLI "ash" command:
"ash $item[hell ramen]" or "ash $familiar[cocoabo]" for example.
Also removed some lingering traces of a couple of former item use types.
So there is, in fact, a $item proxy record.r9033 | jasonharper | 2011-02-12 14:29:49 -0600 (Sat, 12 Feb 2011) | 2 lines
Add proxy records for ASH skill, effect, and location values.
It would be easy to add additional $item fields. For example, plural, usable, multiusable, combat, curse, candy.> ash $item[hell ramen]
Returned: Hell ramen
fullness => 6
inebriety => 0
spleen => 0
notes => 20-29 meat
descid => 388744461
levelreq => 6
> ash $skill[entangling noodles]
Returned: Entangling Noodles
level => 2
traincost => 500
class => Pastamancer
libram => false
passive => false
buff => false
combat => true
permable => true
> ash $familiar[volleyball]
Returned: Blood-Faced Volleyball
combat => false
hatchling => blood-faced volleyball
image => debug.gif
> ash $effect[gothy]
Returned: Gothy
default => use either 1 spooky eyeliner, 1 spooky lipstick
note =>
all => aggregate boolean [string]
**use 1 spooky eyeliner => true
**use 1 spooky lipstick => true
**drink 1 gloomy mushroom wine => true
image => http://images.kingdomofloathing.com/itemimages/gothy.gif
descid => 06cb86ddd689278c5af31423a8210a72
> ash $location[harem]
Returned: Cobb's Knob Harem
nocombats => false
zone => Knob
parent => Knob
parentdesc => Cobb's Knob
It would be easy to add additional $item fields. For example, plural, usable, multiusable, combat, curse, candy.
Revision 9197 adds a few things:For this particular script, "combat", "usable", and "multi-usable" would make handy item fields. Presently that information is included in the script's ever-growing data file, but I'd imagine removing the string-parsing involved in retrieving it would speed the script up a wee bit (contains_text(<record.field>, "multi") is probably not as fast as $item[name].multi).
If you can find the request for the info to be added to monsters.txt, please add a response asking for it to be available in proxy data. Note that we have no proxy records for monsters yet...I don't think this is present in the data files (yet?) but it would be excellent to have a "plurality" field for monsters -- I think StDoodle may have already requested that this info be included in the data file as it becomes known. That would obsolete one of the four maps that BatMan loads on running.
Bounty item support could stand to be refactored. It's all tied into locations. We have the data to go from a location to the bounty item and count, but no efficient way to do the reverse. I would suggest the following fields:Bounty items could include in the "notes" field some info about where they're found and how many are needed (something like "<n> needed from <loc>"). That would obsolete another map BatMan uses.
We don't save item image names. We could easily scrape them from the item description.For all of the above types it could apply to, having an "image" field would have uses, especially in writing relay scripts. There are several maps on the Map Manager simply matching image names to a subset of a data type, which could be eliminated if the image name were accessible this way.
Nothing for ME to do here.There are also several maps matching familiars to their hatchlings, which it appears have already been obsoleted by this development.
No. The "note" field for effects tell you how to get the effect - and the "all" field breaks multiple methods into a map.Also also, there are several maps matching effects to their enchantment(s) (i.e. Oleaginous Soles => +40% Combat Initiative), which may or may not already be in the "note" field for skills, not sure on that one.
Sounds like a feature request.Relatedly, I'd really like item_type() to return "pasta guardian larva" where applicable -- that would help a good deal in parsing conditional drops from item_drops_array().
No. We should have .adventure, .muscle, .mysticality, and .moxie fields. I think Bale asked for that. Sounds like a feature request...Are substat gains included in the notes field for consumable items? I have a script that parses the three relevant consumables files for that info.
Sigh. Who wrote smashlib? Who will update it? If I see it being updated to not read equipment.txt, I'd be more inclined to help it obviate pulverize.txt. Feature Request.SmashLib (still in rather widespread use) loads two data files for information -- looks like the info it grabbed from equipment.txt is now available in ASH with get_power(), can_equip(), and item_type(), but the info it grabbed from pulverize.txt (special results from smashing -- or nosmash / upgrade flags) is not available.
The last one I can think of is the creation method for creatable items -- where mafia says something like SUSE SMITH TINKER ACOCK etc. There are several scripts around that load concoctions.txt just to get the creation method.
I want individual feature requests, so that we can address each one individually, rather than only being able to close the bug after we've done everything - assuming we ever get to doing everything.If you'd like me to post this elsewhere or make feature requests out of each point, let me know.
I want individual feature requests, so that we can address each one individually, rather than only being able to close the bug after we've done everything - assuming we ever get to doing everything.
SmashLib (still in rather widespread use) loads two data files for information -- looks like the info it grabbed from equipment.txt is now available in ASH with get_power(), can_equip(), and item_type(), but the info it grabbed from pulverize.txt (special results from smashing -- or nosmash / upgrade flags) is not available.
Sigh. Who wrote smashlib? Who will update it? If I see it being updated to not read equipment.txt, I'd be more inclined to help it obviate pulverize.txt. Feature Request.
[COLOR="olive"]> ashq print("If you pulverize 1 million glowing red eyes you should get..."); foreach it,num in [B][COLOR="#008000"]get_related($item[glowing red eye], "pulverize")[/COLOR][/B] print(num + " " + it.plural);[/COLOR]
If you pulverize 1 million glowing red eyes you should get...
1666 effluvious emeralds
666666 clusters of hot nuggets
165000 hot wads
1666 steamy rubies
666666 clusters of stench nuggets
165000 stench wads
666666 clusters of twinkly nuggets
166666 twinkly wads
int[item] test;
test = get_related($item[Emblem of Ak'gyxoth], "pulverize");
if(test == null)
print("Empty");
else
print("Not empty");
Ok, this seems like aproject I can take on. Just one question: How do you test for empty returns (i.e. items that have the nosmash-setting)?
boolean is_pulverizable(item it) {
int [item] pulvy = get_related(it, "pulverize");
if(pulvy contains $item[useless powder])
return false; // Let's not count useless powder...
if(count(pulvy) > 0)
return true; // Yay! Something useful!
// Powders and nuggets can be pulverized also!
if(it.to_int() >= 1438 && it.to_int() <=1449)
return true;
switch(it) {
case $item[sewer nugget]:
case $item[floaty pebbles]:
case $item[floaty gravel]:
// These things can be turned into wads!
return true;
}
return false;
}