Tutorial Humanoid files can have their own properties?

Discussion in 'Starbound Modding' started by ManicRykker, Dec 24, 2016.

  1. ManicRykker

    ManicRykker Phantasmal Quasar

    (Kinda long. Tl;dr at the bottom)

    Hi guys. I don't know if this has been noticed before, but in case it hasn't:

    So I have been working on my own race recently, and I noticed something while working on my mod.

    It started a few weeks back while I was bug fixing my mod.

    I noticed that my penguin race, setting it up early on, ran VERY slowly. Like, far below vanilla. At first I thought it was just busted...

    But then, I noticed the penguin humanoid file (A separate file found in the species folder, which I pulled from the game assets. It's called "penguinoid" ), had two properties that the universal humanoid file for all other races didn't:

    walkSpeed and runSpeed options.. (Which both work by the way, as tweaking the run factor fixed the slow running issue.)

    At first I just thought "Oh. That's kinda cool I guess."

    But recently, I got curious: "What happens if I introduce a new element?"

    So I spliced in a factor from one of the core files in the assets: "bounceFactor". This factor, (Not used by the vanilla races, as it's at 0) adds a sort of "feedback" to the players interactions with the environment. Ex: You bounce when you hit the ground from a fall, get bounced back when jumping into a wall, etc.

    I found the above out the hardway, because the factor WORKED... (A little too well actually, as I ended up setting the factor too high at first, and bounced off the ground so high that I died when I hit the ground. :rofl:)

    ... So basically, if this has any indications, some properties CAN be edited for single races. You just have to add them to a separate humanoid.config file.. And the changes to the modded race DON'T affect the vanilla races. (I tested a human character just to be sure. No bounce for them)



    Tl;dr - Having a separate humanoid file for a modded race doesn't just mean tweaking offsets. Other factors can be changed too. You just have to add the factors to the file manually.


    Again, if this has already been brought up before, forgive me. I just found the find really interesting. (I'm new to modding, so it may just be a personal discovery. :rofl:)


    UPDATE:

    Ok, so I believe, after some more experimentation, and thinking, I've realized what's going on:

    These possible changes are a part of the humanoid.config's "Movement Parameters" (That chunk of code at the very bottom of the average humanoid.config file).

    Under normal circumstances, this stuff wouldn't mean much (since just editing the main humanoid.config would affect all vanilla races).. But, the presence of the penguinoid file, and it's extra factors under movement parameters without affecting the universal config file, raises questions:

    Can modded races have some factors to their MPs tweaked through standalone humanoid.config files like the Penguin's? (the answer appears to be yes for this one)
    Also, can the creation of a standalone humanoid.config for an existing race allow some of their MPs to be modified without altering the MPs of other vanilla races? (I will probably be testing/looking into this tomorrow)


    That aside, here are the few working additional parameters races can have that I found (and the two that were already in the Penguinoid):

    NOTE: if you attempt any of this stuff for yourself, be sure to do this tweaking in admin mode. Setting the value wrong for a few of these CAN kill you.

    walkSpeed and runSpeed = Exactly what they sound like

    airBuoyancy = An interesting one. It "seems" to affect how floaty your race's jump is. Particularly in how far you get.. At least from what I noticed. May have to test it more tomorrow. (WARNING: Don't set it to 1.0 or above. Doing this will cause your character to float up into the sky like a rocket :rofl:.. 0.1-0.5 function properly, and safely. Still need to test up to 0.9)

    liquidBuoyancy = Another interesting one. It seems to affect your descent speed in liquid. Also need to test this one more. (Setting this to 1.0 and above also doesn't work right, though doesn't kill you thankfully. It just makes you "sit" inside of a liquid like you just fell into some jello. Lol.)

    bounceFactor = A very interesting one. This one affects some of the physics of your race in a few ways: It can add a slight "bounce" to the point when you hit the ground after a jump.
    Jumping into walls bounces you back a bit.
    Hitting the ceiling during a jump knocks you straight down.
    (WARNING: Setting this one to 1.0 and above can also be deadly. Doing so will cause you to keep bouncing to the point of dieing of fall damage... Or, if there is a ceiling, cause you to bounce around like a pinball.)

    I will be updating this post tomorrow with any new findings, or findings of movement parameters that work.

    UPDATE 2: I have decided that the sheer amount of data surrounding this stuff is too great just to paste into this thread. I have decided I will instead create a "mod" that will assist in experimenting with these newfound properties... So uh, keep an eye out for that I guess. Rofl.
     
    Last edited: Dec 25, 2016
  2. ze_robot

    ze_robot Scruffy Nerf-Herder

    Hey, I've been messing around with this too with my giant race.

    Have you figured out what changing the mass does?

    As for applying different humanoid configs to different races: I think I know how you could do it with patch files.

    Instead of doing anything to the vanilla humanoid.config (If I remember what I was told: configs are loaded on launch and can't be changed on the fly), I believe you could just patch each .species file you wish to modify (found in the species directory). I haven't tried it, but I believe this patch should do the trick:

    Code:
    [  { "op": "add", "path" : "/-" ,"value":{"humanoidConfig" : "/species/customhumanoid.config"} } ]
    
    Where the filename is whatever you want to patch and customhumanoid.config refers to your custom config file.

    The patch here should work on any of the humanoids that don't already have humanoidConfig defined (Hylotl, Human, Glitch, Novakid, Avian, Floran). For species that do already have it defined will need a "replace" patch instead of "add".

    If you need/want help with your mod, I'd be happy to help. Would help me with my own mod(s).
     
  3. ManicRykker

    ManicRykker Phantasmal Quasar

    Heya.

    Since that post, I have made a mod that assists with this sort of stuff.

    I discovered through more digging that race mods in particular can be directed to use alternate humanoid configs. (The code for it, similar to what is in your patch file, is present in the penguin's species file!)

    I will definitely have to test out that patch code for vanilla races though, and see if it works..


    If you want to help out, the mod in question is called NoidMPMod. It's in the Race section of mods page. The mod has a .Noid config with different extra parameters not present in a vanilla .humanoid file, and documentation on them for what I "think" they do. Lol.
     

Share This Page