[General] Need Helping with Set Map Name String Reach Through Limit

Status
Not open for further replies.
Level 2
Joined
Mar 20, 2015
Messages
14
Hello hivers, i have a little problem :) it just about setting Map Name.I know, a Map Name cannot longer than 35 word. However, my Map Name want longer then 35. (You wonder about why my Map Name so longer?) Response:''Because me have using Color Codes, a Color Codes take over 15 word already. (Even i press Shift also cannot do it!!) Is that a way to solved this problem???:vw_wtf:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,271
Do not use a colour code in the map name or give your map a very short name. The choice is yours.

Personally I recommend not using colour codes. Using them makes searching for the map in the list difficult because it counts the un-formatted string when sorting alphabetically. As such with a colour code it appears at the top of the player count category in a seemingly random order (based on the colour of the text used). Hence for finding the map it is easier un-coloured since then it appears as expected in alphabetical order.

The limit is likely due to how the name is stored in the map. The amount of space reserved for the map name is likely only 35 characters or something like that. The reason it is bounded is because having an un-bounded dynamic name adds complexity to the data formatting (from simple char array to needing an entirely new data structure somewhere else).
 
Level 2
Joined
Mar 20, 2015
Messages
14
Ermmmm........... I accepted your idea, but i saw somemap can do it o_O (I confirm his character higher than 35) Thats meaning it is really got a way to do it... Bump...... More advanced people teach me now? Anyway thanks Dr Super Good
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,223
I seriously doubt there is a workaround. Without modifying warcraft 3 base files at least.

TBH I would just rename my map. The Invasion of Tanaris > TIoT

edit: Or actually there is a slight workaround. This is the code for yellow color (taken from abilities in the object editor). "|cffffcc00 something |r" which is 12 characters. However you can use HEX color codes which is a little shorter. "|FFFF00 something |r" which is only 9 characters.
 
Level 2
Joined
Mar 20, 2015
Messages
14
I seriously doubt there is a workaround. Without modifying warcraft 3 base files at least.

TBH I would just rename my map. The Invasion of Tanaris > TIoT

edit: Or actually there is a slight workaround. This is the code for yellow color (taken from abilities in the object editor). "|cffffcc00 something |r" which is 12 characters. However you can use HEX color codes which is a little shorter. "|FFFF00 something |r" which is only 9 characters.
Well, i use HEX, it really might be less up some characters, and now i am also thinking no need so long name with my map. Anyway thanks Chaosy
:ogre_hurrhurr:
 

EdgeOfChaos

E

EdgeOfChaos

Open a Hex Editor like XVI32 and manually write the game name in with that. It should be clear where the game name is when you open it up.
 

EdgeOfChaos

E

EdgeOfChaos

Does corrupting the map header in that way prevent it from being played or just from being opened? Because I know some forms of map protection intentionally corrupt the header so that it can be played but not opened. In that case, you could change the name after you optimize the map and prepare to release it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,271
MPQ archive headers are aligned to 512 byte boundaries. Hence the first 512 bytes of a WC3 map are the map header. I believe this header is processed by the map list since it is uncompressed and always at the start of the file so large numbers can be processed quickly. Additionally at the end of file (directly after the archive ends) there can be additional map information (mostly signatures).

As part of the map header is a string of the map name. This seems to be "null terminated" from what I read. Hence you could possibly have a map name much larger than the editor allows. However it is still limited by the start of the archive header and also there may be internal limits (buffer sizes) that prevent it from being past a certain size.

The archive header can be intelligently corrupted as part of crude forms of "map protection" (which do not work well at all, I advise against them strongly). Such corruption would not happen if you overflow a string across it and instead the archive will not be detected at all (since the MPQA FID is missing).
 
Status
Not open for further replies.
Top