Staredit Network

Staredit Network -> UMS Assistance -> Player gun sounds
Report, edit, etc...Posted by Sie_Sayoka on 2006-11-29 at 19:23:06
ok first off how would i make a gunshot sound when a player kills an enemy.

also i seemed to have maxed out my strings. does anyone know how to counter this problem or delete strings?

thx in advance.
Report, edit, etc...Posted by Shocko on 2006-11-29 at 19:49:47
Currentplayer score (kills) atleast 1 unit

PlayWav (gunshot)
SetScore to 0 kills

or something along those lines i should think, as for strings, try re using strings so instead of naming like 10 triggers different things, i think if you name them all the same thing it is only 1 string.
Report, edit, etc...Posted by Sie_Sayoka on 2006-11-29 at 20:19:54
QUOTE
or something along those lines i should think, as for strings, try re using strings so instead of naming like 10 triggers different things, i think if you name them all the same thing it is only 1 string.


lol i did that but i have so much triggers and text thatit maxed out.
Report, edit, etc...Posted by fritfrat(U) on 2006-11-29 at 20:29:22
There is no way around the byte limit for string text in a map. You can just try to utilize each character to the greatest extent possible, re-use strings, delete all comments...

As for sounds when you kill a unit, what shocko said should suit you.
Report, edit, etc...Posted by Sie_Sayoka on 2006-11-29 at 22:38:41
ahh sorry i forgot to mention that I only wanted one (the main unit) to have a sound when it kills something. later in game you will be able to control more units so would that not be possible?
Report, edit, etc...Posted by Koltz on 2006-11-29 at 22:41:54
nope, not possible. ANd i believe uberation has a recycle/delete unused strings option
Report, edit, etc...Posted by Zeratul_101 on 2006-11-29 at 22:43:08
did you delete strings for comments(if you use them)?
Report, edit, etc...Posted by MindArchon on 2006-11-29 at 22:53:21
Have you maxed out the string limit or the byte limit?

The string limit in Starforge, and a Staredit based editor is 1024. However, this limit can be extended by using SCMDraft2 as an editor.

There is also a theoretical string limit. You have a maximum of 21845 strings if every string of yours was null. So, if every string of yours was 15 characters long, the maximum amount of strings you could have would be 3640.
Report, edit, etc...Posted by Sie_Sayoka on 2006-11-29 at 23:02:52
is scmdraft2 all that and a bag of chips? i dont want to loose any information if i transfer from sf to scm2.
Report, edit, etc...Posted by MindArchon on 2006-11-29 at 23:55:28
QUOTE(Sie_Sayoka @ Nov 29 2006, 09:02 PM)
is scmdraft2 all that and a bag of chips? i dont want to loose any information if i transfer from sf to scm2.
[right][snapback]597066[/snapback][/right]


I believe transferring from SF to SCM2 will not cause any problems. You may have problems when you try to open up a map saved in SCM2 in SCXE, and maybe SF (most likely not).

Make a backup before you do though, it's good practise.
Report, edit, etc...Posted by spinesheath on 2006-11-30 at 00:23:37
QUOTE(MindArchon @ Nov 29 2006, 11:53 PM)
Have you maxed out the string limit or the byte limit?

The string limit in Starforge, and a Staredit based editor is 1024. However, this limit can be extended by using SCMDraft2 as an editor.

There is also a theoretical string limit. You have a maximum of 21845 strings if every string of yours was null. So, if every string of yours was 15 characters long, the maximum amount of strings you could have would be 3640.
[right][snapback]597059[/snapback][/right]


That's outdated knowledge. You can have about 65534 - (StringCharsTotal/2) strings with 65536 + LengthOfLongestString bytes of string data.
Report, edit, etc...Posted by MindArchon on 2006-11-30 at 00:51:24
QUOTE(spinesheath @ Nov 29 2006, 10:23 PM)
That's outdated knowledge. You can have about 65534 - (StringCharsTotal/2) strings with 65536 + LengthOfLongestString bytes of string data.
[right][snapback]597115[/snapback][/right]


Uh, No? Why would you take the total characters of a string and divide by two? I really don't understand what you're talking about, so if you still think you're correct, please clarify for me smile.gif. Here is what I got:

65535 = maximum length of an unsigned integer.

Each offset for the string is an unsigned integer.

Now, each offset is two bytes. After the offsets EVERY string ends with a null terminator, making a minimum of 3 bytes per string. So.. if you have every string with 15 characters, that's 18 bytes per string.

65535 / 18 = 3640.

Probably a bit less, since it includes the initial 2 byte integer which is the string amount.
Report, edit, etc...Posted by spinesheath on 2006-11-30 at 02:33:03
StringCharsTotal/2 is not half the length of one string, but half the length of ALL strings, just to clarify that.

link

This is the link to the Blizzforums topic where I released my findings. I'll add a brief explanation as well:

With currently available editors, you are basically right (though you neglected string recycling). But those editors all follow the rules Staredit set up, instead of Starcraft's rules. Since string recycling already breaks compatability, why should we still go with the outdated rules of SE?

A string offset is a ushort. So a certain string's offset can range from 0 to 65535. Since the first 2 bytes are taken for MaxStrIndex (not NumberOfStrings, that's no proper name), and probably none of your strings will start with the value 0xFFFF (twice the y with the two dots), you'll count those 2 bytes off.
Only the strings beginning must be within the max(ushort) range, so the last string can extend beyond that.

Now the new thing: In SE, the string indexes all form a block at the beginning of the STR section. But Starcraft does not care abouta that. So instead of string 1 to 1023 (string 0 is defaulted for examplte to "Marine" in case of that unit), I use string indexes BEYOND 32768. Those are outside the range that is available for sting characters, and thus I can use an additional 2*NumberOfStrings characters.

Practically, this results in 25000+ strings with a total of ~65700 characters.
Btw, what you also can do is use sub-strings as strings, for example "hello world!" and "world!" could be used as 2 strings only taking up the space of the first string. Otherwise you'd never be able to fit 25000 non-stupid strings into 65700 characters...
Next Page (1)