Modding Help Multiple Secondary Abilities

Discussion in 'Starbound Modding' started by tGMP, May 4, 2023.

  1. tGMP

    tGMP Void-Bound Voyager

    Specifically for broadswords.
    I'll be blunt, my goal is to make a Z-Saber (Mega Man X) for Starbound. Plenty of secondary abilities match his various techniques from throughout the franchise, but making separate broadswords just to match each feels off.

    The Goal: Have each secondary be mapped to a specific input.
    The Problem: .lua work remains the bane of my existence.
     
  2. tigerfestival

    tigerfestival Cosmic Narwhal

  3. Sock_Bunny

    Sock_Bunny Existential Complex

    Depends on the inputs
     
    tigerfestival likes this.
  4. tGMP

    tGMP Void-Bound Voyager

    just directional inputs and whether the character is in the air
     
  5. Sock_Bunny

    Sock_Bunny Existential Complex

    I'm pretty sure we can get directional inputs from activeitems, so yes
     
    tigerfestival likes this.
  6. tGMP

    tGMP Void-Bound Voyager

    so it is possible?

    what im needing here are:
    neutral (0 inputs and on ground) - Projectile Shot
    up - Rising Slash
    down - Parry
    air - Circular Slash
    air + up - Rising Slash (again, i know)
    air + down - Downward Thrust

    i can add those myself if instructed how

    surprised how many of Zero's techniques can easily be replicated in Starbound.
    hard part will be Circular Slash, but i'll worry about dealing with that animation later
     
  7. Rezetrx

    Rezetrx Void-Bound Voyager

    As far as I know, only Tech and Vehicles can hook onto the directional key inputs used for movement.
    Though, You can somewhat check for directional movement using the player velocity (mcontroller.velocity()), but direct check for WASD (or your movement settings) is not possible.

    If you don't have too many actions, you could make it work with primary/alt ability, shift and onGround checks like this:
    • primary -> projectile attack
    • shift + primary (hold) -> Parry
    • Alt -> rising slash
    • Alt + shift + airborne -> Downward Thrust

    (Crouching would also be something you can check for)
     
  8. tGMP

    tGMP Void-Bound Voyager

    teach me, oh wise one
    google gives me no instruction
     
  9. Rezetrx

    Rezetrx Void-Bound Voyager

    Yeah, like most things in modding starbound, its all about trial and error or looking into other mods to see how they did it.

    Here is an example script for the action forks.
    Mind you that this only handles the conditions stated in my last comment and does not actually do the desired actions yet (except some part for the parry).
    I added comments within the code to explain what is going on and what the intention of the functions are as well as to how to continue building on from them.

    Hope this helps.

    (edit: updated file)
     

    Attached Files:

  10. tGMP

    tGMP Void-Bound Voyager

  11. tGMP

    tGMP Void-Bound Voyager

    meanwhile, got a functioning Ryuenjin. basically just a Rising Slash with a fire aesthetic.
    ryuenjin.png

    also planned are
    Hyouretsuzan (Pogo Sword encased in ice)
    Kuuenzan (airborne Flip Slash without the buildup or travel)
    Gokumonken (literally just Parry)
    Zankourin (Traveling Slash in the shape of a sawblade)

    depending how many options there end up being, i may have more slated


    EDIT (5/9/2023): Kuuenzan is functioning... almost. i am someone who uses Frackin' Universe, and that breaks the Flip Slash for some reason. the player will flip, but the weapon will remain in its windup position and not spin with the player. if anyone has the solution to this dilemma, do tell so i can make a separate patch
     
    Last edited: May 9, 2023
  12. tGMP

    tGMP Void-Bound Voyager

    currently have a handful of abilities made and will continue to make more until i'm out of slots.

    @Rezetrx is walking/running a possible factor for how an ability is decided?
     
  13. Rezetrx

    Rezetrx Void-Bound Voyager

    You can check for movement using the velocity, specifically the x value.
    You can check it like this (math.abs(mcontroller.velocity[1]) > 0.5), as sprinting horizontally would yield a x velocity of about 13 and 7 while walking. These values may vary though.
    Edit: This check would also trigger when moving using a vehicle or through knockback though.

    As for direct walking/running checks, I don't recall having found such functions that are available for activeitems.
     
  14. tGMP

    tGMP Void-Bound Voyager

    hmm... noted.
    anyways, like i said, the base im using for the Z-Saber is the Solus Katana which uses the energymeleeweapon.lua
    the results with the provided lua were broken, but that is to be expected when i dont divulge every bit of info. my apologies
    i'll worry about the walking thing later (if at all), and focus on the shift, alt, crouch, airborne, and idle. i have plenty of techniques to plug in
     
    Last edited: May 13, 2023
  15. tGMP

    tGMP Void-Bound Voyager

    a bump, since im still at a loss on what to do
     

Share This Page