Strings
May 8 2010, 10:17 pm
By: Jesusfreak  

May 8 2010, 10:17 pm Jesusfreak Post #1



I've been monitoring my amount of strings, and I've noticed that even though I've barely started triggering my map, I'm already at 9.1% on strings. Most of the strings used are unit names and locations at this point, but I fear that I may run out of strings long before finishing my map.

I'm pretty sure there's no way to expand the maximum amount of strings, but besides avoiding the use of comments and making a lot of stuff have the same name, what can I do to limit my string consumption?

Also, I've read the wiki, and I'm a bit confused on this statement:
Quote
SCMDraft and both of the Uberation programs support an unlimited number of strings. However, the total size of all strings cannot exceed 65536 bytes.
http://www.staredit.net/wiki.php?article=Strings
It says my number of strings is unlimited, but I still see a limit of 1024 strings in the editor. (I also notice that the 9.1% is the percentage of bytes used, not strings)
Should I just ignore the string limit then?



None.

May 8 2010, 11:05 pm O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

The thing is that unit names and locations take up a lot of string space ... But you only need to worry about them once.

StarEdit tries to always say there are 1024 strings, but if you pass that in SCMDraft then nothing bad should happen (it should just increase with string usage.)

My advice is ignore the string limit until it looks like it could become a problem (like 70-80%.)



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 9 2010, 9:46 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

When not using trigger comments or at least use them sparingly and recycle as much as you can you basically can't hit the max. 1024 strings limit (unless you have a shitload of display triggers).

The only hard limit of strings is 64kb total you technically you can get over 1024 strings and ScmDraft 2 also allows you to. BUT is has been reported over and over that this is unstable likely to cause corruption sooner or later, so once you exceed 1024 string you should save and make backups more often. However I've also heard of mappers that had no problems at all crossing that mark. So I guess as long as you're careful you should be fine exceeding it.




May 9 2010, 10:42 pm Lanthanide Post #4



I use comments in all of my triggers, however I do it in a block fashion.

If I have a group of triggers that are working on some particular area, I will give a comment to the first one that represents all the following triggers, and then for the rest of the triggers I give them a comment of "". This saves you many strings and much byte space vs giving unique comments for each trigger, and frankly makes trigger comments much easier to read because you can see where blocks of like-functionality start and end because each block starts with a comment.

Eg:
"Do XYZ for marine, zealot, dragoon, zergling"
This comment would appear on the first marine trigger, the next 3 triggers would be zealot, dragoon and zergling in that order with comments of "". Or
"Do XYZ for P1-3, P5-7"
This comment would appear on the trigger for P1, and 6 triggers for P2, P3, P5, P6 and P7 would follow in order with comments of "".



None.

May 10 2010, 1:09 am rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

I recommend you save a lot if you're using up anywhere near the max amount of strings.

Comments are a stupid workaround for a terrible UI. I much prefer no comments, so you can actually see what the trigger is, rather than just some comment.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 10 2010, 10:21 pm Lanthanide Post #6



Yeah, however when you have 5 triggers doing the same thing, but for different players, you don't really need to look at the contents of each and every trigger. Especially if the triggers are doing like 15 things - that's well over 75 lines that could easily be hidden behind 5 with comments.

Also I'm map-making on my laptop which only has a 1024x768 resolution (perfect 4:3 for SC though!, and not all pixilated) so screen space is an issue. If I was working on my 24" monitor then comments would probably be less of an issue.



None.

May 11 2010, 10:42 am Aristocrat Post #7



Quote from Lanthanide
Yeah, however when you have 5 triggers doing the same thing, but for different players, you don't really need to look at the contents of each and every trigger. Especially if the triggers are doing like 15 things - that's well over 75 lines that could easily be hidden behind 5 with comments.

Also I'm map-making on my laptop which only has a 1024x768 resolution (perfect 4:3 for SC though!, and not all pixilated) so screen space is an issue. If I was working on my 24" monitor then comments would probably be less of an issue.

Use TextPad and code triggers with Trigedit syntax.



None.

May 11 2010, 10:54 am Lanthanide Post #8



I find Trigedit syntax to be unintuitive. I use it when I need to make many repeative triggers, or change many at once. But otherwise most of my triggers are done using classic.



None.

May 11 2010, 2:32 pm Jesusfreak Post #9



Quote from Aristocrat
Quote from Lanthanide
Yeah, however when you have 5 triggers doing the same thing, but for different players, you don't really need to look at the contents of each and every trigger. Especially if the triggers are doing like 15 things - that's well over 75 lines that could easily be hidden behind 5 with comments.

Also I'm map-making on my laptop which only has a 1024x768 resolution (perfect 4:3 for SC though!, and not all pixilated) so screen space is an issue. If I was working on my 24" monitor then comments would probably be less of an issue.

Use TextPad and code triggers with Trigedit syntax.
Er... what???



None.

May 11 2010, 4:21 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

... to conserve strings otherwise used for comments




May 11 2010, 6:23 pm Jesusfreak Post #11



Quote from NudeRaider
... to conserve strings otherwise used for comments
Do WHAT to conserve strings otherwise used for comments???



None.

May 11 2010, 7:38 pm ImagoDeo Post #12



Quote from NudeRaider
When not using trigger comments or at least use them sparingly and recycle as much as you can you basically can't hit the max. 1024 strings limit (unless you have a shitload of display triggers).

The only hard limit of strings is 64kb total you technically you can get over 1024 strings and ScmDraft 2 also allows you to. BUT is has been reported over and over that this is unstable likely to cause corruption sooner or later, so once you exceed 1024 string you should save and make backups more often. However I've also heard of mappers that had no problems at all crossing that mark. So I guess as long as you're careful you should be fine exceeding it.

For example, I have one map that has over 2,000 strings and it hasn't glitched on me yet. I really should be saving backups - I keep forgetting to. But so far I'm OK, and I don't think it's that big of a problem if you don't exceed the actual maximum byte size.

The main reason for my enormous string size is that I have an option for players to display their current amount of men commanded, which can exceed 1000 easily. I don't recall exactly how high my display goes - 1440 I think - but it has an individual string for each of those, so it inflated things quite a bit.

Quote from Lanthanide
I find Trigedit syntax to be unintuitive. I use it when I need to make many repeative triggers, or change many at once. But otherwise most of my triggers are done using classic.

I use MacroTriggers for building any system that would be tedious to make with classic, and once you've learned that system it's pretty easy to use. Anything that I can or have to do with classic I generally make in classic, not in the text edit version. For example, I made my enormous text display system that I talked about above using MacroTriggers. Copy/paste/compile it's all good.



None.

May 12 2010, 8:01 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 Jesusfreak
Quote from NudeRaider
... to conserve strings otherwise used for comments
Do WHAT to conserve strings otherwise used for comments???
I was elaborating on Lanthanide's suggestion.

The point is trigedit ignores any line that begins with 2 slashes //. So your textfile can hold any number of comments.

Quote from ImagoDeo
The main reason for my enormous string size is that I have an option for players to display their current amount of men commanded, which can exceed 1000 easily.
You should do that via leaderboard, resources display or simply change the value on a mineral block. Far more efficient.




May 12 2010, 8:51 pm Jesusfreak Post #14



Quote
The point is trigedit ignores any line that begins with 2 slashes //. So your textfile can hold any number of comments.
And... how do I use trigedit?



None.

May 13 2010, 1:36 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

Triggers -> Trigger Editor




May 13 2010, 3:03 am Lanthanide Post #16



Quote from NudeRaider
or simply change the value on a mineral block. Far more efficient.

I wanted to do this in my Desert Strike Night map but found that you can only 'Set' resource value, you can't "add" or "delete" it, which makes binary countoffs impossible, you just have to have a trigger for each different value that you want to set.

Unless there's some other clever way of achieving this?



None.

May 13 2010, 11:08 am NudeRaider Post #17

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 Lanthanide
Unless there's some other clever way of achieving this?
Yes, a trigger duplicator. :P




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:27 am]
m.0.n.3.y -- Maybe because it's an EUD map?
[03:27 am]
m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
Please log in to shout.


Members Online: jun3hong, m.0.n.3.y, Ultraviolet