Modding Discussion Operation: Let's unofficially get gravity back in

Discussion in 'Starbound Modding' started by ejh1990, Dec 14, 2013.

  1. ejh1990

    ejh1990 Phantasmal Quasar

    Introduction

    Note: I don't intend or deem this to be a mod in its own right. I am intending this to be information sharing, hence why I posted it in the modding discussion section. Though if it still belongs in WIP/Releases section, I apologise.

    Also, for the tl;dr people who just want to try this experiment out, downloads are at the bottom. And you will want the RANDG version, if variable gravity was what you were after. Feedback much appreciated.

    Same-y planets are boring, yes? Yes. Gravity is fun, no? Absolutely. Bummer that it's kinda-implemented-but-really-not? You bet. I am sure this will be addressed officially later. But for now? We, the community, can fix this! Hence this thread.

    So here's the deal... Everyone who has taken the time to poke around the JSON files knows that gravity is implemented. Sort of. There is a range array in planetgen.config.

    Code:
    "gravityRange" : [80, 80],
    Although it's set as 80, 80. "Bargain!" you say "We can just change the values, right?"...

    ... Er, no. Not that simple. The dungeons are affected a little, but that's not the biggest problem. The problem is wonky fall damage. Try setting the gravity to a static range of 130, 130 then walk about a bit. Suddenly, even small steps become ouchy. Now try setting the gravity to 30, 30 and then jump. Same sort of problem. The issue is with player.config. Notably, this part:

    Code:
      "fallDamageFactor" : 0.8,
      "minimumFallTime" : 1.0,
      "maxFallTimeFactor" : 1.5,
      "minimumFallSpeed" : -2.0,
    This is what we're going to be interested in.

    The work so far...

    I'd be a cheeky so-and-so if I were to try and get everyone to do all the work... I have already made a stab at getting the fall damage more balanced for a variety of gravity... Well, I've tried it at two extremes (30, and 130 -- 50 either side of the default 80). Seems to work OK-ish so far. It's still very rough around the edges, but at least you can jump on lower gravity without losing half of your health, and walk on higher gravity without each step being a deathtrap. The tweaks I have made to player.config so far is this:

    Code:
      "fallDamageFactor" : 1.325,
      "minimumFallTime" : 0.6125,
      "maxFallTimeFactor" : 1.5,
      "minimumFallSpeed" : -16.625,
    
    minimumFallSpeed was the greatest issue, though miniumFallTime also played a part in making things unbalanced... The value was perhaps too high with the tweak to minimumFallSpeed. And both of these tweaks seemed to make fall damage less painful, hence the upping of the fallDamageFactor from 0.8 to 1.325. It might be a bit OP, I am not sure (I have spent too long playing Starbound with my own Hard Mod, and have become desensitised to the whole falling thing).

    maxFallTimeFactor may well need reducing slightly as well, especially on low gravity planets. But it seems not too bad so far... This is definitely something that needs looking into though.

    EDIT: Almost three and a half hours after making this post, I have made some more tweaks. You know that game where you have to guess the number, and the way you win is by moving half way between the highest number and the lowest number and then repeat until you hit the correct number? I've kinda been doing that. So after a fair few tweaks, I arrived at these figures (which I rounded to 2 decimal places):

    Code:
      "fallDamageFactor" : 1.28,
      "minimumFallTime" : 0.81,
      "maxFallTimeFactor" : 1.41,
      "minimumFallSpeed" : -18.31,
    The initial rough guess was still too punishing on planets with low gravity. This should be more balanced, though high gravity planets are now maybe too easy. But again, I really do need some feedback from actual playing. :)
    The gravity range (if you hadn't guessed from the clue I dropped earlier) I have now set as this in planetgen.config:

    Code:
      "gravityRange" : [30, 130],


    This is the part I am most unsure about. I think I have picked a value which shouldn't affect dungeons etc. too much. Although the range may need to be reigned in a little e.g. 40, 120. Of course, the higher the range we can make work the greater the variety. And variety is FUN!

    So where do I fit in?

    Good question! This is still a very rough-around-the-edges implementation. Although these settings should make the game playable-ish with different gravitational properties, I don't know how playable. You may discover that perhaps certain generated structures don't take too kindly to the tweaks, and that we need to reign in the range a little. Or you may have an idea as to how to tweak the fall properties further to polish things.

    Try things out, and share your findings. And I hope what I have discovered so far may be of use to the community.

    I am not technically minded... Can I still help?
    Yeps. The more the merrier. I have attached zips file to this post which works nicely with KrazyTheFox's mod manager. If you haven't already got yourself a mod loader and don't feel confident manually installing, grab said mod manager here:

    http://community.playstarbound.com/index.php?resources/starbound-mod-manager.160/


    (Note: the download is for Indignant Koala and may be incompatible with later Starbound releases).

    Use only ONE at a time. There are 4 to choose from -- a random version (30, 130), a low gravity version (30, 30), the normal gravity version with tweaked fall damage (80, 80), and the high gravity version (130, 130). The more testing, the better. But like I said... ONE at a time.

    Don't use on your normal save either.

    Any issues you have with fall damage, weird behaviour in towns structures etc. do let people know in this thread. Your feedback is still very much valued. The more feedback the better. :)
     

    Attached Files:

    Last edited: Dec 14, 2013
    vernadead likes this.

Share This Page