Author Topic: Standard Player  (Read 1063 times)

I'm a new scripter and am going to try to get into it by making playertypes. I've taken a look at existing ones and they seem simple enough. However, I cannot find the standard player in the addons folder and assume it is either in a different folder, or is managed by the game itself as constants. Either way, could someone post the script for the standard player so I know what the default values are?

Start a singleplayer game and enter playerstandardarmor.save("base/standardplayer.cs"); into the console. Then open the output file and there you have it.

Thank you! Much appreciated.

I just tried it and it didn't work. It didn't give me a syntax error or anything, it just printed the line. Clicking on it does nothing... What am I supposed to do from here to "open the output file"?


................


It's much easier to just open up the blockland file and double click the "standardplayer.cs" than doing console magic. I found it...

It created a file in the base/ folder. You weren't supposed to access it from inside Blockland.

It created a file in the base/ folder. You weren't supposed to access it from inside Blockland.

Oh! That explains why I couldn't find it before! Thank you for your help, I have what I need.

For the sake of future scripters who also need this, here is the complete code:

Quote
new PlayerData(PlayerStandardArmor) {
   className = "armor";
   shapeFile = "./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";
   computeCRC = "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";
      cameraMinFov = "5";
      showEnergyBar = "0";
      brickImage = "brickImage";
      speedDamageScale = "3.8";
      cameraDefaultFov = "90";
      aiAvoidThis = "1";
      maxItems = "10";
      maxTools = "5";
      cameraMaxFov = "120";
      maxWeapons = "5";
};

Now it's all a matter of figuring out what each variable does...
« Last Edit: April 08, 2010, 09:29:47 PM by Welknair »

I've found that once you're exposed to all of the values, you see how flawed everything else is.

I have a script that pumps out playertypes when needed. It only uses speed, health, jump, tools, and jet fuel. It calculates everything else based off of those values.

Well, most if not all addon playertypes are parented to this one. That means any value they don't mention is by default what is in the standard player. I've found and know how to edit a number of these, including the speed, health, jump, tools, and energy (It's used by other mods for other things, such as mana with elemental spells) and I've figured a few other useful ones out as well.

What do you mean by:
I've found that once you're exposed to all of the values, you see how flawed everything else is.

What do you mean by:
I've found that once you're exposed to all of the values, you see how flawed everything else is.

I mean that many people leave out important variables.

Example:

"maxTimeScale" controls the speed of the walking animation. Many people change the walking speed, but not the animation.