Tiny question about String.file

Can we just set the string value at start to a default like 10.000 and just modify everything we want!

I mean, I'm adding a race (more to follow I hope), I'm not gonna add 5 000 files...so if I put default string value to 10.000 It'll never fail right?

 

Thanks!

1,466 views 4 replies
Reply #1 Top

I haven't actually tested this.

If I am going to add a ton of new strings and can't figure out the number, there is a simple math equation you can do to figure out exactly how many strings are in your .str file. This is assuming you are using Notepad++ to do your text editing.

In Notepad++, it shows how many lines of text you have. There are 2 lines at the very top that are never repeated and don't add to the .str count. Each .str entry after that is made up of 3 lines. For example...

TXT                                                           <-- Never repeated
NumStrings 3                       
             <-- Never repeated
StringInfo                                             
<-- .str line 1/3
    ID "IDSPlayerAINameTech0"    
<-- .str line 2/3
    Value "Guristas"                              <-- .str line 3/3
StringInfo                                              <-- .str line 1/3
    ID "IDSPlayerAINameTech1"     <-- .str line 2/3
    Value "Arch Angels"                       <-- .str line 3/3
StringInfo                                              <-- .str line 1/3
    ID "IDSPlayerAINameTech2"     <-- .str line 2/3
    Value "Serpentis"                            <-- .str line 3/3

The equation to find out how many lines you have is simple. Scroll down the very bottom of your .str file and look at the number of your last line. For me, it's 16118. Take this number, subtract 2 (for the top 2 lines), and divide that number by 3.

x = TotalLines
y = NumStrings

(x - 2) / 3 = y

so....

(16118 - 2) / 3 = 5372

This is what I do to figure it out. I just tested it with NumStrings 5400 and it works just fine, but I'm sure it's better if you are accurate!

Hope it helps.

Reply #2 Top

Is there any way to get the game to recognize multiple string files so that you can keep changes separate from the original?

Reply #3 Top

No! Only one string file at a time!

At least thats what I suppose but I'm pretty sure its that!

Reply #4 Top

Yeah you put a string file in your mod and never touch the original.