• 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.

[Trigger] Unknown Map Problem (GUI)

Status
Not open for further replies.

sentrywiz

S

sentrywiz


Pre-Info

I've been working on a remake on a map of mine, Villager Wars. The new revamped version was supposed to be 10x better, with tons of fixes in triggers, balancing and just plain hotkey text information stuff. As I was closing in on releasing the map, I saw a bug I couldn't find.

The Map

Original Map (Thread link)
http://www.hiveworkshop.com/forums/maps-564/villager-wars-v1-0-ai-192631/

If you truly want to help, you will need to look at the original map to understand the concept, the point and how the game functions. After that you can look at the revamped version inside out and see if you can spot something. The revamped version has many new things inside and its not complete for release, that is why I am asking for help -- I can't do it by myself.

The revamped map is completely open.


Revamped Map (Pastebin)
http://www.hiveworkshop.com/forums/pastebin.php?id=q2ks7y

The Bug

Units lose items permanently and then the editor drops those items wherever somewhere a unit dies? Or maybe its random item spitting... beats me.

The short-end: You lose items that don't go to Vault and after sometime they are constantly being created on the map.

From countless tests here and there I was atleast able to deduct that only items that belong to the Offensive type of villagers were dropped. This didn't happen for Magic or Defensive users. Its constantly Offensive items.


Testing

The map has AI so if you feel like testing to see, I'd advice you play a game for 15-20 minutes so you can see in-game what happens. You may also die yourself and find that an item is missing from your inventory and from your vault. That's the bug
 
Level 6
Joined
Jun 16, 2007
Messages
235
Find every UNIT_DROP_ITEM and UNIT_PICKUP_ITEM trigger and disable them.

Than enable one by one and see which one makes the bug.
 
Level 7
Joined
Apr 1, 2010
Messages
289
Testing.......
question, in your triggers why do you create an item then remove the item the unit is carrying, wouldn't it be easier(and better) to just give the item the "vault"?

Edit: what you should do is replace your current method for giving the item to the vault with this
  • Hero - Drop the item from slot (Integer A) of (Triggering unit)
  • Hero - Give (Last dropped item) to (SomeVault)
some other things i noticed
you could also get rid of also get rid of all of those ifs, and replace them with a pick every unit of type vault, and if the vault is owner of the player,
also there are lots of places where you spam if then else, unnecessarily, in your drop items trigger, you could do just by having the triggering unit drop it.
 
Last edited:

sentrywiz

S

sentrywiz

Find every UNIT_DROP_ITEM and UNIT_PICKUP_ITEM trigger and disable them.

Than enable one by one and see which one makes the bug.

That's what I did, and had no luck in finding out.

Testing.......
question, in your triggers why do you create an item then remove the item the unit is carrying, wouldn't it be easier(and better) to just give the item the "vault"?

Edit: what you should do is replace your current method for giving the item to the vault with this

Hero - Drop the item from slot (Integer A) of (Triggering unit)
Hero - Give (Last dropped item) to (SomeVault)

some other things i noticed
you could also get rid of also get rid of all of those ifs, and replace them with a pick every unit of type vault, and if the vault is owner of the player,
also there are lots of places where you spam if then else, unnecessarily, in your drop items trigger, you could do just by having the triggering unit drop it.

I remove the item (I had a reason for this, not sure what anymore) I think it was something with not knowing which item was it? Sure, I'll try what you suggest, it seems better.

I would agree to you that my style of making things is unnecessary and brute. In many cases, I did it like that because I didn't know how otherwise so I had to improvise. Just to let you know that these drop triggers, have nothing to do with the bug because if they did, same thing would happen in the original version and such thing doesn't happen there.

I'll start on improving the code. Thanks for your feedback
 
Level 7
Joined
Apr 1, 2010
Messages
289
also, another cause could be from when the units drop all of their items when they level up... because you don't have something that makes the unit automatically pick them up.

other then the items being dropped all over, the map is fun to play.
 

sentrywiz

S

sentrywiz

also, another cause could be from when the units drop all of their items when they level up... because you don't have something that makes the unit automatically pick them up.

other then the items being dropped all over, the map is fun to play.

Triggers: When the unit levels up, if its human players items are dropped (because I know bots don't steal items, the human player will pick them up by clicking. However the computer won't pick them up, And instead of making them being transfered to vault, where the bot won't pick them up, since vault gives items back when the unit dies - its easier to just destroy the items with the bot and give the bot an amount of gold.

I know the map is fun to play. Its extremely simple, its very user based and choice based. With the new version its recipes, items and skills are very balanced. It sucks that I can't still find a solution to the item drops and can't finish up this project.

I've made mass changes to the triggers - replaced all triggers that created items with moving items to the vault. But unfortunately, nothing changed. Units still drop items - offensive items. I'm still looking for the problem, but beyond what you said - I have no idea what to look for.
 
Status
Not open for further replies.
Top