Game Development Community

DTS, adding animation .DSQ's via .CS file

by Jeremy Alessi · in Torque Game Engine · 02/09/2006 (4:30 pm) · 12 replies

When using the Orc or Blocky character in my game at the moment the orc.cs and blocky.cs files load the .dsq sequences fine (although I am having an issue in multiplayer with networking ... but that seems to be another issue). When I attempt to load a DTS + CS in Show Tool Pro ... it crashes. I cannot load any DTS + CS combo in that tool.

I started getting into all of this because I cannot seem to get Jill to work with the ragdoll animations. Her animations are all self-contained and I was wondering what sequence I should make the ragdoll animations in the jill.cs file. Is this even possible ... to append .dsq's onto a model with self-contained animations? Ths Show Tool Pro works fine if I load jill.dts and then add the .dsq to it. I found it strange that DTS + CS loading in the Show Tool crashed with all my models. I figure I must be doing something wrong with the .CS files but ... nothing's really apparent.

Seeing a properly setup Jill + Ragdoll CS would be good.

#1
02/09/2006 (5:49 pm)
Hey Jeremy,
Quick question: does this crash in your game as well, or just in Show Tool? I know I've run Jill with the ragdoll animations in TGE as well as the RTS SK, and it definitely worked... unfortunately, that was many moons ago and I think the project is on my laptop at home.
I'm pretty sure you don't need to number the included dsqs starting _after_ the animations that are contained in the dts, though -- it should figure that out for you. I think you just start with "sequence0" regardless of whether the dts includes any sequences.
Hope that helps, feel free to email me again if you don't get it running. I'll look for my cs file when I get home.
#2
02/09/2006 (5:55 pm)
Thanks man ... I'll keep plugging on it. As of right now it doesn't crash my game ... I just get no ragdoll animation ... even though the ragdoll method is getting called and following through. The Show Tool also only crashes when I load DTS and CS. If I load the DTS and then load a DSQ it works.
#3
02/09/2006 (6:06 pm)
......
#4
02/09/2006 (6:17 pm)
This little bit does nothing ... doesn't crash Show Tool (using Load DTS & CS) ... but also doesn't load up any ragdoll anims.

datablock TSShapeConstructor(PlayerDts)
{
   baseShape = "./jill.dts";
   sequence0 = "./jill_ragdoll.dsq";
};

Now this (for the Orc) ... loads into the game (though I haven't checked networked) but it crashes Show Tool (using Load DTS & CS)!

datablock TSShapeConstructor(PlayerDts)
{
   baseShape = "./orc.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";
   sequence30 = "./kork_ragdoll.dsq ragdoll";  

   // phdana hth ->
   sequence31 = "./player_h1root.dsq h1root";
   sequence32 = "./player_h1thrust.dsq h1thrust";
   sequence33 = "./player_h1slice.dsq h1slice";
   sequence34 = "./player_h1swing.dsq h1swing";
   sequence35 = "./player_h1jumpattack.dsq h1jumpattack";
   // phdana stun ->
   sequence36 = "./player_h1stunde.dsq h1stun";
   // <- phdana stun
   // <- phdana hth
};
#5
02/09/2006 (6:25 pm)
OK, the Block and Orc crash in networked mode as soon as they hit the ground or another player. Not sure what's up with that.

(They also have no animation on the joining computer, Jill was able to join but had no ragdoll anims and it died when two characters collided which calls the ragdoll animation)
#6
02/09/2006 (7:14 pm)
OK, problem was the name passed to the constructor. I had different names at first for all my characters but they were JillDts, OrcDts, and BlockyDts. What I needed was PlayerJill, PlayerOrc, and PlayerBlocky ... now it all works ... networked etc... Need to check the Show Tool but I can imagine it works.
#7
02/09/2006 (7:16 pm)
Hmm... Show Tool Load DTS & CS still doesn't work ... strange!
#8
02/10/2006 (5:57 am)
Hey Jeremy,

The problem you're probably having with the Show Tool is that when loading it that way the Show Tool assumes the name of your .cs file is the same name as your .dts file. So if you try to load jill.dts it looks for jill.cs. Though you should have gotten an error message telling you that instead of a crash, so there may be more to it.
#9
02/10/2006 (12:31 pm)
Yeah they are named the same. jill.dts and jill.cs, orc.dts and orc.cs, blocky.dts and blocky.cs ... I'm sure there is something more ... a solution will present itself ... as always ;)
#10
02/10/2006 (5:16 pm)
I've noticed that spaces in folder name borks the process, try putting the Project directory right on the Root of yer main drive and try from there or eliminate the spaces... I've gotten it to work, pretty sure spaces are a big culprit. I can view my Project's entire asset Also the naming issue as noted above.

As an example; I just loaded a DTS & CS from this location and it works fine(using MS pathing as it appears in TSTPro:[C:\m7player/player.dts].

My script is named, "player.cs" and the dts shape is named "player.dts", the TSShapeConstructor is looking for (PlayerDts).

My boxy boy avatar appears and all the sequences are loaded into the shape.

I was never aware of this Player prefix to the shape's name...??? Hm.....
#11
02/26/2006 (9:28 am)
Did you get this fixed. I was looking at the jill character when I was messing with oust months ago, along with my own models. I can't remember for sure, but I think Jill and the Ork have different rigs, Jill had a custom one with some ankle joint bones or something. I don't really remember now, but you should check that they have the same bones otherwise the ragdol animation may not work.

I'm guessing the ragdoll is for the default Orc skelleton. so you need to keep the same bone structure.
#12
02/26/2006 (10:27 am)
Yeah got it working in engine (as stated above) haven't messed with showtool again. Jill has a separate ragdoll animation which comes with the ragdoll pack.