Author Topic: Replace default player animations  (Read 773 times)

I'm trying to replace the normal player's crouch animations with the run animations, but I'm having a hard time and I can't seem to get it right. Is there something I'm doing wrong?

Code: [Select]
//sprintPlayer.cs

datablock TSShapeConstructor(sprintDts)
{
baseShape  = "./m.dts";
sequence0  = "./m_root.dsq root";

sequence1  = "./m_run.dsq run";
sequence2  = "./m_run.dsq walk";
sequence3  = "./m_back.dsq back";
sequence4  = "./m_side.dsq side";

sequence5  = "./m_root.dsq crouch";
sequence6  = "./m_run.dsq crouchRun";
sequence7  = "./m_back.dsq crouchBack";
sequence8  = "./m_side.dsq crouchSide";

sequence9  = "./m_look.dsq look";
sequence10 = "./m_root.dsq headside";
sequence11 = "./m_root.dsq headUp";

sequence12 = "./m_jump.dsq jump";
sequence13 = "./m_jump.dsq standjump";
sequence14 = "./m_root.dsq fall";
sequence15 = "./m_root.dsq land";

sequence16 = "./m_armAttack.dsq armAttack";
sequence17 = "./m_root.dsq armReadyLeft";
sequence18 = "./m_root.dsq armReadyRight";
sequence19 = "./m_root.dsq armReadyBoth";
sequence20 = "./m_spearReady.dsq spearready"; 
sequence21 = "./m_root.dsq spearThrow";

sequence22 = "./m_root.dsq talk"; 

sequence23 = "./m_death1.dsq death1";

sequence24 = "./m_shiftUp.dsq shiftUp";
sequence25 = "./m_shiftDown.dsq shiftDown";
sequence26 = "./m_shiftAway.dsq shiftAway";
sequence27 = "./m_shiftTo.dsq shiftTo";
sequence28 = "./m_shiftLeft.dsq shiftLeft";
sequence29 = "./m_shiftRight.dsq shiftRight";
sequence30 = "./m_rotCW.dsq rotCW";
sequence31 = "./m_rotCCW.dsq rotCCW";

sequence32 = "./m_root.dsq undo";
sequence33 = "./m_plant.dsq plant";

sequence34 = "./m_root.dsq sit";

sequence35 = "./m_root.dsq wrench";

sequence36 = "./m_root.dsq activate";
sequence37 = "./m_root.dsq activate2";

sequence38 = "./m_root.dsq leftrecoil";
};   

datablock PlayerData(PlayerSprintArmor : PlayerStandardArmor)
{
   runForce = 100 * 90;
   runEnergyDrain = 0;
   minRunEnergy = 0;
   maxForwardSpeed = 7;
   maxBackwardSpeed = 7;
   maxSideSpeed = 7;

   maxForwardCrouchSpeed = 15;
   maxBackwardCrouchSpeed = 15;
   maxSideCrouchSpeed = 15;

   jumpForce = 9 * 90; //8.3 * 90;
   jumpEnergyDrain = 0;
   minJumpEnergy = 0;
   jumpDelay = 0;

minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;

uiName = "Sprint Player";
showEnergyBar = false;

   runSurfaceAngle  = 55;
   jumpSurfaceAngle = 55;
};

I think, by that logic, the game wants to overwrite the old stuff. You'd be better off packaging the crouch trigger and making it do the other instead than changing the baseline of the entire model...

The shape constructor datablock is adding animations for "./m.dts" which will be in your mod's folder. The player type doesn't have a shape file set, so it's using the one PlayerStandardArmor has which is the normal one with the old animations.

The shape constructor datablock is adding animations for "./m.dts" which will be in your mod's folder. The player type doesn't have a shape file set, so it's using the one PlayerStandardArmor has which is the normal one with the old animations.

I realized this, and just to see if it would work, I added all the dsq files to the folder. It still didn't work.

I think, by that logic, the game wants to overwrite the old stuff. You'd be better off packaging the crouch trigger and making it do the other instead than changing the baseline of the entire model...

How would I do that?

I realized this, and just to see if it would work, I added all the dsq files to the folder. It still didn't work.
The player type doesn't have a shape file set, so it's using the ... normal one with the old animations.

-quotes-

Oh. So is there any way for me to do it, or am I out of luck?

Oh. So is there any way for me to do it, or am I out of luck?
set the shapeFile variable on the datablock

set the shapeFile variable on the datablock

I'm sorry, I don't really understand what you said. Which datablock do I set the shapeFile variable? And is the variable "./m.dts"?

Well, for that you'd need an m.dts file in the mod's folder. Which causes massive extra downloads of files they already have installed by default.

Well, for that you'd need an m.dts file in the mod's folder. Which causes massive extra downloads of files they already have installed by default.

Oh.... Might there be any other way I could do this?

Smallish bump, quick question.

If I was to stick the m.dts and all the dsq files in there, would my script then work or would I need to still change something? Or would it even work at all?


Or is there a complete other way on how to achieve this?