Modding Help Adaptable Ammo Ability Type without sprite swap

Discussion in 'Starbound Modding' started by SacrificeThroughBone, Jan 19, 2024.

  1. SacrificeThroughBone

    SacrificeThroughBone Void-Bound Voyager

    Hello! I have a template for the Adaptable Ammo type, but what I struggle with is the dumb sprite swap. Is there a way I can cycle through the ammo while having my weapon look the same?

    An example, I try to mod a revolver with the Adaptable Ammo altability, and the functionality works, but the weapon sprite vanishes. Does anyone with experience on animated weapons help me out here?
     
  2. Rezetrx

    Rezetrx Void-Bound Voyager

    I assume you are directly using the "Adaptable Ammo" alt-ability within your weapon.

    If so, the issue lies within the .weaponability where it sets the texture of the "middle" part according to its ammoType. You could either modify this within the weapons configuration (.activeitem) or route the frame-names through allias within the .frames file of your texture.

    Here an example:
    Code:
    {
        "frameGrid" : {
            "size" : [29, 11],
            "dimensions" : [1, 1],
            "names" : [
                [ "default" ]
            ]
        },
    
        "aliases" : {
            "wooden.1" : "default",
            "explosive.1" : "default",
            "ice.1" : "default",
            "electric.1" : "default",
            "poison.1" : "default",
            "hgravity.1" : "default",
            "ngravity.1" : "default"
        }
    }
    
     
  3. Flexiblue

    Flexiblue Orbital Explorer

    Or you could just copy-paste every frame of the sprite in your sprite sheet picture
     

Share This Page