Require( "animob/animob.ts" ) function rgb8Color( r, g, b ) return ( r*65536 + g*256 + b ) end return AnimobAconf({ version = 1, -- All aconf files have a version number. We will be backwards compatable object = { productName = "Hovercraft", appearance = { modelName = "mhc001hb_lightning.model", modelSettings = { --thc01hb004_lightning = { -- colormap = "hc/thc01hb003_redwood.jpg", --}, }, }, animationTriggers = { default = { -- Normal "idle" animation type = "emotion", -- only type currently supported is "emotion" emotionName = "em001hco00hb_idle", -- Name of this specific emotion }, NoseGrabBoard = { type = "emotion", emotionName = "em001hco01hb_nosegrab", }, RightGrabBoard = { type = "emotion", emotionName = "em001hco02hb_rightgrab", }, TailGrabBoard = { type = "emotion", emotionName = "em001hco03hb_tailgrab", }, LeftGrabBoard = { type = "emotion", emotionName = "em001hco04hb_leftgrab", }, RocketBoard = { type = "emotion", emotionName = "em001hco07hb_rocket", }, }, }, appKeys = { -- levitation physics variables levitationSpringCompressionConstant = 840.0, levitationSpringCompressionExponent = 0.8, levitationSpringExtensionConstant = 2000.0, levitationSpringExtensionExponent = 0.85, levitationSpringLength = 3.1, levitationDamperConstant = 120.0, rootVerticalStabilizerSpringExtensionConstant = 300.0, rootVerticalStabilizerSpringLength = 1.5, -- avatar animation avAnimSpeedMax = 17.0, -- doesn't have to be same as maxVelocity avAnimSpeedInfluence = 0.7, -- if the influences don't sum to 1, their sum will be clamped. Allowed. avAnimLeanInfluence = 0.0, -- the effect of centripetal force on avatar's LR axis avAnimPitchDownInfluence = 1.3, -- the effect of pitching down the board on avatar's FB axis. avAnimLeanCentripetalFactorMax = 1.0, -- 1.0 means sideways; 0.0 means vertical avAnimPitchDownMax = 0.32, -- 1.0 means pitching straight down, 0.0 means horizontal avAnimForwardBackOffset = 0.0, -- added to forward/back factors to allow you to set the center -- drive physics maxVelocity = 17.0, maxAcceleration = 15.0, maxDeceleration = 11.0, lateralStaticFrictionForce = 1500.0, lateralDynamicFrictionForce = 0.125, conformToGround = 1, pendulumMass = 20.0, -- motion forces brakeRotationForce = 240.0, brakeRotationSpeed = 0.15, internalFrictionDamperConstant = 200.0, inAirInternalFrictionDamperConstant = 200.0, -- root offset rootHeightOffset = 0.0, -- sensitivity goalOriSensitivity = 1.0, goalOriHeadingLimit = 70, goalOriPitchLimit = 40, keySensitivity = 3.0, -- heading control headingStableKp = 70.0, headingStableKd = 100.0, headingUnstableKp = 7.0, headingUnstableKd = 100.0, headingAerialKp = 20.0, headingAerialKd = 100.0, -- camera section smoothFactor = 0.055, headingSpeedLimit = 7.0, pitchSpeedLimit = 1.0, inAirPitchSpeedLimit = 0.6, focusUpOffset = 0.2, -- nitro parameters nitroConsumptionRate = 0.033, -- range(0-1) how fast nitro is consumed. nitroRefillRate = 0.014, -- range(0-1) how fast nitro is re-filled. nitroRefillDelay = 2, -- elapsed steps before nitro can be refilled nitroVelocity = 35.0, -- in meters per second nitroAcceleration = 2000.0, -- in meters per second squared useNitro = 1, -- 1 enables nitro, 0 disables it -- jump parameters jumpConsumptionRate = 0.08, -- range(0-1) how fast jump energy is consumed. jumpRefillRate = 0.04, -- range(0-1) how fast jump energy is regerated. maxJumpForce = 50.0, minJumpForce = 23.0, jumpAndTuckVelocity = 2.0, -- height rigidity rigidHeight = 0.91, rigidHeightStiffness = 500.0, -- Mouse Rotation Parameters -- ************************************************************** -- mouseMomentMagnitude - scalar used to convert normalized mouse deltas -- into a trick moment magnitude. -- mouseMomentDecay - scalar used to decay the current trick moment axis( 0 - 1.0 ) -- mouseMomentMaximum - the maximum magnitude of the trick moment. -- mouseDeltaXMax, mouseDeltaYMax - we normalize the mouse deltas these values. -- mouseDeltaXExponent, mouseDeltaYExponent - mouse delta normalization curves. 1.0 is linear. mouseMomentMagnitude = 1200.0, mouseMomentDecay = 0.97, mouseMomentMaximum = 1500.0, mouseDeltaXMax = 400.0, mouseDeltaYMax = 700.0, mouseDeltaXExponent = 1.2, mouseDeltaYExponent = 1.2, -- trick tuning variables trickModeTimeBufferAfterKeyRelease = 15, -- in steps -- sound parameters masterSoundAmpScalar = 1.0, runningSoundRadius = 30.0, idleSoundRadius = 5.0, coolDownSoundScalar = 0.9, engineIdleSoundAmp = 0.085, engineIdleSoundPitch = -0.5, engineSoundPhaserOn = 0, engineSoundPhaserRandomPitchMin = 0.00, engineSoundPhaserRandomPitchMax = 0.00, engineSoundAmpMin = 0.1, engineSoundAmpMax = 0.35, engineSoundPitchMin = -0.1, engineSoundPitchMax = 0.7, engineSoundHPitchMin = -0.1, engineSoundHPitchMax = 0.3, engineSoundRandomAmount = 0.03, pitchSoundAmpMin = 0.0, pitchSoundAmpMax = 0.65, pitchSoundPitchMin = -1.0, pitchSoundPitchMax = 1.0, yawSoundAmpMin = 0.0, yawSoundAmpMax = 0.5, yawSoundPitchMin = -0.35, yawSoundPitchMax = 0.35, whooshSoundAmpMin = 0.1, whooshSoundAmpMax = 0.35, whooshSoundHeadingDiffMin = 9.0, whooshSoundHeadingDiffMax = 50.0, whooshSoundMaxVel = 11.0, whooshSoundMinVel = 5.5, brakeSoundAmpMin = 0.1, brakeSoundAmpMax = 0.35, brakeSoundPitchMin = -1.0, brakeSoundPitchMax = 0.0, nitroSoundAmp = 0.45, startStopSoundAmp = 0.35, soundTrickModePitchBend = 0.1, -- default In-Air emotion, used to be jump pose. inAirEmotionName = "HcJump", riderEmotionAttributeName = "UiAxis", readyEmotionAttributeName = "HcReady", -- default idle and crouching drag coefficients, air resistance along -- the x,y, and z axis of the hoverboard. idleDragCoefficients = { 0.1, 0.6, 0.09 }, crouchDragCoefficients = { 0.1, 0.6, 0.01 }, -- Kicking rider off -- 2 parameters affect kicking riders off. Note that kick off detection -- only occurs when the hovercraft has contact with the ground. Both -- of the following values are evaluated during surface contact only. -- -- 1. kickOffHcToSurfaceSensitivity - dotproduct between the surface -- normal and the hovercraft up vector. If the value is less then this -- sensitivity then detection is true. Value is -1 to 1, where -1 means -- the hovercraft has to be perfectly inverted with respect to the -- surface and 1 means at any orientation. -- -- 2. kickOffHcToGlobalUpSensitivity - dotProduct between the global -- up and the hovercraft up vector. If this value is less than the -- sensitivity then detection is true. Value is -1 to 1, where -1 means -- the hovercraft has to be perfectly inverted with respect to the global -- u pand 1 means any orientation. -- kickOffHcToSurfaceSensitivity = -0.8, kickOffHcToGlobalUpSensitivity = -0.5, -- TRICK SCORING poseDesc = { curveExponent = 1.5, pointsAtMinimum = 0.1, pointsAtMaximum = 1.5, stepsAtMinimum = 15, stepsAtMaximum = 75, }, fixedRotationEval = { rotationsAtMinimum = 0.5, rotationsAtMaximum = 5.0, pointsAtMinimum = 0.5, pointsAtMaximum = 1.5, curveExponent = 1.8, -- used when mapping rotations to score points minimumAngleToRotateInOneStep = 2.0, -- must move this much to trigger a rotation axisAligmentMinimum = 0.65, -- ( 0-1 ) minimum aligment required to continue a rotation. }, fixedRotationFinishEval = { scoringArcAtWhichRiderGetsMostPoints = 0.5, -- in percent of full rotation pointsAtMinimum = 0.5, -- the smaller the difference the greater the points since we are closer to the aligment arc pointsAtMaximum = 0.02, -- a big difference means that less points since we are further from the aligment arc curveExponent = 3, -- used when mapping arc to points. }, noLandTrickBonus = { maxStepsToGetBonus = 15, pointsAtMaximum = 0.05, pointsAtMinimum = 0.6, curveExponent = 2.0, }, landingScoreMultiplier = 0.4, landingScoreMinimum = 0.1, trickScoreMultiplier = 1.0, flatYawMultiplier = 0.75, simpleTrickMultiplier = 0.6, celebrations = { { threshold = 1.25, -- score required to play this celebration riderEmotionName = "HcCelebrate01", -- rider emotion name ( optional ), this cannot be a looped animation -- objectEmotionName = "celebrationOne", -- object emotion name ( optional ), this cannot be a looped animation name = "NewbieSKillCelebration", -- celebration name, for identification sound = "celebration_1", -- celebration sound name ( optional ) volume = 0.35, -- volume of sound ( optional ) }, { threshold = 2.5, riderEmotionName = "HcCelebrate02", -- objectEmotionName = "celebrationTwobject", name = "CoolSKillCelebration", sound = "celebration_2", volume = 0.5, }, { threshold = 3.5, riderEmotionName = "HcCelebrate03", -- objectEmotionName = "celebrationTwobject", name = "L33tSKillCelebration", sound = "celebration_3", volume = 0.45, }, }, --*************************************************************** -- Trick Definitions -- -- key: HbForwardKey, HbBackwardKey, HbLeftKey, HbRightKey -- HbAction0Key, HbAction1Key -- any combination of these keys, order is not considered -- This value is required. -- Note that to enable the action keys you must -- set enableActionKeysForTricks = 1 since this is an -- advanced feature. -- -- leanInfluence: the hoverboard-relative position at which we apply a -- 1 kg mass. The larger the distance the more the lean. -- -- riderTriggerName: named rider emotion to playback. This value is optional. -- -- objectTriggerName: named object emotion to playback. This value is optional. -- -- duration: Number of steps to hold trick, omit for infinite. -- -- Force Applications -- Up to 4 forces may be combined for each trick. -- -- type: HbTranslate, HbRotate -- Refers to the application of a force to the trick. -- -- direction: HbXAxis, HbYAxis, HbZAxis, HbGlobalUpAxis, -- HbMouseAxis -- All axis' are hoverboard-relative expect ones noted -- as global. MouseAxis uses goal ori pitch and heading -- deltas to approximate a rotation axis. -- -- magnitude: The strength of the force applied to the trick. -- Changing the sign inverts the axis of rotation or -- the translation force. -- -- dragCoefficients: Drag along the hoverboards x, y, and z axis. -- This value is optional, if not value is -- set then the hoverboard uses the idle -- drag coefficients. -- -- rotationRestriction: disables application of moments( torques ) -- Options are HbXAxis, HbYAxis, and HbZAxis. -- --*************************************************************** -- -- trickDefs = { -- SpiralUp = { -- key = {"HbBackwardKey","HbForwardKey"}, -- riderTriggerName = "HcJump", -- objectTriggerName = "HcBoardLean", -- leanInfluence = {0.0, 0.0, -15.0}, -- duration = 30, -- dragCoefficients = { 0.4, 1.0, 0.09 }, -- rotationRestrictions = { "HbXAxis", "HbYAxis" }, -- forces = { -- { -- type = "HbRotate", -- direction = "HbGlobalUpAxis", -- magnitude = -1400, -- }, -- { -- type = "HbTranslate", -- direction = "HbGlobalUpAxis", -- magnitude = 300, -- }, -- }, -- }, -- }, trickDefs = { FrontsideGrab = { key = {"HbLeftKey"}, riderTriggerName = "HcLeft", objectTriggerName = "LeftGrabBoard", leanInfluence = {5.0, 0.0, 0.0}, forces = { { type = "HbRotate", direction = "HbYAxis", magnitude = -2200, }, }, }, BacksideGrab = { key = {"HbRightKey"}, riderTriggerName = "HcRight", objectTriggerName = "RightGrabBoard", leanInfluence = {-5.0, 0.0, 0.0}, dragCoefficients = { 0.1, 1.0, 0.01 }, forces = { { type = "HbRotate", direction = "HbYAxis", magnitude = 2200, }, }, }, NoseGrab = { key = {"HbForwardKey"}, riderTriggerName = "HcNose", objectTriggerName = "NoseGrabBoard", leanInfluence = {0.0, 0.0, -10.0}, forces = { { type = "HbRotate", direction = "HbXAxis", magnitude = 1800, }, }, }, TailGrab = { key = {"HbBackwardKey"}, riderTriggerName = "HcTail", objectTriggerName = "TailGrabBoard", leanInfluence = {0.0, 0.0, -5.0}, canLand = 0, forces = { { type = "HbRotate", direction = "HbXAxis", magnitude = -1800, }, }, }, Rocket = { key = {"HbForwardKey","HbBackwardKey"}, riderTriggerName = "HcRocket01", leanInfluence = {0.0, 0.0, -5.0}, canLand = 0, forces = { { type = "HbRotate", direction = "HbXAxis", magnitude = 100, }, { type = "HbTranslate", direction = "HbZAxis", magnitude = -150, }, }, }, RocketRoll = { key = {"HbLeftKey","HbRightKey"}, riderTriggerName = "HcRocket", objectTriggerName = "RocketBoard", leanInfluence = {0.0, 0.0, -5.0}, canLand = 0, forces = { { type = "HbRotate", direction = "HbXAxis", magnitude = 500, }, { type = "HbRotate", direction = "HbZAxis", magnitude = 1300, }, { type = "HbTranslate", direction = "HbZAxis", magnitude = -50, }, }, }, }, --*************************************************************** -- Tricks -- Up to 12 tricks are supported per hoverboard aconf. -- Tricks must reference a trick definition. -- --*************************************************************** tricks = { "NoseGrab", "BacksideGrab", "TailGrab", "FrontsideGrab", "Rocket", "RocketRoll", }, --*************************************************************** -- Effects -- Each effect has common properties and unique properties. -- The common properties are available to all effects. -- -- Common properties -- type: Flame, TerrainKickUp, SmokeTrail2 -- -- joint: A named joint obtained from the model skeleton. -- Note that this value overrides the offset if both -- are defined. -- -- offset: A specified point relative to the root of the animob. -- -- velSource: the particles velocity diphy ball reference. Use the -- diphy ball names defined in the diphy section. -- -- velSourceInfluence - a (0-1) ranged value that scales the -- velocity source. Setting this to zero effectively disables -- the velSource. Currently, this value only applies to flame -- effects. -- -- direction - emitter direction in local animob coordinates. -- The direction is specified as x,y,z. -- -- -- Unique properties -- -- for Flame, -- flameAngle -- particleStartWidth -- flameHeight -- flameSpeed -- ParticlePerFrame -- -- for TerrainKickUp, -- kickUpCone -- particlePerSecond -- speed -- -- for SmokeTrail2, -- puffInitialRadius -- puffRadiusRate -- color ( use rgb8Color( ) function ) -- density -- puffLifespan -- trailRandomSpeed -- puffTexture -- streakTexture --*************************************************************** fxDefs = { trickFx = { type = "Flame", flameAngle = 90.0, particleStartWidth = 0.06, flameHeight = 0.4, flameSpeed = 0.3, particlePerFrame = 3.0, joint = "Exhaust01", direction = { 0, 1, 0 }, velSource = "root", }, dirtKick = { type = "TerrainKickUp", kickUpCone = 80.0, particlePerSecond = 40.0, speed = 5, offset = { 0, -0.18, 0 }, velSource = "rearBall", }, thrustSmokeLeft = { type = "Flame", joint = "Exhaust00", flameAngle = 30.0, particleStartWidth = 0.05, flameHeight = 0.02, flameSpeed = 1.5, particlePerFrame = 2.0, direction = { 0, 0.0, 1.0 }, velSource = "root", velSourceInfluence = 0.99, flameTexture = "fx/t0000fx6_hpxawstblue.png", }, thrustSmokeRight = { type = "Flame", joint = "Exhaust01", flameAngle = 30.0, particleStartWidth = 0.05, flameHeight = 0.02, flameSpeed = 1.5, particlePerFrame = 2.0, velSource = "root", velSourceInfluence = 0.99, direction = { 0, 0.0, 1.0 }, flameTexture = "fx/t0000fx6_hpxawstblue.png", }, nitroSmokeLeft = { type = "SmokeTrail2", joint = "Exhaust00", puffInitialRadius = 0.1, puffRadiusGrowthRate = -0.2, color = rgb8Color( 142, 188, 197 ), density = 1.2, puffLifespan = 0.4, trailRandomSeed = 1.0, direction = { 0, 0.0, 1.0 }, puffTexture = "fx/smokeTrailPuff1.png", streakTexture = "fx/smokeTrailStreak1.png", }, nitroSmokeRight = { type = "SmokeTrail2", joint = "Exhaust01", puffInitialRadius = 0.1, puffRadiusGrowthRate = -0.2, color = rgb8Color( 142, 188, 197 ), density = 1.2, puffLifespan = 0.4, trailRandomSeed = 1.0, direction = { 0, 0.0, 1.0 }, puffTexture = "fx/smokeTrailPuff1.png", streakTexture = "fx/smokeTrailStreak1.png", }, }, -- *************************************************************** -- Effects Controls -- -- input: HbNitro, HbThrust, HbDirtKick, HbEngine -- -- each input can have a set of effect outputs -- -- fx: named effect defined in fxDefs. -- -- onOff: two state channel. subscribing to this channel -- means the entire effect will be either on or off. -- Eventually, we will stream continuous data to the -- effect. -- *************************************************************** fxCtrls = { nitro = { input = "HbNitro", output = { { fx = "nitroSmokeLeft", onOff = 1, }, { fx = "nitroSmokeRight", onOff = 1, }, }, }, engine = { input = "HbThrust", output = { { fx = "thrustSmokeLeft", onOff = 1, }, { fx = "thrustSmokeRight", onOff = 1, }, }, }, kick = { input = "HbDirtKick", output = { { fx = "dirtKick", onOff = 1, }, }, }, }, }, balls = { moveObjectAsWholeOnActorCollision = 1, root = { joint = "root", radius = 0.5, mass = 20.0, restitution = 0.01, staticFriction = 0.1, dynamicFriction = 0.05, nearbyCollisionRadius = 3.2, collisionRadius = 1.0, airFriction = 0.05, waterFriction = 0.8, density = 1.06, volumeInWaterScaleFactor = 1.0, collision = 0, }, rearBall = { joint = "root", offset = {0.0, 1.0, 1.0}, radius = 1.5, mass = 30.0, restitution = 0.01, staticFriction = 0.001, dynamicFriction = 0.05, nearbyCollisionRadius = 3.2, airFriction = 0.05, density = 0.87, waterFriction = 4.0, volumeInWaterScaleFactor = 1.0, }, frontBall = { joint = "root", offset = {0.0, 1.0, -1.0}, radius = 1.5, mass = 30.0, restitution = 0.01, staticFriction = 0.001, dynamicFriction = 0.05, nearbyCollisionRadius = 3.2, airFriction = 0.05, density = 0.87, waterFriction = 4.0, volumeInWaterScaleFactor = 1.0, }, }, springs = { { ball1 = "root", ball2 = "rearBall", idealLength = 1.65, contractionForce = 9000.0, expansionForce = 9000.0, dampingCoefficient = 50.0, }, { ball1 = "root", ball2 = "frontBall", idealLength = 1.65, contractionForce = 9000.0, expansionForce = 9000.0, dampingCoefficient = 50.0, }, { ball1 = "frontBall", ball2 = "rearBall", idealLength = 2.75, contractionForce = 6000.0, expansionForce = 6000.0, dampingCoefficient = 50.0, }, }, seats = { driver = { joint = "driver", getOnTitle = "Hop On", getOffTitle = "Hop Off", lockedTitle = "Locked", lockTitle = "Lock", unlockTitle = "Unlock", teleblurDuration = 0, driver = 1, autoKickOff = 1, getOnActionModeChange = AnimobActionModeChangeNone, cameras = { driver = { upDistance = 1.2, backDistance = 9.4, focusPullTightness = 1.0, pitchFocusTightness = 1.0, userControlledPitchFocus = 0, positionPullTightness = 0.32, fovTightness = 0.9, tightnessTightness = 1.0, desiredFov = 60.0, desiredOrthographicWidth = 2.0, minNearDistance = 0.5, subjectNonclipRadius = 1.0, automaticTeleportDistance = 100.0, desiredProjectionType = AnimobCameraProjectionTypePerspective, cameraMode = AnimobCameraModeVehicle, visibilityEnsurerMode = AnimobVisibilityEnsurerModeTightenToFocus, pitchThreshold = 7.0, pitchMax = 20.0, pitchSlope = 2.0, pitchSensitivity = 1.5, upThreshold = 0.2, upMax = 1.0, upSlope = 1.0, upSensitivity = 1.5, }, }, animationTriggers = { default = { type = "emotion", emotionName = "em001hc01_rider01", axes = { { axisName = "UiAxis", direction = "FB", prevValueBlend = 0.75 }, { axisName = "UiAxis", direction = "LR", valueScalar = 1.7, prevValueBlend = 0.7 }, }, }, HcJump = { name = "HcJump", type = "emotion", emotionName = "em001hc00_tuck01", }, HcReady = { name = "HcReady", type = "emotion", emotionName = "em001hc06_ready", }, HcNose = { name = "HcNose", type = "emotion", emotionName = "em001hc01_grabnose", }, HcTail = { name = "HcTail", type = "emotion", emotionName = "em001hc03_grabtail", }, HcLeft = { name = "HcLeft", type = "emotion", emotionName = "em001hc04_grableft", }, HcRight = { name = "HcRight", type = "emotion", emotionName = "em001hc02_grabright", }, HcRocket = { name = "HcRocket", type = "emotion", emotionName = "em001hc05_rocket", }, HcRocket01 = { name = "HcRocket01", type = "emotion", emotionName = "em001hc05_rocket01", }, HcCelebrate01 = { name = "HcCelebrate01", type = "emotion", emotionName = "em001hc07_celebrate01", }, HcCelebrate02 = { name = "HcCelebrate02", type = "emotion", emotionName = "em001hc08_celebrate02", }, HcCelebrate03 = { name = "HcCelebrate03", type = "emotion", emotionName = "em001hc09_celebrate03", }, }, getOn = { -- Optional get on animation section userAnim = "a001hc05hb_hopon", objectAnim = "a001hco01hb_hopon" -- optional }, getOff = { userAnim = "a001hc06hb_hopoff", objectAnim = "a001hco02hb_hopoff" }, }, }, Sounds3d = { nitro = { soundName = "hovercraft_nitro", ballSource = "rearBall", }, engine = { soundName = "hovercraft_engine", looping = 1, ballSource = "frontBall", }, engineStartUp = { soundName = "hovercraft_start_up", ballSource = "frontBall", }, engineShutDown = { soundName = "hovercraft_shut_down", ballSource = "frontBall", }, pitch = { soundName = "hovercraft_pitch", looping = 1, ballSource = "frontBall", }, yaw = { soundName = "hovercraft_yaw", looping = 1, ballSource = "frontBall", }, whooshPos = { soundName = "hovercraft_whoosh_pos", ballSource = "frontBall", }, whooshNeg = { soundName = "hovercraft_whoosh_neg", ballSource = "frontBall", }, brake = { soundName = "hovercraft_brake", looping = 1, ballSource = "frontBall", }, lock = { soundName = "hovercraft_brake", looping = 0, ballSource = "frontBall", }, unlock = { soundName = "hovercraft_brake", looping = 0, ballSource = "frontBall", }, trickStartSuccess = { soundName = "hovercraft_trickstart_success", ballSource = "frontBall", }, trickStartFail = { soundName = "hovercraft_trickstart_fail", ballSource = "frontBall", }, celebration_1 = { soundName = "hovercraft_celebration_1", ballSource = "frontBall", }, celebration_2 = { soundName = "hovercraft_celebration_2", ballSource = "frontBall", }, celebration_3 = { soundName = "hovercraft_celebration_3", ballSource = "frontBall", }, }, carriable = { icon = "ico_hoverboard01.png", }, })