ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "CSF"

From ModEnc
Jump to: navigation, search
m (Added to category)
(Add section "Editing CSF files in Ra2CsfToolsGUI")
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
ra2.csf is the [[string file]] of [[RA2]] (ra2md.csf for [[YR]]), in which all on-screen text is saved. It is edited either with the [[XCC String Table Editor]] (by [[Olaf van der Spek]]) or with [[RA2StrEdit]] (by [[TheMatze]]).
+
{{HorizontalBar|[[Ra2.csf]] redirects here. If the part about the file itself grows large enough, move it there.}}
 +
 
 +
{{HorizontalBar|[[Image:Cc_advancedsettings.png]] If you're looking for the technical details on the CSF file format, see [[CSF File Format]] instead.}}
 +
 
 +
CSF files contain all the ingame texts of RA2 (ra2.csf) and YR (ra2md.csf). They can be edited either with [[XCC String Table Editor]] (by [[Olaf van der Spek]]) or with [[RA2StrEdit]] (by [[TheMatze]]). They can be loaded from outside a MIX file much like .ini files, if they are named stringtablexx.csf (where xx is a number from 01 to 99).
 +
 
 +
==Editing CSF files in XCC String Table Editor==
 +
[[Image:Xcc string editor1.gif|thumb|170px|Select the game]]
 +
[[Image:Xcc string editor2.gif|thumb|170px|Type in the string name]]
 +
[[Image:Xcc string editor3.gif|thumb|170px|Add the string content]]
 +
Let's say you are following a tutorial for adding a new unit... and the tutorial tells you to "add an entry {{Tt|Name:NewTank}} to the CSF file and set it to 'My New Tank'".
 +
 
 +
* Open [[XCC Mixer]].
 +
* Launch > String Table Editor > select the game.
 +
* In the left panel, select the "NAME" section.
 +
** You can actually select any section you wish, it will still get saved properly.
 +
* Click "Insert" at the bottom.
 +
* Type in {{Tt|Name:NewTank}} and hit Enter.
 +
** These strings are ''case-insensitive'', you can type in {{Tt|naME:NEWTANk}} and it would still work.
 +
* Double click on the new entry.
 +
** Alternatively, click on it and hit "Edit" at the bottom, your choice.
 +
* Type in {{Tt|My New Tank}} in the big box, and leave the bottom box empty.
 +
** These strings are ''case-sensitive'', and the text you type in here will be displayed in the same case as you entered it.
 +
* Hit "OK".
 +
* Hit "OK" at the bottom.
 +
 
 +
There you go, now your tank will be named "My New Tank" when you move your mouse over it. (This doesn't affect the cameo.)
 +
{{clr}}
 +
 
 +
==Editing CSF files in RA2StrEdit==
 +
{| align="right"
 +
|[[Image:Ra2stredit1.gif |thumb|none|170px|Open the file]]
 +
|[[Image:Ra2stredit2.gif |thumb|none|170px|The open file]]
 +
|-
 +
|[[Image:Ra2stredit3.gif |thumb|none|170px|Insert a string]]
 +
|[[Image:Ra2stredit4.gif |thumb|none|170px|Enter its name]]
 +
|-
 +
|[[Image:Ra2stredit5.gif |thumb|none|170px|Enter its content]]
 +
|[[Image:Ra2stredit6.gif |thumb|none|170px|Hit "Save"]]
 +
|-
 +
|
 +
|[[Image:Ra2stredit7.gif |thumb|none|170px|Confirm the flags]]
 +
|-
 +
|}
 +
Same thing as above, for RA2StrEdit.
 +
 
 +
*Open [[RA2StrEdit]].
 +
*File > Open > ''browse to the folder where you left your [[ra2.csf|ra2(md).csf]], select it, and click "open".
 +
*Edit > Insert string.
 +
*In the "String ID" field, enter your string's ID ({{tt|Name:NewTank}} for this example).
 +
*Hit "OK".
 +
*Now you have to scroll the string list on the left down until you see your newly added string; you can press it's first letter to jump near it (so, in this example, select any string, press "n", and scroll down until you see {{tt|Name:NewTank}}).
 +
*Make sure you have your string selected.
 +
*Enter your tank's name in the big box labeled "Content" to the right ("{{tt|My New Tank}}", in this example).
 +
*File > Save.
 +
*I have never heard of a case where the flags were set wrong, so unless you created a new .csf, just hit "OK".
 +
**If you ''did'' create a new .csf, make sure the language flag is set correctly.
 +
 
 +
Once you hit OK, your file is saved. You're done.
 +
{{clr}}
 +
 
 +
==Editing CSF files in Ra2CsfToolsGUI==
 +
 
 +
*Open [[Ra2CsfToolsGUI]] available at https://github.com/SadPencil/Ra2CsfToolsGUI/releases.
 +
*Drag & drop the ra2.csf file to the program window.
 +
*Click "Save as an .ini file..." button to save the ra2.csf file as an ini file, for example, ra2.csf.ini.
 +
*Edit the ini file with text editors. For example, to set up a label "theme:madrap" with content "Hell March", write an ini section as below.
 +
<pre>
 +
[theme:madrap]
 +
Value=Hell March
 +
</pre>
 +
*After finishing editing, drag & drop the ini file back to the program window.
 +
*Click "Save as a .csf file..." button to save the new csf file.
  
== Missing:Name:BLAHBLAH (Modifying ra2(md).csf files) (by Kravvitz)==
 
In XCC Mixer go to Launch --> XCC String Table Editor --> Red Alert 2 or Red Alert 2 YR, whether you are modding RA2 or YR. XCC String Table Editor is used to modify the ra2.csf and ra2md.csf files. First in the left column click on whichever stringtype you want to add, usually this is "NAME" because that controls the names of all units, superweapons, and buildings next click on "insert", then making sure that the string you just created is still selected, click on "edit" and in the big text box in the middle of the window that pops-up add whatever text you want displayed in game. Don't mess with the bottom text box, as far as I know it is unused. Apparently if you switch string type sections before saving, then it will delete all changes to the strings in that section. XCC String Editor only edits the RA2.CSF and RA2MD.CSF files that are in the directory in which you most recently installed RA2/YR.
 
 
[[Category:General_Editing_Information]]
 
[[Category:General_Editing_Information]]
 +
[[Category:General Tutorials]]
 +
[[Category:XCC Tutorials]]

Latest revision as of 13:48, 12 December 2021

Ra2.csf redirects here. If the part about the file itself grows large enough, move it there.

Cc advancedsettings.png If you're looking for the technical details on the CSF file format, see CSF File Format instead.

CSF files contain all the ingame texts of RA2 (ra2.csf) and YR (ra2md.csf). They can be edited either with XCC String Table Editor (by Olaf van der Spek) or with RA2StrEdit (by TheMatze). They can be loaded from outside a MIX file much like .ini files, if they are named stringtablexx.csf (where xx is a number from 01 to 99).

Editing CSF files in XCC String Table Editor

Select the game
Type in the string name
Add the string content

Let's say you are following a tutorial for adding a new unit... and the tutorial tells you to "add an entry Name:NewTank to the CSF file and set it to 'My New Tank'".

  • Open XCC Mixer.
  • Launch > String Table Editor > select the game.
  • In the left panel, select the "NAME" section.
    • You can actually select any section you wish, it will still get saved properly.
  • Click "Insert" at the bottom.
  • Type in Name:NewTank and hit Enter.
    • These strings are case-insensitive, you can type in naME:NEWTANk and it would still work.
  • Double click on the new entry.
    • Alternatively, click on it and hit "Edit" at the bottom, your choice.
  • Type in My New Tank in the big box, and leave the bottom box empty.
    • These strings are case-sensitive, and the text you type in here will be displayed in the same case as you entered it.
  • Hit "OK".
  • Hit "OK" at the bottom.

There you go, now your tank will be named "My New Tank" when you move your mouse over it. (This doesn't affect the cameo.)

Editing CSF files in RA2StrEdit

Open the file
The open file
Insert a string
Enter its name
Enter its content
Hit "Save"
Confirm the flags

Same thing as above, for RA2StrEdit.

  • Open RA2StrEdit.
  • File > Open > browse to the folder where you left your ra2(md).csf, select it, and click "open".
  • Edit > Insert string.
  • In the "String ID" field, enter your string's ID (Name:NewTank for this example).
  • Hit "OK".
  • Now you have to scroll the string list on the left down until you see your newly added string; you can press it's first letter to jump near it (so, in this example, select any string, press "n", and scroll down until you see Name:NewTank).
  • Make sure you have your string selected.
  • Enter your tank's name in the big box labeled "Content" to the right ("My New Tank", in this example).
  • File > Save.
  • I have never heard of a case where the flags were set wrong, so unless you created a new .csf, just hit "OK".
    • If you did create a new .csf, make sure the language flag is set correctly.

Once you hit OK, your file is saved. You're done.

Editing CSF files in Ra2CsfToolsGUI

  • Open Ra2CsfToolsGUI available at https://github.com/SadPencil/Ra2CsfToolsGUI/releases.
  • Drag & drop the ra2.csf file to the program window.
  • Click "Save as an .ini file..." button to save the ra2.csf file as an ini file, for example, ra2.csf.ini.
  • Edit the ini file with text editors. For example, to set up a label "theme:madrap" with content "Hell March", write an ini section as below.
[theme:madrap]
Value=Hell March
  • After finishing editing, drag & drop the ini file back to the program window.
  • Click "Save as a .csf file..." button to save the new csf file.