Overriding INI Files

Tutorial for Command & Conquer 3 C&C3

Avatar of Mastermind


Category: Code
Level: Expert
Created: Thursday August 23, 2007 - 20:43
Updated: Saturday May 5, 2012 - 17:40
Views: 8175
Summary: How to override INI files in C&C 3 with the Mod SDK, featuring the removal of a faction.
  • Staff3.0
  • Members3.5
  • Average3.3/5.0

3 votes

This tutorial will explain how to override the remaining INI files used by C&C 3 with the Mod SDK. It is a fairly straightforward process, but requires building the correct directory structure.

First, you will need the INI files. To get them, please refer to this tutorial which covers using OS Big Editor to extract the files. Once you have a copy of the INI file which you would like to edit (in this case, playertemplate.ini), open it with your favorite text editor. Locate the section that begins with PlayerTemplate FactionNOD, and delete everything starting with that until the line which contains End. The section you are removing should look like the following:               
PlayerTemplate FactionNOD
    Side             = NOD
    PlayableSide             = Yes
    StartMoney             = 0
    MaxLevelMP                    = 32
    MaxLevelSP                    = 78 ;80
    PreferredColor                = R:213 G:0 B:0
    PreferredCampaignRadarColor    = R:255 G:0 B:0
;    PreferredColor                = R:43 G:43 B:179
    StartingBuilding            = NODConstructionYard    
    PurchaseScienceCommandSet    = GoodSpellStoreCommandSet
    PurchaseScienceCommandSetMP    = MenSpellStoreCommandSet
    DisplayName                    = INI:FactionNOD
    DefaultPlayerAIType            = MenSkirmishAI
    BeaconName                    = MultiplayerBeacon
    LoadScreenMusic                = TEMP_RAM_Music360_LoadScreen ; If you change this, remember it must be a RAM-based (no-stream) piece of music
    SkirmishMPVictoryMusic        = CNC3_SUCCESS_EVIL
    SkirmishMPDefeatMusic        = CNC3_FAILURE    
    InitialUpgrades                = Upgrade_NODFaction
    ResourceModifierObjectFilter = RESOURCE_MODIFIER_OBJECT_FILTER
    ResourceModifierValues        = 100 100 100 100 100 100 95 90 85 80 75 71 68 66
    MoneyCapSP                    = 3000
    MoneyCapMP                    = 3000
    SpellBook                    = PlayerSpellBook
    SpellBookMp                    = PlayerSpellBook

Once you have removed that, save your file to a location you can easily find it.

The final step is placing the edited PlayerTemplate.ini file in the correct location. You will need to open up the directory you have installed the Mod SDK into. The default is C:\Program Files\Electronic Arts\Command & Conquer 3\MOD SDK\
From there, you will need to open the BuiltMods folder, and then the Mods folder. If you have previously built your mod, you should find a folder within the Mods folder that is the name of your mod. Open it. Then open the Data folder, and create a new folder called INI. Place your edited INI file in the INI folder, and rebuild your mod.

Why does this work? The Makebig.exe places all of the files in the BuildMods\Mods\ModName folder into the ModName.big file, keeping the directory structure intact. This means that within ModName.big, you will find a Data\INI folder with your edited INI file. This matches the structure the game expects, and allows it to override the default INI file with your edited INI file.

Return to top