Tutorial by gamemastax
This tutorial explains how to add a train to one of your C&C Generals maps. It assumes basic knowledge about how to use the World Builder program.
First off, to make a train, lay down the tracks. If you want it to go through a tunnel in a hill, make the tracks first, then delete them later; it looks a lot better. Avoid tight curves, since the train will look really messed up as it goes around the curve.
Secondly, make waypoints following the track exactly. Around a curve, you should have at least 3 waypoints (I usually use 7). And make sure that you are modeling a waypoint path; that is, make sure that you are dragging from waypoint to waypoint and not just making waypoints. Make sure that when you finish following the tracks you connect the last waypoint to the first again, making a loop.
Next, place the train on the map, next to or on top of the waypoint path. Placing an engine will make there be cars behind it as well, so don't worry about them for now - just place the engine.
Now, click on one of the waypoints in your waypoint path, and in the window where there are three boxes with the words Waypoint path label above them, type "Railroad" in the box for the label (without the quotes).
Also, to make the train stop at a certain area for a certain period of time, label the chosen waypoint as "[waypoint name]Station". Replace [waypoint name] with anything you want. The default name for a waypoint is Waypoint[Number] (i.e. Waypoint146).
To make the train go through a tunnel, first you should make sure that there is a waypoint in the waypoint path right in front of the tunnel. Label this waypoint "[waypoint name]Tunnel" (i.e. Railroad183Tunnel). This will make the train stay at the altitude it is at until you have a point without Tunnel at the end of its label. Thus, make sure all waypoints underground have the word "Tunnel" at the end of their names, unless you want the train popping up from the ground!
Advanced Trains: Changing the Cars in a Train, and Making the Train Garrisonable
This section is for advanced users who want to be able to put troops in the cars of trains and make them go into the enemy base.
Open up your favorite text editor (Notepad, WordPad, etc.) and create a new file. Paste the following into it:
Object TrainEngineVerySlow
ReplaceModule ModuleTag_03
Behavior = RailroadBehavior ModuleTag_03_Override
PathPrefixName = Railroad
RunningGarrisonSpeedMax = 8
KillSpeedMin = 9
Friction = 0.995
BigMetalBounceSound = BuildingFallingMetal
SmallMetalBounceSound = VehicleImpactHeavy
MeatyBounceSound = InfantryCrush
ClicketyClackSound = TrainClicketyClack
WhistleSound = TrainWhistle
IsLocomotive = Yes
SpeedMax = 8.0
Acceleration = 1.005
WaitAtStationTime = 20000 ; twenty seconds
Braking = 0.97
CrashFXTemplateName = SpecialEffectsTrainCrashObject
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCarFlat
CarriageTemplateName = TrainCarRocket
CarriageTemplateName = TrainCarFlat
CarriageTemplateName = TrainCarFlat
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCab
End
End
End
Object TrainCar03
ReplaceModule ModuleTag_02
Body = ActiveBody ModuleTag_02_Override
MaxHealth = 10000.0
InitialHealth = 10000.0
End
End
AddModule ModuleTag_03_Override
Behavior = GarrisonContain ModuleTag_03
ContainMax = 10
AllowInsideKindOf = INFANTRY VEHICLE
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
DamagePercentToUnits = 50%
MobileGarrison = Yes
End
End
ReplaceModule ModuleTag_04
Behavior = RailroadBehavior ModuleTag_04_Override
IsLocomotive = No
PathPrefixName = Railroad
RunningGarrisonSpeedMax = 8
KillSpeedMin = 9
Friction = 0.995
BigMetalBounceSound = BuildingFallingMetal
SmallMetalBounceSound = VehicleImpactHeavy
MeatyBounceSound = InfantryCrush
ClicketyClackSound = TrainClicketyClack
End
End
End
Object TrainCab
ReplaceModule ModuleTag_02
Body = ActiveBody ModuleTag_02_Override
MaxHealth = 10000.0
InitialHealth = 10000.0
End
End
AddModule ModuleTag_03_Override
Behavior = GarrisonContain ModuleTag_03
ContainMax = 10
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
DamagePercentToUnits = 50%
MobileGarrison = Yes
End
End
ReplaceModule ModuleTag_04
Behavior = RailroadBehavior ModuleTag_04_Override
IsLocomotive = No
PathPrefixName = Railroad
RunningGarrisonSpeedMax = 8
KillSpeedMin = 9
Friction = 0.995
BigMetalBounceSound = BuildingFallingMetal
SmallMetalBounceSound = VehicleImpactHeavy
MeatyBounceSound = InfantryCrush
ClicketyClackSound = TrainClicketyClack
End
End
End
Save the file as map.ini in the folder where your map is saved (My Documents\Command and Conquer Generals Data\Maps\[YourMap]\map.ini).
Now, if you place the object TrainVerySlow on the map, it will not be slow, but will have a bunch of cars on it (instead of the rocket it usually has), and it will be able to garrison troops and vehicles inside its cars.
Navigation