Information about Monster Drops

slyz

Developer
Code:
> ashref meat_drop

int meat_drop( )
int meat_drop( monster )
float meat_drop_modifier( )

> ashref item_drop

float item_drop_modifier( )
int [item] item_drops( )
int [item] item_drops( monster )

I found those by checking in SmartStasis. I think the version without input is for use in a consult script, the ( monster ) version should suit you.
 
Last edited:

heeheehee

Developer
Staff member
Incidentally, the map generated by item_drops(m) tends to be inaccurate in the event that an item is dropped multiple times by the same monster. I made a workaround for this in my Profit_FX.ash (by parsing monsters.txt and adding some more elements to a record), but it's pretty messy and inefficient.
 

slyz

Developer
Wow, I see what you mean by messy o_O
I'll try poking at it later to understand what's happening on lines 174-237.
 

heeheehee

Developer
Staff member
I found a bunch of redundancies when looking over it to explain, so I'll have a new version up with the code cleaned up within half an hour, tops. (Just hope it'll be up by the end of the day, heh)

Edit: It's totally up.
 
Last edited:

zarqon

Well-known member
How much meat will drop from a monster:

PHP:
to_float(meat_drop()) * (max(0,meat_drop_modifier()+100))/100.0;

The max() is necessary, since you don't actually lose meat when your meat drop modifier is negative!
 
Top