Find Me On Discord (Brood War UMS Community & Staredit Network)
DTM = Display Text Message.
OK everyone here is my question: Which is the most efficient method of string-saving?
Say I have a menu, the DTM would be like this:
1 - Quests
2 - Character Attributes
3 - Equipment
8 - Back
So, is SCMDraft recycling strings on every enter? Or is it only recycling strings if DTMs are identical? Because, otherwise, I am planning on going all back through my triggers and changing it to something like this.
DTM
1 - Quests
DTM (separate one)
2 - Character Attributes
DTM (separate one)
3 - Equipment
DTM (separate one)
8 - Back
Thanks,
Oh_Man.
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
Open ScmDraft's string editor and see for yourself.
---
Which method conserves more strings depends on how many combinations of different menus with the same element you have.
Every separate DTM is saved as a separate string. Using the [Enter] char in a string won't split it into a new string.
So when you have like 3 different possible combinations, like for example
1
2
3
8
1
3
8
1
2
8
In that case you need fewer number of strings (but more of the max. char limit of 64k) when to put everything in 3 strings, but if you have more combinations than there are choices it's better to separate it into individual lines
if you're using ScmDraft because it recycles
identical strings in different triggers. This is the
only editor that does this.
Find Me On Discord (Brood War UMS Community & Staredit Network)
Aah thank you, a lot of my DTMs have lots of enters as well, to push other writing off the screen. Right now I have a very inefficient use of strings, and I am looking forward to all the extra space I'll have after employing this method.
Many thanks!!
Post has been edited 1 time(s), last time on Jun 19 2011, 12:45 am by Oh_Man.