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

[Import] Setting up Doodad Variation

Status
Not open for further replies.
Level 6
Joined
Sep 11, 2006
Messages
172
So I have a lot of doodad packs in my map which I have optimized and squished before importing.

I would like to make single doodads with multiple variations using these packs.

For example I have imported several Statues which I would like to merge into one doodad as variations of it.

I have been trying to use this tutorial http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/custom-doodad-variations-207150/, but I can't seem to compile the models.

For the second parameter I'm supposed to put in a file path, but what does that mean? Do I use the file path on my computer where the models were imported from? How would I write that?

Here are the names of two models that I'm trying to merge into one doodad - CityStatue_squished and GoldenStatue_squished

The object ID of the doodad I'm using is D008, which would be the first parameter.

Im using the Newgen World Editor so the script should be working.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
No, the models should be imported to a common path, only differing by the trailing index.

E.g.

Doodads\Statue0.mdx
Doodads\Statue1.mdx

And then you write the script like

//! runtextmacro SetDoodadModel("D008", "Doodads\\Statue")

without the index and without the extension.
 
Level 6
Joined
Sep 11, 2006
Messages
172
Ok, I changed the models so that they all have the same path now.

JASS:
//! textmacro SetDoodadModel takes id, path
    //! externalblock extension=lua ObjectMerger $FILENAME$
        //! i setobjecttype("doodads")

        //! i modifyobject("$id$")

        //! i makechange(current, "dfil", "$path$")
    //! endexternalblock
//! endtextmacro

//! runtextmacro SetDoodadModel("D008", "Doodads\\Statue")

I'm getting "Could not load file: none.mdl." Whenever I try to place the doodad and it wont let me select the variations even though I've set the doodad to have 6.

I notice that this also happens when I load your sample map, remove the backslash, save and reload, and then try to view the model.

Maybe there's something wrong with my version of Newgen?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
In the tutorial map, the path is preset to none.mdl, which is just an invalid one/unused. When you remove the leading slash, save, then reload the editor, the path should be set to Doodads\Animal\Animal.

Even if the path is not right, you should be able to switch the variation of a doodad you have given variations amount > 1 to. So you probably confuse it with another type.
 
Level 6
Joined
Sep 11, 2006
Messages
172
I have not changed anything in the example map. I have only removed the leading slash, saved, and then reloaded.

When the map starts, I still see 3 green and black checker boxes and the "Could not load file: none.mdl".

Your example doodad has 3 variations, but on the left side of the screen there is no arrow to cycle through them. The same is true with my map. What else could I be missing?

I have looked at other regular doodads that do have variation and I am able to cycle through those. It seems, in my editor at least, that custom doodads are not showing their variations and also not being set by the script.

I am using JNGP 1.5c.
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Maybe you had jasshelper not activated or another option that is normally on. At least it's strange that there was both no effect and no save error.

When jasshelper runs, it executes the external calls just before the ending and is pretty slow to do so. You should be able to see "Executing external commands." for a brief moment.
 
Status
Not open for further replies.
Top