I can certainly understand the bloat issue.
[quote author=holatuwol link=topic=938.msg4645#msg4645 date=1180043990]
For consistency reasons, museum_amount was changed to display_amount to match all of the put_display functions. closet_amount was removed and combined with item_amount -- so now, item_amount will return how much is available in the inventory and in the closet.
[/quote]
Just a thought or idea which goes along the same path, but might do more for eliminating ash function bloat:
New Data type: $Storage[] (maybe a better name for it?)
Possibilities: inventory, closet, hagnk, display, shop, stash
Replacement for all put and take type commands:
put(in, amount, item) where to is of the $Storage type and shop in the to location would leave limit and price blank. Hagnk in the to location would generate an error.
Take(from, amount, item) where from is of the $Storage type
Replacement for all amount type functions:
amount(in, item) where in would be of the $storage type
The shop_put command has extra parameters, but for it we could resort to the CLI version if we need them. When shop is passed to take it might generate an error, or it might have a clever way of handling it like if less than 3 take 1 at a time, more than 3 take all, then put the excess back.
It seems this would actually take 15 (i think) functions and reduce them to 3, and a new datatype. item_amount returning the total in the closet, and inventory might prove separately useful, but excluding it from removal isn't as productive. 6 of one half a dozen of the other.
visual samples:
int a = $storage[closet].amount($item[turtle totem]);
$storage[display].take(1, $item[turtle totem]);
$storage[display].put(1, $item[turtle totem]);
take($storage[display], 1, $item[turtle totem]); if converted to a sentence like a person would say it would be "Take from display case one turtle totem." which I think covers readability, and making sense.
As you can probably see this would also allow users to quick fix most of their scripts using search/replace in their favorite editor, reduces ash function bloat, and does not reduce functionality. All functions remain available, but require a slightly different calling convention. Some new functionality may even come to be in the process.
I cannot say that I personally use closet_amount, but I know my sister does. I do not remember the script details, and she is away from home right now, but I know closet_amount was required for it to function properly as it verified items which she needs are in her closet, then gets rid of any excess which lingered in her inventory. It could be changed to use the museum, but she prefers people not know what she has to reduce the likelihood of beggars and scammers bugging her.
other ideas after looking through the wiki:
void wait( int delay ) seems to me that this one could be a candidate for becoming a cli_execute only command? Just a thought. It would be easy for most users to fix their scripts in this event.
void print( string helloworld )
void echo( string helloworld ) is there a functional difference between these 2 commands? Could they be merged in some fashion if so?
stat current_hit_stat()
int buffed_hit_stat() since current_hit_stat tells you what stat to check isn't buffed_hit_stat replication of int my_buffedstat( stat st )? Couldn't the user use my_buffedstat(current_hit_stat()) to arrive at the same place?
float elemental_resistance( element elem )
float cold_resistance()
float hot_resistance()
float sleaze_resistance()
float spooky_resistance()
float stench_resistance() Looks like 1 function that does what's wanted and 5 more that do the same? Really if you wanted to these could be combined with the list below also
int raw_damage_absorption()
float damage_absorption_percent()
int damage_reduction()
int combat_percent_modifier()
int initiative_modifier()
int fixed_experience_bonus()
int meat_drop_modifier()
int item_drop_modifier()
int monster_level_adjustment()
seems these functions could be reduced to 1:
float Modifier(string) where string would be one of: "raw_damage_absorption", "damage_absorption_percent", "damage_reduction", "combat_percent", "initiative", "fixed_experience_bonus", "meat_drop_modifier", "item_drop_modifier", "monster_level_adjustment" and possibly the various elemental resistances from above. Does kolmafia auto convert float to int as needed?
Well if you make use of any one of these ideas (and/or hopefully change your mind about closet_amount's functionality being just gone) then it was worth my effort to type all this ;D wow this is a long post!