Add a Fourth Side
by BobingAbout

This is also for Red Alert 2, but this tutorial will be used with examples from YR.

Thanks to the author of Purple Alert who allowed me to look at code to get the original idea on how to start doing all this.

Ok, although there might be other ways to make a 4th side, this is the way I came up with.

Tags in quotes are definite, tags without are ones from memory and might be slightly different.

Assuming you are replacing the British with the 4th side.
Create the 4th MCV, you can use the allied one as a template if you want to.
Edit the Allied one to make it not be available as a free starting unit to the British by editing the owner tag to read: "Owner=French,Germans,Americans,Alliance" and if you cloned the allied one for the 4th edit the same line to be "Owner=British". Also, add the new MCV to the end of the BaseUnit= tag in the [General] section to include the new MCV, like this "BaseUnit=AMCV,SMCV,PCV,TMCV" where the new MCV is TMCV, and also add it to the [VehicleTypes] list. With the Allied MCV being called AMCV and image MCV, a simple clone with that line change results in an MCV that looks like an Allied one that deploys into an Allied construction yard. Clone the construction yard as well, and make the same changes. Make the DeploysInto and UndeploysInto tags link to each other. Don't forget to add the const yard to the [BuildingTypes] list. Both const yards need to retain the same AI tags as the original to prevent crashes. That's AIBuildsThis=yes and AIBasePlanningSide=0. If you replaced a soviet country then the AIBasePlanningSide wants to be 1 instead of 0.

One more note on the Buildings for the slit side, the AI hates this. Just make sure every Allied structure (or Soviet structure if you replaced a Sov side) has the house that is now the 4th side blanked out, so instead of this
"Owner=British,French,Germans,Alliance,Americans" you have this "Owner=French,Germans,Alliance,Americans" and for the 4th side they all have this "Owner=British" and that's simply what you have to do for the AIs 4th side to build its buildings while the side you took it from builds its buildings, and not from the other side. New AIBasePlanningSide is the same as the side it was taken from, E.G., Allied side is 0 and Soviet side is 1.

Now you will have the ability to start with an MCV for your side and have the ability to get a free one in a crate, and be able to build them by all sides. Without the allied AI building 4th side buildings, and the 4th side AI building Allied building. There are 3 problems.

One: You will get the Allied free units, not the 4th side ones, unless you do the same to them. The paradrop will always be the Allied one, or Soviet if you replaced a Soviet side, so be careful what you give it.

Two: Well the short game explosion due to the fact that there is only 3 hardcoded MCVs, which is only a problem for the 4th side.

Three: The 4th side AI still builds Allied units, and badly.

As long as the Owner tag displays the correct countries in the "Owner=" tag the AI will only build them if the building also has the correct side is set in the "AIBasePlanningSide=". That's 0 for Allies, 1 for Soviets and 2 for Yuri, don't forget that you are emulating the 4th side so for the 4th side this is set to the house the country came from I.E. british would be set as 0 even though it is not allied any more.

One: Paradrop and units from sold/destroyed buildings for the new side will be the same as the ones an the side you took it from, so the best way to solve this problem is to make a generic unit and make all units from sold/destroyed buildings and paratroopers this generic unit. E.G., we made a unit called a paratrooper, and paradrops contain him and also all sold/destroyed buildings have him as the free unit rather than the sides unit.

Two: There is no solution to this problem, so I suggest you make a warning stating not to use the 4th side in a short game.

Three: So far you can build all units and buildings for the side you are on. If you capture a base for an enemy house you can build theirs as well. The AI will only build the correct buildings. For them to build the correct units as well, you need to edit the AI, so I'm not going into much detail as it involves AI editing. First of all you need to find all tags for the Allied side and duplicate them to have one for each country with side specific for that country and then another set of AI instructions for the 4th side where all triggers are specific to the country for the 4th side.

In any case i am still experimenting on this so i might find easier methods.

You can use this method again and again to make a 5th side, and a 6th side, all the way up to 10 sides, but if you want 2 countries on a new side, then you have to read my changing countries guide as both countries must be on the same side.