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

Countries

From ModEnc
Revision as of 17:19, 2 January 2006 by DCoder (talk | contribs) (Fixed typo)
Jump to navigation Jump to search

Countries and Sides

Editing/adding countries or sides is one of the most common questions asked by new modders. This should provide the necessary information regarding this subject.

RA2/YR

Basic Info

The countries are listed in the [Countries] section of the rules.ini in this format:

; PCG; WARNING; Do not remove, override or reorder the major 9 houses for skirmish
; or LAN game maps.  These need to go into the house types array first and without
; interruption by other types of houses, or we will get evil crashes.
[Countries]
0=Americans
1=Alliance
2=French
3=Germans
4=British
5=Africans
6=Arabs
7=Confederation
8=Russians
9=YuriCountry
10=GDI
11=Nod
12=Neutral
13=Special

The sides are listed in the [Sides] section of the rules.ini in this format:

; ******* Side Type List *******
; The combantants can be grouped according to side. This
; lists the sides and their respective member houses.
[Sides]
GDI=British,French,Germans,Americans,Alliance
Nod=Russians,Africans,Confederation,Arabs
ThirdSide=YuriCountry 
Civilian=Neutral
Mutant=Special

As you can see, the [Countries] list requires the countries belonging to the GDI side (allies, in this case), to be listed first, followed by countries in the Nod side (soviets), then followed by ThirdSide countries (Yuri), and then the unplayable countries (Civilian side, then Mutant).

Each country in the list also has it's own section, detailing its properties:

[Americans]
UIName=Name:Americans
Name=America
Suffix=Allied
Prefix=G
Color=Gold
Multiplay=yes
Side=GDI
SmartAI=yes
;VeteranInfantry=E1
;CostUnitsMult=.85

Some of these tags are assumed to be unused/leftovers, but it requires confirmation.

UIName= points to a CSF string which will be displayed in the country selection screen for this country.

Name= is presumably a leftover.

Suffix= is Allied for GDI side countries, and Soviet for Nod and ThirdSide. This is believed to be left over from TD/RA1.

Prefix= is G for GDI side, B for Soviets and ThirdSide. This is believed to be left over from TD/RA1.

Color= is a default color for this country. This is the default colour this country will be in a single player map, though it is often overidden by mappers.

Multiplay= is yes for countries which should be enabled in the Skirmish/Multiplayer country select menu, no for others.

MultiplayPassive= is no for countries which should be enabled in the Skirmish/Multiplayer country select menu, yes for others.

Side= decides which side's EVA/GUI/side specific actions this country should get. NOTE: the starting units/tech tree is determined by this country's listing in [Sides].

SmartAI= is yes for all countries playable in Multiplayer.

VeteranXXX= and YYYZZZMult= are detailed in more detail below.

VeteranXXX and YYYZZZMult=

You can grant some bonuses to certain countries. VeteranXXX= makes the specified unit(s) build already at veteran status. XXX can be Infantry, Unit, or Aircraft. Keep in mind that these refer to [InfantryTypes], [VehicleTypes] and [AircraftTypes] accordingly. Otherwise issues can occur.

YYYZZZMult= gives the country a specific bonus.

YYY can be one of:

Armor
Cost
Speed
BuildTime

ZZZ can be one of:

Aircraft
Units
Infantry
Buildings
Defenses

You simply concatenate these two strings, and add "Mult" to the end. Logically, SpeedBuildingsMult= and similar crazy bonuses don't work. There is also IncomeMult which is a special case that doesn't follow the above logic and affects a countries income.

(All these values are straight multipliers to default values.)

Art assets related to countries

The country flags and loading screens are actually bound to the country's index in the country list, not the country name. Here's a list of what means what:

Country index	Default country      Flag file  Loading screen file       Loading screen palette
0              Americans            usai.pcx   ls800ustates.shp          mplsu.pal
1              Alliance (Korea)     japi.pcx   ls800korea.shp            mplsk.pal
2              French               frai.pcx   ls800france.shp           mplsf.pal
3              Germans              geri.pcx   ls800germany.shp          mplsg.pal
4              British              gbri.pcx   ls800ukingdom.shp         mplsuk.pal
5              Africans (Libya)     djbi.pcx   ls800libya.shp            mplsl.pal
6              Arabs (Iraq)         arbi.pcx   ls800iraq.shp             mplsi.pal
7              Confederation (Cuba) lati.pcx   ls800confederation.shp    mplsc.pal
8              Russians             rusi.pcx   ls800russia.shp           mplsr.pal
9              YuriCountry (Yuri)   yrii.pcx   ls800yuri.shp             mpyls.pal

All of these names are hardcoded via array data in the executable itself.

Text assets related to countries

  • The country list you see in the country selection screen is not hardcoded - it builds a list of all countries in the order you list them in the [Countries], using their associated UIName=s.
  • The tooltips ("Britain can train Snipers, USA can drop paratroopers, etc") are hardcoded. Actually, the CSF file data names are. (#1 is loadbriefshort: USA, #2 is loadbriefshort:korea, etc.) It does not obey the [Countries] ordering.
  • The loading screen's top string name is hardcoded the same way. #1 is name:apara, #2 is name:beagle, etc. If you modify the units, you need to modify these strings too.
  • The lower string in the loadscreen is also hardcoded. #1 is loadbrief:usa, #2 is loadbrief:korea, etc.
  • The country name in the lower right corner of the loading screen is hardcoded. It does not follow the [Countries] ordering. #1 is always name:americans, #2 is name:alliance, etc.

In conclusion, if you reorder the [Countries] list (which is almost a necessity if you intend to switch some sides), you will need to work extensively on making it look correct. To do that, you have several chances:

  • A. Make all [Country_Name] sections point to completely different Csf strings. Like name:country0, name:country1, name:country2, etc. Then adjust these names, and correct all the original Csf entries which are used by countries you moved in the list. This means you'll have to adjust 1 extra Csf entry for each country.
  • B. Swap the UIName= entries of the Countries so that the first country on the list gets the name:Americans entry, the second gets name:Korea, etc. Then correct them to say the correct things. This means you'll only need to adjust the CSF for the countries you moved around.
  • C. See the last section.

Editing hardcoded elements

All the previously mentioned "hardcoded" items can be modified in the exe. For example, it is possible to patch the exe to take different flag names (even flg0.pcx, flg1.pcx etc.. would be better IMO) , [which is a 10 second job], and different CSF strings. But this way, you need to distribute a patcher with your mod, which bites. And can interfere with The Project's patcher, or uninstalling the mod.

TS

I have no experience in TS modding, so somebody else will have to fill this in.