Menu:
» News
» Forums
» Downloads
» Link Us
» The Team
» About
» How to Use
» Download
» Modding
» Graphics
» Mapping
» GenDev Utilities
» User Submitted Models
» Alpha/Beta Models
» Tutorial Downloads
» Modding Utilities
» CNC DEN
» SDI
|
Part 3: Adding more attacks.
Files to edit:
ObjectCreationList.ini
Object\WeaponObjects.ini
Okay, so you've set it up this far, you've tried it out ingame and it all works well. Here's how you can add your own attacks for it to randomly select and use.
Open up WeaponObjects.ini and scroll down to the bottom of the file.
Here is the default template for new abilities, copy this into the bottom and change *name of attack here* to an appropriate name for the attack.
Object ChinaSatHack3_*name of attack here*
Side = China
EditorSorting = SYSTEM
KindOf = PRELOAD CLICK_THROUGH IGNORED_IN_GUI
Behavior = LifetimeUpdate ModuleTag_01
MinLifetime = 2
MaxLifetime = 2
End
Behavior = OCLUpdate ModuleTag_02
OCL = SUPERWEAPON_ChinaSatHack3_*name of attack here*
MinDelay = 3
MaxDelay = 3
CreateAtEdge = Yes
End
End
Then, scroll up to Object ChinaSatHack3_Targeter and add ChinaSatHack3_*name of attack here* to the end of the BuildVariations = line. Remember to seperate each option with a space.
Then, in ObjectCreationList.ini: create your own OCL or copy an existing one and name it with the name you used in WeaponObjects.ini (SUPERWEAPON_ChinaSatHack3_*name of attack here*). Then, replace (or add, if it doesn't already exist) the following code in your OCL:
DeliveryDecalRadius = 100
DeliveryDecal
Texture = sccsyshack
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
Then, scroll up to Object ChinaSatHack3_Targeter and add ChinaSatHack3_*name of attack here* to the end of the BuildVariations = line. Remember to seperate each option with a space.
Then, in ObjectCreationList.ini: create your own OCL or copy an existing one and name it with the name you used in WeaponObjects.ini (SUPERWEAPON_ChinaSatHack3_*name of attack here*). Then, replace (or add, if it doesn't already exist) the following code in your OCL:
DeliveryDecalRadius = 100
DeliveryDecal
Texture = sccsyshack
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
Now, for an example i will add the (unused) Chinese Napalm strike (mentioned earlier in the tutorial) as an attack possibility. Five Migs fly over in a V formation and cause a firestorm over the target.
First, in WeaponObjects.ini you add:
Object ChinaSatHack3_NapalmStrike
Side = China
EditorSorting = SYSTEM
KindOf = PRELOAD CLICK_THROUGH IGNORED_IN_GUI
Behavior = LifetimeUpdate ModuleTag_01
MinLifetime = 2
MaxLifetime = 2
End
Behavior = OCLUpdate ModuleTag_02
OCL = SUPERWEAPON_ChinaSatHack3_NapalmStrike
MinDelay = 3
MaxDelay = 3
CreateAtEdge = Yes ; as opposed to just creating on self
End
End
Then, you find the buildvariants line of the targeter object and add ChinaSatHack3_NapalmStrike to the end, so it looks like:
BuildVariations = ChinaSatHack3_ScudStrike ChinaSatHack3_A10 ChinaSatHack3_CarpetBomb ChinaSatHack3_NapalmStrike
In ObjectCreationList.ini, find and copy the ObjectCreationList SUPERWEAPON_NapalmStrike entry (the OCL of the original Napalm Strike) and edit the copy's delivery decal like i said above. Lastly, change its name to SUPERWEAPON_ChinaSatHack3_NapalmStrike. You should end up with an entry looking something like this:
ObjectCreationList SUPERWEAPON_ChinaSatHack3_NapalmStrike
DeliverPayload
Transport = ChinaJetMIGNapalmStriker
FormationSize = 5
FormationSpacing = 35.0
StartAtPreferredHeight = Yes
StartAtMaxSpeed = Yes
MaxAttempts = 1
DropOffset = X:0 Y:0 Z:-10
DropDelay = 0
Payload = NapalmMissile 1
FireWeapon = Yes
DeliveryDistance = 300
WeaponConvergenceFactor = 1.0
DeliveryDecalRadius = 100
DeliveryDecal
Texture = sccsyshack
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 500
Color = R:255 G:0 B:0 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
End
Thats all you need to do, the satellite hack will now randomly attack with the Napalm Strike.
Thanks/Acknowledgements:
Mad Ivan - for being a sounding board for ideas and helping me develop the concept
DeeZire - for the info about the original System Hack
Phoib - For the ocl/death code which i based the super weapon callers off
Updated 29/10/03: Corrected the info about the original System Hack and added Part 3. Changed the naming system of OCL and targeting objects.
This tutorial was taken from Sleipnir's Stuff. For discussion and more information on this tutorial, visit this thread.
|
|