• 🏆 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!

mdl editing add animations and tag

Status
Not open for further replies.
Level 17
Joined
Apr 27, 2008
Messages
2,455
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:
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
 

Attachments

  • peasant2.mdl
    416.2 KB · Views: 63
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) :
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.
 
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...).
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
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.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
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.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
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:
Level 8
Joined
Feb 21, 2005
Messages
110
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).
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
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.
 
Status
Not open for further replies.
Top