Manual Item Quant Editing

Nightmist

Member
Is it currently possible for a script to manually alter the item quantities that mafia handles internally?

I'm looking for this ability for my trade handler (Since if you offer up a item in trade, mafia wont recognise that the item is gone until you do a inventory refresh which would need to be after every single trade handled... which is "unnecessary" server hammering)
 

holatuwol

Developer
No, however, one of my goals is for the internal engine to recognize things that happen in the relay browser (which is why I don't want to give ASH scripts to do so).  A side-effect of recognizing things that happened in the relay browser is that visit_url will recognize that something happened as well.

So I've added "trades" as an area where something happens and I need to investigate more.  Off-hand, are there are any other places where KoLmafia makes a mistake in inventory tracking?
 

Nightmist

Member
Personally I ment in response to a trade so I'm using cli_execute( "URL") rather then visit_url as I have no intention of keeping the output string. Although I just realised, all I need to do is keep a int map with a single "item" key, I can simply add the number of "traded" items into the map and then when calculating current inventory, simply takeaway the value for the item I'm trading in the map from the item_amount return. (Effectively item_amount-ItemsTraded=RemainingQuantOfItem) If I decide to use this system (Which I might actually since it also means almost a "trade history" which might be interesting) then this request isn't really "needed" for me anymore.

Off-hand I can't think of any other places that mafia loses track.
 
I had trouble with it recognizing the mosquito larva during the spooky forest quest. It recognized that I acquired it because I had the condition in effect, but when you visit the council I believe it removes it from your inventory. You have to do an inventory refresh to use it.
 
Top