How to - Use the Object Merger

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
I've been doing this since NewGen came out :p good to know that other people are using it. :thup:
 

Azlier

Old World Ghost
Reaction score
461
>Do we have to delete the lines of code after we create the objects?
You should. Otherwise it will create new objects every time you save, lengthening save time by an annoying amount and overwriting existing ones.

>I've been doing this since NewGen came out
Why didn't YOU write the tutorial, then? I wrote it the day after I learned how to use the Object Merger. :p
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
I didn't want people to blame me for crashing their maps. Me and Builder Bob where probably the only ones who where aware of it's feature.
 

Romek

Super Moderator
Staff member
Reaction score
962
> Me and Builder Bob where probably the only ones who where aware of it's feature.
I've been aware of this for a very long time too... :rolleyes:

It'd be useful to mention that existing objects are overwritten by new ones with the same ID.
 

Light Alkmst

New Member
Reaction score
20
Codes

For the field codes as used on the first page, I can't find them. I know about the codes from Ctrl + D, and I know they're different. For whatever reason, when I ran NewGen on the school computers, they would display those codes. On my computer at home, it doesn't show up. How can I turn these codes on?
 

Azlier

Old World Ghost
Reaction score
461
:confused:

I see no option to turn that on or off. I'm assuming you're using NewGen, of course. But, I don't think I could turn those off if I tried.
 

Light Alkmst

New Member
Reaction score
20
That's not good...

Can you just give me the codes for these then?

Unit Base Damage
Unit Base Armor
Unit Max HP
 

Builder Bob

Live free or don't
Reaction score
249
For the field codes as used on the first page, I can't find them. I know about the codes from Ctrl + D, and I know they're different. For whatever reason, when I ran NewGen on the school computers, they would display those codes. On my computer at home, it doesn't show up. How can I turn these codes on?
From the main window in the Warcraft 3 World Editor
-> Grimore -> Enable object editor hack

Make sure it's checked, then restart the editor.
 

Light Alkmst

New Member
Reaction score
20
Ok, I've got another problem here. I've tried using the Object Merger in a text macro, but I'm have some trouble...

JASS:

library Sparta initializer Absolute
    //! textmacro SPARTANS takes NUMBER, DAMAGE, ARMOR, NEXT, SPAWNS
    //! external ObjectMerger w3u n001 S$NUMBER$ anam "Spartan $NUMBER$" ua1b $DAMAGE$ udef $ARMOR$ uhpm $NUMBER$
    private function Filt$NUMBER$ takes nothing returns boolean
        return GetUnitTypeId(GetTriggerUnit()) == 'S$NUMBER$'
    endfunction
    
    private function Conditions$NUMBER$ takes nothing returns boolean
        return GetUnitTypeId(GetTriggerUnit()) == 'S$NUMBER$'
    endfunction
    
    private function Actions$NUMBER$ takes nothing returns nothing
        local group g = CreateGroup()
        local integer c = 0
        
        call GroupEnumUnitsInRect(g, GetWorldBounds(), Condition(function Filt$NUMBER$))
        if (FirstOfGroup(g) == null) then
            loop
                exitwhen c == $SPAWNS$
                call IssuePointOrder(CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'S$NEXT$', GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit())), "attack", 0., 0.)
                set c = c + 1
            endloop
        endif
        
        call DestroyGroup(g)
        set g = null
    endfunction
    
    private function Init$NUMBER$ takes nothing returns nothing
        local trigger t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
        call TriggerAddCondition(t, Condition(function Conditions$NUMBER$))
        call TriggerAddAction(t, function Actions$NUMBER$)
    endfunction
    //! endtextmacro
    //! runtextmacro SPARTANS("001", "1", "1", "002", "1")
    //! runtextmacro SPARTANS("002", "1", "1", "003", "1")
    //! runtextmacro SPARTANS("003", "1", "1", "004", "1")
    //! runtextmacro SPARTANS("004", "1", "1", "005", "1")
    //! runtextmacro SPARTANS("005", "1", "1", "006", "1")
    //! runtextmacro SPARTANS("006", "1", "1", "010", "1")
    //! runtextmacro SPARTANS("010", "1", "1", "001", "1")
    
    private function Absolute takes nothing returns nothing
        call Init001()
        call Init002()
        call Init003()
        call Init004()
        call Init005()
        call Init006()
        call Init010()
    endfunction
endlibrary


It says that anam is not a valid field for Object Merger...

EDIT: I think I got it. anam should be unam

EDIT: EDIT: It compiles and runs fine now, but the created units are heroes...I don't want that...
 

Builder Bob

Live free or don't
Reaction score
249
Code:
//! external ObjectMerger w3u [B]n001[/B] S$NUMBER$ anam "Spartan $NUMBER$" ua1b $DAMAGE$ udef $ARMOR$ uhpm $NUMBER$
EDIT: EDIT: It compiles and runs fine now, but the created units are heroes...I don't want that...
n001 is the base unit you're using for all those other units. If n001 is a hero, then all other units based on it will also be heroes. Change the base unit to another raw code.

By the way. You don't have to run the object merger code every time you save. Just save once, then restart the editor. The unit will be in your object editor now. Comment out the line, so it won't run the next time you save.
 

Azlier

Old World Ghost
Reaction score
461
Uncapitalize the S in the desired rawcode. Units with capitalized letters as the first character in their raw codes like to be heroes.
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
When I save my map it tells me:

External not found in config fileé "ObjectMerger"

Please tell me what's the problem.
 

Azlier

Old World Ghost
Reaction score
461
>Please tell me what's the problem.

I wouldn't know, sorry.
 

WaterElement

New Member
Reaction score
0
It's a good tutorial, I guess, though I managed to work it all out for myself after looking at the BonusMod textmacros for about 20 minutes anyway. The level thing did confuse me for a while though, and this tutorial could have helped a lot then.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I have a bunch of community service I have to do, and I have a feeling there will be a lot of snow shoveling involved now
  • The Helper The Helper:
    don't know why people choose to live in that kind of weather :)
  • Varine Varine:
    Well
  • Varine Varine:
    My job is here
  • Varine Varine:
    I was born here man I didn't choose shit
  • Varine Varine:
    And also, I keep moving away and it doesn't get any better. I moved to San Antonio and shit froze there AND we had blackouts
  • tom_mai78101 tom_mai78101:
    I'm back, suffering from severe jet lag.
  • The Helper The Helper:
    Cold is following your ass around Varine - I just dont think I could handle a snowy winter.
  • The Helper The Helper:
    Welcome Back Tom!
  • The Helper The Helper:
    I hear that taking a Melatonin around your normal bedtime can really fix jet lag
  • tom_mai78101 tom_mai78101:
    Yeah, I also heard about that as well. I think I'm good. I'm just lucky it's the weekend so I have some time to readjust.
    +1
  • Varine Varine:
    It was a fucking blizzard today, shoveling was an effort in futility.
  • Varine Varine:
    Melatonin gives me nightmares
  • Varine Varine:
    They had me shoveling out the parking lot for the jail. Fucking pointless, they need a blow.
  • Varine Varine:
    Well they gave me a snow blower but it was too wet to do much with with other than compact everything. Oh well, the cop cars can get into there now when they arrest people I guess
    +1
  • The Helper The Helper:
    I shit you not we are Number one on Google for Banana Bread Recipe
  • jonas jonas:
    xD
    +1
  • The Helper The Helper:
    Need Web Design Contractor that knows Word Press, Woocommerce and Elementor to help with the company that sponsors this site
  • The Helper The Helper:
  • The Helper The Helper:
    I am going to be AFK most of this weekend has I have a friend coming into town for his company christmas party and I am going to be busy with that this weekend.
    +1
  • The Helper The Helper:
    541 Active Users and this number has been pretty steady give or take some. The bots are hammering us.
  • The Helper The Helper:
    I have been posting a bunch of recipes and Google is loving them. I mean OK my shit is good but how does google know LOL!

    The Helper Discord

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top