HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

1 KB string size restriction?

05-06-2008, 09:02 AM#1
Danat
Hi. I'm making a tool to translate some WC3 map to different languages and after the first translation test was made, I've noticed that most hero descriptions are truncated at "random" positions. After some analysis I've figured out that the portion of the string that was visible in the tooltip takes up exactly 1 KB if I copy-paste it in a blank UTF8 txt file and save it.

Does that mean that there is some "no more than 1 KB string size" restriction?
Is there any way to change that, other than make my strings smaller (which would make the descriptions ugly) ?
05-06-2008, 12:06 PM#2
Tide-Arc Ephemera
Are these tooltips, if so, how long? 'Cause I'm pretty sure DotA puts novels into their descriptions.
05-06-2008, 01:45 PM#3
Vexorian
I'd like to see those tooltips that are 1024 characters long.
05-06-2008, 02:36 PM#4
Danat
Quote:
Are these tooltips, if so, how long?
Yes it's a tooltips and more specifically Ubertip, that appears when you hover your mouse over the hero icon in the Tavern.
Quote:
'Cause I'm pretty sure DotA puts novels into their descriptions.
lol I'm making this tool for DotA :).

Quote:
I'd like to see those tooltips that are 1024 characters long.
Sure i can paste it here, but they are in russian language. The thing is, english character takes up 1 byte in UTF8 while russian takes 2, which means that text with same size (amount of characters) in text editor will have different size when saved into file. Note that I'm talking about 1KB size restriction, not amount of characters.
Here is one such description:
Quote:
Luna Moonfang - непреклонная и ярая последовательница Богини Луны, Элуны. Она сражается бок о бок с Sentinel в бесконечной битве, чтобы очистить землю от проклятых Scourge. Благодаря своим героическим усилиям, она была вознаграждена небольшим количеством таинственной силы Elune. Luna использует подарок, чтобы прорубать себе дорогу сквозь врагов. Поговаривают, что Luna способна призвать свет самой луны, и всегда озарена свечением ауры, будто находясь в лунном свете. Luna - сияющая путеводная звезда для Sentintel, вечно бдительная защитница. |n|n|c000042ffСила|r - 15 + 1.75|n|c00ff0303Ловкость|r - 22 + 2
this hero description is provided in its truncated form which takes up 1026 bytes. The rest of it (about 30 characters) is not displayed.
05-06-2008, 04:10 PM#5
DioD
this text contain no usefull information about hero, just a story,most ppl will read such tooltips only once.
05-06-2008, 04:46 PM#6
Strilanc
The solution is to put the text in JASS instead of GUI. GUI truncates when you copy/paste triggers (as you have seen).

JASS also a limit, but it is much higher.
05-06-2008, 04:54 PM#7
Danat
hmm, perhaps i haven't made myself clear.
After manually overwriting the hero's description, putting the translated text in its place, I've noticed that while the string is stored OK in the map, the tooltip displays only a portion of it. And that portion is exactly first 1KB of my string.
05-07-2008, 03:50 AM#8
Ammorth
It might be an engine limitation which prevents too much information being displayed (wouldn't surprise me). The guess the reason this was never found out before was that (as you said) certain languages take up more memory per character than others, and usually the text runs out of space before the memory limit is reached.
05-08-2008, 07:37 AM#9
Tide-Arc Ephemera
Well, all unit data is stored somewhere. There's probably something in one of the SLKs or one of the random files inside the w3x that could be manipulated.