Mass copy-paste triggers

Status
Not open for further replies.
Level 10
Joined
Aug 4, 2017
Messages
90
Hello. I make big map pack with 100+ maps. It is custom melee with heroes from campaign and other improvements.

To work with many files, I need a tool that can import/export triggers and other info and avoid WorldEdit because it works very-very slow.

At the moment I found good solution with Ladiks MPQ and Pulover's Macro Creator to automate routine. But when I put .wtg file into MPQ archive of the map, it is not applied in the game (other data works correct). My triggers are not working, and I should open maps in WorldEdit and resave them to apply.

How can I mass import triggers and avoid WorldEdit?

My import/export maps have the same versions, btw.
 
Level 20
Joined
Jan 3, 2022
Messages
364
But when I put .wtg file into MPQ archive of the map, it is not applied in the game (other data works correct). My triggers are not working, and I should open maps in WorldEdit and resave them to apply.
Oh this is actually correct.
.wtg is only used by WorldEdit, never by the game. That's why you need to save the map to convert new .wtg -> war3map.j.
If you want to apply triggers from another map, copy both .wtg (for editing) and war3map.j (for the game execute)
 
Level 10
Joined
Aug 4, 2017
Messages
90
Because then you don't have to import anything, you just put assets in the right folder.
Nice feature. I've never heard before. Does it work starting from 1.32+?

Oh this is actually correct.
.wtg is only used by WorldEdit, never by the game. That's why you need to save the map to convert new .wtg -> war3map.j.
If you want to apply triggers from another map, copy both .wtg (for editing) and war3map.j (for the game execute)
Thank you :)
 
Level 10
Joined
Aug 4, 2017
Messages
90
Oh this is actually correct.
.wtg is only used by WorldEdit, never by the game. That's why you need to save the map to convert new .wtg -> war3map.j.
If you want to apply triggers from another map, copy both .wtg (for editing) and war3map.j (for the game execute)
If I import the file .j, all maps will have only 2 players in lobby, as in a reference map. :( My pack contains different numbers of players.
 
Last edited:
Level 20
Joined
Jan 3, 2022
Messages
364
:peasant-neutral:You control the triggers right? Since they should be saved in the same order as shown in WE, add trigger comments or something to mark the end/start of your triggers. Because then you can open war3map.j and only insert your updated triggers.

The lobby and player slots, map author, suggested players are only defined in war3map.j for in-game use. You must keep the original map's player slots code and config() yet inject into main() to register custom triggers. That's possible with very little manual effort in Lua, but not Jass.

What you need is a custom build system to automatically build/inject maps with your updates.

MPQEditor exists but is practically impossible to use as a CLI tool for MPQ automation. We need a new CLI utility based on Stormlib :wscrolleyes:
 
Status
Not open for further replies.
Top