String Limit
This topic is locked. You can no longer write replies here.
Mar 21 2009, 6:15 am
By: Pinky  

Mar 21 2009, 6:15 am Pinky Post #1



Is there ANY way to get past the 65536 byte string limit??



None.

Mar 21 2009, 6:18 am Roy Post #2

An artist's depiction of an Extended Unit Death

http://www.staredit.net/wiki/Strings

Start deleting trigger comments, recycling strings, etc.

Without modding SC, there isn't any known way. If you happen to find one, however, you'd be a hero.




Mar 21 2009, 7:36 am Pinky Post #3



How do I recycle strings? If I have two seperate triggers (say two display text msgs) with exactly the same txt will it automatically use the one string twice? Or does SCMDraft2 just create two identical strings?

With that in mind couldn't I just have a string for each letter of the alphabet, and then recycle them and have them form different word combinations, hence only having 26 strings??

Also without comments on my triggers well, I'm gonna have a hard time sifting through all those triggers. :S is there anyway to mark them without using strings?



None.

Mar 21 2009, 10:49 am NudeRaider Post #4

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

ScmDraft automatically recycles strings that match exactly.

Yes, that's theoretically possible, if you like your ingame texts aligned vertically.

Nope. That's why we're asking for it in the "last call for ScmDraft" topic.
You can reduce the need for comment strings significantly if you don't comment small triggers at all and for the rest use only 1 header comment for the entire system and for the rest of the triggers of that system just make an empty comment.
Usually you don't hit the byte limit, just the number of strings (1024) limit, so you can comment every trigger of that system in a seperate line of the same comment. Like this:

Respawn timer:
Counter
Died
Respawn

So you needed only 1 string for 3 triggers.




Mar 21 2009, 11:20 am Wormer Post #5



Quote from Pinky
How do I recycle strings? If I have two seperate triggers (say two display text msgs) with exactly the same txt will it automatically use the one string twice? Or does SCMDraft2 just create two identical strings?
Classic StarEdit creates two different strings in this case (and all other cases too). SCMDraft2 reuses all strings. If you have two identical (colors and spaces count!) strings used at any place in your map SCMDraft2 will reuse them. For example, if you have a "Terran Marine" string used in brifing, comment, unit name and display text SCMDraft2 will use one string.

Quote from Pinky
With that in mind couldn't I just have a string for each letter of the alphabet, and then recycle them and have them form different word combinations, hence only having 26 strings??
No, you can't, because at each place you can specify only one string, you cant build a string to display consisting of other strings.

Quote from Pinky
Also without comments on my triggers well, I'm gonna have a hard time sifting through all those triggers. :S is there anyway to mark them without using strings?
There is a way, write triggers in text and maintain them in a separate file. Use real text comments.



Some.

Mar 21 2009, 11:51 am Pinky Post #6



So lets just say i had a comment saying: GENERAL STORE HEALTH POTION FAIL COST and then i cut it down to GSHHFC how much wuld i save?? If i was to apply that principle to all my comments wuld i save a worthy amount of space?



None.

Mar 21 2009, 12:09 pm NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

There's 2 limits:
- Number of strings: max. 1024
- Bytes used for strings: max. 64k

The number of strings limit can be circumvented (ScmDraft allows that) but it seems to create a whole lot of problems, so unless SI fixes it I'd stay away from >1024 string count.

The Byte limit cannot be circumvented, except by reusing and shortening strings.

So if you shorten "GENERAL STORE HEALTH POTION FAIL COST" (37 chars) to "GSHHFC" (6 chars) you saved 31 byte, but same number of strings.




Mar 21 2009, 12:40 pm Pinky Post #8



What kind of problems occur when you go over the STRING limit?? (Not the byte one)



None.

Mar 21 2009, 1:51 pm Vi3t-X Post #9



Nothing bad happens to go over the 1024 limit. If you go over the byte limit, I think the text doesn't show up, or SC crashes or something.



None.

Mar 21 2009, 3:23 pm NudeRaider Post #10

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Vi3t-X
Nothing bad happens to go over the 1024 limit. If you go over the byte limit, I think the text doesn't show up, or SC crashes or something.
No.
Starcraft can handle string indexes > 1024.
It's the editors. Afaik only ScmDraft even supports > 1024 but it tends to crash or mess up the strings indexes so the wrong string are shown. But I also received reports of it working properly. Use at your own risk.

If you're interested you can test for yourself and post your results. Maybe you can even help SI to overcome these problems.




Mar 21 2009, 4:40 pm Pinky Post #11



I have maxxed out on string bytes which was 1354 strings in total. When I tried to save when going over the max limit SCMDraft 2 immediately crashes and the save does not follow through. Hence you CANT save a map that has over the maximum amount of bytes.

I have not noticed any errors going over the 1024 string limit though.

Anyway thanks for all the help guys I've been recycling and cutting down on strings like mad now but I think I will have to cut out a fair chunk of the ideas I had planned. :(

Damn this byte limit, does anyone know why it is in place? Seems rather useless really.



None.

Mar 21 2009, 4:46 pm ClansAreForGays Post #12



I updated the strings wiki to add what has been said about using the exact same thing over and over again, because I honestly never knew that. Someone should go over it to make sure I didn't say anything false.




Mar 21 2009, 6:19 pm NudeRaider Post #13

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Pinky
Damn this byte limit, does anyone know why it is in place? Seems rather useless really.
Quote from Strings wiki
Each character in a string takes up one byte of data, and each string has a 2 byte offset value, and a 1 byte null terminator. So, the string "Hello" takes up 8 bytes.
This is your answer.
The string index, as I called it earlier, is 2 byte (=16bit => 0-64k) and shows where in the string section this string is located.
This is a limitation Blizzard set over 10 years ago when the game was created and is part of the definition of the .scm/.scx file type. Obviously they didn't think that anyone would hit that limit.




Mar 22 2009, 8:14 am Pinky Post #14



Sooo the only way to remove this limit would be to modify the game and thus make it unplayable on reg SC... :(

Ah well thanks 4 the help all.



None.

Mar 22 2009, 10:16 am NudeRaider Post #15

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

I doubt you can even mod such a basic thing.

EDIT:
Quote from name:Killer_Kow
String Limit

Quote
I doubt you can even mod such a basic thing.

When Farty was doing work on TrigPlug, he found a way to display strings from stat_txt.tbl, so you could theoretically have as many strings as you wanted to (well, 65k, but you could in theory read from a second .tbl file if you really wanted to). Just to clarify.


Post has been edited 1 time(s), last time on Mar 22 2009, 6:04 pm by NudeRaider.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[01:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
Please log in to shout.


Members Online: Roy, jun3hong