Staredit Network

Staredit Network -> UMS Assistance -> Breaking the String Limit.
Report, edit, etc...Posted by Forsaken on 2005-07-01 at 22:21:41
Well, I understand that it is possible to break the string limit. Referring to BSTRhino's thread where e had 2500 strings in a map and that it successfully ran. But, I don't really understand how he was able to do so.

So, I was wondering if anybody could possibly how he did it. I really need to know because I know I will use more than 1024 strings in the map I am currently making.
Report, edit, etc...Posted by Devil_O_Duce on 2005-07-01 at 22:32:21
QUOTE(-Jake- @ Jul 1 2005, 08:21 PM)
Well, I understand that it is possible to break the string limit. Referring to BSTRhino's thread where e had 2500 strings in a map and that it successfully ran. But, I don't really understand how he was able to do so.

So, I was wondering if anybody could possibly how he did it. I really need to know because I know I will use more than 1024 strings in the map I am currently making.
[right][snapback]250283[/snapback][/right]


well he probbly uses starforge plus if you thought about it
Report, edit, etc...Posted by Forsaken on 2005-07-01 at 22:34:52
Not really. He said he used some kind of program that he wrote. But, I have no idea on how to actually do it.

I am just hoping that someone else does. Besides, Rhino isn't on SEN much. He is very busy with SC.org and Warboards.
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-02 at 00:59:44
Read the thread, silly Rexy.

QUOTE(SI)
Its always been known that the stringlimit is only in staredit.
However since the format uses WORDS as offsets you cant have more than 65536 letters (including 3 bytes overhead oer string).

Scmdraft has always been able to add more strings when you reached the limit...


Just keep in mind you'll, as I said, get smacked hard in the face by the raw byte limit in strings. Watch out! tongue.gif
Report, edit, etc...Posted by BSTRhino on 2005-07-02 at 01:05:54
There really wasn't any trick to it. I just went to Campaign Creations, looked at the CHK spec, and wrote a program that writes the string section exactly as specified, except substituting 1024 with the number of strings in the map. I remember I did play around a bit, but that's only because the CHK spec doesn't fully specify everything, but there's no trick to it otherwise. SCMDraft is meant to support 1024 strings, although I haven't heard of anyone actually using it, and one person opened my 2500 string map in SCMDraft, added a new string, and SCMDraft crashed. So maybe not, but you'll have to see for yourself.

I'm not planning to release the program, it's not much better than TrigEdit in its current form.
Report, edit, etc...Posted by Forsaken on 2005-07-02 at 01:25:10
So pretty much, you opened the CHK and changed the max limit through there?

Report, edit, etc...Posted by BSTRhino on 2005-07-02 at 01:47:06
Hmmm... kind of.

Basically what the program did was it rewrote the part of the CHK that contains all the strings in the map (and the trigger section and some others) while leaving the other sections untouched.

If you look at the spec on campaign creations it says:

QUOTE
x: Section 'STR ' - strings section
beta57 * 1.00 * 1.04 * Brood REQUIRED
1 int - Number of strings in the section(this will be 1024, regardless of how many strings are actually used, and cannot exceed 1024)

1024 ints - 1 int for each string specifying the offset from the beginning of this section of where the string starts. If there are less that 1024 strings, the unused entries will point to string #0 (the null string). Important Note: String #0 should have an offset of 2050, etc. (1025 ints for this table)

Here is where all the strings go, one right after another; and all of them null terminated. Note: string #0 (the very first one) is ALWAYS the null string. All other strings start at #1


This describes how to write a string section. It's not quite completely described, but see how it says "1 int - Number of strings in this section" up the top? This is saying "write an integer (two byte) value to the CHK that is a count of the number of strings." So, I write an integer to the CHK file containing exactly how many strings there are, and unlike StarEdit, the program doesn't always write 1024 here.

Then after that the program writes the string table. That's in the CHK spec up there in that part that says "1024 ints - 1 int for each string". Instead of writing 1024 integers to the CHK file, it'll write as many as there are strings, whether it be 1024, 2500 or any other number.

Finally the program just writes the strings. Rewriting the CHK file to exceed the string limit is not something you can do manually unless you have a lot of time, you need to be able to write a program to do it for you, so I can't really explain it unless you understand what I'm talking about when I start getting geeky and start talking in geeky programmer terms.

If I can find the source code for this part I'll post it, but it's on the other computer and I don't have access to that at the moment.



Edit: I thought -Jake- asked me this question?
Report, edit, etc...Posted by Forsaken on 2005-07-02 at 02:12:33
QUOTE(BSTRhino @ Jul 1 2005, 09:47 PM)
Edit: I thought -Jake- asked me this question?
[right][snapback]250424[/snapback][/right]


shifty.gif... Yeah... Rrrriiiiighhhttt....


Well, I kind of understand. I remember Heimdal teaching me some of the basics for editing the CHK. I have the tutorial or whatever you want to call on CC. But I am not wanting to the program that deos the strings for me, I was just wanting to know how to actually manually break the limit. Which I think I have an idea.

My idea has to with hex editing. But meh... I'm no expert.
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-02 at 02:28:58
Posting name RexyRex_ *wink wink*
Report, edit, etc...Posted by BSTRhino on 2005-07-02 at 03:03:14
Gosh, if you seriously want to edit the CHK manually, you'll be hex editing for months! And I don't think most hex editors support inserting bytes into a file either, so it might not be possible.
Report, edit, etc...Posted by Forsaken on 2005-07-02 at 11:39:22
Well, I'm still a bit confused. So, in order for me to edit the limit I need to have your program?

Report, edit, etc...Posted by scwizard on 2005-07-02 at 12:50:16
So does SCMDraft add 1 string to that section where the defult is 1024 when you add strings past 1024?

Also, the next verson of uberation should make it so that the number there will be the actual number of string instead of 1024 as part of the compacting and protecting package. (It makes it so if they some how manage to unprotect it, they can't add new strings. I know this becuase if you try to add 2 strings in your map where the number is set to 2500 or something, SCMDraft crashes.)

Oh ya, and Jake felt like being stupid, so he changed his name to RexyRex_
Report, edit, etc...Posted by Forsaken on 2005-07-02 at 12:54:04
QUOTE
Oh ya, and Jake felt like being stupid, so he changed his name to RexyRex_

You got that right. Besides, EzDay2 stole my name. -Jake-! tongue.gif
Report, edit, etc...Posted by Heimdal on 2005-07-02 at 14:20:00
Hex editing the CHK isn't that hard if you know what you're doing. I had added a 1025th string a long time ago just to see if it could be done. Of course, this method is impractical for most people.

One possibility would be to extract the whole STR section to a separate file and edit it with TBLPad, then import it back in.

I don't know if SCMDraft works with more than 1024 strings or not.
Report, edit, etc...Posted by Clokr_ on 2005-07-02 at 14:24:21
PROEdit can or could set the string max to another number... but the map won't work on SCXE after it has been changed.
SCMDII should support more than 1024 strings.
Report, edit, etc...Posted by Sniper on 2005-07-03 at 01:59:43
Will SF support more than 1024?
Report, edit, etc...Posted by Heimdal on 2005-07-03 at 02:54:05
No.
Report, edit, etc...Posted by Deathknight on 2005-07-03 at 12:23:09
Most editors only read 1024. That's why protection changes the number and scrambles the section. So if you make it less/more, the editors will still not be able to read it.
Report, edit, etc...Posted by SI on 2005-07-03 at 19:56:40
BSTRhino: That crash was fixed in one of the prereleases, so any current version of scmdraft will be able to add strings to your map.
-
Scmdraft 2 will automatically create more strings if you reach the 1024 string "limit", however then you may not be able to work with SCXE / SF etc since they all have the size hardcoded to 1024.
Report, edit, etc...Posted by BSTRhino on 2005-07-03 at 22:56:44
Excellent! Well there you go. To break the string limit, use SCMDraft. Why bother getting down to the bits and bytes when you don't need to?
Next Page (1)