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

Noob questions about modding

Status
Not open for further replies.
Level 2
Joined
Jul 19, 2022
Messages
3
Hello, I've been using this site for a long time but never dropped by the forums since I would just use WE for custom melee maps and the like.

Problem being that porting everything to a second map after you're done turns out to be tiring, so I just intend to embed it into my game by modding it, I just have two questions.

1. Creating and tuning the units stats works the same way as it does on WE?

2. What programs do I need?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
1. Creating and tuning the units stats works the same way as it does on WE?
I think Warcraft III uses SLK files (a type of spreadsheet) for object data rather than the binary object data format that maps and campaigns use.
2. What programs do I need?
If using a legacy build of Warcraft III then MPQEdit should be enough to modify the main archives.

For the current version of Warcraft III you can try forcing local files and providing them in a folder structure, otherwise it is not possible. CASC is designed to check for damage and change so any local modifications to stored files might be "corrected" next time Warcraft III or the BattleNet application is launched.

Another solution to your problem might be to streamline "porting" everything between maps. Trigger, object data and the like can easily be moved between maps as they are separate files. If the maps are saved as folders (newer versions of WC3 only) then you could even write macro scripts to automate this process so that changes made to cores systems in 1 map can be deployed to multiple maps very easily. This also retains compatibility with online play making it easier for other players to use the maps.
 
You have the option to place the data modification files into your Warcraft 3 installation (when "Allow Local Files" is enabled).

That way you don't have to bother mpq/casc/slk, but it removes the ability for maps/campaigns to have data modification. (Breaks any custom map with custom Object Editor data)

It is done by using world editor Object Editor and then one uses the export unit/item/... feature of object Editor. But individual, not as pack. You name these files "war3map" and put them next to the Wacraft 3 exe.

Also need the imports and String File (Menu File World Editor).

For custom Triggers (custom Systems or spells etc) you would make a clone of Blizzard.j and put it in your wacraft 3 installation. To the code of this Blizzard.j, you would add your custom Triggers (in text form taken from war3map.j) and init your Triggers in function InitBlizzard. But don't put war3map.j into your warcraft 3 or all maps have the same code.

war3map.w3u - units
war3map.w3t - Items
war3map.w3b - destructables
war3map.w3d - doodads
war3map.w3a - Abilities
war3map.w3h - Buffs
war3map.w3q - Upgrades
war3map.wts - Text/Tooltip

Kinda, like shown by Retera in this video (unsure if this war3mod mpq is still supported)
 
Level 2
Joined
Jul 19, 2022
Messages
3
I think Warcraft III uses SLK files (a type of spreadsheet) for object data rather than the binary object data format that maps and campaigns use.

If using a legacy build of Warcraft III then MPQEdit should be enough to modify the main archives.

For the current version of Warcraft III you can try forcing local files and providing them in a folder structure, otherwise it is not possible. CASC is designed to check for damage and change so any local modifications to stored files might be "corrected" next time Warcraft III or the BattleNet application is launched.

Another solution to your problem might be to streamline "porting" everything between maps. Trigger, object data and the like can easily be moved between maps as they are separate files. If the maps are saved as folders (newer versions of WC3 only) then you could even write macro scripts to automate this process so that changes made to cores systems in 1 map can be deployed to multiple maps very easily. This also retains compatibility with online play making it easier for other players to use the maps.

Fortunately I still run an OG version and I play offline when I have some spare time, so it appears that I'm saving myself some troubles. I'll give this a look, thank you.

You have the option to place the data modification files into your Warcraft 3 installation (when "Allow Local Files" is enabled).

That way you don't have to bother mpq/casc/slk, but it removes the ability for maps/campaigns to have data modification. (Breaks any custom map with custom Object Editor data)

It is done by using world editor Object Editor and then one uses the export unit/item/... feature of object Editor. But individual, not as pack. You name these files "war3map" and put them next to the Wacraft 3 exe.

Also need the imports and String File (Menu File World Editor).

For custom Triggers (custom Systems or spells etc) you would make a clone of Blizzard.j and put it in your wacraft 3 installation. To the code of this Blizzard.j, you would add your custom Triggers (in text form taken from war3map.j) and init your Triggers in function InitBlizzard. But don't put war3map.j into your warcraft 3 or all maps have the same code.

war3map.w3u - units
war3map.w3t - Items
war3map.w3b - destructables
war3map.w3d - doodads
war3map.w3a - Abilities
war3map.w3h - Buffs
war3map.w3q - Upgrades
war3map.wts - Text/Tooltip

Kinda, like shown by Retera in this video (unsure if this war3mod mpq is still supported)

If this works with my version it's saving me a lot of hassle, the question then is where do I put the custom assets (Models, sounds, etc)?

Thanks.
 
the question then is where do I put the custom assets (Models, sounds, etc)?
Relative to the warcraft main folder, as they were in the map.

When you have a map import for example:
war3mapImported\footmen.mdx

Then create a folder in the warcraft 3 installation named war3mapImported and put the model into it.
C:\Program Files\Warcraft III\war3mapImported\footmen.mdx


That "Allow Local Files" has to be enabled in regedit.
[Computer\HKEY_CURRENT_USER\SOFTWARE\Blizzard Entertainment\Warcraft III\Allow Local Files] = 1
 
Level 2
Joined
Jul 19, 2022
Messages
3
Relative to the warcraft main folder, as they were in the map.

When you have a map import for example:
war3mapImported\footmen.mdx

Then create a folder in the warcraft 3 installation named war3mapImported and put the model into it.
C:\Program Files\Warcraft III\war3mapImported\footmen.mdx


That "Allow Local Files" has to be enabled in regedit.
[Computer\HKEY_CURRENT_USER\SOFTWARE\Blizzard Entertainment\Warcraft III\Allow Local Files] = 1

Alright so I managed to make this work, do you know of any way to add extra races with a working AI?

Thanks again
 
extra races: The game-lobby does not allow to select more than 5 options, in the player raceselection, even when you change the ui-files (fdf).

When you some how got the additional races selectable: You can make bots uses a specific ai file. You would overwritte scripts/blizzard.j.
Blizzard.j gives the starting units and the bot scripts. function MeleeStartingAI is the function giving the bot the script files based on race.

function MeleeStartingUnits calls the functions to spawn race specific starting units.
 
Level 2
Joined
Aug 23, 2022
Messages
2
You have the option to place the data modification files into your Warcraft 3 installation (when "Allow Local Files" is enabled).

That way you don't have to bother mpq/casc/slk, but it removes the ability for maps/campaigns to have data modification. (Breaks any custom map with custom Object Editor data)

It is done by using world editor Object Editor and then one uses the export unit/item/... feature of object Editor. But individual, not as pack. You name these files "war3map" and put them next to the Wacraft 3 exe.

Also need the imports and String File (Menu File World Editor).

For custom Triggers (custom Systems or spells etc) you would make a clone of Blizzard.j and put it in your wacraft 3 installation. To the code of this Blizzard.j, you would add your custom Triggers (in text form taken from war3map.j) and init your Triggers in function InitBlizzard. But don't put war3map.j into your warcraft 3 or all maps have the same code.

war3map.w3u - units
war3map.w3t - Items
war3map.w3b - destructables
war3map.w3d - doodads
war3map.w3a - Abilities
war3map.w3h - Buffs
war3map.w3q - Upgrades
war3map.wts - Text/Tooltip

Kinda, like shown by Retera in this video (unsure if this war3mod mpq is still supported)
Hello! Tried this one on reforged and except the custom triggers..

I may have messed up the instruction but this is what I've done... I pasted the script in the blizzard.j and placed the file at retail\scripts. here's the script that i've added:

JASS:
//===========================================================================
function EndlessGold takes nothing returns boolean
    local unit f
    local group g = CreateGroup()
    local integer id
    call GroupEnumUnitsInRange(g, 0,0, 300000, null)
    loop
        set f = FirstOfGroup(g)
        exitwhen f == null
        set id = GetUnitTypeId(f)
        if id == 'ugol' or id == 'egol' or id == 'ngol' then
            call SetResourceAmount( f, 1000000 )
        endif
        call GroupRemoveUnit(g,f)
    endloop
    call DestroyGroup(g)
    set g = null
    set f = null
    return false
endfunction

function InitTrig_EndlessGold takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterTimerEvent(t, 1, true)
    call TriggerAddCondition(t, Condition(function EndlessGold))
    set t = null
endfunction

also i can't find the war3map.j file using casc viewer, I only found blizzard.j, common.j and cheats.j
Thanks in advance
 
war3map.j is the map specific code. it is important to let the map handle it. It places preplaced stuff, map triggers, you don't want all maps to have the same preplaced units.

When you have function InitTrig_EndlessGold inside blizzard.j, then you still need to call InitTrig_EndlessGold(). That will create the trigger and start the wanted behaviour, i suggest to add such a call line into the function InitBlizzard. InitBlizzard belongs to the functions called on default by maps created by world editor.
Jass can only call functions written in a lower line number (above), hence your code should be placed above InitBlizzard.

function InitBlizzard takes nothing returns nothing
 
Last edited:
Level 2
Joined
Aug 23, 2022
Messages
2
Thanks... I realized that original campaign has many custom objects that if I use mine most of the triggers on the map will not initialize. I thought the world editor in reforge will be like in Starcraft II where custom mods will can be applied to default or campaign mods (up to HoTS only though as file structure was changed on LotV).

I guess my mod is only useful in melee and I'm not using it on campaign as it would be a tedious to apply my mods on every campaign maps :sad:
 
Status
Not open for further replies.
Top