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. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. 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.

mdl editing add animations and tag

Discussion in 'Modeling & Animation' started by Troll-Brain, Sep 13, 2012.

  1. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    Hello.

    I know quite nothing about models.
    Here i've just tried to edit the peasant model in order to add animations which will be played if a tag is enabled, you know like "gold" and "lumber", here i've named it "test".
    But maybe you are not allowed to add a new tag.
    Basically animations are screwed.
    I attach the edited mdl file.

    Plz don't link me some tool, unless this is very necessary, for example i've tried the same with wc3modeleditor with the same result.
    And the animation transfer tool from Oink... tools doesn't work for me.
    Also, unless i'm very wrong it should be just a matter of copy/paste/edit, so it would be far faster to edit a mdl with a text editor.

    That's the begin of the file and that's only this part that i've edited (only the Sequences block) :

    Code (Text):
    Version {

        FormatVersion 800,

    }

    Model "peasant" {

        NumGeosets 6,

        NumGeosetAnims 4,

        NumHelpers 1,

        NumBones 22,

        NumAttachments 9,

        NumEvents 8,

        BlendTime 150,

        MinimumExtent { -69.6533, -44.804, -41.9811 },

        MaximumExtent { 88.9427, 46.9668, 123.917 },

    }

    Sequences 27 {

        Anim "Stand" {

            Interval { 133, 1633 },

            MinimumExtent { -28.5623, -29.8084, -0.0504422 },

            MaximumExtent { 20.6361, 26.5544, 92.6605 },

            BoundsRadius 52.6531,

        }

        Anim "Stand -2" {

            Interval { 1800, 4467 },

            Rarity 3,

            MinimumExtent { -25.878, -29.8389, 0.152655 },

            MaximumExtent { 28.2653, 28.5517, 92.7458 },

            BoundsRadius 51.4812,

        }

        Anim "Stand - 3" {

            Interval { 4633, 9800 },

            Rarity 4,

            MinimumExtent { -29.9116, -31.7053, -5.43188 },

            MaximumExtent { 36.1178, 38.608, 92.7594 },

            BoundsRadius 51.9626,

        }

        Anim "Stand - 4" {

            Interval { 14133, 18133 },

            Rarity 4,

            MinimumExtent { -26.0243, -36.6485, -0.456286 },

            MaximumExtent { 26.0185, 31.4237, 97.5041 },

            BoundsRadius 54.1783,

        }

        Anim "Stand Gold" {

            Interval { 18300, 19867 },

            MinimumExtent { -30.7913, -29.2415, 0.201665 },

            MaximumExtent { 19.058, 21.2577, 98.3751 },

            BoundsRadius 55.6318,

        }

        Anim "Stand Lumber" {

            Interval { 20167, 21733 },

            MinimumExtent { -37.0978, -30.9237, 0.201666 },

            MaximumExtent { 32.0584, 34.4464, 96.998 },

            BoundsRadius 55.9295,

        }

        Anim "Stand Test" {

            Interval { 21735, 23301  },

            MinimumExtent { -37.0978, -30.9237, 0.201666 },

            MaximumExtent { 32.0584, 34.4464, 96.998 },

            BoundsRadius 0,

        }

        Anim "Attack" {

            Interval { 23400, 24400 },

            NonLooping,

            MinimumExtent { -62.5415, -38.3509, -0.294451 },

            MaximumExtent { 73.084, 35.311, 121.39 },

            BoundsRadius 73.7341,

        }

        Anim "Attack Gold" {

            Interval { 24533, 25533 },

            NonLooping,

            MinimumExtent { -62.5858, -38.3372, -0.297971 },

            MaximumExtent { 73.2082, 38.8403, 121.391 },

            BoundsRadius 74.4935,

        }

        Anim "Attack Lumber" {

            Interval { 25667, 26667 },

            NonLooping,

            MinimumExtent { -62.4881, -43.8993, -0.294681 },

            MaximumExtent { 73.0275, 44.9459, 121.447 },

            BoundsRadius 74.5759,

        }

        Anim "Attack Test" {

            Interval { 26670, 27670 },

            NonLooping,

            MinimumExtent { -62.4881, -43.8993, -0.294681 },

            MaximumExtent { 73.0275, 44.9459, 121.447 },

            BoundsRadius 0,

        }

        Anim "Attack -2 " {

            Interval { 27767, 29033 },

            Rarity 3,

            NonLooping,

            MinimumExtent { -69.6533, -25.3983, -1.19888 },

            MaximumExtent { 72.4694, 29.9399, 123.917 },

            BoundsRadius 74.4558,

        }

        Anim "Walk" {

            Interval { 29100, 29900 },

            MoveSpeed 150,

            MinimumExtent { -43.8932, -35.4016, 0.0448157 },

            MaximumExtent { 47.764, 45.1813, 93.5366 },

            BoundsRadius 57.2193,

        }

        Anim "Walk Gold" {

            Interval { 30067, 30867 },

            MoveSpeed 150,

            MinimumExtent { -34.1984, -30.3442, 0.044815 },

            MaximumExtent { 36.8763, 24.099, 94.4577 },

            BoundsRadius 56.2489,

        }

        Anim "Walk Lumber" {

            Interval { 31033, 31833 },

            MoveSpeed 150,

            MinimumExtent { -37.0978, -32.6104, 0.044815 },

            MaximumExtent { 36.7597, 33.2111, 101.125 },

            BoundsRadius 58.0451,

        }

        Anim "Walk Test" {

            Interval { 32033, 32833 },

            MoveSpeed 150,

            MinimumExtent { -37.0978, -32.6104, 0.044815 },

            MaximumExtent { 36.7597, 33.2111, 101.125 },

            BoundsRadius 0,

        }

        Anim "Death" {

            Interval { 34333, 37667 },

            NonLooping,

            MinimumExtent { -35.984, -44.804, -3.70354 },

            MaximumExtent { 85.2466, 46.9668, 92.8574 },

            BoundsRadius 72.0123,

        }

        Anim "Decay Flesh" {

            Interval { 38133, 98133 },

            NonLooping,

            MinimumExtent { -13.1904, -29.5365, -40.7403 },

            MaximumExtent { 88.9427, 45.1974, 26.8391 },

            BoundsRadius 60.7709,

        }

        Anim "Decay Bone" {

            Interval { 99800, 159800 },

            NonLooping,

            MinimumExtent { -10.2479, -29.5365, -41.9811 },

            MaximumExtent { 88.9427, 38.3126, 11.685 },

            BoundsRadius 55.8183,

        }

        Anim "Stand Ready" {

            Interval { 183133, 184633 },

            MinimumExtent { -28.6408, -29.9645, -0.0823058 },

            MaximumExtent { 20.7765, 26.5544, 92.7449 },

            BoundsRadius 52.5659,

        }

        Anim "Stand Ready Gold" {

            Interval { 184833, 186333 },

            MinimumExtent { -28.66, -28.9963, -0.137306 },

            MaximumExtent { 20.7034, 26.7239, 92.6302 },

            BoundsRadius 52.7277,

        }

        Anim "Stand Ready Lumber" {

            Interval { 186600, 188100 },

            MinimumExtent { -37.0978, -30.9237, -0.0880196 },

            MaximumExtent { 32.0584, 34.5076, 96.998 },

            BoundsRadius 56.0629,

        }

        Anim "Stand Ready Test" {

            Interval { 188600, 190100 },

            MinimumExtent { -37.0978, -30.9237, -0.0880196 },

            MaximumExtent { 32.0584, 34.5076, 96.998 },

            BoundsRadius 0,

        }

        Anim "Stand Work" {

            Interval { 191333, 191933 },

            MinimumExtent { -57.8181, -37.0602, -0.0542747 },

            MaximumExtent { 70.507, 33.8441, 117.941 },

            BoundsRadius 71.0203,

        }

        Anim "Stand Work Gold" {

            Interval { 192233, 192833 },

            MinimumExtent { -57.8447, -36.2669, -0.0542747 },

            MaximumExtent { 70.507, 34.1633, 117.941 },

            BoundsRadius 71.2252,

        }

        Anim "Stand Work Lumber" {

            Interval { 193133, 193733 },

            MinimumExtent { -57.8733, -43.083, -0.546668 },

            MaximumExtent { 70.5075, 35.2598, 118.031 },

            BoundsRadius 70.1906,

        }

        Anim "Stand Work Test" {

            Interval { 194133, 194733 },

            MinimumExtent { -57.8733, -43.083, -0.546668 },

            MaximumExtent { 70.5075, 35.2598, 118.031 },

            BoundsRadius 0,

        }

    }
    PS : Yes the added animations make the model unselectable, it's intended
     

    Attached Files:

  2. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    I didn't know that but : yes, you are not supposed to create a new animation tag. "Stand Test" is handled just like "Stand - 2". TITS it's like another version of the "Stand" animation.

    The animation tags are listed in the game.dll file (maybe some of them are not actually animation tags but bone tags or animation names ; they are all together in the .dll) :
    tags
    upgrade
    wounded
    work
    victory
    turn
    two
    throw
    three
    third
    swim
    spin
    spiked
    slam
    severe
    second
    ready
    puke
    one
    off
    moderate
    lumber
    looping
    light
    hit
    gold
    fourth
    four
    five
    first
    fire
    fifth
    flesh
    flail
    fill
    fast
    critical
    complete
    chain
    alternateex
    alternate
    cinematic


    I guess that answers your problem.
     
  3. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    Thx.

    Ok, so you didn't find any error, or lack excepted this tag use ?
    What tag have you already sucessfully used ? (if you have ever used a tag ofc)
     
  4. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    Some of those tags are specialy handled by the game, such as the "Swim" tag which is automatically enabled on amphibious ways. I don't remember using much tags for my own models except the "upgrade", "first", "second" and "third" ones but I saw a lot of those that I listed in W3 models.

    If you are looking for tags with no special side-effect, you could use "alternate first", "alternate second", ..., "victory", "upgrade" (I don't think the building thing is hardcoded ; it seems to be specified in the object editor but I may be wrong) or "Defend" (which is not in my list for some reason...).
     
  5. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    Ok, and to use a tag for an animation you only need to had its name Likethat, in the animation name, make sure you don't overlap the frames, edit the numbers of Sequences, and nothing more ?
    In short what i've done ?

    EDIT : It works with "swim" but i've made something else wrong since now it's the tag animations which are screwed.
     
  6. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    I don't think it's case-sensitive but the rest is just like you said.
     
  7. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    I've just edited my previous post, animations without a tag seems to work well, but the ones with the tag are screwed.
    So i've must done something wrong, and/or there is something more i must do.

    EDIT : No, even the not tag animations are screwed, ony move seems to works, and probably stand.
     
  8. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    I can't help. How is that screwed now?

    I know that the model can be unproperly displayed if extents are wrong (Magos' "Calculate extents" tool is great for fixing that) but I don't know if the bound radius also has to be set well.

    Maybe you should test with "alternate" since it is the most commonly used.
     
  9. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    They are "mixed". The better is to try it.
    I will try with a model where there is no tag.

    EDIT :

    Meh i'm sure it's not that simple, for examples frames are everywhere in the mdl file, so i would need to edit them also.
    In fact it makes sense that's not because you add an animation name that it means that magically it will create the wanted animation for you.

    This seems way too tedious without any script/tool to make all the boring work for you.
    For what i want i suppose it would be way easier and faster to create an other model and just set the BoundsRadius in sequences to 0, and when i want to be unselectable animations i just switch the unit model through a passive morph ability, it could be maybe even used in a local block (ofc with care), that's my goal in fact.
    Sure it will increase the map of some kb (hopefully there is the mdx format), but well that's not like i use other imports anyway so that doesn't matter for me.
     
    Last edited: Sep 13, 2012
  10. Infrisios

    Infrisios

    Joined:
    Feb 21, 2005
    Messages:
    106
    Resources:
    7
    Models:
    7
    Resources:
    7
    Bounds Radius makes something unselectable? That's new to me, last time I checked the collision shapes did that and the bounds radius decided how "big" the model is for the renderer (0 bounds radius means that if the center is not in the FoV of the camera, the model won't be rendered).
     
  11. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    Yes it does, at least when you edit the Sequences block in some .mdl file, it's how easy or hard the model is selectable according to the BoundsRadius value.
    It's how big is the virtual select circle size.
    I'm just waiting if it can work in a local block : GetLocalPlayer() (adding a morph ability which uses the very same unit excepted the imported unselectable model).
    But well by selectable i mean be able or not to click on it with the mouse.

    However even if it works, it's true that it would be way cleaner to just add tag animations and use only one model, i think my best hope is with the tool "animation transfer", but i need to fix this error message on use first.
     
  12. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    You can also use MdlVis !
    On my linux, it makes some funny bug : the screen becomes a glitch and I had to remove the computer's battery to shut it down. :goblin_boom:

    I didn't think you wanted to have proper animations for your tests. Here is a peasant with Stand/Walk/Attack Swim that looks like something.
     

    Attached Files:

  13. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    Hmm thx but i need to be able to do it myself, the peasant was just a sample.

    So i suppose the best option is still the "animation transfer" from Oink... tools.