What Filetype do MOD's use

by GENERALZOOL
Reply

Original Post

What Filetype do MOD's use

★ Pro

This might sound dumb, but what do I need to make a MOD into.

Previously, I would play on my own, so it wouldn't matter just slapping the Raw files (Rules.INI) into the directory of my game. I know for compiled MOD's, it was meant to be .MIX files.

 

So, what do I need to do now, can I just grab the Raw file Rules.INI and slap it in (unlikely), or do I need to compile into a .MIX file first. If it's a .MIX file, then what does that file need to be called (as it used to be things like Expand99 and so on).

 

All I really want to do is just add a MOD that adds the ANT Cameos to the game.

Message 1 of 23 (7,437 Views)

Re: What Filetype do MOD's use

[ Edited ]
★★ Apprentice

@GENERALZOOLAlthough i have no solution, i really like to know that aswell and want to support your request. We need documentary and may be an example how to proceed with custom mods.

Message 2 of 23 (7,383 Views)

Re: What Filetype do MOD's use

[ Edited ]
Hero

@GENERALZOOL 

@CNCJack_TD 

I've been looking into this, but I don't have many answers yet...

 

The basics is, you go to your Documents folder, open the "CnCRemastered" folder in there, go to "Mods", and pick your game ("Tiberian_Dawn" or "Red_Alert")

 

In the correct folder, make a folder for your mod, and name it something identifiable, like, say, "BuildableAnts"

 

Now, under that you'll need 2 things: a "ccmod.json" file, and a "data" folder.

 

The "ccmod.json" file is plain text. This is what is expected inside it:


{
    "name": "My Mod Name",
    "description": "This does mod stuff.",
    "author": "Me",
    "load_order": 2,
    "version_low": 0,
    "version_high": 1,
    "game_type": "RA"
}


In that, edit the name, description, and author. For "game_type", you need "TD" for C&C1, and "RA" for Red Alert.

 

The "load_order" is a bit special; normally this is put on 1 for mods that change the core DLL (more on that later), and 2 for mods that only change assets. This basically means core engine changes take precedence over asset mods, since you can obviously only have one core gameplay engine dll file. Asset mods can be stacked on that.

rules.ini mods are a bit of an odd case here; they change core behaviour but are not a dll. I'm honestly not sure what to put in there for them.

 

In the "data" folder will come all your mod assets. For replacing existing assets, and for seeing how the internal assets are structured, I advise you to download OS Big Editor:

https://www.ppmsite.com/osbigeditorinfo/

 

This program can open all the .meg files in the "data" sub-folder in the game's install folder. Once you open a file there, you will see all assets internally are in directory trees that start with a "data" folder. Well, this is the same "data" root you made in your mod folder. So just build on that, as indicated in the .meg files. If you extract multiple assets from OS Big Editor (select them in the tree, then go to Edit -> Extract), and select the root folder of your mod (not the "data" one, the one below that) you'll see OS Big Editor will create the entire folders tree for you, which is really handy.

 


 

The graphical assets in the .meg files use two formats... well, three, actually, if you distinguish internal types.

 

The first is 32-bit .tga files, used for all structures and units, and icons too I think. I haven't really looked into that yet. Editors like Gimp should have no problems with opening and writing that format.

 

The second type is .dds; DirectDraw Surface files. These are actually scalable textures, which save smaller versions of itself internally inside one file for very quick texture scaling, or, in the remaster's case, zooming. There are two types of dds files; the 32-bit type with transparency, used for terrain decorations like trees, and the 24-bit type, without transparency, used for terrain tiles.

 

Gimp has a plugin for opening DDS files here:

https://code.google.com/archive/p/gimp-dds/

To use it, you find your Gimp install folder, go into the "lib\gimp\2.0\plug-ins" folder, make a new folder named "dds" and dump the contents of the plugin ("dds.exe" and "readme.txt") in there, and then restart Gimp.

 

I did notice Gimp's saved DDS files were not readable by the game though. Maybe I just did something wrong, I dunno, but in the end, I stumbled on this Nvidia toolset that did the trick:

https://developer.nvidia.com/gameworksdownload#?dn=dds-utilities-8-31

 

They're command line tools, but they do the job well. I just saved my edited tiles as png, and then used this command to convert them to usable Remaster tiles:

nvDXT.exe -24 dxt1c -quality_production -file *.png

 

Note that .dds files, as mentioned, contain smaller resized versions of themselves. For this conversion, however, you should completely ignore that; you only need the full-sized frame saved as png, and the above command will convert it to a correctly working terrain tile. It generates the smaller internal versions automatically.

 

For the trees and bibs and such, it needs alpha blending, so you'll need to use -32 rather than -24. The full command line becomes this:

nvDXT.exe -32 dxt5 -quality_production -file *.png

 


 

This is about as far as I got. Some useful hints for further modding:

 


 

Any legacy items are read from a "ccdata" folder directly under the mod folder (so in the same folder that "ccmod.json" and the "data" folder are in). This includes "rules.ini", so that allows easy oldskool rules modding. Note that the legacy assets in the Remaster's own installed files are under a "cncdata" folder. This mod folder is "ccdata", not "cncdata"; don't confuse the two.

 

Items in this folder obey the same rules as modding did in the original games. This means that most graphics assets you add here will needs to be in an sc*.mix file for the game to read them.

 


 

To actually add entirely new art assets, they need to be defined in the game's xml definition files. Those control the GlyphX user interface part, which acts independently from the old game core, and needs information to display everything concerning all units and structures. I don't know where those are located in the .meg files, but I know that under "data" they end up in an "xml" folder. The main data definitions file is "GameObjectFiles.xml", and it will tell you that one of the loaded files is "Objects\Units\RABuildables.xml". I believe that is the file which you would need to edit to add filenames for the build icons for the ants, but the folder in which those assets need to be put should follow the pattern used by the game's other assets, as seen in the .meg files.

 


 

You can add a "ModText.csv" in the mod's "data" folder to define custom text to be used in the user interface. Text in the Remaster is defined for all languages at once. I don't know if there are any examples of the format to be found in the game internally. The data is basic comma separated file format, but you need to make sure the file is saved in the text encoding "UTF-16-LE", with BOM (byte order mark).

 

The first line defines the columns:


"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"


As you see, that's basically the text ID, some internal data you probably don't need, and then a list of languages. There seem to be more in there than the Remaster officially supports... not sure what's up with that.

 

Anyway, every comma in a CSV will define a column end. A build description for the ant could look like this:


"TEXT_UNIT_ANT1_DESC",,,"The Warrior Ant has a strong corrosive bite that makes short work of heavy armor.","","","","","","","","","","","","","","","","","","",""

This example defines the text for English only (4th column). If you want to be nice to other-language users, but don't know the language, at least copy the same thing over into all other columns so it's not just empty.

 

The first column, "TEXT_UNIT_ANT1_DESC", needs to be added under the ANT1 entry in the aforementioned "RABuildables.XML" to be used. You'll see when you open the file and look around a bit.

 


 

If you want to dig into deeper modding than what rules.ini can offer, you can edit the game's actual program core using the source code released by EA. You can find that here:

https://github.com/electronicarts/CnC_Remastered_Collection/

I'm not going to give any help on that here; some guides are already out, so, check those:

https://ppmforums.com/topic-48415/step-by-step-on-how-to-create-petroglyphs-nuke-tank-td/

 

When you compile the project, you will end up with a "RedAlert.dll" file. This file is simply put into the "data" folder under your mod folder.

 


 

Welp. That's all, folks!

 

I linked to ppmsite before in this guide, well; there's a whole modding forum there. So if you need more in-depth info on any of that, I'd say look around there a bit:

https://ppmforums.com/forum-1073/cc-remastered-collection-editing-forums/

 


Like a lot of people helping out around this place, I am a volunteer, not an EA employee. I'm just here to help. If my answer helped you, please give XP. And if an answer solved your problem, be sure to accept it as solution.
I will not help with game questions sent as private messages; those questions belong on the boards where everyone can see my answers.
Message 3 of 23 (7,374 Views)

Re: What Filetype do MOD's use

★★ Apprentice

wow that is a lot of stuff to leaen, but i am willing to have a look at it.

 

Actually i am going to try make something simple. Adding additional Warheads / Armor Classes - something like that. Would be a nice upgrade for Rules-Modding.

 

Thx for your advice.

Message 4 of 23 (7,343 Views)

Re: What Filetype do MOD's use

[ Edited ]
★ Pro

@Nyerguds
Well, it's a start, I appreciate your swift response.

It looked like my OSBig Editor was out-of-date, so thanks for leaving a link to the updated version.

I would just have one quick question, what is the Cameo Size these Days?

 

Edited (added content):

As I'm only making a simple Cameo addon, would I really need to go to the extent of making a DLL file (since the units themselves already exist, just need Cameo's).

Message 5 of 23 (7,320 Views)

Re: What Filetype do MOD's use

[ Edited ]
Hero

@GENERALZOOL 


I would just have one quick question, what is the Cameo Size these Days?


No idea. Look up the ones in the game with OS Big Editor and find out?


As I'm only making a simple Cameo addon, would I really need to go to the extent of making a DLL file (since the units themselves already exist, just need Cameo's).


No, as I said, that's all defined in those xml files.


Like a lot of people helping out around this place, I am a volunteer, not an EA employee. I'm just here to help. If my answer helped you, please give XP. And if an answer solved your problem, be sure to accept it as solution.
I will not help with game questions sent as private messages; those questions belong on the boards where everyone can see my answers.
Message 6 of 23 (7,268 Views)

Re: What Filetype do MOD's use

★ Pro
@Nyerguds

I haven't actually found the Cameos in the MEG files yet, any idea where they would be. Anyone found them yet, I haven't (got a little lost looking for them).

So you're saying I need make a DLL file even though the only bit of code that might need looking at is Cameo/Image listed under units ANT1/ANT2/ANT3.

I don't know, but maybe I'm looking in the wrong place, but the MEG files I've looked at have not mentioned ANT1/ANT2/ANT3, only the ANT Missions.
Message 7 of 23 (7,244 Views)

Re: What Filetype do MOD's use

[ Edited ]
Hero

@GENERALZOOL wrote:
So you're saying I need make a DLL file even though the only bit of code that might need looking at is Cameo/Image listed under units ANT1/ANT2/ANT3.

What part of "no" don't you understand? I said the exact opposite! All you need are the xml files for that stuff!

 

As for the MEG files, I'm not sure tbh. Just look around a bit?

 

Once opened, right click in the tree and select "collapse all", so you can more easily browse the folders inside without getting overwhelmed.


Like a lot of people helping out around this place, I am a volunteer, not an EA employee. I'm just here to help. If my answer helped you, please give XP. And if an answer solved your problem, be sure to accept it as solution.
I will not help with game questions sent as private messages; those questions belong on the boards where everyone can see my answers.
Message 8 of 23 (7,206 Views)

Re: What Filetype do MOD's use

★ Pro
@Nyerguds
I miss-read the context of that prior post back there, my bad, LOL.
Message 9 of 23 (7,194 Views)

Re: What Filetype do MOD's use

[ Edited ]
Hero

@GENERALZOOL wrote:
I haven't actually found the Cameos in the MEG files yet, any idea where they would be. Anyone found them yet, I haven't (got a little lost looking for them).

I don't know, but maybe I'm looking in the wrong place, but the MEG files I've looked at have not mentioned ANT1/ANT2/ANT3, only the ANT Missions.

Uh. I thought the whole issue was that ants don't have them in the first place... so looking for the ant cameos seems rather useless Raised eyebrow

 

Anyway, seems cameos in the original remaster archives are not separate files; they're inside a megatexture TGA file inside "TEXTURES_SRGB.MEG".

 

The file inside is DATA\ART\TEXTURES\SRGB\MT_COMMANDBAR_COMMON.TGA

 

The actual cameo images in there seem to be 343x258 in size.

 

But there are already examples out there of how to mod in your own cameos; check out the example nuke tank mod or the Funpark mod for TD.

 


Like a lot of people helping out around this place, I am a volunteer, not an EA employee. I'm just here to help. If my answer helped you, please give XP. And if an answer solved your problem, be sure to accept it as solution.
I will not help with game questions sent as private messages; those questions belong on the boards where everyone can see my answers.
Message 10 of 23 (7,131 Views)