Command & Conquer™ Remastered Collection

Command & Conquer™ Remastered Collection

Command & Conquer™ Remastered Collection Workshop
Create, share, and play mods for a custom C&C experience! A new Map Editor is also included. Welcome back, Commander.
Learn More
DDF3 40 Oct 21, 2020 @ 6:07am
ModText.csv
I made a ModText.csv file

"TEXT ID","AUDIO TAG","CHARACTER","ENGLISH","UNITED_KINGDOM","GERMAN","FRENCH","SPANISH","ITALIAN","JAPANESE","KOREAN","CHINESE","RUSSIAN","POLISH","THAI","CZECH","TURKISH","PORTUGUESE","HUNGARIAN","DUTCH_NL","ARABIC","ROMANIAN","CHINESE_TAIWAN"
"TEXT_RA_TUTORIAL_MESSAGE_1",,,"Hi There.","","","","","","","","","","","","","","","","","","",""
"TEXT_RA_TUTORIAL_MESSAGE_209",,,"Hi There.","","","","","","","","","","","","","","","","","","",""

I got the text lines from MASTERTEXTFILE_EN-US.LOC

I put this in the Mods\Red_Alert\ModifyText\Data folder . Made a ccmod.json file and put that in the modifytext directory

{
"name": "Modify Text",
"description": "Modified Text",
"author": "ME",
"load_order": 1,
"version_low": 0,
"version_high": 1,
"game_type": "RA"
}

Also tried moving things around to a Data\TEXT folder and changing the json file load order to 2

I can turn the mod on and off .

But i still cant get it to work any ideas ?
< >
Showing 1-10 of 10 comments
Karl Jan 9 @ 11:46pm 
1. How you opened the "MASTERTEXTFILE_EN-US. LOC"?
2. Why you put the code into "ModText.csv"?
3. Can you change text format of your Tutorialmessage? Using Colours, Emojis, letter size, ...
Nyerguds 8 Jan 10 @ 12:32am 
1. By using OS Big Editor 64 bit, and looking through the game's .meg archives.
2. That's not 'code'. And, it's used because that's the way to override specific text in the game without needing to include all the entire edited strings files. It also has the advantage that it can override one string for multiple languages.
3. I doubt it. Colour options are given to the text through the game code that displays them IIRC. You could check if certain things (construction descriptions maybe?) use bold or italics formatting; if they do, it might be supported. But I doubt it.

This thread has a bunch of useful info, and the link to OS Big Editor:

https://answers.ea.com/t5/Other-Command-Conquer-Games/What-Filetype-do-MOD-s-use/m-p/9210176
Last edited by Nyerguds; Jan 10 @ 1:06am
Karl Jan 10 @ 8:26pm 
1. a) You described how to extract the .LOC file, but i want to know how to open it. I use "String Editor", but don't trust the program. Can't open the file directly, can only converting in a useless .VDF. Marking all lines, copy and insert into a Textfile, don't work correct for a non-english keyboard layout user.
b) Witch character codes (ASCII, ANSI, Unicode) the untuched .LOC is using?

2. a) "Code" = i mean the content from the .LOC file. I recognize the "TEXT ID"-commands, he copied.
b) How you converting the file into a other notepad usefull file?
c) My point with the "Why as .CSV file?" question was: Is this the most userfriendly option? I saw on other source, than you can also converting it into .XML (in UTF-8-BOM). Maybe the are existing more.
https://github.com/BeForU/CnC_Remastered_Korean

3. "game code" = means i need higher programming skills than change a line in a textfile? Ok, than iam out.
I tested in buildmenue the 3x BB-Codes + HTML colour = nothing worked. And only 10% of the Emojis i tryed, worked: ⚔️☺️☹️☠†✈⚓•
Last edited by Karl; Jan 10 @ 8:29pm
Nyerguds 8 Jan 11 @ 11:42am 
1. That's a good point. I assumed it would just be plain text, but I'm confusing it because for my own purposes (specifically, upgrading the map editor[github.com]), I adapted the code of the map editor to make it write the whole thing into one big text file.

So yea, I saw it as plain text file, but that was indeed not the original file. I didn't do it for modding purposes, though; I was trying to match these string IDs to their classic counterparts in the original 90s games (to make the editor work without the remastered files, which I eventually achieved). I could upload that dump file somewhere though I guess.

2. The text encoding used by the CSV file is UTF-16-LE. I should probably edit that into that post on the EA help forum. (Note that "Unicode" isn't a text encoding. Unicode is just the general system of assigning a value to each symbol. Text encoding defines how these values are saved to a file as bytes)

3. Well, the program code is what determines how it's put on the screen, of course. But only the old classic code was made open source, and all things on the high res UI are ultimately managed by Petroglyph's proprietary GlyphX engine, so it's possible that that part can't be affected anyway. If I remember correctly, the only way in which the old code can affect it is by telling the GlyphX part which colour the message should be in.
Last edited by Nyerguds; Jan 11 @ 2:28pm
DDF3 40 Jan 11 @ 3:38pm 
Holy this is an Oldie Post ,


Ok first off , i found out the reason why the file above did not work. It was because the file type was saved in UTF8 format and not in Unicode,
The file although it has the correct characters in it , it does not contain all of the required Bytes .

If you use notepad and have a proper ModText.csv file in it you can basically rewrite all of the file and it will be saved as Unicode. But if you start a totally new file in notepad it will save it as UTF 8


You can use RE Mod Creator http://www.blacknails.com if you want to make Modtext.csv files pretty easily, Though it does work best on Red Alert tutorial lines.

I started making a new Mod creator ,but haven't finished it, it does a better job and is easier to use
Karl Jan 12 @ 1:59am 
@ both
1. Is somehere a list for the commands, you can use in the .CSV? "&&"=&, "\n"=line, break are the only i knew.
2. a) Can you add/change the number of usable lines you see in game? (When you hover over structures & untits, the their names and into build menue). It's limited to hard.
The the number of lines for superweapons discriptions are not all equal. And they all don't start with a automaticly line break.
b) Line breaks in names, when you hovering mouse over them (on the finished buldings/units models), generally don't work. I tested with the "\n"-command. But in the buildmenue it works correctly.
3. Can you change the order the structures & untis are displayed in buildmenue? Plus, i want a 100% fix order! When new things are unlocked, i want prevent they are only added to the last one in the menue.
4. Nice bonus would be, able to add empty cells. So you can see easier when a "category" ends and a new starting.
5. It's possible to add the "one picture over a other" mechanics into build menue? I see in the MT_COMMANDBAR_COMMON.TGA, there are pictures (of the different factions) with transparent background.
6. Any idea why the devs using incorrect nuclear sign for atom bomb (in the superpower build menue)? Never saw it. The emolition truck buildmenue & ingame animation has the correct one.
https://static.wikia.nocookie.net/cnc_gamepedia_en/images/c/c3/RAR_Atom_Bomb_Cameo.png
https://static.wikia.nocookie.net/cnc_gamepedia_en/images/0/00/RAR_Demo_Truck_Cameo.png

@ Nyerguds
7. You are sure the correct text encoding is UTF-16 LE? I have UTF-16 LE BOM.

@ DDF3
8. How can i find out when you publish the new program?
9. Are you the author of "RE Mod Creator" ?
a) I don't think the, "creating Modtext.csv file", feature works generally. It's using wrong text encoding. If you use the given MASTERTEXTFILE_EN-US.LOC, you can open the .CSV with Nodepad++ and try the buttons "coding"---> "converting to UTF-16-LE BOM". Maybe you are lucky and get no errors (for example with special characters).
b) It's not compatible with non-english languages:
The link to the MASTERTEXTFILE_*.LOC is changeable in ...\re_mod_creator_2_4\REModData\Conf.txt. But its gives you a error at starting, when you change it to other language file. Thats because the link to the file is written in the Re_Mods.exe, too. It's limited on the english language only. The MASTERTEXTFILE_EN-US.LOC (It's in Line 9521). If you change the name of the language you want open, in ...\re_mod_creator_2_4\Data manually to EN-US, you get wrong letters and can't use it.
I thinks its because the program using UTF-8. When you click on the buttons "ModText.csv" ---> "Save ModText File" it exporting in UTF-8.
Last edited by Karl; Jan 12 @ 2:27am
Originally posted by Karl:
1. Is somehere a list for the commands, you can use in the .CSV? "&&"=&, "\n"=line, break are the only i knew.
Ah, these are special escaped characters. The ones with \ basically represent characters that exist, but are either not possible to type on a keyboard, or can't fit in the syntax in a programming language. It is just standard Windows strings stuff as it is used in the Microsoft .Net programming framework. The "\n" one is probably the only useful one.

Technically a line break is "\r\n". This is an odd DOS/Windows quirk, whereby a line break is two bytes (0D and 0A; values 13 and 10); originally the two commands "carriage Return and "liNe feed" which respectively mean "return to the start of the line" and "go down a line"; a leftover of the double action required on old mechanical type writers. On unix operating systems, only "\n" is used, and on Macintosh ones, it's just "\r". On Windows user interface stuff, as you said, just "\n" generally works fine. Any other \ codes like it are similar special control characters, most of which haven't had any real function since the old DOS days.

The only other usable character like it that I can think of is "\t" for a 'tab' character, but how much spacing a tab character gives on a Windows UI label is kind of undefined, so I doubt it'll be useful in any way. Another one is \0 for the null character (Unicode symbol 0), but that one should never be used. In programs written in C and C++ , it is used in program memory to indicate the end of a piece of text, but it should never be explicitly used inside the text. I'm assuming GlyphX is C#, and I doubt it'd show anything at all there.

The ampersand thing is actually an annoying quirk in Windows UI where a single ampersand is used to indicate, on things like menu links, that the next character is the shortcut for the indicated function. Like, if you have an "Open File" menu somewhere, the menu option's text will be stored as "&Open File" so the "O" at the start is underlined. Press "alt" (or alt+F if there's a "File" menu) in any program, and then the down arrow, and you should see these underlined letters on the menu options. The double ampersand is simply a way to still be able to use a real ampersand character despite that system.

In programs I write, I never let this quirk bleed through into the strings files; I just make sure to preprocess any strings ending up on such UI elements to compensate for this by doubling the ampersands.

Originally posted by Karl:
2. a) Can you add/change the number of usable lines you see in game? (When you hover over structures & untits, the their names and into build menue). It's limited to hard.
The the number of lines for superweapons discriptions are not all equal. And they all don't start with a automaticly line break.
b) Line breaks in names, when you hovering mouse over them (on the finished buldings/units models), generally don't work. I tested with the "\n"-command. But in the buildmenue it works correctly.
That depends entirely on the internal programming of these things, which, as mentioned, is not even in the open-source part of the game engine. So, we can't change it, and we can't even look into how it works.

Originally posted by Karl:
3. Can you change the order the structures & untis are displayed in buildmenue? Plus, i want a 100% fix order! When new things are unlocked, i want prevent they are only added to the last one in the menue.
I know there is a sorting function for sidebar icons in the game engine (the open source part), but it is unused. When the game was remastered, there were some discussions about that (I was there; I was part of the Community Council), but ultimately the team decided to retain the order-of-unlocking logic, so the gameplay feel wouldn't be changed too much.

The actual order of the units and buildings (as in, the order of things that are unlocked together) might be determined by their internal IDs, which can probably be juggled around in the old game engine, but I don't know if that will have any odd side effects. And again, that would require actual programming.

If that stuff bothers you, I suggest you learn to use the build shortcut keys instead; they never change.

Originally posted by Karl:
4. Nice bonus would be, able to add empty cells. So you can see easier when a "category" ends and a new starting.
Uh, the stuff is already divided into four categories which didn't exist before; they're the four tabs. And again, any behaviour on the GlyphX UI is pretty much unmoddable. There are a bunch of xml files that control a lot of that stuff, but I doubt they can affect things that are actual programmed behaviour.

Originally posted by Karl:
5. It's possible to add the "one picture over a other" mechanics into build menue? I see in the MT_COMMANDBAR_COMMON.TGA, there are pictures (of the different factions) with transparent background.
Not sure what you mean exactly, but again, that's in the closed-source part of the engine, and thus, probably impossible to mod.

Originally posted by Karl:
6. Any idea why the devs using incorrect nuclear sign for atom bomb (in the superpower build menue)? Never saw it. The emolition truck buildmenue & ingame animation has the correct one.
https://static.wikia.nocookie.net/cnc_gamepedia_en/images/c/c3/RAR_Atom_Bomb_Cameo.png
https://static.wikia.nocookie.net/cnc_gamepedia_en/images/0/00/RAR_Demo_Truck_Cameo.png
Because that's how it looked in the original game. If you want the reasons behind that, I dunno, go back in time and ask Westwood.

https://cnc.fandom.com/wiki/Nuclear_missile_silo_(Red_Alert_1)#Cameos

The symbol looks like it's an odd mix of the inverted nuclear symbol (which is an official symbol btw, though I couldn't find much info about it) and the symbol for fallout shelters.

https://commons.wikimedia.org/wiki/File:Nuclear_symbol.svg
https://en.wikipedia.org/wiki/File:United_States_Fallout_Shelter_Sign.svg

Originally posted by Karl:
@ Nyerguds
7. You are sure the correct text encoding is UTF-16 LE? I have UTF-16 LE BOM.
"BOM" is the Byte Order Mark at the start of the file; a series of bytes that identify the encoding to the system that reads it. It's not actually part of the text encoding definition, and it's generally implied to always be there on UTF-16. Only insane (or ignorant) people would ever write UTF-16 text files without a BOM.

It's only optional on UTF-8 because UTF-8 is compatible with ASCII on the Unicode range below value 128.
Last edited by Nyerguds; Jan 13 @ 4:25pm
Oh, I just realised there's another special character I forgot to mention, but its handling depends on the implementation, so I'm not 100% sure how it will be treated here. That character is the " double-quote character.

Inside strings in programming, this is generally escaped as \", however, inside the CSV format, if the text field itself is surrounded by quotes (as these are), it's normally indicated by doubling it. I'm assuming this is how it's done here, too. So to put this sentence inside the CSV:

"Hello, world," he said.

...it would need to look like this:

"""Hello, world,"" he said."
Last edited by Nyerguds; Feb 9 @ 9:36am
Karl Mar 24 @ 5:49pm 
Is there any example for a sucsessfully working multilingual file(s)?
In my attempts, in game it only displays the text for the language witch is set in the first place of the file. I tested it with 1x .CSV file, with more .CSV files with separated languages and the same with .XML files.
Never worked for me either. Only the english field is working. Guess it is just another bug in the glyphx engine we have to live with.
< >
Showing 1-10 of 10 comments
Per page: 1530 50