• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Object Merger

Status
Not open for further replies.
Level 16
Joined
Oct 12, 2008
Messages
1,570
Hello people,

I want to create a shitload of units (types), and i am not that eager to do it all in Object Editor, so how do I properly use the external Objecmerger to create those units?
Easy question, harder answer,, hope i can get some good help on this.

Have a nice life!
JASS:
// And rep shall come your way if you help me!

-Yixx,,-
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
I need to change the Base HP, Base Stats, stats per level, all those thing, as well as the model, the standard abilitys, and make it have no attack.
But does the ObjectMerger create a new Unit-type (as in new object with an individual rawcode) or does it change an already existing object?

Reaper, i will look into that

EDIT: Element of Water, i know how a normal textmacro works, and that might indeed be handy, but i need to know how the Objectmerger works, like this:
JASS:
//! textmacro NewUnit takes "NAME", "AGI", "STR", "INT"
    //! external objectmerger 
    // and then? what parameters and stuff?
//! endtextmacro
 
It can do either i think. It can definitely create new ones.

EDIT:
JASS:
//BASE - Base unit's rawcode
//RAWCODE - New unit's rawcode - MUST start with a capital letter
//NAME - New unit's name
//HP - New unit's hitpoints
//STR/AGI/INT - New unit's strength/agility/intelligence
//STRPL/AGIPL/INTPL - New unit's strngth per level, etc
//HEROABILS - Hero ability list
//NORMABILS - Normal ability list
//MODEL - New unit's model path
//ICON - New unit's icon path
//! textmacro MakeUnit takes BASE, RAWCODE, NAME, HP, STR, AGI, INT, STRPL, AGIPL, INTPL, HEROABILS, NORMABILS, MODEL, ICON
//! external ObjectMerger w3u $BASE$ $RAWCODE$ unam "$NAME$" uhpm $HP$ ustr $STR$ uagi $AGI$ uint $INT$ ustp $STRPL$ uagp $AGIPL$ uinp $INTPL$ uhab $HEROABILS$ uabi $NORMABILS$ umdl "$MODEL$" uico "$ICON$"
//! endtextmacro
//You can't end a trigger with a //! line!
You can call this textmacro to create your units. This is an example of calling the textmacro:
JASS:
//! runtextmacro MakeUnit("nech", "He01", "Awesome Hero Dude!", "100", "10", "10", "10", "10", "10", "10", "AHhb,AHds", "AInv", "units\human\WarWagon\WarWagon", "ReplaceableTextures\CommandButtons\BTNSeigeEngine.blp")
//You can't end a trigger with a //! line!
If you want extra stuff maybe you can figure out how to add it yourself. I figured it out myself after seeing someone else's textmacros. Otherwise, ask me.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
ok, the w3u stands for creating a unit, the rest is explained, but basically if i want to add more values, i just put the 'Object code' (udaa,uabi,utcc, etc.) of the desired field and my new value in the line? And does it matter in what order? Or can it take any order i want?
 
Status
Not open for further replies.
Top