Strings
May 26 2008, 2:41 am
By: Cardanis  

May 26 2008, 2:41 am Cardanis Post #1



So, I've been reading a lot of horror stories lately about overloading strings/maps exploding etc etc, and I just checked my strings in SCM Draft, and im at 462 strings (16.6%) is this pushing it? And if I do get too close, what exactly will happen? =\



None.

May 26 2008, 2:48 am Brontobyte Post #2



Quote from Cardanis
So, I've been reading a lot of horror stories lately about overloading strings/maps exploding etc etc, and I just checked my strings in SCM Draft, and im at 462 strings (16.6%) is this pushing it? And if I do get too close, what exactly will happen? =\

Well, from what I know, there is no real limit to the strings you a given map. There have been a lot of maps made and unless your map contains 1000+ triggers each with a comment, and locations with comments, differently named units, and other string oriented material, I doubt that you will go over. I have seen some maps that have had over 1000 but not much over, and they were full of everything that could be used for strings. (EX: renamed units, locations, trigger comments, ect...) On the account that no one I know/herd of, has ever gone over this limit, I'm really not sure what would happen.



None.

May 26 2008, 11:11 am NudeRaider Post #3

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

Uhm there IS a limit: Max 64k characters. But ScmDraft loosens the 1024 string count limit you find in other editors as it seems technically possible to go over.
What will happen when you make more than 1024 strings? I don't know. A bug if you're unlucky.
I've heard people claiming it would be np to use more than 1024 strings IF YOU SOLELY STICK TO SCMDRAFT. Other editors will screw up for sure.
But I also heard people experiencing bugs (strings got screwed up) when doing exactly that.
So I suggest you backup your map as soon as you get close to the limit and try for yourself.

But usually you don't need to get near this limit. Just save comments. It's not necessary to comment every single trigger.
For example make headlines for the following group of triggers. This headline can even be like an index stating what each of the trigger does as you usually hit the 1024 trigger count earlier than the 64kb limit.




May 29 2008, 2:31 am Falkoner Post #4



SCM Draft was meant to be able to break the 1024 limit of strings. The idea was that the true limit was 65536 bytes,(correct me if I'm wrong) and so it was made to go over, but people seem to be running into many bugs with this lately, so I would definitely keep backups, which is a good idea, whether or not you are doing risky things.

Post has been edited 1 time(s), last time on May 29 2008, 2:01 pm by Falkoner.



None.

May 29 2008, 3:02 am NudeRaider Post #5

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 Falkoner
the true limit was 65536k,(correct me if I'm wrong)
Correcting you as requested: 65536 Byte (= 64k)




May 29 2008, 3:07 am Clokr_ Post #6



It's not 65535 bytes worth of strings. You have to also count one short for the number of strings, one short for each string and all the null chars for every string :P

EDIT: Hm well, it is 65535 bytes worth of strings then the last string can be as long as you want? Because what counts is that you can point to the beginning of the string. Haven't used this stuff for a while...



?????

May 29 2008, 3:22 am A_of-s_t Post #7

aka idmontie

http://www.staredit.net/maplantis/index.php?sid=eedfd11fef;wiki=35
http://www.staredit.net/maplantis/index.php?sid=f6bfa75d14;wiki=22

Quote
"STR " Section
Note: Required for Melee game type
This section contains all the strings in the map.
Note: This section can contain more then 1024 strings and will work in Starcraft
2 byte integer: Number of strings in the section
(# of strings) 2 byte integers: 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).
Strings: After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.

So:
65536 - 2 - 2n = amount of characters you can store.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

May 29 2008, 12:58 pm Clokr_ Post #8



Quote from A_of-s_t
http://www.staredit.net/maplantis/index.php?sid=eedfd11fef;wiki=35
http://www.staredit.net/maplantis/index.php?sid=f6bfa75d14;wiki=22

Quote
"STR " Section
Note: Required for Melee game type
This section contains all the strings in the map.
Note: This section can contain more then 1024 strings and will work in Starcraft
2 byte integer: Number of strings in the section
(# of strings) 2 byte integers: 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).
Strings: After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.

So:
65536 - 2 - 2n = amount of characters you can store.

Yeah that's the first that came to my mind. But notice that you have to reach the beginning of the string, but not its end. So it's 65534 chars worth of strings and the last string can be as long as you wish.



?????

May 29 2008, 8:51 pm O)FaRTy1billion[MM] Post #9

👻 👾 👽 💪

Nevermind. Didn't read all the posts thoroughly... For an additional comment:
It's the same as the TBL format... Except, for whatever reason, it stays at 1024 entries by default. I have no idea why map editors are so picky about this. TBL editors have no trouble. :P



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 29 2008, 9:26 pm Clokr_ Post #10



Because setting a limit is easier than counting how many characters are left for strings. They probably thought that noone would make a map that needed more strings, otherwise changing the format wouldn't have been hard...



?????

May 29 2008, 9:30 pm Falkoner Post #11



Yeah, they also thought no one would want to add and subract from health, this is just another reason why we're all going to love the SC2 editor :P



None.

May 29 2008, 9:41 pm O)FaRTy1billion[MM] Post #12

👻 👾 👽 💪

Quote from Clokr_
Because setting a limit is easier than counting how many characters are left for strings. They probably thought that noone would make a map that needed more strings, otherwise changing the format wouldn't have been hard...
You don't need to change the format... it's just dumb the way they implemented it.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 29 2008, 9:58 pm Clokr_ Post #13



Quote from O)FaRTy1billion[MM]
Quote from Clokr_
Because setting a limit is easier than counting how many characters are left for strings. They probably thought that noone would make a map that needed more strings, otherwise changing the format wouldn't have been hard...
You don't need to change the format... it's just dumb the way they implemented it.

It is not dumb. They could've used longs instead of shorts, but the format is very good because it is fast to read. You just load it as a whole into memory then you can access a string by doing:
Code
stringsection[stringtable[id + 1]]

Simple and fast.



?????

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[2024-5-16. : 5:24 pm]
lil-Inferno -- poopoo
[2024-5-16. : 5:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[2024-5-16. : 3:36 pm]
NudeRaider -- :lol:
Please log in to shout.


Members Online: 2evanc8323gb4, 5emmac6122fL6