I've been working on a tutorial and I need someone to test it for me to make sure it's easy to use. So this is the perfect opportunity. Here's the first two steps. Tell me if you have any issues. I'll post more steps afterwards.
STEP 1: Creating a clone general
Creating a general with no unique features is actually very simple. So this is step 1. In this tutorial we're going to clone laser general, but the clone will have an extra dozer and a free fuel air bomb.
So first off, open up PlayerTemplate.ini and look for this code:
Code:PlayerTemplate FactionAmericaLaserGeneral
Side = AmericaLaserGeneral
BaseSide = USA
PlayableSide = Yes
StartMoney = 0
PreferredColor = R:0 G:0 B:255
IntrinsicSciences = SCIENCE_AMERICA
PurchaseScienceCommandSetRank1 = Lazr_SCIENCE_AMERICA_CommandSetRank1
PurchaseScienceCommandSetRank3 = Lazr_SCIENCE_AMERICA_CommandSetRank3
PurchaseScienceCommandSetRank8 = Lazr_SCIENCE_AMERICA_CommandSetRank8
SpecialPowerShortcutCommandSet = Lazr_SpecialPowerShortcutUSA
SpecialPowerShortcutWinName = GenPowersShortcutBarUS.wnd
SpecialPowerShortcutButtonCount = 10
DisplayName = INI:FactionAmericaLaserGeneral
StartingBuilding = Lazr_AmericaCommandCenter
StartingUnit0 = Lazr_AmericaVehicleDozer
ScoreScreenImage = America_ScoreScreen
LoadScreenImage = SAFactionLogoPage_US
LoadScreenMusic = Load_USA
ScoreScreenMusic = Score_USA
;HeadWaterMark = SCTempSelectPortrait ; don't use unless we add a "generalshead for non selected generals
FlagWaterMark = WatermarkUSA
EnabledImage = SSObserverUSA
BeaconName = MultiplayerBeacon
SideIconImage = GameinfoAMRCA
GeneralImage = USA_Laser
OldFaction = No ; This faction was NOT available in the original Generals and should NOT be available if the oldFactionsOnly flag is set
ArmyTooltip = TOOLTIP:BioStrategyLong_Pos5
Features = GUI:BioFeatures_Pos5
MedallionRegular = LaserGeneral_slvr
MedallionHilite = LaserGeneral_blue
MedallionSelect = LaserGeneral_orng
End
So, to turn this into a separate general, we will copy and paste this code to the bottom of the file and make some modifications. Like so:
Code:PlayerTemplate FactionNEWGENERAL ; Rename to make this into a separate general.
Side = AmericaNEWGeneral ; This is for world builder categories and allows you to have a unique control bar.
BaseSide = USA
PlayableSide = Yes
StartMoney = 0
PreferredColor = R:0 G:0 B:255
IntrinsicSciences = SCIENCE_AMERICA SCIENCE_DaisyCutter ; This is the free fuel air bomb.
PurchaseScienceCommandSetRank1 = Lazr_SCIENCE_AMERICA_CommandSetRank1
PurchaseScienceCommandSetRank3 = Lazr_SCIENCE_AMERICA_CommandSetRank3
PurchaseScienceCommandSetRank8 = Lazr_SCIENCE_AMERICA_CommandSetRank8
SpecialPowerShortcutCommandSet = Lazr_SpecialPowerShortcutUSA
SpecialPowerShortcutWinName = GenPowersShortcutBarUS.wnd
SpecialPowerShortcutButtonCount = 10
DisplayName = INI:FactionNEWGENERAL ; This will change the displayed name of your general.
StartingBuilding = Lazr_AmericaCommandCenter
StartingUnit0 = Lazr_AmericaVehicleDozer
StartingUnit1 = Lazr_AmericaVehicleDozer ; The Second dozer. I've added this entire line.
ScoreScreenImage = America_ScoreScreen
LoadScreenImage = SAFactionLogoPage_US
LoadScreenMusic = Load_USA
ScoreScreenMusic = Score_USA
FlagWaterMark = WatermarkUSA
EnabledImage = SSObserverUSA
BeaconName = MultiplayerBeacon
SideIconImage = GameinfoAMRCA
GeneralImage = USA_Laser
OldFaction = No
ArmyTooltip = TOOLTIP:BioStrategyLong_Pos5
Features = GUI:BioFeatures_Pos5
MedallionRegular = LaserGeneral_slvr
MedallionHilite = LaserGeneral_blue
MedallionSelect = LaserGeneral_orng
End
I've put comments in to show what I changed and why.
So now you can start up the game to make sure you haven't done anything wrong. It shouldn't crash. If you did it correctly, your new general will appear in the skirmish list with a weird name and there will be a very strange graphical glitch with the control bar when you play a match.
STEP 2: Fixing the bugs
You will need to create an entry in generals.csf to fix your general's name. The entry I created was INI:FactionNEWGENERAL as you can see in the above code (DisplayName). Alternatively,
use this STR file as it's a lot simpler than using a csf editor.Next we'll fix the control bar. Open up ControlBarScheme.ini and look for the control bar you desire. Since this is a clone of laser general, I'm using laser general's controlbar.
Code:ControlBarScheme AmericaLaserGeneral8x6
ScreenCreationRes X:800 Y:600
Side AmericaLaserGeneral
[...]
PowerPurchaseImage GeneralsPowerWindow_American
End
Copy the huge lump of code and change the first and third lines to match your new general. Here's mine:
Code:ControlBarScheme AmericaNEWGeneral8x6
ScreenCreationRes X:800 Y:600
Side AmericaNEWGeneral ; Must be the same as the side you've created in PlayerTemplate.ini
[...]
PowerPurchaseImage GeneralsPowerWindow_American
End
Now you can start up the game to make sure you haven't done anything wrong. You should be able to play as your clone laser general without any bugs. At this point, you should now have a fully functioning new general and the next steps are to modify it to make it unique.