Modding Help How do I substantially change the mouthOffset?

Discussion in 'Starbound Modding' started by greyedstars, Aug 19, 2019.

  1. greyedstars

    greyedstars Seal Broken

    Hey, y'all- I'm working on Penguin Piracy Reborn, and while I'm trying everything I can think of, I can't get the position where it senses the mouth (3 tiles high) to shift down a tile, no matter how large of an offset I've tried.
    I've tried digging through the vanilla files, to no avail- there's a mouthposition parameter, sure, but I don't know how I would change where the mouthposition is located properly.

    Code for the config is below, and this isn't anything causing errors, so I ain't gonna provide a log.


    {
    // Configuration data for the humanoid renderer. All values in pixels.
    "globalOffset" : [0, 0],
    "headRunOffset" : [0, 0],
    "headSwimOffset" : [0, 0],
    // Offset for hair and chest when running or falling
    "runFallOffset" : 1,
    // Offset for hair and chest when ducking
    "duckOffset" : -0,
    "headDuckOffset" : [1, 0],
    "sitOffset" : -1,
    "layOffset" : -1,
    "headSitOffset" : [0, 0],
    "headLayOffset" : [0, 0],
    "recoilOffset" : [0, 0],
    // Walking sequence for front and back arms
    "armWalkSeq" : [2, 1, 2, 3, 4, 5, 4, 3],
    "armRunSeq" : [2, 1, 2, 3, 4, 5, 4, 3],
    // Used for bobbing hair, chest armor, and center of rotation.
    "walkBob" : [-1, -1, -1, -1, -1, -1, -1, -1],
    "runBob" : [-1, -1, -1, -1, -1, -1, -1, -1],
    "jumpBob" : 1,
    "swimBob" : [0, -1, -2, -1, 0, 0, 0],
    "frontArmRotationCenter" : [-4, -5],
    "backArmRotationCenter" : [-3, -5],
    // The anchor for items held in the front hand
    "frontHandPosition" : [-2, -5],
    // The pixel difference between the front and back arms, all data for the
    // back arm is calculated by adding this offset to the front arm values.
    "backArmOffset" : [6, 0],
    "mouthOffset" : [0, 0],
    "feetOffset" : [0, -10],
    "headArmorOffset" : [0, 0],
    "chestArmorOffset" : [0, -2],
    "backArmorOffset" : [-6, -2],
    "legsArmorOffset" : [0, -12],
    "vaporTrailFrames" : 8,
    "vaporTrailCycle" : 0.5,
    "deathParticles": "deathPoof",
    "particleEmitters": {
    "deathPoof" : {
    "particles" : [
    {
    "particle" : {
    "type" : "animated",
    "animation" : "/animations/playerdeath/playerdeath.animation",
    "size" : 1,
    "angularVelocity" : 0,
    "fade" : 1,
    "destructionTime" : 1,
    "position" : [0, 0],
    "initialVelocity" : [0, 0],
    "finalVelocity" : [0, 0],
    "approach" : [1, 1],
    "timeToLive" : 1.0,
    "layer" : "middle"
    }
    }
    ]
    }
    },
    "humanoidTiming" : {
    // Idle, Walk, Run, Jump, Fall, Swim, SwimIdle, Duck, Sit, Lay
    "stateCycle" : [1.0, 0.75, 0.75, 0.25, 0.25, 0.50, 0.50, 1.0, 1.0, 1.0],
    "stateFrames" : [1, 8, 8, 4, 4, 7, 2, 1, 1, 1],
    // EmoteIdle, Blabbering, Shouting, Happy, Sad, NEUTRAL, Laugh, Annoyed, Oh, OOOH, Blink, Wink Eat Sleep
    // , normal , caps , :) , :'(, :wut: , :D , , :eek:, :O , , ;)
    "emoteCycle" : [1.0, 0.3, 0.3, 0.3, 1.0, 0.3, 0.5, 1.0, 1.0, 1.0, 1.0, 0.5, 0.3, 1.0],
    "emoteFrames" : [1, 2, 2, 2, 5, 2, 2, 2, 2, 3, 3, 5, 2, 2]
    },
    "personalities" : [
    [ "idle.1", "idle.1", [0, 0], [0, 0] ], //standard
    [ "idle.2", "idle.2", [-1, 0], [0, 0] ], //gunslinger
    [ "idle.3", "idle.3", [-1, 0], [0, 0] ], //wingsout
    [ "idle.4", "idle.4", [-1, 0], [0, 0] ], //wingsforward
    [ "idle.5", "idle.5", [0, 0], [0, 0] ] //fullbelly
    ],
    "movementParameters" : {
    "standingPoly" : [ [-0.75, -1.0], [-0.35, -1.5], [0.35, -1.5], [0.75, -1.0], [0.75, -0.25], [0.35, 0.25], [-0.35, 0.25], [-0.75, -0.25] ],
    "crouchingPoly" : [ [-0.75, -1.0], [-0.35, -1.5], [0.35, -1.5], [0.75, -1.0], [0.75, -0.25], [0.35, 0.25], [-0.35, 0.25], [-0.75, -0.25] ],
    "walkSpeed": 6,
    "runSpeed": 14,
    "mass": 1.6,
    "speedLimit": 400,
    "maximumCorrection": 3,
    "maxMovementPerStep": 0.4,
    "airFriction": 0,
    "liquidFriction": 10,
    "liquidImpedance": 0,
    "normalGroundFriction": 65,
    "groundForce": 250,
    "airForce": 100,
    "liquidForce": 150,
    "airJumpProfile": {
    "jumpSpeed": 45,
    "jumpControlForce": 900,
    "jumpInitialPercentage": 1,
    "jumpHoldTime": 0,
    "multiJump": false,
    "reJumpDelay": 0.05,
    "autoJump": false,
    "collisionCancelled": true
    },
    "liquidJumpProfile": {
    "jumpSpeed": 45,
    "jumpControlForce": 400,
    "jumpInitialPercentage": 0.75,
    "jumpHoldTime": 0.25,
    "multiJump": true,
    "reJumpDelay": 0.25,
    "autoJump": true,
    "collisionCancelled": false
    },
    "bounceFactor": 0.4,
    "stopOnFirstBounce": false,
    "ignorePlatformCollision": false,
    "maximumPlatformCorrection": 0.12,
    "maximumPlatformCorrectionVelocityFactor": 0.09
    }
    }

     
  2. Zaakari

    Zaakari Big Damn Hero

    This may be a silly question, but are you sure that file is getting used?
    I looked at the vanilla "/species/penguinoid.config" file, and I can see that "mouthOffset" is [3, 3].
    I also noticed that there are no config files for any of the other species. So I would assume that the "penguinoid" file is getting used for all of them.

    Perhaps you would need to create a status effect for that race that would offset the mouth position (if that's possible).
     
    Last edited: Aug 19, 2019
  3. greyedstars

    greyedstars Seal Broken

    Humanoid.config is what the other species use, and its in the main folder of the game assets, rather than in /species.
    With the way I have things set up, penguins from the base game and penguins from penguin piracy are totally different- all the penguins in penguin piracy call for pppenguinoid rather than penguinoid
    Even then, I have no clue how I'd make a status effect like that...
     
  4. Zaakari

    Zaakari Big Damn Hero

    Perhaps something like:
    Code:
    status.setStatusProperty("mouthPosition",[x,y])
    This is just guessing, by looking at the statusController and the player.config. I should really be testing this...

    I'll try modifying the "mouthOffset" on my end, though, and see if I can get anything to change.
     
  5. Zaakari

    Zaakari Big Damn Hero

    Well, my Lua knowledge is obviously poor. Arrays are made with curly braces, and not square brackets.
    Anyway, I've attached a zipped up mod that gives a status effect to the human species, that offsets their mouth position by a large amount (15 blocks upwards).
    I tested it by jumping into an ocean, and seeing where the bubbles would spawn (and when I started losing air). And the bubbles were way above my character's head.

    I tried making a patch to the humanoid.config, but--like yours--it seemed to have no effect.

    So I'm not sure if this suits you or not (a config change would no doubt be far nicer). But it might do what you want it to.
     

    Attached Files:

  6. greyedstars

    greyedstars Seal Broken

    zaakri I owe you my life.
     
  7. Zaakari

    Zaakari Big Damn Hero

    Nah, you owe your life to God, not to me.
    But I understand what you mean, and you're welcome; I'm glad I could help:nuruhappy:
     

Share This Page