Thursday, 5 June 2014

june 3rd- starbound modding

edited the jetpack variable to modify speed and energy use etc. trying to find  good balance. this is done by modifying the corresponding .tech file (which is openable in any text editor)

{
  "script" : "jet.lua", -what script file to load
  "actions" : [ "jet" ], -what the action is called
  "animator" : "jet.animation", -what animation to use

  "jetpackSpeed" : 20.0, -speed of jetpack (vertical)
  "jetpackControlForce" : 180.0, -how the jetpack handles? (playing with this variable hasn't changed anything noticeable but it's necessary)
  "energyUsagePerSecond" : 50.0 -energy used per second
}

after finding the values I liked i decided to make a custom jukebox that plays music. I took the original jukebox in the assets folder and copied the files then opened them. This was the jukebox.object file.

{
  "objectName" : "jukebox", -object id
  "rarity" : "Common",
  "objectType" : "noisy",

  "category" : "decorative",
  "price" : 1500,

  "description" : "This jukebox only seems to have songs from a band called the 'Jon Afro Band'.", -description
  "shortdescription" : "Jon Afro Jukebox", - In game name
  "race" : "human",

  "apexDescription" : "A cheerful music box. There's only one band, though.", -different race descriptions.
  "avianDescription" : "This jukebox can brighten even the darkest spirits.",
  "floranDescription" : "Box make noissse at Floran. Floran make noissse back.",
  "glitchDescription" : "Grooving. The music affects my circuits in such a way that I can't help but dance.",
  "humanDescription" : "Oh boy, they have my favourite album! Space just got funkier.",
  "hylotlDescription" : "Human music lacks the tonal nuance of its Hylotl counterpart.",

  "inventoryIcon" : "jukeboxicon.png", -icon
  "orientations" : [
    {
      "dualImage" : "jukebox.png:<color>.<frame>", -animatons
      "imagePosition" : [-16, 0],
      "frames" : 6,
      "animationCycle" : 1.0,

      "spaceScan" : 0.1,
      "anchors" : [ "bottom" ]

    }
  ],

  "sounds" : [ "/sfx/objects/jab.ogg" ] -the music it played
}


I renamed the object, changed the description. then converted some music to .ogg format, put the music in the older then changed the jab.ogg to the music i added. then coded it to be buyable ingame for 1 pixel(currency). it worked perfectly fine although the music did not loop properly (but that could be fixed with some sound editing.

No comments:

Post a Comment