• Are you planning to upload your awesome tool to Hive? Please review the rules here.
    July 9, 2018: The rules for the Tool Section have been revised. Please be sure to read the revisions.

W3x2Lni v2.7.2

This bundle is marked as approved. It works and satisfies the submission rules.
W3x2Lni is a wc3 map management tool. It helps you to manage your maps when developing or publishing.We defined 3 formats for a wc3 map, and w3x2Lni allows you to convert your maps amongst these 3 formats which are `Lni`, `Obj` and `Slk`.

> Lni
`Lni` is a VCS (like git, svn) friendly format. It looks like a directory. Most binary files in w3x will be converted into plain text files (yes! human-readable) by w3x2Lni which will also organize and categorize these text files.

> Obj
`Obj` is a wc3-readable and WE-readable format. If you want to open your map with WE, convert your map into this format.

> Slk
`Slk` is only readable by wc3 and should be used for final distribution. W3x2Lni enables multiple optimization for this format, including:

* Objects converted to slk
* Removed unreferenced objects
* Removed WE-only files
* Inlined WTS strings
* Compressed mdx
* Removed comments and unncessary white spaces in the script
* obfuscated variable and function name

W3x2Lni comes with war3 1.27.1 English data files. But it may not meet everyone's needs, you can use `w2l mpq <war3_path>` to extract data files.


For more information see the documentation.


W3x2Lni is a open source project.We welcome any pull request, e.g. improving the English text or writing English documents.
Contents

W3x2Lni v2.7.2 (Binary)

Reviews
eejin
The tool works as one would expect. The UI is nice and to the point. Only thing I am missing is a back button wen you have chosen a conversion mode. You also cannot scroll horizontally when viewing the log when converting to Lni. I am looking...
Level 8
Joined
Apr 14, 2016
Messages
204
I did some tests, but I didn't find this problem. Could you please provide a demo map, maybe there is something changed in the latest version of WC3.
Bleach vs One Piece v2.08b - Warcraft 3 Maps - Epic War.com if you want I can give you listfile for it. In short, either reassemble it into slk or make it into LNI and then back to SLK, this problem only happens in SLK mode.

Added info: wait for the creeps to spawn normally, then check the result from W3X2LNI, the set of mobs will be completely different, as Zeppelins will be spawned with it as well.


Will check the GlobalExperience in a bit, thanks!

Edit: GlobalExperience is now being set correctly, thanks :)
 
Last edited:
Level 4
Joined
May 31, 2018
Messages
92
wait for the creeps to spawn normally, then check the result from W3X2LNI, the set of mobs will be completely different, as Zeppelins will be spawned with it as well.
There's so much in your map that I can hardly find the difference. Could you provide two screenshots for comparing?
 
Level 4
Joined
May 31, 2018
Messages
92
The latest W3x2lni in Github has almost support WC3-1.31.1, except converting wtg to lml in Lni mode.
The format of wtg seems great changed in latest WC3.
Could anyone provide a document of the new format of war3map.wtg?
 
Level 4
Joined
May 31, 2018
Messages
92
stijnherfst/HiveWE
This should have the basics, and the code might help too (Base/Triggers.cpp)
Thanks for your help.

I have supported converting the latest `war3map.wtg` to `lml` in Lni mode.
Currently, it should be fully support WC3-1.31.1 .
You could checkout it by W3x2lni v2.5.3 with the scripts in sumneko/w3x2lni .
And, DONT FORGET BACKUP your map!
 
Level 4
Joined
May 18, 2018
Messages
35
I'm getting this error message when I try to convert my map to slk on 2.5.3 (and also on 2.5.1)

Code:
Date: 2019-12-19 22:50:34
Version: 2.5.3
Commit: 412839e58563d5f5ea6841250cf45fc6f73e70fe
Stack:
----------------------------------------
C:/Games/Warcraft/W3x2Lni v2.5.1/W3x2Lni v2.6.0/W3x2Lni v2.5.3/w3x2lni_enUS_v2.5.3/bin/w3x2lni-lua.exe: .\core\slk/backend_computed.lua:77: attempt to index a nil value (local 'key')
stack traceback:
    .\core\slk/backend_computed.lua:77: in function <.\core\slk/backend_computed.lua:61>
    (...tail calls...)
    [C]: in function 'string.gsub'
    .\core\slk/backend_computed.lua:110: in upvalue 'computed'
    .\core\slk/backend_computed.lua:126: in method 'backend_computed'
    .\core\slk/backend.lua:355: in method 'backend'
    .\backend\convert.lua:140: in function 'backend.convert'
    .\backend\cli\slk.lua:4: in function 'backend.cli.slk'
    backend\init.lua:12: in main chunk
    [C]: in ?

----------------------------------------

If you need my map let me know and I'll send it to you. I'm not sure what the cause is, as it actually used to work fine a few months ago.
 
Level 4
Joined
May 31, 2018
Messages
92
I'm getting this error message when I try to convert my map to slk on 2.5.3 (and also on 2.5.1)

Code:
Date: 2019-12-19 22:50:34
Version: 2.5.3
Commit: 412839e58563d5f5ea6841250cf45fc6f73e70fe
Stack:
----------------------------------------
C:/Games/Warcraft/W3x2Lni v2.5.1/W3x2Lni v2.6.0/W3x2Lni v2.5.3/w3x2lni_enUS_v2.5.3/bin/w3x2lni-lua.exe: .\core\slk/backend_computed.lua:77: attempt to index a nil value (local 'key')
stack traceback:
    .\core\slk/backend_computed.lua:77: in function <.\core\slk/backend_computed.lua:61>
    (...tail calls...)
    [C]: in function 'string.gsub'
    .\core\slk/backend_computed.lua:110: in upvalue 'computed'
    .\core\slk/backend_computed.lua:126: in method 'backend_computed'
    .\core\slk/backend.lua:355: in method 'backend'
    .\backend\convert.lua:140: in function 'backend.convert'
    .\backend\cli\slk.lua:4: in function 'backend.cli.slk'
    backend\init.lua:12: in main chunk
    [C]: in ?

----------------------------------------

If you need my map let me know and I'll send it to you. I'm not sure what the cause is, as it actually used to work fine a few months ago.

This should be fixed in v2.6.0
 
Level 4
Joined
May 18, 2018
Messages
35
This should be fixed in v2.6.0

I just tried it and I get a similar error on 2.6.0

Code:
Date: 2019-12-20 14:16:11
Version: 2.6.0
Commit: c684282eb33ec6465f097bb13398466f9f49dca0
Stack:
----------------------------------------
C:/Games/Warcraft/W3x2Lni v2.5.1/W3x2Lni v2.6.0/W3x2Lni v2.6.0/w3x2lni_enUS_v2.6.0/bin/w3x2lni-lua.exe: .\core\slk/backend_computed.lua:23: attempt to index a nil value (local 'key')
stack traceback:
    .\core\slk/backend_computed.lua:23: in function <.\core\slk/backend_computed.lua:18>
    (...tail calls...)
    .\core\slk/backend_computed.lua:80: in function <.\core\slk/backend_computed.lua:61>
    (...tail calls...)
    [C]: in function 'string.gsub'
    .\core\slk/backend_computed.lua:112: in upvalue 'computed'
    .\core\slk/backend_computed.lua:128: in method 'backend_computed'
    .\core\slk/backend.lua:359: in method 'backend'
    .\backend\convert.lua:141: in function 'backend.convert'
    .\backend\cli\slk.lua:4: in function 'backend.cli.slk'
    backend\init.lua:12: in main chunk
    [C]: in ?

----------------------------------------
 
Level 4
Joined
May 31, 2018
Messages
92
I just tried it and I get a similar error on 2.6.0

Code:
Date: 2019-12-20 14:16:11
Version: 2.6.0
Commit: c684282eb33ec6465f097bb13398466f9f49dca0
Stack:
----------------------------------------
C:/Games/Warcraft/W3x2Lni v2.5.1/W3x2Lni v2.6.0/W3x2Lni v2.6.0/w3x2lni_enUS_v2.6.0/bin/w3x2lni-lua.exe: .\core\slk/backend_computed.lua:23: attempt to index a nil value (local 'key')
stack traceback:
    .\core\slk/backend_computed.lua:23: in function <.\core\slk/backend_computed.lua:18>
    (...tail calls...)
    .\core\slk/backend_computed.lua:80: in function <.\core\slk/backend_computed.lua:61>
    (...tail calls...)
    [C]: in function 'string.gsub'
    .\core\slk/backend_computed.lua:112: in upvalue 'computed'
    .\core\slk/backend_computed.lua:128: in method 'backend_computed'
    .\core\slk/backend.lua:359: in method 'backend'
    .\backend\convert.lua:141: in function 'backend.convert'
    .\backend\cli\slk.lua:4: in function 'backend.cli.slk'
    backend\init.lua:12: in main chunk
    [C]: in ?

----------------------------------------

Please try this: 修正公式计算的报错 · sumneko/[email protected]
 
Level 8
Joined
Mar 26, 2017
Messages
355
I'm afraid there is something wrong with the exe for w3x2lni 2.6.0.
The 2.5.3 version is not working for 1.31 unfortunately.

Anyone have got 2.6.0 to work?

Have seen the post from the developer on last page, but it just linked to a github with a code change. I need a bit help to go from there :p
 
Last edited:
Level 4
Joined
May 18, 2018
Messages
35
I'm afraid there is something wrong with the exe for w3x2lni 2.6.0.
The 2.5.3 version is not working for 1.31 unfortunately.

Anyone have got 2.6.0 to work?

Have seen the post from the developer on last page, but it just linked to a github with a code change. I need a bit help to go from there :p

Copy paste the w3x3lni.exe from the 2.5.3 folder to the 2.60 folder and it'll work.
 
Level 8
Joined
Mar 26, 2017
Messages
355
Copy paste the w3x3lni.exe from the 2.5.3 folder to the 2.60 folder and it'll work.

Just tried this, but now it crashes when converting to lni with 'attempt to index a nil value'
This is the same error message that I got for 2.4.6 versions from w3x2lni (on WC3 latest patch).

So in short, my experiences on using w3x2lni:
2.4.6 > Crashes on convert with 'attempt to index a nil value'
2.5.3 > Can convert, but when I convert to lni and then back to obj, the result map crashes when trying to open in WC3
2.6.0 > Cannot open .exe
2.6.0 with 2.5.3 exe > Crashes on convert with 'attempt to index a nil value'

With the previous WC3 patches I always happily used 2.4.6 without issues.
 
Level 4
Joined
May 31, 2018
Messages
92
Just tried this, but now it crashes when converting to lni with 'attempt to index a nil value'
This is the same error message that I got for 2.4.6 versions from w3x2lni (on WC3 latest patch).

So in short, my experiences on using w3x2lni:
2.4.6 > Crashes on convert with 'attempt to index a nil value'
2.5.3 > Can convert, but when I convert to lni and then back to obj, the result map crashes when trying to open in WC3
2.6.0 > Cannot open .exe
2.6.0 with 2.5.3 exe > Crashes on convert with 'attempt to index a nil value'

With the previous WC3 patches I always happily used 2.4.6 without issues.

Please show me the error log(Screenshot or `log\error\`)
 
Level 8
Joined
Mar 26, 2017
Messages
355
Please show me the error log(Screenshot or `log\error\`)

For 2.6.0 like from download link
upload_2020-1-5_19-13-36.png


upload_2020-1-5_19-12-29.png


"This app cannot be executed on your pc"



2.6.0 with 2.5.3 exe

Date: 2020-01-05 19:23:13
Version: 2.6.0
Commit: c684282eb33ec6465f097bb13398466f9f49dca0
Stack:
----------------------------------------
Basedir/w3x2lni_enUS_v2.6.0/bin/w3x2lni-lua.exe: attempt to index a nil value
stack traceback:
[C]: in for iterator 'for iterator'
.\core\slk/backend_lml.lua:101: in upvalue 'read_dirs'
.\core\slk/backend_lml.lua:268: in method 'backend_lml'
.\core\slk/backend.lua:99: in upvalue 'convert_wtg'
.\core\slk/backend.lua:388: in method 'backend'
.\backend\convert.lua:141: in function 'backend.convert'
.\backend\cli\lni.lua:4: in function 'backend.cli.lni'
backend\init.lua:12: in main chunk
[C]: in ?
----------------------------------------

 

Attachments

  • upload_2020-1-5_19-18-1.png
    upload_2020-1-5_19-18-1.png
    119.9 KB · Views: 82
  • upload_2020-1-5_19-22-32.png
    upload_2020-1-5_19-22-32.png
    107 KB · Views: 73
Level 3
Joined
May 5, 2018
Messages
30
I'd like to report that at map SLK optimization choice, option Optimize JASS is not working with new blizzard functions in the map which contains them (or not new already, maybe they were replaced (about renaming functions)). It like causes errors aka "Variable [PLAYER_COLOR_MAROON] not exists" and etc
 
Level 13
Joined
Jun 15, 2016
Messages
743
Oh mine. Bless the one @actboy168, who made this optimization. This is even surpass Vexorian's Optimization, Wc3SLKOpt and other optimization too. Very clean UI, easy to use, fast progress and most importantly, it allow to optimize the huge object data all at one without bugs. Not to mention, it supports different versions of WE. Seriously, you deserve more +rep than this.
 
Level 3
Joined
May 5, 2018
Messages
30
Tried to test current version (2.7.2) in reforged (1.32.8) with one map, and with SLK optimization now can't launch the map. It gives message "Invalid shadow map file". Hm, I guess its because the map is protected, but still I've managed to recover its listfile fully and implanted back for optimization...

Update: Yeah, my bad. Just poorly implanted restored listfile.

Update #2: But still, why slk optimization messes up hotkeys? Like it removes hotkeys for upgrades beyond level 1. Minor example: have map with some upgrade with 4 levels, optimize map with SLK optimization - now you can only press upgrade via hotkey only on 1st level, the next levels doesn't have hotkeys (about other mess ups, like turning some icons to completely different icons, I suppose i will remain silent).
 
Last edited:
Level 4
Joined
May 31, 2018
Messages
92
Tried to test current version (2.7.2) in reforged (1.32.8) with one map, and with SLK optimization now can't launch the map. It gives message "Invalid shadow map file". Hm, I guess its because the map is protected, but still I've managed to recover its listfile fully and implanted back for optimization...

Update: Yeah, my bad. Just poorly implanted restored listfile.

Update #2: But still, why slk optimization messes up hotkeys? Like it removes hotkeys for upgrades beyond level 1. Minor example: have map with some upgrade with 4 levels, optimize map with SLK optimization - now you can only press upgrade via hotkey only on 1st level, the next levels doesn't have hotkeys (about other mess ups, like turning some icons to completely different icons, I suppose i will remain silent).

Did you load data files of 1.32.8?
 
Top