Modding Help Some script requests/help

Discussion in 'Starbound Modding' started by ManicRykker, Mar 14, 2017.

  1. ManicRykker

    ManicRykker Phantasmal Quasar

    Ok, so I need to ask a couple of questions... (I'll put them in spoilers so this post doesn't come out huge)


    Would any lua experts be interested in creating/providing some scripts for use in some things I want to do?

    For the past few weeks, I've made futile attempts at making scripts for certain content/features.. I am unfortunately a bit of a newbie with it (I'm at the experimenting stage, where I'm still just trying to get a handle on everything :rofl:.. I'm unfortunately one of the sort of modders that only seems to be able to develop understanding for things through hands on trial and error..)

    So the things I am trying to do are:

    1. I want to create an object that can change/play music when interacted with. It would also need to be able to pick from more than just one track. Most "musical" objects I've toyed with in the game files work off of sound effects, which is fine, but they only seem to accept one file.. (unless I'm missing something)



    2. I want to give my penguin race in my PenguinPiracyMod a sound effect when they jump. (In a similar vein to the soundeffect heard when monsters jump)..

    But from what I've gathered from a question I asked in an older thread I made, that's more script territory. (I am personally curious if such behavior could be hooked to a species file via a status effect...)


    I am aware setting up scripts isn't something done in like five minutes, and I know many people are probably busy with their own projects and experiments.. I hate having to ask for help like this (as I usually prefer trying to experiment and fiddle with things on my own)

    But I have been hitting so many brick walls in relation to these two specific ideas, thanks to my lack of experience, that I am wondering if I would even be able to get the things these would require set up at all..

    If anyone decides to lend a hand with those scripts, I don't care how long it takes to make em. If someone helps me with one of the things I'm wanting to do, I will give them full credit for the script work they did in my mod. (Referenced on the main page, and in a file in the mod archive itself.)




    Could someone link me to some resources that could help me better wrap my head around lua/things to do with Starbound lua scripts, so I don't run into this problem (at least not as often)?




    Thanks in advance.
     
  2. Cyel

    Cyel Scruffy Nerf-Herder

    As I think I've seen you getting help for the jukebox, here's for the sound when jumping. Monster hop sound's defined in their .animation files, this is via a status effect.

    .species file accept an array of status effects that are permanently applied (that's how novakids get their glows). The .patch files I've wrote do a test to see if the specie already have a statusEffects array, if yes simply adds the effect at the end of it, if not create it with the status in it.
    Since you're making your own specie, you don't need those patches, look at novakids's .species file for that statusEffects array example

    The script itself is pretty simple too: it just checks if the player jumps and if we didn't already played the sound with a variable, play the sound, sets the variable, check if the player's on ground, sets the variable accordingly.

    I didn't really knew much about Lua before starting modding starbound (but I had some programming experience), and my resources were just unpacked things that do fancy things, having a goal in mind, trying to change them to get to that goal, trial and error. The lua doc's in the "doc" folder in the game's files or on the wiki, and if you put something in double quotes in google, it'll give you results that match exactly this, so I spam things like
    Code:
    "starbound" "mod" "speech bubble"
     

    Attached Files:

    ManicRykker likes this.
  3. ManicRykker

    ManicRykker Phantasmal Quasar

    Thank you SO MUCH.

    I have actually wanted to add jump sounds in my mod almost since it's early beta days..

    A few days ago I had a suspicion that I could probably accomplish it via status effect.. But I just don't have enough experience yet I guess. Lol.

    Most of my experience getting acquainted with all of this stuff has been through trial and error too...

    Can't tell you how many times I've had Chucklefish laugh at me as it crashes.. :rofl:


    Anyways,

    I will be utilizing that script very soon in my PenguinPiracyMod. When I do, I'm adding you to the credits. ^-^

    Thanks for your help. I'll definitely be doing more look ups to try to get some more experience with this.. (I almost feel embarrassed with myself that the solution to the jump thing was really that simple.. Lol)
     
  4. bk3k

    bk3k Oxygen Tank

    As for music, I started on something but never finished it. Or rather... I finished it in a form that didn't work the way I originally thought it should. Specifically
    1. <tags> can't be used in .animation files in nearly as versatile a manor as I thought. I can probably use config.setParameter() instead.
    2. Some of the things I put in the .animation file are apparently only used in activeitems and don't work elsewhere... even though they'd clearly be useful. I was going to let the animation file do more of the work, rather than having the script do that portion of the work.

    I'm pretty sure I know how to adjust for how things do work, but things not working the way I wanted annoyed me enough I put the project aside. It was to be a versatile modder's resource/standard for musical objects and track lists, but also included a functional object. I'd probably need to tone down my ambition a bit for this.

    It has lost my attention, but if you need it, I could go ahead and pick the project back up.
     
    ManicRykker likes this.
  5. Cyel

    Cyel Scruffy Nerf-Herder

    You can just type /reload or press F8 to reload the client side assets
     
    ManicRykker likes this.
  6. ManicRykker

    ManicRykker Phantasmal Quasar


    That would definitely be very useful!

    As of right now, my mod has several jukebox objects for each individual track.. And to be honest it feels a bit cheap (like cheap filler), since they all look alike... :/

    If that project became a thing, I would cut down my jukebox count in an instant.

    Edit: I also bet that modder that has a few jukebox mods would find something like that handy as well.
     
    Last edited: Mar 17, 2017

Share This Page