Modding Help Is it possible to change the spear's attack to horizontal?

Discussion in 'Starbound Modding' started by Melendroach, Mar 24, 2017.

  1. Melendroach

    Melendroach Subatomic Cosmonaut

    Is it possible to change spear to only attack left and right, without following the cursor? And if it is, I suppose I have to change a .lua file? And if yes, where can I find this .lua file?
     
  2. Bloopers

    Bloopers Void-Bound Voyager

    i'm not sure for spears, but i remember for guns, i found in the activeitem a stances section, which allowed disabling aiming or flipping while holding the weapon.

    Code:
    "stances" : {
          "idle" : {
            "armRotation" : 0,
            "weaponRotation" : 0,
    
            "allowRotate" : true,
            "allowFlip" : true
          },
          "fire" : {
            "duration" : 0,
            "armRotation" : 0,
            "weaponRotation" : 0,
    
            "allowRotate" : true,
            "allowFlip" : true
          },
          "cooldown" : {
            "duration" : 0.1,
            "armRotation" : 0,
            "weaponRotation" : 0,
    
            "allowRotate" : true,
            "allowFlip" : true
          }
        }
    changing allowRotate and/or allowFlip might be able to do these things. try adding something similar to your activeitem - i'm not able to test anything at the moment
     
    IHart likes this.
  3. Melendroach

    Melendroach Subatomic Cosmonaut

    Doesn't work for me :/
     
  4. IHart

    IHart Scruffy Nerf-Herder

    share the code that you used that is not working.
     
  5. Melendroach

    Melendroach Subatomic Cosmonaut

    It's the same case as with katars, it says there is no such item. I've tried doing the same thing as with katars, which is placing all neccessary files in the same folder, and changing paths, but it doesn't work.
     

    Attached Files:

  6. IHart

    IHart Scruffy Nerf-Herder

    what else does the log say.
     
  7. Melendroach

    Melendroach Subatomic Cosmonaut

    It doesn't say anything about my weapon, it just still attacks in all directions. This piece of code just doesn't work.
     
  8. IHart

    IHart Scruffy Nerf-Herder

    wut.
     
  9. Melendroach

    Melendroach Subatomic Cosmonaut

    Yes, I've fixed the first problem by uploading the mod to steam (which is weird). What is wrong with this code? Maybe it just doesn't work for spear?
     
  10. IHart

    IHart Scruffy Nerf-Herder

    So the code that @Bloopers shared is part of a weaponability. To see how you can override these values from an activeitem observe daggers. But also i fixed your file using Bloopers concept.
     

    Attached Files:

    Cyel likes this.
  11. Melendroach

    Melendroach Subatomic Cosmonaut

    Works! Thanks a lot!
     
  12. IHart

    IHart Scruffy Nerf-Herder

    happy to!
     

Share This Page