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

Splitting Production Facilities

From ModEnc
Jump to: navigation, search

The system described in the following builds is outlined in its basic functionality in the Correctly Working Naval Yards article, though it is expanded and generalized in the following article.

This tutorial will explain how you can have certain objects be built from distinct production facilities, much in the same way as naval units will come from your naval yard instead of your war factory. Applications for this are countless: you could have infantry come from barracks, while dogs come from kennels, produce fighters and bombers from an airstrip while helicopters come from an helipad and ships come from your naval yard while your submarines will be produced in a sub pen. Note that the full implementation of this tutorial might mess up the AI, though partial implementation should generally be safe.

Firstly, note that any buildable object will only be produced from a building with Factory= set to its corresponding type (Unit, Infantry, Aircraft, Building) and an Ownership identical to the object that is being built. If you were to remove all the Allied nations from the Soviet Barrack's owner tag, the soviet Barracks would, even when captured by an Allied player, be unable to produce infantry types that have no soviet nation in their Owner list.

Secondly, concerning Houses (in TS) or Countries (in RA2): Creating a new House / Country should be sufficiently explained in other tutorials, so I will not bother you with this here. It is important to note that creating new Houses/Countries works both in TS and RA2 - even though in RA2 you cannot create new playable Countries, the game will read them from the list and they constitute working entries for the Owner= tag.

In order to generate a split production line, you first need to create a new House / Country. Make sure it is NOT playable - in RA2, this happens automatically (as mentioned above), but just to be safe, you should add Multiplayer=no in both TS and RA2.

Just as an example, I want to split my Allied VehicleType production into ground-based vehicles from the War Factory, and helicopters, from my Helipad. I create a new country called [AlliesHeliTypes].

Next, you have to create a production facility that produces the type you want to split into two (or more) distinct production lines. In my example, I would create a Helipad building with Factory=UnitType. Next, set the Owner tag of the new building to your new House/Country (which in my case would be AlliesHeliTypes) and the "parent" house to which the building in question and the objects it builds should belong - in my case, my Owner list thus holds: Americans,Alliance,French,Germans,British,AlliesHeliTypes. This means that the building itself can be built by all the allied nations (of unmodded RA2/YR).

Next, go to the sections of the objects you want to have produced in your split production line. In my case, that would apply only to [SHAD] - the NightHawk is the only helicopter of the Allies in RA2, presuming I have not added any others. In the sections of your objects in question, find the Owner= list and replace whatever is listed there with the name of your new Country/House.

In my case, the last two steps should mean:

Name=Allied Helipad

Because the normal Allied War Factory has only the allied nations listed in its Owner= statement, it cannot produce - or even make appear on the sidebar - the SHAD, because SHAD is not owned by any nation listed in the Allied Warfactory's Owner= list. However, the GAHPAD will give me access to SHAD, because the Owner of SHAD is also included in the Owner list of the GAHPAD. When I now produce a NightHawk, it will come from my GAHPAD, rather than my generic War Factory.

Of course, as you might have noticed, this approach is a bit buggy, because, as the GAHPAD has in its Owner list all the Allied nations, that means that the GAHPAD can actually produce the vehicles normally produced from the war factory as well. The solution to this is to change the Owner= statement on all Allied vehicles to another new house that is then listed in the Factory's Owner= list, but not the GAHPAD's one. This splits the production lines entirely, but it is also the part which might get you into conflict with the game's AI, plus it is further complicated by the fact that you might want to use ForbiddenHouses and RequiredHouses, which requires further thoughtful meddling with the Country/House system. This requires further research.