Modding Help Where are the gun scripts?

Discussion in 'Starbound Modding' started by dantevfenris, Feb 14, 2017.

  1. dantevfenris

    dantevfenris Space Hobo

    In particular I want to make guns with new effects. Such as creating a flashlight effect. However I'm not able to find scripts for guns or flashlights to view what is going on.

    From my knowledge it seems that from experimenting the extension .flashlight has high importance in giving flashlight like functions. However I want to potentially put this on a gun. I've tried putting some of the variables from the flashlight on the gun but that doesnt seem to work. It seems like the extension .flashlight gives different properties than .actionitem. How can I meld these together.
     
  2. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    If you have your game unpacked you can find the abilities at :
    \assets\_unpacked\items\active\weapons\ranged\abilities

    With the flashlight ability, there is a folder in there called `flashlight`, and if you go in that folder, you will see : `flashlight.weaponability`perhaps checking that out may help.

    Hope this helps.
     
    IHart likes this.
  3. The | Suit

    The | Suit Agent S. Forum Moderator

    JSON parameters can't be mixed and matched like that.

    You have to know Lua to be able to write in a script for an active item.
    Otherwise if you don't know Lua - you can only use existing mechanics.
     
    ImHereForTheMods and IHart like this.
  4. dantevfenris

    dantevfenris Space Hobo

    I've never heard of lun
    yea my hope was that the json would but I already figured otherwise. Lua looks just like any other language. What I'm trying to find is more fundamental scripts so I can look at Lua scripts and apply them elsewhere. Like finding the script that define the JSON parameters.
     
  5. The | Suit

    The | Suit Agent S. Forum Moderator

    Many of the things in the game are hard coded - so the parameters directly plug into the game engine. There is no script you can edit to see how it is done.

    There is a flashlight attachment in weapons.
    Or you can try and learn something from my Experiments mod.
    https://github.com/xxswatelitexx/Starbound/tree/master/mad_Exp/active_item

    http://community.playstarbound.com/resources/mr-mad-doctors-experiments-2.4130/

    Though to fully understand it you will need to learn lua.
     
  6. dantevfenris

    dantevfenris Space Hobo

    okay thank you
     
  7. dantevfenris

    dantevfenris Space Hobo

    judging from the look of that mod, your turning a flashlight into an active item?
     
  8. dantevfenris

    dantevfenris Space Hobo

    actually now fully delving into your work, these are great resources and examples, thank you very much. Read mes are nicely documented as well. It shows me how to attach my own scripts and other things that don't seem to be done on regular files. With this help I should be able to get to more advance ideas quickly. The basic JSON stuff and using that to make new items is simple. But the next step above that goes directly to challenging from a begginer perspective.This will help me.
     
    Last edited: Feb 14, 2017
    ImHereForTheMods likes this.

Share This Page