ok for the generals powers...you have to copy one of the other ones that closly resemble the one you want to create and just mix & match the things you want in it...I will give you examples from my mod...
If I were you, i would start at Science.ini and work your way down..
Science.ini
Code:
Science SCIENCE_CarpetBombUS
PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank1
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = CONTROLBAR:CarpetBombUS
Description = CONTROLBAR:ToolTipCarpetBombUS
End
This actually originated from the fuel air bomb code, and sense the fuel air bomb and carpet bomb both drop bombs, i copied the fuel air bomb science code, and just input everything i wanted in it...next lets go to SpecialPower.ini
SpecialPower.ini
Code:
SpecialPower SuperweaponCarpetBombUS
Enum = SPECIAL_CARPET_BOMB
ReloadTime = 250000 ; in milliseconds
RequiredScience = SCIENCE_CarpetBombUS
PublicTimer = No
SharedSyncedTimer = Yes
ViewObjectDuration = 30000 ; Lifetime of a Look done belonging to the firing player
ViewObjectRange = 250 ; And how far it can see
RadiusCursorRadius = 100
End
notice the RequiredScience = SCIENCE_CarpetBombUS ...this is why I start with science.ini. Science is basically all the generals abilities that are available to be bought from the generals menu...lets move on to ObjectCreationList....You must go to object creation list if something is being spawned from offscreen...e.g. artillery barrage, fuel air bomb,...all of those have something coming from offscreen, rather it be a b52 bomber, or a artillery shell... However, things like enabling the paladin, or enabling the stealth fighter do not need a OCL [Object Creation List].
ObjectCreationList.ini
Code:
ObjectCreationList SUPERWEAPON_CarpetBombUS
DeliverPayload
Transport = AmericaJetB1
StartAtPreferredHeight = Yes
StartAtMaxSpeed = No
MaxAttempts = 5
DropOffset = X:0 Y:0 Z:-2
DropVariance = X:10 Y:20 Z:0
DropDelay = 360 ;500 ; time in between each item dropped (if more than one)
Payload = SmallBombs 30
DeliveryDistance = 200
DeliveryDecalRadius = 150
DeliveryDecal
Texture = SCCA10Strike_USA
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:255 B:255 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
For the object creationlist.ini, you have to have planned what bomber/object you are going to use, what it will drop, ext... Lets move on to the Commandbutton.ini. This contains the clickable buttons that do the commands in the game...such as the guard button, the stop button, the attackrun button...these are all in commandbutton.ini
Commandbutton.ini
Code:
CommandButton Command_CarpetBombUS
Command = SPECIAL_POWER
SpecialPower = SuperweaponCarpetBombUS
Options = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:CarpetBombUS
ButtonImage = SSClusterMines
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipCarpetBombUS
RadiusCursorType = CLUSTERMINES
InvalidCursorName = GenericInvalid
End
Notice that this contains the text SpecialPower = SuperweaponCarpetBombUS...this is taken from the specialpower.ini
Next is the CommandSet.ini...this basically contains all of the sets of commands available to units/structures..for example, the colonel burton command set has the sets of commandbuttons that tell him to knife, plant bomb, attack run, plant timed bomb, guard, or stop...However, here you may need to make more than one change...because if you have a shortcut from a place such as the American Command Center, you want to be able to add the commandbutton to the command center, and also to the unit who will be performing the action...in this case, its the B1 bomber i made...
CommandSet.ini
Code:
CommandSet Command_ScriptedTransportDrops
1 = Command_DaisyCutter
2 = Command_Paradrop
3 = Command_CarpetBomb
4 = Command_ClusterMines
5 = Command_CrateDrop
6 = Command_GLAClusters
7 = Command_CarpetBombUS
End
Code:
CommandSet AmericaAirfieldCommandSet
1 = Command_ConstructAmericaJetRaptor
2 = Command_ConstructAmericaVehicleComanche
3 = Command_ConstructAmericaJetAurora
4 = Command_ConstructAmericaJetStealthFighter
5 = Command_CarpetBombUS
6 = Command_ConstructAmericaJetFightingFalcon
7 = Command_ConstructCINE_AmericaJetRaptor
8 = Command_Constructa10
9 = Command_UpgradeComancheRocketPods
10 = Command_UpgradeAmericaLaserMissiles
11 = Command_SetRallyPoint
12 = Command_Sell
End
Notice that I have 2 command sets here. The scripted transport drops command set is basically the command set for all of the transpot planes...such as: the b52, c130, china c130, and gla c130...these planes need this...the 2nd commandset belongs to the airfield, because this is where i want to launch the attack from...meaning that if i were to click on the airfield, i would see a commandbutton that would allow me to carpet bomb.
Next is the factionbuilding.ini from the object folder. This contains all of the factions' structures...
Factionbuilding.ini
Code:
Behavior = OCLSpecialPower ModuleTag_20
SpecialPowerTemplate = SuperweaponCarpetBombUS
OCL = SUPERWEAPON_CarpetBombUS
CreateLocation = CREATE_AT_EDGE_NEAR_SOURCE
End
I placed this under my airfield's list...[there is a hell of a lot more to the airfield.ini, but it WAY to long to post]. This bahavior module basically says that this building can contain and use the carpet bomb power...next and last is the factionunit.ini. I just put this under my b1 bomber..the same thing applies, its just to long to post here...but its there...
Code:
Behavior = OCLSpecialPower ModuleTag_06
SpecialPowerTemplate = SuperweaponCarpetBombUS
OCL = SUPERWEAPON_CarpetBombUS
CreateLocation = USE_OWNER_OBJECT
End
As you can see, its a long process. And actually, if you wanted to add your own cameo, it would take even longer! But wait till you get more advanced before worrying about that. To tell you the truth, I really dont advise trying to get into generals powers yet, unless you enable disabled ones. Its too advanced to start out with.