• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Computer Players obsessed with trying to sell items to shops

Status
Not open for further replies.
Any computer player, whether it's a proper one or neutral hostile, will constantly try to sell items to shops when I do not want them to do this. It does not matter if the item is unsellable - for some reason the computers drop the items in front of the shops.

Any idea what could be causing this or how to prevent it?

I believe this may have started happening after I reduced the "stats - priority" of all items to 0, that is my only lead for now.
 
You and Uncle are both right. You pretty much told the AI all items are worthless by setting Priority to zero.

1000 Priority would be the most valuable item. I usually keep item Priority default unless I made a custom item, then I set priority relative to how powerful that item is. Also in my Defense of Felwood map, I pretty much don't want the AI's hero messing with items at all, so I gave it a bunch of non-consunable custom items and set priority to 1000. In that case the hero never changes out items. Maybe it would for another 1000 Priority item but there are no others on the map.

In most guides and other posts on this topic, Priority is mentioned as 'not important' or 'useless' but now you know that it does matter to cpu players.
 
Thank you, a couple of quick follow-up questions:

1: What fields in the item would you recommend for holding arbitrary data as opposed to priority? I am using priority for extra statistics for each item referenced in triggers.

2: Is there any way you're aware of to disable this functionality or prevent this without using priority, or at least a bandaid fix to detect when the AI is attempting to do this? The weirdest part is they never even sell the items, they just drop them in front of the shops.
 
1) I'm sure Uncle would have a better solution. But perhaps use Item's Custom Value. Perhaps don't use Priority for extra statistics?

2) I haven't found a way. Like you noticed, it seems even if the item can't be sold, they still try if they consider the item worthless/low prio. Maybe there is some threshold where the cpu considers the item worthless/needs to be pawned like anything below 120? IDK just speculating.
 
1: What Gnuoy said, you have an infinite number of extra statistics if you use an Item Indexer.

2: Almost everything is an Order so perhaps you could interrupt it. I know that the AI will often just try again so it could cause more problems than good. Another idea would be to make the item's Undroppable when a Computer acquires them, this is possible on 1.31+.
 
How about creating a custom inventory ability for AI heroes and disable this option?

1692738143504.png


That's a bit extreme but heh that should prevent them from littering :p
 
Status
Not open for further replies.
Back
Top