Torque Tutorials - Getting Rid of the Orcs
Sometimes those Orcs can be really tiresome. So what do you do? Well replace with them with your own character. Maybe a fork (orc -> fork, get it? ha. ha. ha.) or something else. Remember you too can change!

Assuming you already have a character that has been converted to a .dts file, one way of modding the Starter FPS Kit with the GarageGames Torque Game engine is by going to .cs files and also providing your own .dts player file within the scripts.
The two files you want to concern yourself with are both named player.cs. However while they are same named, they are different and are located in different dirctories. Here are their respective locations. One is in:
starter.fps/server/scripts/player.cs and the other one is located in starter.fps/data/shapes/player/player.cs.
Let’s look at starter.fps/data/shapes/player/player.cs. I use TextPad and it allows me to see the line numbers. So in my case, on or about line 10 is the part of this file that I need to change. What needs to change is the location of the new player.dts file. In this example you see that I’ve experimented with a few others. One of them was from a book I picked up by Ken Finney (more on that later) and the other one is a sample character from Obsidian Games (we won’t be using Thom today). Here’s what it looks like:
//starter.fps\data\shapes\player\player.cs
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
datablock TSShapeConstructor(PlayerDts)
{
//baseShape = “./playerThom/player.dts”;
baseShape = “./playerEmaga/player.dts”;
//baseShape = “./player.dts”;
sequence0 = “./player_root.dsq root”;
sequence1 = “./player_forward.dsq run”;
sequence2 = “./player_back.dsq back”;
sequence3 = “./player_side.dsq side”;
sequence4 = “./player_lookde.dsq look”;
sequence5 = “./player_head.dsq head”;
sequence6 = “./player_fall.dsq fall”;
sequence7 = “./player_land.dsq land”;
sequence8 = “./player_jump.dsq jump”;
sequence9 = “./player_diehead.dsq death1″;
sequence10 = “./player_diechest.dsq death2″;
sequence11 = “./player_dieback.dsq death3″;
sequence12 = “./player_diesidelf.dsq death4″;
sequence13 = “./player_diesidert.dsq death5″;
sequence14 = “./player_dieleglf.dsq death6″;
sequence15 = “./player_dielegrt.dsq death7″;
sequence16 = “./player_dieslump.dsq death8″;
sequence17 = “./player_dieknees.dsq death9″;
sequence18 = “./player_dieforward.dsq death10″;
sequence19 = “./player_diespin.dsq death11″;
sequence20 = “./player_looksn.dsq looksn”;
sequence21 = “./player_lookms.dsq lookms”;
sequence22 = “./player_scoutroot.dsq scoutroot”;
sequence23 = “./player_headside.dsq headside”;
sequence24 = “./player_recoilde.dsq light_recoil”;
sequence25 = “./player_sitting.dsq sitting”;
sequence26 = “./player_celsalute.dsq celsalute”;
sequence27 = “./player_celwave.dsq celwave”;
sequence28 = “./player_standjump.dsq standjump”;
sequence29 = “./player_looknw.dsq looknw”;
};
The parts we need to concern ourselves at this time is in bold. That my friends says that use the base shape that is found in the directory named playerEmaga and in it you will find the player.dts file. Ofcourse, make sure you have the player.dts file in the directory. So make sure you make a directory named playerEmaga with the player.dts file and textures accomanying it. Otherwise it will not work. So that’s a step there.
The other player.cs file located at starter.fps/server/scripts/player.cs needs the following adjustment:
....
datablock PlayerData(PlayerBody)
{
renderFirstPerson = false;
emap = true;
className = Armor;
//shapeFile = "~/data/shapes/player/player.dts";
//shapeFile = "~/data/shapes/player/playerThom.dts";
shapeFile = “~/data/shapes/player/playerEmaga/player.dts”;
cameraMaxDist = 3;
computeCRC = true;
canObserve = true;
cmdCategory = “Clients”;
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
debrisShapeName = “~/data/shapes/player/debris_player.dts”;
debris = playerDebris;
aiAvoidThis = true;
minLookAngle = -1.4;
maxLookAngle = 1.4;
maxFreelookAngle = 3.0;
….
I’ve just snipped a part of the player.cs file because it is a very very long file. In this case we’ve snipped the PlayerData datablock. In bold is what you need to make sure you change. You will also notice I did some other test just above it. They’ve been commented out so those statements will be ignored.
So once you’ve done those changes in both player.cs files and have also created the playerEmaga directory containing the new player.dts, you should see your new player appear.
See, no more Orcs!
The next thing I want to do is be able to add different players and player types. That’s gonna be a pain because I really don’t know where to start with that one. Help?
July 5th, 2012 at 2:15 pm e
hey there and thank you for your info – I’ve definitely picked up anything new from right here. I did however expertise some technical issues using this web site, since I experienced to reload the web site many times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I’m complaining, but slow loading instances times will sometimes affect your placement in google and can damage your quality score if ads and marketing with Adwords. Well I am adding this RSS to my email and can look out for much more of your respective fascinating content. Ensure that you update this again soon..
October 18th, 2012 at 10:00 pm e
You lost me, friend. I signify, I assume I get what youre indicating. I recognize anything you are stating, however you just seem to have neglected that you may obtain another individuals in the globe who look at this concern for what it basically is and might not concur with you. You may perhaps be turning absent a lot of folks who might happen to be followers of your site site.