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 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  4. The Secrets of Warcraft 3 have revealed interesting works. The RESULTS for Abelhawk's Mini-Mapping Contest #15 have come out!
    Dismiss Notice
  5. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  6. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  7. Night Rider gained several songs for his journey. The poll for the 12th Music Contest has started. Check it out!
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  10. 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.

Mining animation

Discussion in 'World Editor Help Zone' started by Majid_Ne, May 16, 2019.

  1. Majid_Ne

    Majid_Ne

    Joined:
    Apr 30, 2019
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Hi, I have downloaded gold ore model and replace gold mine model with it.

    I'm wondering is anyway to stop workers and peons from default mining and do another thing ?

    Let me explain.

    As default , they go inside the mine take gold (10 golds) and get out and return to base.
    I don't want they enter mine as its new model is an gold ore.

    I want something to make them play their working animation for 10 times and then return back with gold
    Like tree chopping.

    Please help me
     
  2. Zepher

    Zepher

    Joined:
    May 14, 2019
    Messages:
    264
    Resources:
    0
    Resources:
    0
    I don't think this is possible to my knowledge.

    Try asking @Dr Super Good
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Not directly possible in Warcraft III. You will need to trigger the desired mechanics which is not a trivial thing to do.

    For a trigger based system you will need a system to represent units carrying resources. This would mean mapping some sort of structure to the unit which contains information such as how much gold they are carrying. To make it look like the worker is carrying gold you will either need to change its animation prefix/suffix to use the gold carrying animations, if that is possible, or use a custom gold sack model which you attach to the unit by triggers and keep track of with the carrying structure. When the worker is ordered to a gold drop off and is near the point you will need to clean the carrying structure from it and give the player the appropriate amount of gold.

    Then you need a system to do the actual mining. The simplest would be to pause the unit in place for some amount of time when ordered to the gold ore and near it. During this stage it is made to face the gold ore and loops the mining animation. After the desired amount of time passes then gold is removed from the gold ore unit (if possible) and the worker is given the previously described carry structure to represent that it is now holding gold.

    Finally a system is needed to automate this process so the workers go to the gold ore to mine and back to the nearest gold drop off point. This may require keeping track of which workers are automated and to which mines they work.

    Now on top of the above full trigger solution there may be a hacky hybrid approach one could try. If one can detect when a unit enters a gold mine then one could make the gold ore a fake gold mine with near instant gold pickup. When a unit picks up gold from the gold ore you then pause them, make them face the gold ore and play their mining animation for some amount of time. After that time expires you unpause them and if necessary order them to return resources. This would allow one to use the standard gold carrying system instead of having to trigger ones own which could reduce the required work considerably, however there may be technical issues with this approach.
     
  4. Majid_Ne

    Majid_Ne

    Joined:
    Apr 30, 2019
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Thanks for reply.

    I found another way that it works probably good.
    Since in my map i don't use lumber I switch gold and lumber icons and name ( actually i removed lumber from map ) and change model of trees to gold ore. it looks he's mining.

    Only problem i got is that peons and peasants carry lumbers not gold bag.
     
  5. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    2,407
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I'm afraid you will have to modify their work animation manually. Which means duplicate their gold harvesting animation and rename one of them to Stand Lumber, Attack Lumber, etc...

    Here's an example of a peasant carring a gold bag when harvesting lumber :
     

    Attached Files:

  6. The_Silent

    The_Silent

    Joined:
    Feb 4, 2008
    Messages:
    2,832
    Resources:
    159
    Models:
    49
    Icons:
    89
    Packs:
    8
    Skins:
    12
    Maps:
    1
    Resources:
    159
    Use one of the custom resource systems from the spell section.
     
  7. Majid_Ne

    Majid_Ne

    Joined:
    Apr 30, 2019
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Thanks guys now i have peasant and peons mining.

    But now i think it will good to change mining sound. It's like chop woods , Any idea ?

    I got mining sounds already.
     
  8. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Replace the axe hitting wood sound with that of metal hitting stone? By replace I mean in import manager.
     
  9. Majid_Ne

    Majid_Ne

    Joined:
    Apr 30, 2019
    Messages:
    20
    Resources:
    0
    Resources:
    0
    I try it by importing , but every time I save map and test it , no sound play , In world editor when I play sound in sound editor it's replaced by default one.

    Before I save map , I test sounds and they were replaced by my mining ones.

    I'm so confused at this. :eek:

    Files are WAV , the same name and path , but not works.
     
  10. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,427
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    My previous post stupidly assumed it was part of the peasant animation. It is actually a combat hit sound which one can easily change.

    Try changing the "Combat - Armor Type" of the Gold Ore destructable to be "Stone". Then change the "Combat - Attack 2 - Weapon Sound" of the worker unit to something like "Metal Light Chop" or "Metal Medium Chop" depending on how burly the worker unit is.

    Note that there appears to be some minor bug with combat sound playback. It might not always play the hit sound in the tests I ran, but at least when it does it sounds like a pick hitting stone rather than an axe hitting wood.
     
  11. Majid_Ne

    Majid_Ne

    Joined:
    Apr 30, 2019
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Thanks it works ;)