• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Missing Sold Items

Status
Not open for further replies.
Level 11
Joined
Mar 31, 2016
Messages
657
Hey all, just about done with my map: Medieval Realms

I was testing a bit and found that buildings that sold items were missing all the items; however pre-placed buildings were fine and had the items. Any idea of what can cause this?

Also some of the items have a techtree requirement and the items are available regardless of the requirement... did I miss another requirement?

Edit: My map uses a custom construction system - is it possible that it's interfering with the base wc3 data?
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,013
Also some of the items have a techtree requirement and the items are available regardless of the requirement... did I miss another requirement?
Some item abilities (when given to units) are applied regardless of their requirements being met because they were never designed to be limited by tech requirements in the first place. It's possible that some items simply ignore techtree requirements for selling in the same way. What if you copy an item that is properly disabled and replace a non-working item with it? Does the replacement item work like the original should have?
Edit: My map uses a custom construction system - is it possible that it's interfering with the base wc3 data?
Unlikely, but someone more versed in mass OE data could better answer this than I.
I was testing a bit and found that buildings that sold items were missing all the items; however pre-placed buildings were fine and had the items. Any idea of what can cause this?
I've heard of something like this before (I think specifically related to stock refresh time/item availability or having a consistently ordered shop menu) and I believe the solution was to make the shop have no items sold in the OE and always add them with triggers when they're built/on map init.
 
Level 11
Joined
Mar 31, 2016
Messages
657
Some item abilities (when given to units) are applied regardless of their requirements being met because they were never designed to be limited by tech requirements in the first place. It's possible that some items simply ignore techtree requirements for selling in the same way. What if you copy an item that is properly disabled and replace a non-working item with it? Does the replacement item work like the original should have?

Unlikely, but someone more versed in mass OE data could better answer this than I.

I've heard of something like this before (I think specifically related to stock refresh time/item availability or having a consistently ordered shop menu) and I believe the solution was to make the shop have no items sold in the OE and always add them with triggers when they're built/on map init.
Thanks so much! I'll start tinkering and let you know how it works :)
 
Level 11
Joined
Mar 31, 2016
Messages
657
Well, tried a few different commands in the trigger editor but I cant get it to work...

A Unit finishes an Upgrade (Upgrading Building Tier), also tried construction command.
Unit equal to Granary. (Just tried it for one building)
Neutral Building - Add Item (Seeds) to Triggering Unit. (can't find any other line that adds items to a building/unit)

Any other commands I should try?
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
So you're just trying to add seeds to a granary whenever it's constructed or upgraded to? Pretty simple:

  • Events
    • Unit - A unit Finishes construction
    • Unit - A unit Finishes an upgrade
  • Conditions
    • (Unit-type of (Triggering Unit)) equal to Granary
  • Actions
    • Neutral Building - Add Seeds to (Triggering unit) with 0 in stock and a max stock of 1
 
Level 11
Joined
Mar 31, 2016
Messages
657
So you're just trying to add seeds to a granary whenever it's constructed or upgraded to? Pretty simple:

  • Events
    • Unit - A unit Finishes construction
    • Unit - A unit Finishes an upgrade
  • Conditions
    • (Unit-type of (Triggering Unit)) equal to Granary
  • Actions
    • Neutral Building - Add Seeds to (Triggering unit) with 0 in stock and a max stock of 1

This is exactly what I did but it still didn't work... weird. I think my construction system trigger is conflicting with it or something...
 
Level 8
Joined
Jul 10, 2018
Messages
383
So I tried disabling the trigger(s) and it gave me JASS errors, also tried other events to try to get the trigger to work but no dice. WC3 wont work with JASS errors, tried disabling but idk how.
Late reply, been busyyy.
How about making a Item when Acquired it summons a dummy that sells stuff I think I saw this type of system before I will look into it for you.
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
Either post all of the construction system as well or just upload your map. Without that it's nigh impossible to determine what's happening if you can't even disable the triggers without throwing compile errors. (Honestly this should never happen in GUI so you must be doing something real funky.)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Can you upload an edited version of your map so I can get a better understanding of what the exact issue is?

Also, this is what I did when I tested your map:
1) I added the Sell Items ability to the Granary in the object editor
2) I tested the map and built a granary
3) I upgraded the crop research that added items to the granary

This worked as intended and the items were added to the Granary.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Alright, I found the issue. I imported a standard Arcane Vault into the map and tried upgrading your Building Site into it and experienced the same issue. It could no longer sell items. I don't know why this happens or how to fix it but I do know that there is a very easy workaround with triggers.

1) Add the "Sell Items" ability to your Granaries
2) Remove any "Items Made" and "Items Sold" from your Granaries
3) Add the Items using Triggers:
  • Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Granary (1)
    • Actions
      • Neutral Building - Add Your Item to (Triggering unit) with 1 in stock and a max stock of 5
And for future posts, please provide some more information so we can have an easier time helping you. It took me a while to figure out how the building system worked, where the Granary was, and which workers to use, etc... Also, a demo map containing the specific problem and nothing more would've probably had this fixed sooner. Help us help you :p Anyway, if you have any other problems feel free to ask.
 
Last edited:
Level 11
Joined
Mar 31, 2016
Messages
657
Alright, I found the issue. I imported a standard Arcane Vault into the map and tried upgrading your Building Site into it and experienced the same issue. It could no longer sell items. I don't know why this happens or how to fix it but I do know that there is a very easy workaround with triggers.

1) Add the "Sell Items" ability to your Granaries
2) Remove any "Items Made" and "Items Sold" from your Granaries
3) Add the Items using Triggers:
  • Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Granary (1)
    • Actions
      • Neutral Building - Add Your Item to (Triggering unit) with 1 in stock and a max stock of 5
And for future posts, please provide some more information so we can have an easier time helping you. It took me a while to figure out how the building system worked, where the Granary was, and which workers to use, etc... Also, a demo map containing the specific problem and nothing more would've probably had this fixed sooner. Help us help you :p Anyway, if you have any other problems feel free to ask.
Thanks for the feedback!!! IT WORKS!!!! WOOOOOOO!!! TYVM! 100% fixed
Sounds about right. Right, will do! Sorry about that lol. I definitely could have been more specific and descriptive. I'll try to give more info next time :D Of course, I will. Thanks again, truly appreciate the help!
 
Status
Not open for further replies.
Top