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

Mobile War Factory Rally Points

From ModEnc
Jump to navigation Jump to search

This article talks about Mobile War Factories, however any mobile factory, cloning vat, hospital, or armory suffers from the same problem.

Issues

If you have ever attempted to create a Mobile War Factory in Red Alert 2, like the one in Firestorm, you may have noticed a problem that arises from the nature of setting rally points. The Mobile War Factory is a Factory of UnitType—one that produces VehicleTypes—and is initially constructed as a vehicle that can be deployed into a version of the War Factory, much like the MCV deploys into the ConstructionYard. A rally point can be set for factories by selecting it and left clicking a location on the tactical map1. However, this same action tells the Mobile War Factory to pack up and move to that location. This is the result of coding ambiguity, which means that the game engine is confused about what action it should take, usually yielding undesirable results.

Solutions

Because of the nature of these types of problems, some functionality must be sacrificed. In this case, there are two options available. You can choose which one you prefer based on your situation and preferences.

Sacrifice rally points

This is the "normal" case, and basically means putting up with it. A player will be able to undeploy and move the mobile factory, however they will not be able to set a rally point for it. One additional problem with this is that the "Rally Point Set" EVA Event will trigger when the Mobile War Factory undeploys, although this can be made to seem less glitchy by sacrificing that EVA Event.

Sacrifice continuous mobility

The other option is to not allow the mobile factory to pack up again once it is deployed, meaning wherever the player chooses to deploy it is where it is going to stay unless it is sold or destroyed. The benefit of choosing this option is that rally points can be set.

Via FreeUnit

Another solution is possible, but although it allows the player to use both methods, it appears very strange in-game and negatively affects gameplay. The solution is to make the Deployable Mobile War Factory undeployable, but giving it a FreeUnit. This FreeUnit gets Speed=0 and itself DeploysInto another structure. That structure is made invisible and in a suicide way so it is instantly destroyed upon creation, but gets as a FreeUnit the Mobile War Factory in its vehicle form. In effect, this means that when a player deploys a Mobile Factory, the FreeUnit is created, but cannot itself deploy, because it cannot move (due to Speed=0) to a free location. Since the Deployed Factory itself cannot be undeployed, rally points can be set as normal. Once the Deployed Mobile War Factory is destroyed or sold, the FreeUnit has free space to deploy - upon deploying, it self-destructs, but gives the Mobile War Factory (as a vehicle), which can then move to another location to re-deploy as described above.

Notes

1 In Tiberian Sun and Firestorm, rally points were set by selecting the factory, holding down the Alt key and then left clicking a location on the tactical map, thereby avoiding confusion to the game engine.