Modding Help Is there any documentation on weather?

Discussion in 'Starbound Modding' started by xaliber, Jan 29, 2017.

  1. xaliber

    xaliber Scruffy Nerf-Herder

    Hello, sorry for making new threads continuously (I'm not sure if I should dump all my questions in one thread or make a new thread for specific question).

    Anyway, I wonder if there's any documentation on weather around? Especially .weather files. Some properties like duration, ratePerX, collidesLiquid are clear enough, but others are... less than clear.

    For example, I played around with meteorshower.weather. I wanted to make the meteors rain faster, so I changed the velocity parameter. But nothing changed. The velocity parameter has two numbers inside the array and I'm not sure what affects what even after looking at vanilla and FrackinUniverse for inspiration.

    I'm also curious how to change the angle of the meteor rains (like in regular storm or rain, sometimes it rains from the right direction, sometimes from left), but I can't find any properties indicating that.

    Any help?
     
    Last edited: Jan 29, 2017
  2. lazarus78

    lazarus78 The Waste of Time

    The meteors are probably controlled more by their "projectile" file.

    The angle they spawn in from might be engine controlled since rian, meteors, etc, all are basically the same from a technical view.
     
  3. xaliber

    xaliber Scruffy Nerf-Herder

    So, I've taken a look at the projectile files. Can't find any parameters indicating velocity, but there seems to be something as physics. "grenadezbomb" it says... so I went to physics.config and found the physics. It has mass and gravityMultiplier parameter, but it's kinda odd that both small meteors and large meteors are using the same physics despite both meteors have different speed... so I reckon this must be configured somewhere else, but I can't find it anywhere. :/

    As for the angle, after a long observation I've noticed that meteors only spawn from the left side, unlike rain. Still trying to find out where is this stuff configured...
     
  4. Cyel

    Cyel Scruffy Nerf-Herder

    the physics settings are "presets" of given physics and some of their parameters are generally overwritten when using them. I think you can either patch a new physics preset into the physics file, then patch meteorshower to use this preset, or directly patch meteorshower's values. The velocity array is probably a range from which the game will pick a value (defaults are [30, -30], so from -30 to 30), so you can change them to a higher value. Since the only difference between large and small meteors is the ratePerX value, it's probably also impacting speed but I'll leave testing to you

    I think the angle is calculated behind the scenes with the current windLevel value, and that there's no way to influence it other than with the "ignoreWind" and "windAffectAmount" values (you can see them used in the snow and meteorshower files)

    Sadly, there's apparently no way to control weather / wind. (But you could prboably make some "fake" weather by spawning yourself the projectiles / particles and calculate yourself their angle via world.windLevel, their velocity, etc.)
     
    Last edited: Feb 4, 2017
  5. xaliber

    xaliber Scruffy Nerf-Herder

    I've tried setting the velocity array but still not sure what they exactly do, since nobody seems to change... debug mode doesn't show the meteor speed either, kinda confusing.

    I'm still trying this out, but in the mean time I'd like to ask another thing: is there a way to make weather projectiles play sound effect when they are spawned? I want to make "whoosh" sound effect for the meteors. Other weather don't seem to emit any sound.
     
  6. Cyel

    Cyel Scruffy Nerf-Herder

    I played with the velocity values on snow (because I was too lazy to wait for a meteor shower and I was on a snowy planet), and the effects were clearly visible, but those don't use projectiles, only particles?

    I think generally sound is "sent" via Lua when spawning the projectiles, but you can do it by patching the .projectile file. I believe there's two ways to do it, but I only tested (and got it to work with):
    Code:
    "periodicActions" : [
        {
          "time" : 0,
          "repeat" : false,
          "action" : "sound",
          "options" : [ "/sfx/tech/honk.ogg" ]
       }
      ]
    Maybe you could also use "timedActions", but I didn't really played with that.
     
    Last edited: Feb 5, 2017
  7. xaliber

    xaliber Scruffy Nerf-Herder

    That does the trick, much appreciated @Cyel!

    Just in case - is there actually a documentation somewhere to read, so that we can know which parameter can be used? Especially on weather...
     
    Cyel likes this.
  8. Cyel

    Cyel Scruffy Nerf-Herder

    From what I remember reading, weather's part of the engine and can't be really touched, the only things you can change are their chances of appearing in weather.config, some aspects of them in their .weather files, and as shown above their projectiles, which are just generic projectiles
     
    Last edited: Feb 10, 2017
  9. xaliber

    xaliber Scruffy Nerf-Herder

    Sorry, I mean I'd love to know which parameters we can use in .weather files and .projectile files - and what each parameter means/what each parameter actually does.

    Like the periodicActions you mentioned before, I didn't know we can use that in .projectile. I'd love to know if there is a proper documentation explaining what parameter we can use so we don't have to trial and error figuring out what each parameter means/does... :catcry:
     
  10. Cyel

    Cyel Scruffy Nerf-Herder

    Sadly, and it's a grief shared by all modders I guess, there's not really any documentation on stuff. I just usually slam ""starbound" "whateverimsearchingfor"" (surrounding something by quotation marks means "this exact string") in google.

    The main technique is to use a tool that search for a certain string in given files; if your text editor doesn't do that (the "built-for-code" ones do), you can use an external program such as Agent RanSack or others. This is commonly used here to find examples of how something is used. I don't really remember but I think I found the periodic actions thingy by searching ".ogg" or "sound" in the .projectile files with this method.
     
    xaliber likes this.
  11. xaliber

    xaliber Scruffy Nerf-Herder

    Ah, that's unfortunate. :( Yep I'm using Notepad++ and it can search certain string in files and folders. But it can be a bit tedious and kinda trial and error since some parameters aren't descriptive enough.

    Kinda wish we have something like CreationKit wiki in Skyrim modding scene. They have a thorough walkthrough and pretty decent documentation. Maybe this can be replicated in starbounder.org - is that wiki dev or community-maintained?
     

Share This Page