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

W3x2Lni v2.7.2

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 6
Joined
May 1, 2012
Messages
95
I am also getting the same error.

Why wouldn't the font just be included in the package then? :x

And please provide some description in the config, how do I change it so that the error message is in English?

Sorry, I am writing a new GUI now, so the current GUI is no longer maintained. Currently you can use the CLI version instead.
 
Level 5
Joined
Aug 19, 2015
Messages
68
40% of the players desync *every time* when i optimize my map with this.
i tried it with vxoptimizer with old wc3 data and that one didnt cause desyncs (but i cant use that because you cant sell items then because of missing shop selection boxes or smth like that)
wc3 version: 1.29.2.9231 settings: slk format
[global]
lang = ${AUTO}
data_war3 = enUS-1.27.1
data_ui = enUS-1.27.1
data_meta = enUS-1.27.1
data_wes = enUS-1.27.1

[lni]
read_slk = false
find_id_times = 0
export_lua = false

[slk]
remove_unuse_object = false
optimize_jass = false
mdx_squf = false
remove_we_only = false
slk_doodad = false
find_id_times = 10
confused = false
confusion = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_

[obj]
read_slk = false
find_id_times = 0

(i tried deactivating settings until i reached this point, no change)
when i deactivated (mdx_squf or slk_doodad, not sure), many (doodad?) models also went missing.
map: https://www.dropbox.com/s/mofxa1kgs4or7c0/Vamp Zero Turbo 6.00 raw.w3x?raw=1
 
Level 5
Joined
Aug 19, 2015
Messages
68
@ownlyme That happens with any SLK optimizer (like Widgetizer). The only solution currently is to force everyone to restart their game if they played another map before playing your map.
This happens because the global SLK table values get overwritten when playing an optimized map causing data to be different for everyone.
i don't think it happened with widgetizer.
i used to optimize my map all the time with widgetizer (after the optimization with vxopt)
if there were that many desyncs, i would have noticed it earlier (trust me, i hosted it a LOT^^)

does that mean i just have to choose another format?
obj seems to load pretty long
 
Last edited:
Level 6
Joined
May 1, 2012
Messages
95
40% of the players desync *every time* when i optimize my map with this.
i tried it with vxoptimizer with old wc3 data and that one didnt cause desyncs (but i cant use that because you cant sell items then because of missing shop selection boxes or smth like that)
wc3 version: 1.29.2.9231 settings: slk format
[global]
lang = ${AUTO}
data_war3 = enUS-1.27.1
data_ui = enUS-1.27.1
data_meta = enUS-1.27.1
data_wes = enUS-1.27.1

[lni]
read_slk = false
find_id_times = 0
export_lua = false

[slk]
remove_unuse_object = false
optimize_jass = false
mdx_squf = false
remove_we_only = false
slk_doodad = false
find_id_times = 10
confused = false
confusion = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_

[obj]
read_slk = false
find_id_times = 0

(i tried deactivating settings until i reached this point, no change)
when i deactivated (mdx_squf or slk_doodad, not sure), many (doodad?) models also went missing.
map: https://www.dropbox.com/s/mofxa1kgs4or7c0/Vamp Zero Turbo 6.00 raw.w3x?raw=1

A known problem is that optimizing doodad will cause the global state of wc3 to be modified. This may cause desync. You can disable optimized doodad and try again.

I will change this option to disabled by default in the next English version. This is a problem that I neglected. For Chinese maps, the wc3 process is closed at the end of each game, so there is no problem with optimized doodad. If you cannot guarantee this, you must disable optimized doodad.
 
Level 6
Joined
May 1, 2012
Messages
95
i don't think it happened with widgetizer.
i used to optimize my map all the time with widgetizer (after the optimization with vxopt)
if there were that many desyncs, i would have noticed it earlier (trust me, i hosted it a LOT^^)

does that mean i just have to choose another format?
obj seems to load pretty long

Obj is not an optimized format, a WE generated map is converted to obj format, almost nothing will change.
 
Level 6
Joined
May 1, 2012
Messages
95
40% of the players desync *every time* when i optimize my map with this.
i tried it with vxoptimizer with old wc3 data and that one didnt cause desyncs (but i cant use that because you cant sell items then because of missing shop selection boxes or smth like that)
wc3 version: 1.29.2.9231 settings: slk format
[global]
lang = ${AUTO}
data_war3 = enUS-1.27.1
data_ui = enUS-1.27.1
data_meta = enUS-1.27.1
data_wes = enUS-1.27.1

[lni]
read_slk = false
find_id_times = 0
export_lua = false

[slk]
remove_unuse_object = false
optimize_jass = false
mdx_squf = false
remove_we_only = false
slk_doodad = false
find_id_times = 10
confused = false
confusion = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_

[obj]
read_slk = false
find_id_times = 0

(i tried deactivating settings until i reached this point, no change)
when i deactivated (mdx_squf or slk_doodad, not sure), many (doodad?) models also went missing.
map: https://www.dropbox.com/s/mofxa1kgs4or7c0/Vamp Zero Turbo 6.00 raw.w3x?raw=1

Hi, I tried your map. There is an error that needs to be resolved. I suggest that you should read everything in the log carefully because they are really useful.
There is a bug in the current version that causes the details of this error not to be displayed correctly. What it actually means is that your map script has undefined variables because you are using 1.27 data files, but your map script contains 1.29 variables. You need to use w2l mpq to generate a 1.29 data file.
However, this may not be related to desync, but it can cause other problems.
 
Level 6
Joined
May 1, 2012
Messages
95
W3x2Lni 2.3 has been released. It has fixed all the bugs reported. Optimizing doodad has been disabled by default. V2.3 also added a new GUI, but the GUI for the log has not yet been completed.If you have trouble viewing the log in the GUI, you can open the `/log/report.log` file to view it.
 
Level 6
Joined
May 1, 2012
Messages
95
if slk causes so terrible desyncs, why did you write in the description that it's meant for final distribution?

Slk does not cause desyncs, except for optimizing doodad. In China, everyone uses third-party platform services to play Warcraft 3. In the third-party platform service, the Warcraft 3 process is closed at the end of each game. Under this premise, there is no problem with optimizing doodad.
So in version 2.3, optimizing doodad has been disabled by default for English users, but it is still enabled by default for Chinese users.
 
Level 5
Joined
Aug 19, 2015
Messages
68
when i run the commandline w2l.exe i get an error message saying
Commit: c65eb4ed10ab1d8acc2c613f60000130d23c64d5
Stack:
----------------------------------------
C:\Users\own\Desktop\W3x2Lni v2.3\w3x2lni_v2.3\bin\w3x2lni-lua.exe: (command line):1: unfinished long string (starting at line 1) near <eof>

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

edit: now im getting the error for the gui too (even after a windows restart), but the first time it worked.. Oo
deleting and unzipping the download again doesn't change anything
version 2.2.1 (command line) still works
 
Last edited:
Level 6
Joined
May 1, 2012
Messages
95
when i run the commandline w2l.exe i get an error message saying
Commit: c65eb4ed10ab1d8acc2c613f60000130d23c64d5
Stack:
----------------------------------------
C:\Users\own\Desktop\W3x2Lni v2.3\w3x2lni_v2.3\bin\w3x2lni-lua.exe: (command line):1: unfinished long string (starting at line 1) near <eof>

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

edit: now im getting the error for the gui too (even after a windows restart), but the first time it worked.. Oo
deleting and unzipping the download again doesn't change anything
version 2.2.1 (command line) still works

There is now a bug. w3x2lni does not work if there are spaces in the path. You can put w3x2lni in a path without spaces and try again.
 
Level 5
Joined
Aug 19, 2015
Messages
68
as you can see from the settings i posted, i had already deactivated optimized doodads when i still got desyncs
now im using obj which is still pretty good compared to unoptimized, and probably even better than vxopt was.
the only bug i noticed was that some later levels of research had missing icons (green placeholder)
most weirdly, they don't even have a different icon at level 4 and other researches work just fine..
when they reach level 6/10 respectively 5/8/10 (when they get a different icon) it works for that level
if you want to check my map, it's improved masonry 4,5,7,8,9 and combat training 4,6,7,9 (the levels above 10 work)
i have already updated my data to 1.29.2 but i'm using optimizer version 2.2.1
oh and i'm not getting any errors or warnings
i have everything deactivated except remove_unuse_object, optimize_jass, mdx_squf, remove_we_only
 
Last edited:
Level 6
Joined
May 1, 2012
Messages
95
as you can see from the settings i posted, i had already deactivated optimized doodads when i still got desyncs

If I have other findings, I will tell you the first time.


now im using obj which is still pretty good compared to unoptimized, and probably even better than vxopt was.

Now converting to obj will enable the optimization of wts inline. This may be a more powerful optimization than object data slk.

the only bug i noticed was that some later levels of research had missing icons (green placeholder)
most weirdly, they don't even have a different icon at level 4 and other researches work just fine.. though they are the only researches (of those i've checked) that do have different icons at some levels.
when they reach level 6 respectively 5 (when they get a different icon) it works again.
if you want to check my map, it's improved masonry 4.. and combat training 4...

I will see.
 
Level 6
Joined
May 1, 2012
Messages
95
the only bug i noticed was that some later levels of research had missing icons (green placeholder)
most weirdly, they don't even have a different icon at level 4 and other researches work just fine.. though they are the only researches (of those i've checked) that do have different icons at some levels.
when they reach level 6 respectively 5 (when they get a different icon) it works again.
if you want to check my map, it's improved masonry 4.. and combat training 4...

This bug has been fixed in v2.3.1. Thank you for your feedback.
 
Level 5
Joined
Aug 19, 2015
Messages
68
Awesome, it works!
This is really the best map optimizer that exists.
Just 1 little suggestion:
In the gui, there is no option for extracting the current wc3 data.
Maybe some people are not so comfortable with using the command line, so I think it would be best if there was a button in the gui.
(and the thing that you are recommending slk for distribution^^ i'm really sure it caused desyncs, but am not willing to test it again because it takes ages to get my map full^^)
 
Level 6
Joined
May 1, 2012
Messages
95
Just 1 little suggestion:
In the gui, there is no option for extracting the current wc3 data.
Maybe some people are not so comfortable with using the command line, so I think it would be best if there was a button in the gui.

In the v2.3.1, you can use the GUI to extract war3 data files. You can drag the war3 directory into the GUI just like dragging a map.
 
Level 5
Joined
Aug 19, 2015
Messages
68
i found another bug:
when you use a higher level research requirement (above 4), the requirement gets ignored
here is a test map: https://www.dropbox.com/s/np27xa2xah2ll5x/Vamp Zero Turbo test raw.w3x?raw=1
enter "r" in the chat and watch the "ignited embers" research get unlocked (i set research time to 3 and it gives you resources)
(i placed an upgrade center just to the right of the portal)
when you optimized the map (i picked obj), level 4+ will ignore the technology requirement.
(i'm using the latest version, 2.3.1)
 
Last edited:
Level 6
Joined
May 1, 2012
Messages
95
i found another bug:
when you use a higher level research requirement (above 4), the requirement gets ignored
here is a test map: https://www.dropbox.com/s/np27xa2xah2ll5x/Vamp Zero Turbo test raw.w3x?raw=1
enter "r" in the chat and watch the "ignited embers" research get unlocked (i set research time to 3 and it gives you resources)
(i placed an upgrade center just to the right of the portal)
when you optimized the map (i picked obj), level 4+ will ignore the technology requirement.
(i'm using the latest version, 2.3.1)

Thanks.It is fixed in v2.3.2.
 
  • Like
Reactions: pyf
Level 5
Joined
Aug 19, 2015
Messages
68
i shortened my map info now but it doesn't load faster even though the program stated it when i converted to lni. I'm pretty sure there are a few buildings that exceed 299 characters though. But I'm not sure if it's even possible to reduce the loading time for my map. I probably just have too many researches, abilities (all with tons of levels) and units. (even though i preload very few)
also this: Didn't convert WTG - Trigger data error (no idea which trigger, impossible to fix when you have 100 triggers)
when i convert to obj, i get weird error messages about abilities.
==========================
Invalid object data (7)
==========================
Ability ANdo - [datad]: [1]: 5
Ability ANia - [dataa]: [1]: 1.0 [2]: 2.0
Ability ANia - [datab]: [1]: 30.0 [2]: 45.0
Ability ANia - [datac]: [1]: 90.0 [2]: 90.0
Ability ANia - [datad]: [1]: 15.0 [2]: 22.0
Ability ANia - [datae]: [1]: 180.0 [2]: 180.0
Ability ANia - [dataf]: [1]: 0.2 [2]: 0.2
.... ANdo is not even changed. And i have no idea what the fields in ANia are. I don't recognize those values.
https://www.dropbox.com/s/ri5jiecnijadw1z/Vamp Zero Turbo test raw2.w3x?raw=1
I also have one more idea for the program: Maybe it could automatically replace those BJ functions with the native ones.
In my last game i also experienced that at some point in the game i could research "insta-rez" even though it requires "slayer-focus", but it's hard to reproduce because the requirement works by default. I now added "required level: 1" to the research, maybe that already fixes it

edit: after shortening all the strings to below 299 characters i still didnt notice any difference.
but i removed a lot of abilities and have 10 seconds shorter loading time now.
 
Last edited:
Level 4
Joined
May 31, 2018
Messages
92
Thank you for your feedback.

i shortened my map info now but it doesn't load faster even though the program stated it when i converted to lni. I'm pretty sure there are a few buildings that exceed 299 characters though. But I'm not sure if it's even possible to reduce the loading time for my map. I probably just have too many researches, abilities (all with tons of levels) and units. (even though i preload very few)
W3x2lni has inlined more than 17000 wts strings by converting your map. By contrast, shortened one or two long-string may not make you feel any change.

also this: Didn't convert WTG - Trigger data error (no idea which trigger, impossible to fix when you have 100 triggers)
It means that trigger data file("TriggerData.txt", extracted from your wc3) parsing fails. When convert to lni, W3x2lni converted your trigger from wtg to lml, it depends on your wc3's trigger data file. However, this file is built with many grammatical errors, so we have to support and ignore these errors. But in 1.29.0 Blizzard added some new grammatical errors in, so it parsed fails. We will support them in next version.

when i convert to obj, i get weird error messages about abilities.
==========================
Invalid object data (7)
==========================
Ability ANdo - [datad]: [1]: 5
Ability ANia - [dataa]: [1]: 1.0 [2]: 2.0
Ability ANia - [datab]: [1]: 30.0 [2]: 45.0
Ability ANia - [datac]: [1]: 90.0 [2]: 90.0
Ability ANia - [datad]: [1]: 15.0 [2]: 22.0
Ability ANia - [datae]: [1]: 180.0 [2]: 180.0
Ability ANia - [dataf]: [1]: 0.2 [2]: 0.2
.... ANdo is not even changed. And i have no idea what the fields in ANia are. I don't recognize those values.
Ability 'ANdo' really has a field 'DataD' used by wc3, means "max creep level". However it is not visible in default WE. To make sure that the map can be opened in your WE, we used your WE config("abilitymetadata.slk", extracted from your wc3) when convert to Obj, so this field is droped after leaving the report. 'ANia' is same with 'ANdo'. By the way, in China ever WEer used YDWE witch has fixed all the cheats, so we didn't have these problem. For others, we have no idea and you can ignore these reports.

I also have one more idea for the program: Maybe it could automatically replace those BJ functions with the native ones.
We do not intend to modify the semantics of the script. The risk is very large, the income is very small, and there is compatibility problem.

In my last game i also experienced that at some point in the game i could research "insta-rez" even though it requires "slayer-focus", but it's hard to reproduce because the requirement works by default. I now added "required level: 1" to the research, maybe that already fixes it.
Need more infomation, it's better to be a demonstration.
 
Level 4
Joined
May 31, 2018
Messages
92
Ability 'ANdo' really has a field 'DataD' used by wc3, means "max creep level". However it is not visible in default WE. To make sure that the map can be opened in your WE, we used your WE config("abilitymetadata.slk", extracted from your wc3) when convert to Obj, so this field is droped after leaving the report. 'ANia' is same with 'ANdo'. By the way, in China ever WEer used YDWE witch has fixed all the cheats, so we didn't have these problem. For others, we have no idea and you can ignore these reports.
After discussion, I think we have found a way to solve this problem.
 
Level 6
Joined
May 1, 2012
Messages
95
Ability 'ANdo' really has a field 'DataD' used by wc3, means "max creep level". However it is not visible in default WE. To make sure that the map can be opened in your WE, we used your WE config("abilitymetadata.slk", extracted from your wc3) when convert to Obj, so this field is droped after leaving the report. 'ANia' is same with 'ANdo'. By the way, in China ever WEer used YDWE witch has fixed all the cheats, so we didn't have these problem. For others, we have no idea and you can ignore these reports.

Although this is an error from wc3, we should probably ignore it unless the data really comes from the map.
 
Level 16
Joined
Apr 14, 2016
Messages
382
Why do you say so?

Well, if you fill the map from 0 with files, they are added to (listfile), but the tool still thinks that some of them are missing, even though they are not, my mistake. I thought it was actually missing them, turns out it thinks it does, but it does not.

Meaning it does all it has, which is amazing. Actually, i should post a screenshot:

Discard.png
 
Level 4
Joined
May 31, 2018
Messages
92
Well, if you fill the map from 0 with files, they are added to (listfile), but the tool still thinks that some of them are missing, even though they are not, my mistake. I thought it was actually missing them, turns out it thinks it does, but it does not.

Meaning it does all it has, which is amazing. Actually, i should post a screenshot:

View attachment 299826

Could you please show me your map?
 
Level 16
Joined
Apr 14, 2016
Messages
382
So if I don't want to convert to slk because some abilities have over 4 levels deep, the only optimization available is inlining wts file? The only option I see is read slk, but I guess it does wts inlining
You can have spells that have 50+ levels and slk optimization will still work as it does. Only initial level is actually the reason for lag, the rest are used solely as pointers.

It does WTS inlining only if any string exceed normal length.

All in all, just use slk optimization, it works as it should :)
 
Level 4
Joined
Sep 25, 2017
Messages
56
You can have spells that have 50+ levels and slk optimization will still work as it does. Only initial level is actually the reason for lag, the rest are used solely as pointers.

It does WTS inlining only if any string exceed normal length.

All in all, just use slk optimization, it works as it should :)

Well, even when I dont check any optimization on slk, map crashes on load when trying it. Would a warning cause it? Have 0 errors but have this warning:
Id [BUst] is conflicted between different objects - [Ability]HP증가 800 --> [Buff]Sleep (Stun)
 
Level 16
Joined
Apr 14, 2016
Messages
382
Well, even when I dont check any optimization on slk, map crashes on load when trying it. Would a warning cause it? Have 0 errors but have this warning:
Id [BUst] is conflicted between different objects - [Ability]HP증가 800 --> [Buff]Sleep (Stun)
Yes, it can. Also this is a very strange type of warning, it is the first time I see something like this. Basically it does not like that one buff is used for different purposes or just because two different spells use same buff, which is kinda strange.
 
Level 4
Joined
Sep 25, 2017
Messages
56
Yes, it can. Also this is a very strange type of warning, it is the first time I see something like this. Basically it does not like that one buff is used for different purposes or just because two different spells use same buff, which is kinda strange.

Well, I converted to lni and checked all .ini files in table directory and can only see BUst mentioned once in ability.ini and once in item.ini (as one of the item abilities). Also, when trying to go from lni to either object or slk, throws error, attached log.

On another note, just clicking directly on generate obj map, it does optimize quite a bit but when I then try to use that map on 5.0wc3mapoptimizer it gives me map script file not found error. Also can't use on Wc3SLKOpt either.
 

Attachments

  • 2018-06-15 01-53-45.txt
    770 bytes · Views: 172
Level 4
Joined
May 31, 2018
Messages
92
Well, even when I dont check any optimization on slk, map crashes on load when trying it. Would a warning cause it? Have 0 errors but have this warning:
Id [BUst] is conflicted between different objects - [Ability]HP증가 800 --> [Buff]Sleep (Stun)
It means `[Ability]HP증가 800` and `[Buff]Sleep (Stun)` use the same Id [BUst]. But I don't think it cause your map crashes, please show me your map, thank you.
 
Level 6
Joined
May 1, 2012
Messages
95
Well, I converted to lni and checked all .ini files in table directory and can only see BUst mentioned once in ability.ini and once in item.ini (as one of the item abilities). Also, when trying to go from lni to either object or slk, throws error, attached log.

Lni will only contain the objects of your map, does not contain Warcraft 3 built-in objects. It's exactly that BUst is a Warcraft 3 built-in object.
 
Top