1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

a system for itens and resouce generator

Discussion in 'Requests' started by Robson Carmo, Nov 6, 2019.

  1. Robson Carmo

    Robson Carmo

    Joined:
    Nov 6, 2019
    Messages:
    5
    Resources:
    0
    Resources:
    0
    Hi guys, I don't know if this is the right place for this sorry ... I am trying to make a way for an upgrade to generate an item within the building (having hero inventory) and a butom to make iron sword consuming iron ore and leather along with it generating a resorce and gold or wood per second.

    and there would be a system that you could use items as a requirement to make a unit like:

    recruit + sword + armor = footman (would work when you hit the button to do it would consume the items in the barracks inventory)
     
  2. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    489
    Resources:
    0
    Resources:
    0
    Sadly I don't fully understand what you mean when you say: "I am trying to make a way for an upgrade to generate an item within the building (having hero inventory) and a butom to make iron sword consuming iron ore and leather along with it generating a resorce and gold or wood per second."

    But I think I understood your second request: "Items as requirements to train units" and I came up with a system for you and uploaded the map below.

    How to use:
    Edit the Setup Items trigger and add in your own Items. Follow the 5 steps listed under "How to add a new Item".
    • Setup Items
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- How to add a new Item: --------
        • -------- 1) Create a new Integer variable and a new Item in the Object Editor --------
        • -------- 2) Name the new variable something related to the Item's name like this: Item_Sword --------
        • -------- 3) Set the new variable to be equal to the next unused number. If this is your first new Item then it will be equal to 4, then 5, then 6, etc... --------
        • -------- 4) Set ItemType[] to the Item from the Object Editor and use the number from step 3 as it's Array --------
        • -------- 5) Set TotalItems to however many Items the system uses --------
        • -------- - --------
        • Set TotalItems = 3
        • -------- - --------
        • Set Item_Recruit = 1
        • Set ItemType[1] = Recruit
        • -------- - --------
        • Set Item_Shield = 2
        • Set ItemType[2] = Shield
        • -------- - --------
        • Set Item_Sword = 3
        • Set ItemType[3] = Sword

    Then copy and paste one of my Example triggers. Here's an example for training a Footman. It requires 1 Recruit, 1 Sword and 1 Shield to train. Use the variables RequiredItem[] and RequiredItemCount[] to set which Items and how many of them you will need to train the Footman or whichever unit you want to train. You can have up to 6 RequiredItems (because there's 6 max inventory slots). Also, make sure to put the correct Unit Type in the Conditions. Once you've put in all of the requirements you can run the Convert Items trigger and the system will do the rest for you.
    • Train Footman
      • Events
        • Unit - A unit Begins training a unit
      • Conditions
        • (Trained unit-type) Equal to Footman
      • Actions
        • -------- Put your requirements here: --------
        • Set RequiredItem[1] = Item_Recruit
        • Set RequiredItemCount[1] = 1
        • Set RequiredItem[2] = Item_Sword
        • Set RequiredItemCount[2] = 1
        • Set RequiredItem[3] = Item_Shield
        • Set RequiredItemCount[3] = 1
        • -------- - --------
        • -------- Run this trigger: --------
        • Trigger - Run Convert Items <gen> (ignoring conditions)
     

    Attached Files:

    Last edited: Nov 7, 2019
  3. Robson Carmo

    Robson Carmo

    Joined:
    Nov 6, 2019
    Messages:
    5
    Resources:
    0
    Resources:
    0
    thanks and in the other and so, I created a mine and one upgraded to produce iron but that it becomes an item and it will be generated in the mine's inventory finally another upgrade that made this mine generate gold per second.

    And your map don't open on editor say's "level info data missing or invalid" :/
     
    Last edited: Nov 7, 2019
  4. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    489
    Resources:
    0
    Resources:
    0
    Are you using the latest patch? It must have to do with the folders/variable changes added in the newer patches, because the triggers themselves should be compatible with any version.

    Also, I uploaded another version, maybe this one will work?
     

    Attached Files:

    Last edited: Nov 8, 2019
  5. Robson Carmo

    Robson Carmo

    Joined:
    Nov 6, 2019
    Messages:
    5
    Resources:
    0
    Resources:
    0
    Yeah i'm not put the wc3 in the last patch lol, the map work fine thanks so much and for others things have any tips ?
     
  6. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    489
    Resources:
    0
    Resources:
    0
    For the gold mine, do you plan on having multiple gold mine's per player or only 1 per player?
     
  7. Robson Carmo

    Robson Carmo

    Joined:
    Nov 6, 2019
    Messages:
    5
    Resources:
    0
    Resources:
    0
    multiples but i see that we got unbalanced i put a limit. the ideia of my map is put a system like the knights and merchant, where buildings create the items to get things done
     
  8. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    489
    Resources:
    0
    Resources:
    0
    Do you want to add Gold like this?
    • Player - Add 100 to Player 1 (Red) Current gold

    Or have an item called Gold, like the Iron.

    Edit: I attached a map with an example of how you could do it. It's not perfect but I didn't have much to work with. If you can explain it in greater detail it makes it easier to know exactly what you want.
     

    Attached Files:

    Last edited: Nov 10, 2019
  9. Robson Carmo

    Robson Carmo

    Joined:
    Nov 6, 2019
    Messages:
    5
    Resources:
    0
    Resources:
    0
    not gold is the same used by the game, I moved to item the resources that the game does not have, such as iron, horses, wooden boards etc. the idea is that you do the research, mine and other builds create the item in her inventory to worker pick up. i'm leaving the map i'm working on might help in understanding xD

    Ps: the system of gold mine is great, I was having trouble remembering things kk
     

    Attached Files:

  10. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    489
    Resources:
    0
    Resources:
    0
    Thanks, I understand now. Let me know if you have any problems.