This is a small tutorial on how to get your
own mod to use the Capture Pack, this same tutorial is found in the readme
file upon downloading the pack. This tutorial is in the form of a step-by-step process to
make it as easy as possible for other mods to incorporate the pack.
Step 1: Downloading
First off you need to download this
pack (latest version is available here).
The only file you need to activate the Capture Pack graphics within your mod
is ECACHECAPTURE.MIX. Copy
this file and include it within your mod when you distribute it. The naming of the file is
unique so it will not conflict with any other mod files you may have.
Step 2: Notes Before We
Begin
Now comes that hard part, you have
successfully included the graphics for the Capture Pack within your mod, now
you need to activate the logic so it works correctly. This is where certain issues arise:
Your own additional units your
mod may include are obviously not covered by this pack and will not see any changes since
there are no graphics for them. Should you want to make your units have modified versions,
you need to modify the graphics of your voxels and produce duplicates of them, each
duplicate with a different colour scheme. The naming convention is as follows (where xxxx
is the ID for your unit):
Gxxxx - Allied Colour Version
Nxxxx - Soviet Colour Version
Yxxxx - Yuri Colour Version
You do need to remember that your normal unit is still in your own .mix files, and so you
only need to provide duplicates of the two other sides that the unit is not available for.
For example lets say you added in the Chrono Prison to the Allies with your mod, and it's
ID was CHRP. You will
need to extract out all the voxel and hva files relating to that unit and duplicate them
again, so there is now two copies (three including the copy still normally inside your mod
files). These other two copies are the Soviet and Yuri versions of the unit. After
modifying the units appropriately, rename the duplicates so they correspond to the naming
convention above. So the Soviet versions of the CHRP becomes NCHRP, and Yuri's become YCHRP. Place these modified voxels of your own inside the ECACHECAPTURE.MIX file.
Note: Even though there are restrictions of units in the Capture
Pack, in the ECACHECAPTURE.MIX file there are some recoloured versions of the units I am not
using anyway, just in case that in your mod you may want to use them unlike the normal YR.
The other issue is the overload
bug in Yuri's Revenge which hinder the [VehicleTypes] list so no buildable unit in the game can be numbered higher than
101. Because since you add in two new duplicate units, you need to add in two new entries
into that list. Overall the normal Capture Pack so far requires around 40
new entries into that list, that will become more if you want to add in your own. By
default with the normal RULESMD.INI file, you will end up going over 101 units and so screwing up the AI's
producing facilities, which cannot be allowed to happen. The way to solve this is to stick
ALL normally unbuildable units over 101 in the list (this includes civilian units,
placeholder units, unloading Ore Miner units etc). After doing this you will find you have
a lot more space now to add in new units, for me I was not able to start number at 45 up
to 100, which have me 55 extra unit placings. Remember these numbers are from the default RULESMD.INI file, your mod may
have included more units so you have a larger number of buildable units, and a larger
number of duplicate entries needed. Do some calculations to find out exactly how many new
units you intend to add in through the Capture Pack, if you run out of
space, you will have to sacrifice some. Also remember certain Capture Pack
units are aircraft, and go under [AircraftTypes] instead, which has no problems. This is a real annoying issue
with Yuri's Revenge.
You will also need to take note
that certain units in the Capture Pack have alternate cameos, but not all.
As updated versions are released more cameos will also be released. Cameos are done in the
same way as voxels, and uses the same naming convention. If you wish to add in your own
modified cameos, follow the same steps above and deviate accordingly. Extract out your
normal cameo file, duplicate it once more so you have two copies of the cameo (and veteran
cameo if necessary), then modify those two to suit your needs, and rename them adding in
the certain prefix of the two additional sides that will now be receiving that unit (G, N or Y). Again
place these modified cameos inside the ECACHECAPTURE.MIX file for easy reference.
Step 3: ARTMD.INI
Editing
Right, now that you have done any
modifications you need to your own voxel files you may wish to add into your mods version
of the Capture Pack, it is time to do the .INI editing to activate the
duplicate units! Let's start with the ARTMD.INI file. Open your mods version of the ARTMD.INI file and go to the vehicle art section. You will see a section for each
unit in the game organized under their ID's. For the units you have included in the Capture
Pack of your mod, you will need to duplicate the certain unit's section twice,
covering the other two side's colour schemes of the unit that doesn't normally build the
unit. Now the ARTMD.INI file
also defines what cameo the certain unit uses, so in the example below, let's say I am
duplicating the Rhino Tank to include the Allied and Yuri versions that in the ECACHECAPTURE.MIX file, and also defining
the alternate cameos since the current Capture Pack includes alternate Rhino
Tank cameos:
The Normal Rhino Tank entry is
here:
[HTNK] ; Rhino heavy tank
Voxel=yes
Remapable=yes
Cameo=HTNKICON
AltCameo=HTNKUICO
PrimaryFireFLH=150,0,100
;GEF;UseTurretShadow=yes
;GEF;PBarrelLength=250
;GEF;SBarrelLength=250
;GEF;TurretOffset=-16
;GEF;WalkFrames=15
And now you duplicate it twice
underneath so it accommodates the Allied and Yuri versions of the unit:
[GHTNK] ; Rhino heavy tank - Allied Version
Voxel=yes
Remapable=yes
Cameo=GHTNKICON
AltCameo=GHTNKUICO
PrimaryFireFLH=150,0,100
;GEF;UseTurretShadow=yes
;GEF;PBarrelLength=250
;GEF;SBarrelLength=250
;GEF;TurretOffset=-16
;GEF;WalkFrames=15
[YHTNK] ; Rhino heavy tank - Yuri
Version
Voxel=yes
Remapable=yes
Cameo=YHTNKICON
AltCameo=YHTNKUICO
PrimaryFireFLH=150,0,100;GEF;UseTurretShadow=yes
;GEF;PBarrelLength=250
;GEF;SBarrelLength=250
;GEF;TurretOffset=-16
;GEF;WalkFrames=15
Now repeat this process for all the
units that the Capture Pack adds plus any additional units you may have
included specifically for your mod. If your unit does not have a modified cameo for each
version, just use the same cameo for all three, so in the example above use Cameo=HTNKICON and AltCameo=HTNKUICO for the two duplicates
instead of unique ID's.
Save and Close the ARTMD.INI file, we're
done here.
Step 4: RULESMD.INI
Editing
Now it is time for the most
important and difficult part of the tutorial, the modifications to the RULESMD.INI file. First off you need to add
in the duplicated units to the [VehicleTypes] (or [AircraftTypes] ) list. So let's say I followed the above instructions and moved all
unbuildable units so they have numbers higher than 101, by default now 45 is the next free
number (you probably will have to start at a higher number since your mod may have more
units). So for our lovely Rhino Tank additions, we add in:
45=NHTNK
46=YHTNK
47=...
And then carrying on with any other
duplicate unit that you have done, the current 40+ new placings for the units that are in
V2.0 of the Capture Pack, and any others you may add in.
Next comes the main part of the new
units, and the most unorthodox. First off you need to find the normal section of the unit
you are duplicating (either a normal WW unit, or a new unit your mod has added in), and
you need to duplicate it two more times, changing the ID's accordingly to match the ID's
for the unit you added in the [VehicleTypes] list. So for our HTNK (Rhino), the two duplicates have headers GHTNK and YHTNK. Do
not modify the normal HTNK in
any way, but you must make the two duplicates are TechLevel=-1, and, if your unit normally is a start game unit, AllowedToStartInMultiplayer=no and finally
add/modify the specific Owner=
and ForbiddenHouses= tag to
suit the unit so the duplicate unit is ONLY available for houses of the side it is
allocated to. What the tag includes depends on the side it is for, so if it is a [Gxxxx] unit, it needs:
Owner=British,French,Germans,Americans,Alliance
ForbiddenHouses=Russians,Confederation,Africans,Arabs,YuriCountry
While if it is a [Nxxxx] unit is needs:
Owner=Russians,Confederation,Africans,Arabs
ForbiddenHouses=British,French,Germans,Americans,Alliance,YuriCountry
And finally if it is a [Yxxxx] unit it needs:
Owner=YuriCountry
ForbiddenHouses=British,French,Germans,Americans,Alliance,Russians,
Confederation,Africans,Arabs
Now you have complete duplicate
units. However the duplicates cannot be built (concluded due to the TechLevel=-1 tag), which may strike you as
weird as the whole point of adding in the new units is to have them buildable when another
side captures the Prerequisite='s.
However this is done with good reason, and brings us to our final .INI modding step:
Step 5: Game Mode .INI
Editing
Now we have to edit the correct
.INI files to make the normal unit unbuildable to the other two sides, and activate the
duplicate units to make them buildable. Since if we did this in the RULESMD.INI file the changes would
affect the Single Player missions as well as Multiplayer games (we only want this logic
activated in Multiplayer/Skirmish) it would most likely conflict with certain rules
settings within mission files causing an internal error, and the AI somewhat ignores the
restrictions if they were done in the RULESMD.INI file. The solution to this is to modify every single Game Mode
override .INI file to activate the units correctly so Skirmish/Multiplayer games are
affected but Single Player mode stays as it is. This is a tedious job, but worth it in the
end.
First off you will need to extract
out all the extra MPxxxxxxxxMD.INI files you mod adds as well as all the normal MPxxxxxxxxMD.INI files
out of the RA2MD.MIX file.
Then you will need to add in the
extra code to get the units working, this is specific to each unit, so you will need to
repeat this step for every single group of units you have added in, being normal Capture
Pack units and additional ones you have done. Remember some MPxxxxxxxxMD.INI files may already
have certain modifications done to some units, so instead of adding in the modified
sections you simply add in the tags underneath the existing section. Let's revisit our
Rhino Tank example:
Firstly you need to make the
existing Rhino Tank unbuildable to the other two sides (Allies and Yuri):
[HTNK]
ForbiddenHouses=British,French,Germans,Americans,Alliance,YuriCountry
Then you need to activate the two
duplicates so they are specifically called when the appropriate structure is captured:
[GHTNK]
TechLevel=2
[YHTNK]
TechLevel=2
Repeat this process appropriately
for all unit's being added in, and you need to do this for every single MPxxxxxxxxMD.INI file.
Step 6: Finishing Off
Finally we have finished! All that
needs to be done now is the modified .INI files go back into your normal mod files, and
both them and the ECACHECAPTURE.MIX file be distributed as part of your mod! Done!
Remember as new updates to the
Capture Pack are released, more graphics will be included in the newer version's ECACHECAPTURE.MIX file. If you wish to
update your mod to include the new duplicates, add in the new version's units to your mods
ECACHECAPTURE.MIX file and
modify the .INI's appropriately to add them in! |