Check out our discord at https://discord.gg/3u69jMa
Create new Squad Member: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This tutorial shows you how to create custom squad members for your party. | This tutorial shows you how to create custom squad members for your party. | ||
==Create new squad class== | ==Create new squad class== | ||
In your Actor browser, go to Actor->Pawn->CTPawn->Republic->CloneCommando and create a new sub class from CloneCommando. | In your Actor browser, go to Actor -> Pawn -> CTPawn -> Republic -> CloneCommando and create a new sub class from CloneCommando. | ||
[[File:Csmt1.PNG]] | [[File:Csmt1.PNG]] | ||
Once the class and package have been created and saved, add the following code to the new class: | Once the class and package have been created and saved, add the following code to the new class: | ||
Line 44: | Line 46: | ||
Hit the compile button and save the package. | Hit the compile button and save the package. | ||
==Adjusting Properties== | ==Adjusting Properties== | ||
The rest of this tutorial is just adjusting the properties of our new squad class. Open up the properties window adjust the values. Of course most of the values can be changed to achieve certain desires: | The rest of this tutorial is just adjusting the properties of our new squad class. Open up the properties window and adjust the values to your need. Of course most of the values can be changed to achieve certain desires: | ||
===Advanced=== | ===Advanced=== | ||
MyDamageVariance = DV_OrganicCTSquadMember | Damage class, can be organic/metal or other predefined classes | MyDamageVariance = DV_OrganicCTSquadMember | Damage class, can be organic/metal or other predefined classes | ||
Line 63: | Line 65: | ||
===CTPawn=== | ===CTPawn=== | ||
FootStepInfoClass = CloneCommando_FS | Which footsteps should be used for this | FootStepInfoClass = CloneCommando_FS | Which footsteps should be used for this squad member | ||
IdleInfoClassName = Properties.StandardIdleInfo | | IdleInfoClassName = Properties.StandardIdleInfo | Standard IDLE info | ||
===Display=== | ===Display=== | ||
EnhancedVisionColor = X | Outline color | EnhancedVisionColor = X | Outline color | ||
EnhancedVisionFade = True | Draw color outlines of the character | EnhancedVisionFade = True | Draw color outlines of the character on HUD | ||
Skins = X | Path to the texture file of your mesh | Skins = X | Path to the texture file of your mesh | ||
===DisplayAdvanced=== | ===DisplayAdvanced=== | ||
Mesh = X | Link the class to Skeletalmesh | Mesh = X | Link the class to Skeletalmesh | ||
===Karma=== | ===Karma=== | ||
(Just copy karma properties from default class) | (Just copy karma properties from default class) | ||
===Pawn=== | ===Pawn=== | ||
AvailableAccessories = X | Add your accessories | AvailableAccessories = X | Add your accessories. | ||
MaxAccessories = 3 | Define max accessories for this pawn | MaxAccessories = 3 | Define max accessories for this pawn | ||
MaxHealth = 400 | Set max health | MaxHealth = 400 | Set max health | ||
MaxShields = 50 | Set max shields | MaxShields = 50 | Set max shields | ||
MeshSet = X Set = X | Mesh and Animation link | MeshSet = X Set = X | Mesh and Animation link | ||
RequiredEquipment = X | Weapon loadout | RequiredEquipment = X | Weapon loadout - Note: Needs sniper/AA and other items for him to be used on squad markers | ||
ShieldColor = X | Color of the shields when taking damage | ShieldColor = X | Color of the shields when taking damage | ||
ShieldRechargeDelay = 4 | Time in seconds before shield recharging starts | ShieldRechargeDelay = 4 | Time in seconds before shield recharging starts | ||
ShieldRechargeRate = 15 | How percent to recharge each second | ShieldRechargeRate = 15 | How much percent to recharge each second | ||
===[Hiden]=== | ===[Hiden]=== | ||
Line 103: | Line 108: | ||
==Prevent crashing== | ==Prevent crashing== | ||
In order to use manouvers on the new squad member, you have to link the mesh sets to the animations of the gamemode. | In order to use manouvers on the new squad member, you have to link the mesh sets to the squad action animations of the gamemode. | ||
So go to Actor->Info->GameInfo->CTGameInfo->CTGameInfoSP and open up properties window: | So go to Actor -> Info -> GameInfo -> CTGameInfo -> CTGameInfoSP and open up properties window: | ||
[[File:Csmt2.PNG]] | [[File:Csmt2.PNG]] | ||
On the category "CustomAnims" -> "CustomMeshSets", add your mesh and the default manouver animations. | On the category "CustomAnims" -> "CustomMeshSets", add your mesh and the default manouver animations. |
Latest revision as of 18:43, 1 August 2024
This tutorial shows you how to create custom squad members for your party.
Create new squad class
In your Actor browser, go to Actor -> Pawn -> CTPawn -> Republic -> CloneCommando and create a new sub class from CloneCommando.
Once the class and package have been created and saved, add the following code to the new class:
class MyCustomCommando extends CloneCommando;
var Texture ReviveOutsideTexture;
var Texture ReviveInsideTexture;
var localized string HUDDescription;
var localized string HUDNickname;
simulated event String GetHudDescription()
{
return HUDDescription;
}
simulated event String GetHudNickname()
{
return HUDNickname;
}
simulated function AnimateWoundedWalking()
{
TurnLeftAnim = 'WoundedTurnLeft';
TurnRightAnim = 'WoundedTurnRight';
MovementAnim = 'Wounded62WalkForward';
}
simulated function AnimateWoundedRunning()
{
TurnLeftAnim = 'WoundedTurnLeft';
TurnRightAnim = 'WoundedTurnRight';
MovementAnim = 'Wounded62RunForward';
}
Hit the compile button and save the package.
Adjusting Properties
The rest of this tutorial is just adjusting the properties of our new squad class. Open up the properties window and adjust the values to your need. Of course most of the values can be changed to achieve certain desires:
Advanced
MyDamageVariance = DV_OrganicCTSquadMember | Damage class, can be organic/metal or other predefined classes
AI
Accuracy = 0.9 | Shooting accuracy bCanBeSquadMember = True | Must be true bOnPathFailNoCollision = True | Must be true SightRadius = 5000 | Distance in ingame units to be in line of sight
CTPawn
FootStepInfoClass = CloneCommando_FS | Which footsteps should be used for this squad member IdleInfoClassName = Properties.StandardIdleInfo | Standard IDLE info
Display
EnhancedVisionColor = X | Outline color EnhancedVisionFade = True | Draw color outlines of the character on HUD Skins = X | Path to the texture file of your mesh
DisplayAdvanced
Mesh = X | Link the class to Skeletalmesh
Karma
(Just copy karma properties from default class)
Pawn
AvailableAccessories = X | Add your accessories. MaxAccessories = 3 | Define max accessories for this pawn MaxHealth = 400 | Set max health MaxShields = 50 | Set max shields MeshSet = X Set = X | Mesh and Animation link RequiredEquipment = X | Weapon loadout - Note: Needs sniper/AA and other items for him to be used on squad markers ShieldColor = X | Color of the shields when taking damage ShieldRechargeDelay = 4 | Time in seconds before shield recharging starts ShieldRechargeRate = 15 | How much percent to recharge each second
[Hiden]
AudioTable = X | Link specific audio table to the pawn bCannotDie = True | Must be true since squad members don't really die ControllerClass = X | Select a controller class for this bot HUDDescription = X | HUD text on bottom left side of screen. Should be between 1 and 2 letters or numbers HUDNickname = X | Actual nickname which will be displayed above the pawns head like Fixxer, Sev, Scorch SquadHUDSlot = X | From 4 onwards since 1, 2 and 3 are already occupied by default
Once you adjusted the properties, save the package.
Prevent crashing
In order to use manouvers on the new squad member, you have to link the mesh sets to the squad action animations of the gamemode.
So go to Actor -> Info -> GameInfo -> CTGameInfo -> CTGameInfoSP and open up properties window:
On the category "CustomAnims" -> "CustomMeshSets", add your mesh and the default manouver animations.
In this exmaple I used the Trando mercenary mesh:
Mesh: SkeletalMesh'Clone.TrandoshanMerc' Set: MeshAnimation'Clone.mDemolitionSet'
MeshAnimation'Clone.mDemolitionSet' MeshAnimation'Clone.mDoorBreachSet' MeshAnimation'Clone.mHackUnlockConSet' MeshAnimation'Clone.mHackUnlockDoorSet' MeshAnimation'Clone.mProximityMineSet' MeshAnimation'Clone.mTrapSet'
When done editing, close the editor and a prompt will show up asking to save modified package "CTGame". Click Yes and save it in System folder.
Conclussion
Now the only thing you have to do is add your custom squad member to your map by either placing him or spawning him with scripted Triggers.
In general you can use any mesh (Battledroids/Droidekas/so on) but keep in mind the default manouver animations are not made for those bone stuctures.
Meshes like Clonetrooper and Trando mercenary work fine while others will just deform the actual mesh.