Author Topic: Player standard armor base code? How do I disable a datablock from loading?  (Read 4245 times)

Hi, I was wondering if anyone could figure out all the datablocks that are inside the PlayerStandard code and post them here, no I do not want the PlayerStandardArmor, I've already got that one down, I need the part that lists all the animations and the directories, and the debris, and whatever else is required, I'm on the verge of adding custom animations to the main playertype here

EDIT: found the code with all the animations, is there anything else?
« Last Edit: December 13, 2011, 11:35:54 PM by soba »

Can't you just do playerStandarArmor.dump();

Can't you just do playerStandarArmor.dump();

That would be all the methods and fields on playerStandardArmor*. He's looking for "all the animations, and the directories, and the debris, and whatever else is required".

Anyhow, the .dts, it's textures and it's animations are in base/data/shapes/player. The animation constructor is named mDts.

Okay, I got it ingame, animations and all, but avatar code isn't handled automaticly it seems....



can anyone walk me through this?

You might find this relevant to what you are doing (custom animations).

Alright, I'm trying a new approach

Code: [Select]
new TSShapeConstructor(mDts) {
   baseShape = "base/data/shapes/player/m.dts";
   sequence0 = "base/data/shapes/player/m_root.dsq root";
   sequence1 = "base/data/shapes/player/m_run.dsq run";
   sequence2 = "base/data/shapes/player/m_run.dsq walk";
   sequence3 = "base/data/shapes/player/m_back.dsq back";
   sequence4 = "base/data/shapes/player/m_side.dsq side";
   sequence5 = "base/data/shapes/player/m_crouch.dsq crouch";
   sequence6 = "base/data/shapes/player/m_crouchRun.dsq crouchRun";
   sequence7 = "base/data/shapes/player/m_crouchBack.dsq crouchBack";
   sequence8 = "base/data/shapes/player/m_crouchSide.dsq crouchSide";
   sequence9 = "base/data/shapes/player/m_look.dsq look";
   sequence10 = "base/data/shapes/player/m_headSide.dsq headside";
   sequence11 = "base/data/shapes/player/m_headup.dsq headUp";
   sequence12 = "base/data/shapes/player/m_standjump.dsq jump";
   sequence13 = "base/data/shapes/player/m_standjump.dsq standjump";
   sequence14 = "base/data/shapes/player/m_fall.dsq fall";
   sequence15 = "base/data/shapes/player/m_root.dsq land";
   sequence16 = "base/data/shapes/player/m_armAttack.dsq armAttack";
   sequence17 = "base/data/shapes/player/m_armReadyLeft.dsq armReadyLeft";
   sequence18 = "base/data/shapes/player/m_armReadyRight.dsq armReadyRight";
   sequence19 = "base/data/shapes/player/m_armReadyBoth.dsq armReadyBoth";
   sequence20 = "base/data/shapes/player/m_spearReady.dsq spearready";
   sequence21 = "base/data/shapes/player/m_spearThrow.dsq spearThrow";
   sequence22 = "base/data/shapes/player/m_talk.dsq talk";
   sequence23 = "base/data/shapes/player/m_death1.dsq death1";
   sequence24 = "base/data/shapes/player/m_shiftUp.dsq shiftUp";
   sequence25 = "base/data/shapes/player/m_shiftDown.dsq shiftDown";
   sequence26 = "base/data/shapes/player/m_shiftAway.dsq shiftAway";
   sequence27 = "base/data/shapes/player/m_shiftTo.dsq shiftTo";
   sequence28 = "base/data/shapes/player/m_shiftLeft.dsq shiftLeft";
   sequence29 = "base/data/shapes/player/m_shiftRight.dsq shiftRight";
   sequence30 = "base/data/shapes/player/m_rotCW.dsq rotCW";
   sequence31 = "base/data/shapes/player/m_rotCCW.dsq rotCCW";
   sequence32 = "base/data/shapes/player/m_undo.dsq undo";
   sequence33 = "base/data/shapes/player/m_plant.dsq plant";
   sequence34 = "base/data/shapes/player/m_sit.dsq sit";
   sequence35 = "base/data/shapes/player/m_wrench.dsq wrench";
   sequence36 = "base/data/shapes/player/m_activate.dsq activate";
   sequence37 = "base/data/shapes/player/m_activate2.dsq activate2";
   sequence38 = "base/data/shapes/player/m_leftrecoil.dsq leftrecoil";
};
new PlayerData(PlayerStandardArmor) {
   className = "armor";
   shapeFile = "base/data/shapes/player/m.dts";
   emap = "1";
   renderWhenDestroyed = "1";
   mass = "90";
   drag = "0.1";
   density = "0.7";
   maxEnergy = "100";
   maxDamage = "100";
   disabledLevel = "1";
   destroyedLevel = "1";
   repairRate = "0.33";
   rechargeRate = "0.8";
   inheritEnergyFromMount = "0";
   isInvincible = "0";
   firstPersonOnly = "0";
   thirdPersonOnly = "0";
   useEyePoint = "0";
   observeThroughObject = "0";
   renderFirstPerson = "0";
   pickupRadius = "1.25";
   minLookAngle = "-1.5708";
   maxLookAngle = "1.5708";
   maxFreelookAngle = "3";
   maxTimeScale = "1.5";
   maxStepHeight = "1";
   runForce = "4320";
   runEnergyDrain = "0";
   minRunEnergy = "0";
   maxForwardSpeed = "7";
   maxBackwardSpeed = "4";
   maxSideSpeed = "6";
   maxUnderwaterForwardSpeed = "8.4";
   maxUnderwaterBackwardSpeed = "7.8";
   maxUnderwaterSideSpeed = "7.8";
   runSurfaceAngle = "70";
   minImpactSpeed = "30";
   maxForwardCrouchSpeed = "3";
   maxBackwardCrouchSpeed = "2";
   maxSideCrouchSpeed = "2";
   airControl = "0.1";
   cameraTilt = "0.261";
   cameraVerticalOffset = "0.75";
   cameraHorizontalOffset = "0";
   cameraMaxDist = "8";
   cameraMinDist = "0";
   jumpForce = "1080";
   jumpEnergyDrain = "0";
   minJumpEnergy = "0";
   minJumpSpeed = "20";
   maxJumpSpeed = "30";
   jumpSurfaceAngle = "80";
   jumpDelay = "3";
   jetEnergyDrain = "0";
   minJetEnergy = "0";
   canJet = "1";
   boundingBox = "5 5 10.6";
   crouchBoundingBox = "5 5 4";
   horizMaxSpeed = "68";
   horizResistSpeed = "33";
   horizResistFactor = "0.35";
   upMaxSpeed = "80";
   upResistSpeed = "25";
   upResistFactor = "0.3";
   decalOffset = "0.25";
   jetEmitter = "playerJetEmitter";
   jetGroundEmitter = "playerJetGroundEmitter";
   jetGroundDistance = "3.98827";
   footPuffNumParts = "10";
   footPuffRadius = "0.25";
   JumpSound = "JumpSound";
   mediumSplashSoundVelocity = "10";
   hardSplashSoundVelocity = "20";
   exitSplashSoundVelocity = "5";
   impactWaterEasy = "Splash1Sound";
   impactWaterMedium = "Splash1Sound";
   impactWaterHard = "Splash1Sound";
   exitingWater = "exitWaterSound";
   Splash = "PlayerSplash";
   splashVelocity = "4";
   splashAngle = "67";
   splashFreqMod = "300";
   splashVelEpsilon = "0.6";
   bubbleEmitTime = "0.1";
   splashEmitter[0] = "PlayerFoamDropletsEmitter";
   splashEmitter[1] = "PlayerFoamEmitter";
   splashEmitter[2] = "PlayerBubbleEmitter";
   footstepSplashHeight = "0.35";
   groundImpactMinSpeed = "10";
   groundImpactShakeFreq = "4 4 4";
   groundImpactShakeAmp = "1 1 1";
   groundImpactShakeDuration = "0.8";
   groundImpactShakeFalloff = "10";
   uiName = "Standard Player";
   rideAble = "0";
   canRide = "1";
      showEnergyBar = "0";
      cameraMaxFov = "120";
      maxTools = "5";
      cameraMinFov = "5";
      maxItems = "10";
      speedDamageScale = "3.8";
      brickImage = "brickImage";
      cameraDefaultFov = "90";
      maxWeapons = "5";
      aiAvoidThis = "1";
};

This is the code I am using to test it, I want to either disable the mDts and PlayerStandardArmor datablocks from loading, delete them from the game, or overwrite them with this one, overwriting appears to crash the game upon startup, and I don't know how a datablock is unloaded from the server

Problem #1: You're using 'new'.
Problem #2: You cannot under any circumstance change any TSShapeConstructor datablock after it has already been created.
Problem #2b: You also can't make a new one that references the same baseShape as another.

Answer to "want to disable default stuff": You can't.

Problem #1: You're using 'new'.
Problem #2: You cannot under any circumstance change any TSShapeConstructor datablock after it has already been created.
Problem #2b: You also can't make a new one that references the same baseShape as another.

Answer to "want to disable default stuff": You can't.
son of a bitch...I can't find any other way to do this without getting the avatar problems, and I doubt the face.ifl and decal.ifl duplication would work in the end

I need to recreate the standard playertype, using all the animation merging crap and everything else, thats it, thats all, is there no way to do this?

-Use my code in the links people provided as a resource
-Make so players are forced to your new playertype

-Use my code in the links people provided as a resource
-Make so players are forced to your new playertype
Did use your code, your server command never played even the "slash" animation that comes with it, nor mine

Did use your code, your server command never played even the "slash" animation that comes with it, nor mine
Did you use an event or code to change your playertype first?

example
OnActivate -> Player -> ChangeDatablock -> Animation Test

Did you use an event or code to change your playertype first?

example
OnActivate -> Player -> ChangeDatablock -> Animation Test
Of course I changed my datablock, I then tried the server cmd once, didn't work, started spamming it, nothing

It works for me and heed so I don't know what you're doing wrong.

It works for me and heed so I don't know what you're doing wrong.
Downloaded the add-on, put it in my add-ons folder, turned it on upon starting a game, changed my datablock to it, said /jumpy, nothing happened, I even tried the /heed and /thread commands it came with, still nothing

Ah so Heed uploaded an edited version which doesn't have m_slash.dsq for some reason.
That causes it to not work.


Just remove this:

   sequence39 = "./content/player/m_slash.dsq slash";

Or replace it with whatever.