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

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
Can we get an update that supports the latest patch?
It's critical for my map to be supported by the latest version, but at the same time i don't want to leave unprotected versions out there for the sake of it.

Unfortunately, the format of the data file was modified after 130, which caused w3x2lni to be unsupported. You can manually convert the 130 data file format to 129 format to solve it.
 
Level 4
Joined
Jun 19, 2018
Messages
31
If I convert this map to slk with "optimize doodads" off (slk_doodad = false), run it smoothly in warcraft, and then run a regular melee map (bascially any other map) it will have pink cubes instead of doodads. Isn't that a sign that the program does optimize doodads even though the option is set off?
Tested with 2 people and both console and gui variants.
 
Level 4
Joined
May 31, 2018
Messages
92
If I convert this map to slk with "optimize doodads" off (slk_doodad = false), run it smoothly in warcraft, and then run a regular melee map (bascially any other map) it will have pink cubes instead of doodads. Isn't that a sign that the program does optimize doodads even though the option is set off?
Tested with 2 people and both console and gui variants.

Is there a "w3x2lni\config.ini" file in your map?
 
Level 4
Joined
May 31, 2018
Messages
92
No the program doesn't modify the original archive like I would expect from it.
Is the original map your own? If not, there may be another configuration file ("w3x2lni\config.ini") in the map, and w3x2lni will use the configuration file in the map first.
 
Level 4
Joined
Jun 19, 2018
Messages
31
Is the original map your own? If not, there may be another configuration file ("w3x2lni\config.ini") in the map, and w3x2lni will use the configuration file in the map first.
The map is my own. I will check what will happen if I add the configuration file to the map.

Checked, same thing.
 
Last edited:
Level 4
Joined
Jun 19, 2018
Messages
31
PLZ show me the opmizized map.
The problem is not specific to my map, I get same result with any other map.
So I attached to this post a blizzard map (2)BanditRidge, optimized (2)BanditRidge_slk map and config.ini used
 

Attachments

  • FrozenThrone.zip
    465.9 KB · Views: 50
Level 4
Joined
May 31, 2018
Messages
92
The problem is not specific to my map, I get same result with any other map.
So I attached to this post a blizzard map (2)BanditRidge, optimized (2)BanditRidge_slk map and config.ini used

Thank you, I have reproduced this problem.
I used to think that only Doodad could cause this problem, but I didn't know after this test that Destructable had the same problem.
I will update W3x2lni to fix it.
 
Level 4
Joined
May 31, 2018
Messages
92
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

Hello, maybe we have solved your desyncs problem, please download and try the latest version.
 
Level 4
Joined
Jun 19, 2018
Messages
31
Thank you, I have reproduced this problem.
I used to think that only Doodad could cause this problem, but I didn't know after this test that Destructable had the same problem.
I will update W3x2lni to fix it.
Thanks, this works. However the new version has an issue with providing different patch data, crashing on 34%. Tried with ruRU-1.26.0 and ruRU-1.27.1.
upload_2019-3-19_16-48-42.png
 

Attachments

  • 2019-03-19 16-32-10.log.txt
    760 bytes · Views: 55
Level 4
Joined
May 18, 2018
Messages
38
When you convert a map to slk with "Remove unreferenced objects" enabled and they have this system in it, some of the abilities used by it are deleted. I assume it's because that system refers to the objects it uses with an @ for example: 'A5A@'.

I've attached a map converted to slk (with only "Remove unreferenced objects" on) and the normal map, so you can see for yourself.

Loving this software btw, very useful! I've been using the map files that were converted to Lni to spell check my map.

EDIT: what exactly is meant by these reports in the log?

--------------------------------------------
Data level is more than 4
--------------------------------------------
Ability A01U - Area
Ability A02P - Cost
Ability A00A - Cool
Ability A034 - Area

When I look at the fields mentioned in those abilities they look fine to me, what does "Data level is more than 4" mean in this case?

Same with:

==========================
Invalid object (62)
==========================
Wc3 can't identify ability: A08S - Wc3 can't identify a custom ability without any modify
Wc3 can't identify ability: A09H - Wc3 can't identify a custom ability without any modify
Wc3 can't identify ability: A055 - Wc3 can't identify a custom ability without any modify
Wc3 can't identify ability: A065 - Wc3 can't identify a custom ability without any modify

Those are all item abilities and they look fine to me in the editor, and also work fine in the normal map, but when I try the map converted to slk none of them work.
 

Attachments

  • Status_slk.w3x
    84.7 KB · Views: 51
  • Status.w3x
    78.2 KB · Views: 42
Last edited:
Level 4
Joined
May 31, 2018
Messages
92
When you convert a map to slk with "Remove unreferenced objects" enabled and they have this system in it, some of the abilities used by it are deleted. I assume it's because that system refers to the objects it uses with an @ for example: 'A5A@'.

I've attached a map converted to slk (with only "Remove unreferenced objects" on) and the normal map, so you can see for yourself.

I have checked your map, many objects like 'A5IG' are removed with "Remove unreferenced objects" because they are REALLY unreferenced. Your system uses a dynamic algorithm to calculate the ID of the object, so W3x2lni dose not know which objects will be used. There are some ways to resolved this issue, you may choose one:

1. Set "Remove unreferenced objects" off.
2. Create a unused trigger or function in the script that mentions all the object IDs that need to be retained.
3. Use this plugin, you need to modify the plugin with Lua yourself.
 

Attachments

  • plugin.zip
    493 bytes · Views: 54
Level 4
Joined
May 31, 2018
Messages
92
When I look at the fields mentioned in those abilities they look fine to me, what does "Data level is more than 4" mean in this case?
It's just a report that these objects can't be perfectly SLK because they have more than four levels。
 
Level 4
Joined
May 31, 2018
Messages
92
Those are all item abilities and they look fine to me in the editor, and also work fine in the normal map, but when I try the map converted to slk none of them work.
I have tested again, simply copying ability that have not been modified is totally ineffective in WC3, even as an item ability.
If you found this is wrong, plz show me the demo map, thank you!
 
Level 5
Joined
Mar 6, 2017
Messages
190
I have an idea for the map optimization
Why wont you remove the stardard units which arent edited by the map maker?
The map will lighter and load faster
Just keep custom units and modified standard ones
 
Level 4
Joined
May 31, 2018
Messages
92
I have an idea for the map optimization
Why wont you remove the stardard units which arent edited by the map maker?
The map will lighter and load faster
Just keep custom units and modified standard ones

It's very hard for map maker. For example, the ability "AOhx" needs to refer to a large number of small animals.
 
Level 4
Joined
May 31, 2018
Messages
92
“which is not modified”
I mean you only export changed objects and custom ones

You customize a ability based on 'AOhk', which transforms the unit into 'npig'. And 'npig' is an unchanged default object, and I have to keep it.

On the other hand, many maps that have been updated over a long time contain many obsolete custom objects that should be removed or they may refer to more unused objects.
 
Level 4
Joined
May 18, 2018
Messages
38
I have checked your map, many objects like 'A5IG' are removed with "Remove unreferenced objects" because they are REALLY unreferenced. Your system uses a dynamic algorithm to calculate the ID of the object, so W3x2lni dose not know which objects will be used. There are some ways to resolved this issue, you may choose one:

1. Set "Remove unreferenced objects" off.
2. Create a unused trigger or function in the script that mentions all the object IDs that need to be retained.
3. Use this plugin, you need to modify the plugin with Lua yourself.

Thanks, It's a ton of abilities so I'll try to use that plugin!

It's just a report that these objects can't be perfectly SLK because they have more than four levels。

Ah okay, My map has over 400 abilities with 9 levels, will it have any other effect while playing or is it just a report?

I have tested again, simply copying ability that have not been modified is totally ineffective in WC3, even as an item ability.
If you found this is wrong, plz show me the demo map, thank you!

Almost all of them have modifications. Some of them are just used for effects or are dummy abilities used by triggers, though.

A08S, based on Arel:
upload_2019-3-20_8-40-33.png
A09H, based on Ald0
upload_2019-3-20_8-41-39.png
A055, based on Ali1:
upload_2019-3-20_8-42-10.png

A065, based on Alxm:
upload_2019-3-20_8-42-44.png

If you need the map I'll try and post it later today.
 
Level 4
Joined
May 31, 2018
Messages
92
Please give me the map, I want to check why W3x2lni thinks they have not been modified.

I've checked the map and found out why W3x2lni dose not think these objects have been modified.

W3x2lni parses binary files following the rules of this document: W3M and W3X Files Format

The rule says 'int: end of modification structure (this is either 0, or equal to the original object ID or equal to the new object ID of the current object, when reading files you can use this to check if the format is correct, when writing a file you should use the new object ID of the current object here)'

So I followed this rule, checking the last 4 bytes of each data, and discarding the data if the check failed. This check is really necessary. I have encountered some maps that contain garbage data. WC3 and the WE will ignore the garbage data, and W3x2lni will also ignore the garbage data by this check.

But in his map, the last 4 bytes of all data in 'A08S' (original ID is 'Arel' ) is 'AI01', so W3x2lni discarded all of these data. However, WE thinks that all these data are correct.

So is anyone knows the exact rules?
 
Level 4
Joined
May 18, 2018
Messages
38
But in his map, the last 4 bytes of all data in 'A08S' (original ID is 'Arel' ) is 'AI01', so W3x2lni discarded all of these data. However, WE thinks that all these data are correct.

So is anyone knows the exact rules?

Is it possible that my map is just corrupt or something?

EDIT: When I copy A08S into a new ability 'A0EM' it still happens, however if I create a copy of the original Arel ability and edit that it doesn't happen.

Don't know if that helps or not, I have no idea what's happening. But I guess I can "fix" my map by recreating 60 abilities again.

EDIT2: Copying data from other abilities based on the same original abilities into the not working ability in Lni format also fixes it. It seems to remove editor suffix data, race data and names (and maybe other stuff too) when converted to Lni though, even for abilities that aren't mentioned in the log.
 
Last edited:
Level 5
Joined
Mar 6, 2017
Messages
190
Could u solve this problem?
When I convert my map to slk format,then convert them back to object ( to remove unused object ),then all the “use in editor” of all units turn to false?
Pls fix
 
Level 4
Joined
May 31, 2018
Messages
92
Could u solve this problem?
When I convert my map to slk format,then convert them back to object ( to remove unused object ),then all the “use in editor” of all units turn to false?
Pls fix

Slk is a format for play. Converting to SLK is a lossy conversion, so please don't convert map to SLK and back again.
 
Level 4
Joined
May 31, 2018
Messages
92
Well this new version completely broke my map lol, it replaced my spells with other spells for some reason, caused workers to no longer be able to harvest wood, and thats what i've caught so far.

anyway to download the previous version please?

Please give me the map to check what happened.
 
Level 2
Joined
Feb 12, 2019
Messages
10

I wanted to see if it was my map specifically so i made a blank map and i still was able to produce the same results, it will give me different abilities... you'll see it. When you play the _slk version some of those abilities from the original get switched out for things like spawn a unit or berserk?

Test both in single-player. i named the original nonslk so when you look at game list you dont see 2 of the same names :p

using W3x2Lni v2.5.0

[x]Remove WE-only files
[x]Optimize doodads and destrucables
...thats it
 

Attachments

  • Test A-B.w3x
    20.6 KB · Views: 38
  • Test A-B_slk.w3x
    308.8 KB · Views: 45
Level 4
Joined
May 31, 2018
Messages
92
I wanted to see if it was my map specifically so i made a blank map and i still was able to produce the same results, it will give the different abilities you'll see it. I placed 2 units on map and the original will have abilities,, but when you play the _slk version some of those abilities get switched out? Test them out in single-player. i named the original nonslk so when you look at game list you dont see 2 of the same names :p

using W3x2Lni v2.5.0

[x]Remove WE-only files
[x]Optimize doodads and destrucables
...thats it

Did you try v2.5.1 ?
 
Level 2
Joined
Feb 12, 2019
Messages
10
Did you try v2.5.1 ?

I'll try it right now.


Edit: So i tried it.. it works now. i dont understant. Im extremly confused, cause i could of sworn i downloaded the latest version.. The version i was using previously was working fine... but then 1-2 week or two ago you made another version, i used that and thats when things broke, unless you released another version very recently since then.

Anyway, thank you for the continued support, def my go-to tool!
 
Last edited:
Level 4
Joined
May 31, 2018
Messages
92
I'll try it right now.


Edit: So i tried it.. it works now. i dont understant. Im extremly confused, cause i could of sworn i downloaded the latest version.. The version i was using previously was working fine... but then 1-2 week or two ago you made another version, i used that and thats when things broke, unless you released another version very recently since then.

Anyway, thank you for the continued support, def my go-to tool!

We released v2.5.0 at Apr 19, then we found that it had serious problems, so we released a fixed v2.5.1 at Apr 23.
So I'm sorry you're the victim of v2.5.0.
 
Level 1
Joined
Aug 10, 2018
Messages
3
Hi @sumneko

I have been using your tool on a korean rpg map (HM RPG) that me and another person have been keeping up to date with the creators permission.

I have been using w3x2lni after the translations had been completed to ensure a faster load time, and it has been very helpful in doing this. However, the creator has noted some issues with the optimized map where some things are broken. Overall, I just updated the optimizer from 2.4.4 to 2.5.1, and am finally seeing some warnings pop up that were not present with the version i was using.

I was hoping to send you a copy of the unoptimized map, and the error log to see if you could provide some insight to see what these warnings may be pointing out that is potentially broken with the optimized map.

I've attached the files below, and if you are able to help with the following that'd be great
  • Is it possible to use -listfile="listfile.txt" with w2l.exe?
    Have source listfile from the creator for optimizing purposes.
  • If yes, then what would be the proper input for cmd be?
    Using w2l with scripts/cmd to simplify the translation process.
  • What are the warnings showing is potentially broken with the optimized map?
    I have attached the unoptimized english map

report.txt
Code:
Input path: C:/Users/<name>/Google Drive/Warcraft III/HM RPG/Translating/Work/hmeng.w3x
Output path: C:/Users/<name>/Google Drive/Warcraft III/HM RPG/Translating/Work/hmeng_slk.w3x
Input format: Mpq
Output mode: slk
Result: 2 errors, 50 warnings
Takes: 6.766 sec
==========================
Error (2)
==========================
Lost 1298 files - These files are discarded, Please include the complete `(listfile)`
Read (31/1329) files

==========================
Warn (50)
==========================
Id [h042] is conflicted between different objects - `h042`[Step 1 Raid] --> `H042`[Techies]
Id [H04A] is conflicted between different objects - `H04A`[Techies] --> `h04A`[Dummy(Raging Thunder)]
Id [H02E] is conflicted between different objects - `H02E`[Techies] --> `h02E`[Universal Dummy]
Spell Book 'A0SD' [에이션트 블레이드] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0YM' [Adrenaline] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0SA' [에이션트 블레이드] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0MI' [Crown] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0H6' [용기의 방패] will be merged - Base order ID 'spellbook' invalid
Spell Book 'Aspb' [Spell Book] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1PL' [To delete] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0S9' [에이션트 블레이드] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1AM' [아이템] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A10J' [레전더리] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0TA' [네루비안 클로] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0M8' [승리의 방패] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1A6' [레전더리] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0RX' [배틀 해머] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1Q2' [직업 유물 종합] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A12X' [제거대상] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0YN' [Adrenaline] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A18M' [Magic List] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0TB' [네루비안 클로] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0Y8' [Spellbook] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0SC' [에이션트 블레이드] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0WC' [Spellbook] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1AI' [레전더리] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1GU' [Basic Abilities] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0UW' [Dragon Slayer] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A11I' [명예의오브] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0SB' [에이션트 블레이드] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A10K' [레전더리] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0MW' [Impact Sword] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1BS' [Double Shot] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1R2' [A Mercy Strike] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A11L' [제거대상] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1O8' [To delete] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1D1' [Rage] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1ND' [A보스A] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1ND' [A보스A] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A12Y' [제거대상] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0T8' [네루비안 클로] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A11F' [풋맨의 방패] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A18Z' [Spellbook] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0T9' [네루비안 클로] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0PG' [블레스 토템] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A15X' [프로스트모운] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A1QF' [Power of Mok'nathal] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0WJ' [Location Staff] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0MM' [Crown] will be merged - Base order ID 'spellbook' invalid
Spell Book 'A0T7' [네루비안 클로] will be merged - Base order ID 'spellbook' invalid

==========================
No SLK data (445)
==========================
--------------------------------------------
Data level is more than 4
--------------------------------------------
Ability A121 Blessing of Elune - DataB
Ability A0W1 Skeletal Mastery - DataC
Ability A0JI Frenzy - Cool
Ability A11O Entangling Roots - Cost
Ability A0KP Sandstorm - Cost
Ability A0IM Feedback - DataA
Ability A0KX Infernal Strike - Cost
Ability A0JG Entangling Roots - Cost
Ability A169 Holy Lightning - Cost
Ability A0K2 Shocking Lightning - Cost
Ability A0JP On The Hunt - Cool
Ability A1JA Throw Bomb - DataA
Ability A0Z2 Dragon Scale - DataA
Ability A0K3 Inner Fire - Cost
Ability A0N5 Shadow Strike - Cost
Ability A0K4 Shadow Strike - Cost
Ability A1K0 Ghost - DataB
Ability A1QT Frost Armor - DataB
Ability A1OX Upgraded Regen Speed - DataB
Ability A1LB Spirit Touch - DataB
Ability A0XW Evasion - DataD
--------------------------------------------
Txt is conflicted between different objects
--------------------------------------------
Unit h04A Dummy(Raging Thunder) - Buttonpos_1 --> H04A
Unit h02E Universal Dummy - Tip --> H02E

==========================
Remove unreferenced objects (7)
==========================
Missing object '_' - Referenced by 'e0EG'[Unit Effect] in JASS
Missing object 'B06I
' - Referenced by 'A1DE'[연계] in JASS
Missing object 'A0QK
' - Referenced by 'I0DS'[|c00804000+3 Battle Power|r] in JASS
Missing object 'A13KK' - Referenced by 'n009'[Chicken] in JASS
Missing object 'A0G1
' - Referenced by 'I0E9'[|c00804000+1 Ancient Rune|r] in JASS
Unclassified object: 'orbr' - Expectation classification: unit
Missing object 'Rewd' - Referenced by 'ofrt'[Fortress] in JASS
-------------------------------------------
Simplified objects: 2346/7565
---------------------------------------------------------------------
Retained default objects: 1062/2770
---------------------------------------------------------------------
Unit 'hphx' Phoenix - Referenced by 'ofrt'[Fortress] in JASS
Unit 'osw3' Shadow Wolf - Referenced by 'ofrt'[Fortress] in JASS
Unit 'ucrm' Burrowed Crypt Fiend - Referenced by 'ofrt'[Fortress] in JASS
Unit 'Ewar' Warden - Referenced by 'ofrt'[Fortress] in JASS
Unit 'okod' Kodo Beast - Referenced by 'ofrt'[Fortress] in JASS
Unit 'ohun' Troll Headhunter - Referenced by 'ofrt'[Fortress] in JASS
Unit 'Hamg' Archmage - Referenced by 'ofrt'[Fortress] in JASS
Unit 'oshm' Shaman - Referenced by 'ofrt'[Fortress] in JASS
Unit 'obea' Beastiary - Referenced by 'ofrt'[Fortress] in JASS
Unit 'Emoo' Priestess of the Moon - Referenced by 'ofrt'[Fortress] in JASS
Ability 'ACen' Ensnare - Referenced by 'ndh3'[Draenei Barracks] in JASS
Ability 'AHwe' Summon Water Elemental - Referenced by 'ofrt'[Fortress] in JASS
Ability 'Aphx' Phoenix Morphing (Egg Related) - Referenced by 'ofrt'[Fortress] in JASS
Ability 'Aivs' Invisibility - Referenced by 'ofrt'[Fortress] in JASS
Ability 'AIha' Item Area Healing - Referenced by 'ofrt'[Fortress] in JASS
Ability 'Aeat' Eat Tree - Referenced by 'ofrt'[Fortress] in JASS
Ability 'AHta' Reveal - Referenced by 'ofrt'[Fortress] in JASS
Ability 'Awrs' War Stomp - Referenced by 'e08S'[Black Dragon] in JASS
Ability 'AUfn' Frost Nova - Referenced by 'ofrt'[Fortress] in JASS
Ability 'Amfl' Mana Flare - Referenced by 'ofrt'[Fortress] in JASS
Item 'sreg' Scroll of Regeneration - Referenced by 'ofrt'[Fortress] in JASS
Item 'bgst' Belt of Giant Strength +6 - Referenced by 'bgst'[Belt of Giant Strength +6] in JASS
Item 'hslv' Healing Salve - Referenced by 'ofrt'[Fortress] in JASS
Item 'skul' Sacrificial Skull - Referenced by 'ofrt'[Fortress] in JASS
Item 'shea' Scroll of Healing - Referenced by 'ofrt'[Fortress] in JASS
Item 'phea' Potion of Healing - Referenced by 'ofrt'[Fortress] in JASS
Item 'spre' Staff of Preservation - Referenced by 'ofrt'[Fortress] in JASS
Item 'dust' Dust of Appearance - Referenced by 'ofrt'[Fortress] in JASS
Item 'pams' Anti-magic Potion - Referenced by 'ofrt'[Fortress] in JASS
Item 'tsct' Ivory Tower - Referenced by 'ofrt'[Fortress] in JASS
Buff 'Bphx' Phoenix - Referenced by 'ofrt'[Fortress] in JASS
Buff 'BHwe' Water Elemental - Referenced by 'ofrt'[Fortress] in JASS
Buff 'BHds' Divine Shield - Referenced by 'A06C'[Divine Shield] in JASS
Buff 'BNht' Howl of Terror - Referenced by 'H07Y'[Azgalor] in JASS
Buff 'BUsl' Sleep - Referenced by 'ofrt'[Fortress] in JASS
Buff 'Bdbm' Siphon Mana - Referenced by 'ofrt'[Fortress] in JASS
Buff 'Bdef' Scroll of Protection - Referenced by 'rreb'[Rune of Invincibility] in JASS
Buff 'Bpxf' Phoenix Fire - Referenced by 'A1HE'[Unit] in JASS
Buff 'BNva' Volcano (Area) - Referenced by 'e04P'[볼케이노 시전] in JASS
Buff 'BUim' Impale - Referenced by 'A1I2'[Impale] in JASS
Upgrade 'Rehs' 하드 스킨 - Referenced by 'ofrt'[Fortress] in JASS
Upgrade 'Rhst' 소서리스 중급 훈련 - Referenced by 'ofrt'[Fortress] in JASS
Upgrade 'Rhhb' 스톰 해머 - Referenced by 'ofrt'[Fortress] in JASS
Destructable 'YT18' Long Stone Bridge - Referenced by 'YT18'[Long Stone Bridge] which replaced in map
Destructable 'VTlt' Village Tree Wall - Referenced by 'VTlt'[Village Tree Wall] which replaced in map
Destructable 'CTtc' Felwood Canopy Tree - Referenced by 'CTtc'[Felwood Canopy Tree] which replaced in map
Doodad 'LSba' Barn - Referenced by 'LSba'[Barn] which replaced in map
Doodad 'ZWsw' Seaweed - Referenced by 'ZWsw'[Seaweed] which replaced in map
Doodad 'OPop' Outland Plants - Referenced by 'OPop'[Outland Plants] which replaced in map
---------------------------------------------------------------------
Simplified custom objects: 638/4795
---------------------------------------------------------------------
Unit 'nmpe' 록
Unit 'e054' Stat + 4
Unit 'e07K' Spirit Wyvern Dummy
Unit 'e083' 마크맨아이템3
Unit 'e055' Stat + 6
Unit 'e08E' 골렘메테오2
Unit 'e02M' 핑거 워드
Unit 'e05R' Stat + 1200
Unit 'H03R' Weak Green Dragon
Unit 'nnrg' 택
Ability 'A1N4' Unit
Ability 'A08S' 공격력
Ability 'A09H' 액스 블레이드
Ability 'A0KQ' Sandstorm
Ability 'A08T' 공격력
Ability 'A19H' 아이템
Ability 'A14L' Agility
Ability 'ANin' Inferno
Ability 'A1HB' Unit
Ability 'A0MX' A
Item 'I0IV' |c008080ffEgg of Nozdormu|r
Item 'I03A' Rune of Elimination
Item 'I0IX' |c0089e8f5Burning Beads|r
Item 'I0BD' Wood+10000
Item 'I0IW' |c0089e8f5Predator Skin|r
Item 'I0L3' Preparing
Item 'tstr' Tome of Strength
Item 'I0IE' Rune of Disintegration
Item 'I00X' Coral Scales
Item 'I0BE' Wood+2500
Buff 'B01M' Sentinel's Mask
Buff 'B013' Sentinel Guard
Buff 'B023' Thunder Tornado
Buff 'B04R' Power Shot
Buff 'B05S' Agony and Sorrow
Buff 'B07S' Berserk
Buff 'B025' Eruption
Buff 'B075' Whirlpool
Buff 'B015' Instant Death
Buff 'B05G' Wild Battlecry
Upgrade 'R00D' 철 검
Destructable 'ZTd3' Rolling Stone Door
Destructable 'ZTd1' Rolling Stone Door
Destructable 'DTg2' Dungeon Gate
Doodad 'D006' 큰 풍차
Doodad 'D002' 대성당 큼

==========================
Compute text failed (8)
==========================
Ability A129 인탱글링 루츠 - Ubertip: <A129, Cool1>
Ability A129 인탱글링 루츠 - Ubertip: <A129, Dur1>
Ability A0YS Forked Lightning - Ubertip: <A0YS,Cool>
Ability A1L7 Chain Lightning - Ubertip: <A1L7,DataA7|r>
Ability A0YS Forked Lightning - Ubertip: <A0YS,Cool>
Ability A0K5 Critical Strike - Ubertip: <A0K5,Data13B>
Ability A1LW Curse - Ubertip: <A1LW,DataA,%>
Ability A0JU On The Hunt - Ubertip: <A0JU,Cool>

==========================
Save text into WTS (1)
==========================
Text is longer than 1023 characters in w3i - The text saved in WTS will cause the loading to slow down:
|c00FF46C5Cafe|r : |c00FF7F50cafe.naver.com/hmrpg|r

|c00FF46C5Translated by|r : |c00FF7F50Magepowers and Unitil,|r |c00FF7F50Updated 3/26/19|r

|c00FF46C5English Community:|r |c00FF7F50hmrpg.boards.net|r

|c00afff6fDiscord:|r discord.io/hmrpg

|c00FF46C5Command|r : |c00FF7F5000|r = |c00FF7F50Return to town|r

Please remember to save and upload replays/screenshots....
-------------------------

==========================
Optimize JASS (2051)
==========================
--------------------------------------------------
Unreferenced global variables (62)
--------------------------------------------------
udg_AbilityNA_Unit2 - Line [170] :
udg_AbilityNA_Unit3 - Line [171] :
udg_Maievs - Line [184] :
udg_Rsla_Ability - Line [338] :
udg_SW_AttackType - Line [452] :
udg_AbilitySA_Caster - Line [467] :
udg_AbilitySA_Target - Line [471] :
udg_HeroPlayer3 - Line [486] :
udg_HeroPlayer6 - Line [487] :
udg_Box6 - Line [488] :
udg_Box3 - Line [489] :
udg_AbilityC_Caster - Line [578] :
udg_AbilityC_Target - Line [579] :
udg_AbilityFairyLoc - Line [600] :
udg_bagZoneRect - Line [688] :
udg_bagUnitType - Line [689] :
udg_Box1 - Line [691] :
udg_AntoUnit - Line [748] :
udg_Sasum1 - Line [767] :
udg_herocheat - Line [771] :
--------------------------------------------------
Unreferenced functions (1927)
--------------------------------------------------
Trig_ProRaid_Func007Func012002002002 - Line [32466]-[32468] :
Trig_ProRaid_Func014Func010002002001 - Line [32582]-[32584] :
Trig_ProRaid_Func014Func010002002002001 - Line [32585]-[32587] :
Trig_ProRaid_Func014Func010002002002002 - Line [32588]-[32590] :
Trig_ProRaid_Func014Func010002002002 - Line [32591]-[32593] :
Trig_ProRaid_Func016Func018002002001 - Line [32634]-[32636] :
Trig_ProRaid_Func016Func018002002002001 - Line [32637]-[32639] :
Trig_ProRaid_Func016Func018002002002002 - Line [32640]-[32642] :
Trig_ProRaid_Func016Func018002002002 - Line [32643]-[32645] :
Trig_ProRaid_Func017Func018002002001 - Line [32691]-[32693] :
Trig_ProRaid_Func017Func018002002002001 - Line [32694]-[32696] :
Trig_ProRaid_Func017Func018002002002002 - Line [32697]-[32699] :
Trig_ProRaid_Func017Func018002002002 - Line [32700]-[32702] :
Trig_ProRaid_Func018Func018002002001 - Line [32748]-[32750] :
Trig_ProRaid_Func018Func018002002002001 - Line [32751]-[32753] :
Trig_ProRaid_Func018Func018002002002002 - Line [32754]-[32756] :
Trig_ProRaid_Func018Func018002002002 - Line [32757]-[32759] :
Trig_ProRaid_Func019Func015002002001 - Line [32805]-[32807] :
Trig_ProRaid_Func019Func015002002002001 - Line [32808]-[32810] :
Trig_ProRaid_Func019Func015002002002002001 - Line [32811]-[32813] :
--------------------------------------------------
Unreferenced local variables (62)
--------------------------------------------------
CreateBuildingsForPlayer6 - Line [7425] : [t]
CreateBuildingsForPlayer6 - Line [7426] : [life]
CreateUnitsForPlayer6 - Line [7431] : [u]
CreateUnitsForPlayer6 - Line [7432] : [unitID]
CreateUnitsForPlayer6 - Line [7433] : [t]
CreateUnitsForPlayer6 - Line [7434] : [life]
CreateBuildingsForPlayer7 - Line [7440] : [unitID]
CreateBuildingsForPlayer7 - Line [7441] : [t]
CreateBuildingsForPlayer7 - Line [7442] : [life]
CreateUnitsForPlayer7 - Line [7447] : [u]
CreateUnitsForPlayer7 - Line [7448] : [unitID]
CreateUnitsForPlayer7 - Line [7449] : [t]
CreateUnitsForPlayer7 - Line [7450] : [life]
CreateBuildingsForPlayer11 - Line [7456] : [unitID]
CreateBuildingsForPlayer11 - Line [7457] : [t]
CreateBuildingsForPlayer11 - Line [7458] : [life]
CreateNeutralPassiveBuildings - Line [7464] : [unitID]
CreateNeutralPassiveBuildings - Line [7465] : [t]
CreateNeutralPassiveBuildings - Line [7466] : [life]
CreateNeutralPassive - Line [7673] : [unitID]

Would have sent this all via conversations, however, does not appear I have access to that feature at this point in time.
 

Attachments

  • hmeng.w3x
    19.4 MB · Views: 52
Last edited:
Level 4
Joined
Jun 19, 2018
Messages
31
Hi @sumneko
Overall, I just updated the optimizer from 2.4.4 to 2.5.1, and am finally seeing some warnings pop up that were not present with the version i was using.
Warnings in GUI are displayed only when there are errors (come on, just put your list file to the archive). If you dont have errors you will find all the warnings in log folder.
 
Level 4
Joined
May 31, 2018
Messages
92
Is it possible to use -listfile="listfile.txt" with w2l.exe?
Have source listfile from the creator for optimizing purposes.

I haven't been able to download your map because of the bad network, but I think this map is an optimized map, otherwise, the (listfile) should not be missing from the map.
I don't recommend that you re-optimize an optimized map. If you have to do this, use other tools to import a complete (listfile) into the map first.

What are the warnings showing is potentially broken with the optimized map?
I have attached the unoptimized english map

1~3: The ID in SLK ignores case. To maintain correctness, I need to keep one of the objects in OBJ.
4+: 'spellbook' is an invalid order id, its effect is the same as a random string. I think it's a mistake, although it's the default set by WC3. You can disable this warning by canceling `extra check`.
 
Level 12
Joined
Jun 12, 2010
Messages
413
Hello! First, I'd like to really thank you guys for this tool, it is beyond awesome and has allowed me to do create some really useful scripts by parsing the .ini files. However, I have a small concern with the JASS optimization performed by the tool.

It appears that, when I declare a constant key, the tool correctly inlines the variable as a constant. However, when I delcare a key as non-constant, those keys are not inlined correctly. When I check the script inside the SLK map, those keys are not constant integer, just integer. However, in the OBJ version of the map (converted from LNI), all these non-constant keys are constant integers.

JassHelper output:
JASS:
constant integer s__TerrainFog_style_impl=15
constant integer s__TerrainFog_zstart_impl=17
constant integer s__TerrainFog_zend_impl=19
constant integer s__TerrainFog_density_impl=21
constant integer s__TerrainFog_red_impl=23
constant integer s__TerrainFog_green_impl=25
constant integer s__TerrainFog_blue_impl=27
constant integer s__RectEnvironment_fog_impl=29
constant integer s__AutoRectEnvironment__Globals_static_members_key=31
constant integer s__AutoRectEnvironment__Globals_lastCameraX_impl=33
constant integer s__AutoRectEnvironment__Globals_lastCameraY_impl=35
constant integer s__AutoRectEnvironment__Globals_rectWasMoved_impl=37
constant integer s__AutoRectEnvironment__Globals_lastCameraRect_impl=39
constant integer s__AutoRectEnvironment__Globals_allRects_impl=41
constant integer s__AutoRectEnvironment__Globals_rects_impl=43
constant integer s__AutoRectEnvironment__Globals_id2_key=45

LNI to OBJ output: (The same as JassHelper)
JASS:
constant integer s__TerrainFog_style_impl=15
constant integer s__TerrainFog_zstart_impl=17
constant integer s__TerrainFog_zend_impl=19
constant integer s__TerrainFog_density_impl=21
constant integer s__TerrainFog_red_impl=23
constant integer s__TerrainFog_green_impl=25
constant integer s__TerrainFog_blue_impl=27
constant integer s__RectEnvironment_fog_impl=29
constant integer s__AutoRectEnvironment__Globals_static_members_key=31
constant integer s__AutoRectEnvironment__Globals_lastCameraX_impl=33
constant integer s__AutoRectEnvironment__Globals_lastCameraY_impl=35
constant integer s__AutoRectEnvironment__Globals_rectWasMoved_impl=37
constant integer s__AutoRectEnvironment__Globals_lastCameraRect_impl=39
constant integer s__AutoRectEnvironment__Globals_allRects_impl=41
constant integer s__AutoRectEnvironment__Globals_rects_impl=43
constant integer s__AutoRectEnvironment__Globals_id2_key=45


OBJ (or LNI) to SLK: (
JASS:
integer a=15
integer b=17
integer c=19
integer d=21
integer e=23
integer f=25
integer g=27
integer Y=29
integer N=31
integer i=33
integer j=35
integer h=37
integer X=39
integer T=41
integer O=43
integer m=45

Normally, I would fix this by just declaring a key as constant, however, the version of Jass Helper packed in WEX is bugged, and does not allow you to declare constant keys inside of a struct (it gives the error "A constant requires initializing", even though you can't initialize a key). Since I am declaring these keys inside of a struct, I can't make them constant.

JASS:
//! textmacro ConstTable_NewPrimitiveField takes NAME, TYPE
    private static key $NAME$_impl
    method operator $NAME$ takes nothing returns $TYPE$
        return ConstTable(thistype.$NAME$_impl).$TYPE$[this]
    endmethod
  
    method operator $NAME$= takes $TYPE$ $NAME$ returns nothing
        set ConstTable(thistype.$NAME$_impl).$TYPE$[this] = $NAME$
    endmethod
  
    method $NAME$Clear takes nothing returns nothing
        call ConstTable(thistype.$NAME$_impl).$TYPE$.remove(this)
    endmethod
//! endtextmacro

Is this behaviour intentional? I really don't want to have to create a huge workaround by declaring the keys outside of the structs, since that will make the API I am working on really inconvinient. Though I guess I can live with it, if this behaviour is not a bug.

I will attach an obj and a slk version of the map I tested this on. Thank you for your time!

EDIT: Using version 2.4.6. It seems a real I declared as constant is also not being inlined and being converted to a regular real variable (AutoRectEnvironment__PERIOD = 0.03).
 

Attachments

  • TerrainFog - Copy.w3x
    56.8 KB · Views: 32
  • TerrainFog - Copy_slk.w3x
    26.5 KB · Views: 29
Last edited:
Level 1
Joined
Aug 10, 2018
Messages
3
Warnings in GUI are displayed only when there are errors (come on, just put your list file to the archive). If you dont have errors you will find all the warnings in log folder.

The map i've downloaded is the map widely available to all users. So, the missing (listfile) is fixed by the creator providing me with an external listfile.txt that I can use with the optimizer.

I modified the load.lua file for w3x2lni so it will look for an imported listfile.txt instead of (listfile) when optimizing.

I haven't been able to download your map because of the bad network, but I think this map is an optimized map, otherwise, the (listfile) should not be missing from the map.
I don't recommend that you re-optimize an optimized map. If you have to do this, use other tools to import a complete (listfile) into the map first.

You are correct, found some previous conversations with him, and he had mentioned 5.0wc3mapoptimizer (not sure of settings used) to help optimize and/or protecting the map. Overall, he has provided me with a complete listfile, so hopefully that shouldn't be an issue.

1~3: The ID in SLK ignores case. To maintain correctness, I need to keep one of the objects in OBJ.

Seems this warning is causing an issue in version 2.5.1 that I did not experience with version 2.4.4. The issue causes the hero to change to mountain king, and has default MK abilties from what i've heard.

I've attached two photos labeled 2.4.4 and 2.5.1, that show the unit(s) that are affected due to doubled up unit id, and being not case sensitive as you've mentioned.

• 2.4.4 - Correct unit and abilities are as they should be
• 2.5.1 - Incorrect unit and abilities when selected

This was tested on the same version of the map, and using 2.4.4 results in it not being an issue. Also note, that I did manage to get the complete listfile to work with w3x2lni and that error shouldn't be an issue or connected.

4+: 'spellbook' is an invalid order id, its effect is the same as a random string. I think it's a mistake, although it's the default set by WC3. You can disable this warning by canceling `extra check`.

I have removed the extra check function, and it has disappeared as you've noted.

Hopefully the above is enough information, please let me know if you'd like to know more about my situation and such.
 

Attachments

  • 2.4.4.png
    2.4.4.png
    951.3 KB · Views: 60
  • 2.5.1.png
    2.5.1.png
    596.5 KB · Views: 43
Last edited:
Top