If you want to help us maintaining this wiki, check out or discord server: https://discord.gg/3u69jMa 

Create new Squad Member

From SWRC Wiki
Jump to: navigation, search

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 adjust the values. Of course most of the values can be changed to achieve certain desires:


bCanBeAutoAimed = False                                 | Leftover from the XBOX version, should still be set to False
MyDamageVariance = DV_OrganicCTSquadMember              | Damage class, can be organic/metal or other predefined classes


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


FootStepInfoClass = CloneCommando_FS                    | Which footsteps should be used for this mate
IdleInfoClassName = Properties.StandardIdleInfo         | Some standart properties crap


EnhancedVisionColor = X                                 | Outline color
EnhancedVisionFade = True                               | Draw color outlines of the character
Skins = X                                               | Path to the texture file of your mesh


Mesh = X                                                | Link the class to Skeletalmesh


(Just copy karma properties from default class)


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
ShieldColor = X                                         | Color of the shields when taking damage
ShieldRechargeDelay = 4                                 | Time in seconds before shield recharging starts
ShieldRechargeRate = 15                                 | How percent to recharge each second


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 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'

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.


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.