More importantly, I want to be able to purchase from the NPC shop even if the mall has it at the same price...
And even if the user says they don't want to use NPC shops.
More importantly, I want to be able to purchase from the NPC shop even if the mall has it at the same price...
KoL changed.With the "improvement" to KoL that allows purchases to be made from the mall in Ronin I want a way to disable such purchases unless I explicitly enable them
I raised the suggestion of mafia acquiring the antique accordion in that thread, but automatic toy accordion acquisition was left as the only in-run acquisition. As such, it was left to scripts to acquire the actually useful level of accordion...
That is a change in behavior. "acquire" is defined to get the object as cheaply as possible into inventory. No way.- acquire: Mafia automatically decides how to obtain the item (respecting autoBuyPriceLimit), even if it ends up in Hagnks.
Current behavior.- buy: Mafia purchase the cheapest available item, whether from an NPC or from the mall, even if it ends up in Hagnks.
Like acquire, except if you are out of Ronin, this will force you to buy from the npc, even if it is cheaper from a mall store. Why would you want to do that?- buy npc: Mafia purchases from npc players only, item never ends up in Hagnks.
Like buy, but this will force you buy from the mall, even if it is cheaper from an npc. Why would you want to do that?- buy mall: Mafia purchase from the mall only, even if it ends up in Hagnks.
Except that the two we have already cover all the sensible cases and the two we don't have are for people who want to spend more Meat than is necessary. Why should we cater to stupidity?I think that gives a good enough range of options.
It was only to satisfy my sense of symmetry, "buy mall" isn't needed.Like buy, but this will force you buy from the mall, even if it is cheaper from an npc. Why would you want to do that?
As for buy_npc: meh. If you are specifically looking to limit your vulnerability to spending too much money, why aren't you using acquire?
What bothers me is that scripts that use buy() when the player is in HC/Ronin don't know if the item will end up in the player's inventory.
The script knows that the player is in HC/Ronin. Having that knowledge, if the script wants an item which is available from an NPC store and it is important for the item to end up in inventory, it will use retrieve_item(). If the item is available from NPCs but it is not important if it ends up in inventory, just that it be obtained as cheaply as possible, it will use buy().What bothers me is that scripts that use buy() when the player is in HC/Ronin don't know if the item will end up in the player's inventory.
I am still waiting for the OP (or anybody) to explain why he wants to use "buy" while in HC/Ronin rather than "acquire" to get an item which he wants in inventory. I've asked that repeatedly. The response, so far, is crickets.It looks like the "buy versus acquire" debate can't be put aside.
boolean buy_npc( int count, item it )
{
boolean old = get_property( "autoSatisfyWithNPCs" ).to_boolean();
try {
if ( !old )
set_property( "autoSatisfyWithNPCs", "true" );
return retrieve_item( count + item_amount( it ), it );
} finally {
if ( !old )
set_property( "autoSatisfyWithNPCs", "false" );
}
}
I think that is probably correct. The underlying function - InventoryManager.retrieveItem - is complicated. If it decides that it needs to do a mall search (because you are out of Ronin), the list of results will include player stores and NPC stores, and it will pick the cheapest. But I think there is a check for "is this available from NPC stores" before it decides to do that.I believe "acquire" will prefer NPC shops when available rather than comparing NPC and mall and deciding which is cheaper. I recall an old bug report to that end. I also don't necessarily think this is wrong behavior.
Actually, I think I can answer that. You want the antique accordion. How are you going to get it? You're going to buy it. It's more intuitive to buy something than it is to acquire it when you're planning on spending meat.I am still waiting for the OP (or anybody) to explain why he wants to use "buy" while in HC/Ronin rather than "acquire" to get an item which he wants in inventory. I've asked that repeatedly. The response, so far, is crickets.