Staredit Network

Staredit Network -> UMS Assistance -> Quick question about strings
Report, edit, etc...Posted by Gigins on 2006-08-25 at 06:06:57
I know that with Draft I can have more than 1024 strings. But is there any real limit for these. Can I actually have like 3000 or 5000 strings in map? Will Draft give me errors when I have such a big number of them?

Because I comment every single trigger so it's easier for me to work. Protector will later delete comment strings and the map will have like only 1500 strings in it.

Please educate we about it. happy.gif
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-25 at 06:31:23
There's a character limit of 65536 I believe. You can have as many strings as you want as long as they fit within that limit.

Staredit strings are 64 characters max I believe. 64 x 1024 is about 65536, and hence the limit.
Report, edit, etc...Posted by Gigins on 2006-08-25 at 06:54:58
Ok, let's say I exceed the char limit with comments but later the protector deletes the comments.

Will Draft bug me if I exceed the limit?
Report, edit, etc...Posted by Kenoli on 2006-08-25 at 14:31:34
QUOTE(DEAD)
I know that with Draft I can have more than 1024 strings. But is there any real limit for these. Can I actually have like 3000 or 5000 strings in map?
You could have that many if they were small enough, like 10-20 characters long.

QUOTE(DEAD)
Will Draft give me errors when I have such a big number of them?
If you do manage to pass the string limit, Scmdraft2 will not tell you. It is a problem, though.
When I tried going over it, saving caused a crash.

QUOTE(Tuxedo Templar)
There's a character limit of 65536 I believe. You can have as many strings as you want as long as they fit within that limit.
That's almost right. Difference is that each individual string takes up 3 bytes by default. 2 for the offset, and 1 for the null character at the end.
So, when you make a string that says "Word", it's not using up 4 bytes, it's using up 7.

QUOTE(Tuxedo Templar)
Staredit strings are 64 characters max I believe. 64 x 1024 is about 65536, and hence the limit.
StarEdit will let you make 1024 character long strings. (the null character is added automatically, so you actually only get to enter 1023 characters)
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-26 at 01:33:56
Oh you're right. But then that makes me question the character limit. I mean, if you had just 64 strings filled to capacity, you'd hit the limit, right? I know RPGs that use up a lot more than 64 strings worth of loaded text. And that doesn't include all the extra strings for unit names, locations, comments, wavs, etc.

Something seems amiss. I'mma go and test this out...
Report, edit, etc...Posted by Heimdal on 2006-08-26 at 14:54:54
QUOTE(Kenoli @ Aug 25 2006, 01:31 PM)
That's almost right. Difference is that each individual string takes up 3 bytes by default. 2 for the offset, and 1 for the null character at the end.
So, when you make a string that says "Word", it's not using up 4 bytes, it's using up 7.

That's not right. While it is true that there is an extra two bytes associated with every string for the offset, you need an offset for every entry in the string table - for every "standard" map, this is always 1024 string entries.

The character limit is actually a little less than 65535. The offset of the last string has to be less than 65536, but that includes the space for the offset table. So in a "standard" map, you only have 65535 - 2048 - 2 bytes of space for the first 1023 strings, and the last string can be pretty much as long as you want. Although also keep in mind that string index 0 is pretty much reserved for the empty string, but this doesn't always have to be the case.
Report, edit, etc...Posted by Gigins on 2006-08-26 at 14:58:24
But maps with more than 1024 strings work, doesn't they?
Report, edit, etc...Posted by Heimdal on 2006-08-26 at 16:34:34
QUOTE(DEAD @ Aug 26 2006, 01:58 PM)
But maps with more than 1024 strings work, doesn't they?
[right][snapback]551246[/snapback][/right]

Yup. But I don't think there are many (any?) programs that support it very well.
Report, edit, etc...Posted by Gigins on 2006-08-26 at 19:22:51
SCMDraft2 does.
Report, edit, etc...Posted by LegacyWeapon on 2006-08-26 at 22:14:10
So should ube2 and ube3.
Report, edit, etc...Posted by Heimdal on 2006-08-27 at 12:17:52
QUOTE(DEAD @ Aug 26 2006, 06:22 PM)
SCMDraft2 does.
[right][snapback]551396[/snapback][/right]

QUOTE(Kenoli)
If you do manage to pass the string limit, Scmdraft2 will not tell you. It is a problem, though.
When I tried going over it, saving caused a crash.
It didn't sound like it. I haven't actually tried it myself, so I dunno.

Has any map editor successfully separated out "useful" strings (strings that are actually used in the game) vs. "support" strings (location names, comments, switch names, etc) into two different STR sections? This was an idea that was floating around a long time ago, and I think it would help a lot with the string problem. Of course it would make maps incompatible with other editors...
Report, edit, etc...Posted by Gigins on 2006-08-27 at 12:53:41
I think protector programs has a feature to delete the support strings.


Here [GTA classic] has 1359 strings. It's made in SCMDraft2. crazy.gif

http://www.staredit.net/index.php?download=4549

Use trigger viewer, it counts triggers and strings.
Next Page (1)