Modding Help Getting Perfectly Generic Item instead of mod weapon

Discussion in 'Starbound Modding' started by honjenac, Jul 28, 2016.

  1. honjenac

    honjenac Space Hobo

    Hello. Sorry if this is difficult to understand, it's very late here. I've built a new weapon based off of the code of the Solus Katana. The game launches and loads just fine, but my Solus Katana was removed from my inventory. Trying to spawn another gives me a Perfectly Generic Item. Trying to spawn my mod weapon also gives me one. I didn't alter anything in the true assets folder; I just made copies and altered those as I wanted. Really new to modding, and sorry if I've explained this poorly. Hopefully my brain will be functioning by the time morning rolls around :p.


    Code:
    {
      "frameGrid" : {
        "size" : [27, 44],
        "dimensions" : [9, 2],
        "names" : [
          ["extend.1", "extend.2", "extend.3", "extend.4", "extend.5", null, null, null, null],
          ["active.1", "active.2", "active.3", "active.4", "active.5", "active.6", "active.7", "active.8", "active.9"]
        ]
      },
    
      "aliases" : {
        "retract.1" : "extend.5",
        "retract.2" : "extend.4",
        "retract.3" : "extend.3",
        "retract.4" : "extend.2",
        "retract.5" : "extend.1"
      }
    }
    


    Code:
    {
      "name" : "new_weapons",
      "version" : "Beta v. Cheerful Giraffe",
      "path" : "C:\Program Files (x86)\Steam\steamapps\common\Starbound\mods\new_weapons\items\active\weapons\bossdrop\soluskatana",
      "dependencies" : [],
      "metadata" : {
        "author" : "HONJENAC",
        "version" : "0.1",
        "description" : "new_weapons"
      }
    }


    Code:
    {
      "itemName" : "genjikatana",
      "price" : 960,
      "level" : 4,
      "maxStack" : 1,
      "rarity" : "Legendary",
      "description" : "Genji's katana, which channels the power of the dragon.",
      "shortdescription" : "Genji's Katana",
      "tooltipKind" : "base",
      "category" : "broadsword",
      "twoHanded" : true,
      "itemTags" : ["weapon", "melee", "broadsword"],
    
      "inventoryIcon" : "genjikatanaicon.png",
    
      "animation" : "/items/active/weapons/bossdrop/soluskatana/soluskatana.animation",
      "animationParts" : {
        "blade" : "genjiblade.png",
        "handle" : "genjihandle.png"
      },
      "animationCustom" : {
        "sounds" : {
          "fire" : [ "/sfx/melee/laser_weapon_swing1.ogg", "/sfx/melee/laser_weapon_swing2.ogg", "/sfx/melee/laser_weapon_swing3.ogg" ],
          "fire2" : [ "/sfx/melee/laser_weapon_swing1.ogg", "/sfx/melee/laser_weapon_swing2.ogg", "/sfx/melee/laser_weapon_swing3.ogg" ],
          "fire3" : [ "/sfx/melee/laser_weapon_swing1.ogg", "/sfx/melee/laser_weapon_swing2.ogg", "/sfx/melee/laser_weapon_swing3.ogg" ]
        }
      },
    
      "scripts" : ["/items/active/weapons/melee/energymeleeweapon.lua"],
    
      "activeTime" : 3.0,
    
      "elementalType" : "physical",
    
      "primaryAbilityType" : "broadswordcombo",
      "primaryAbility" : {
        "fireTime" : 0.83,
        "baseDps" : 35.0,
    
        "stances" : {
          "fire1" : {
            "duration" : 0.05
          },
          "wait1" : {
            "duration" : 0.1
          },
          "fire2" : {
            "duration" : 0.1
          },
          "wait2" : {
            "duration" : 0.1
          }
        }
      },
    
      "altAbilityType" : "blinkslash",
    
      "builder" : "/items/buildscripts/buildunrandweapon.lua"
    }
    


    Code:
    {
      "globalTagDefaults" : {
        "paletteSwaps" : ""
      },
    
      "animatedParts" : {
        "stateTypes" : {
          "swoosh" : {
            "default" : "idle",
            "states" : {
              "idle" : {},
              "fire" : {
                "frames" : 3,
                "cycle" : 0.1,
                "mode" : "transition",
                "transition" : "idle"
              },
              "fire2" : {
                "frames" : 3,
                "cycle" : 0.1,
                "mode" : "transition",
                "transition" : "idle"
              },
              "fire3" : {
                "frames" : 3,
                "cycle" : 0.1,
                "mode" : "transition",
                "transition" : "idle"
              }
            }
          },
          "blade" : {
            "default" : "inactive",
            "states" : {
              "inactive" : {
                "properties" : {
                  "lightsOff" : ["glow"],
                  "particleEmittersOff" : ["blade"]
                }
              },
              "extend" : {
                "frames" : 5,
                "cycle" : 0.15,
                "mode" : "transition",
                "transition" : "active",
                "properties" : {
                  "lightsOn" : ["glow"],
                  "particleEmittersOn" : ["blade"],
                  "immediateSound" : "/sfx/tools/energypickaxe_start.ogg"
                }
              },
              "active" : {
                "frames" : 9,
                "cycle" : 0.5,
                "mode" : "loop",
                "properties" : {
                  "lightsOn" : ["glow"],
                  "particleEmittersOn" : ["blade"],
                  "persistentSound" : "/sfx/tools/energypickaxe_idle.ogg"
                }
              },
              "retract" : {
                "frames" : 5,
                "cycle" : 0.15,
                "mode" : "transition",
                "transition" : "inactive",
                "properties" : {
                  "lightsOn" : ["glow"],
                  "particleEmittersOn" : ["blade"],
                  "immediateSound" : "/sfx/tools/energypickaxe_stop2.ogg"
                }
              }
            }
          }
        },
    
        "parts" : {
          "blade" : {
            "properties" : {
              "zLevel" : 3,
              "centered" : true,
              "fullbright" : true,
              "offset" : [0, 1.875],
              "transformationGroups" : ["weapon"],
              "rotationCenter" : [0, 0],
              "damageArea" : [[-0.7, -1.0], [-0.7, 2.5], [0.5, 2.5], [0.5, -1.0]]
            },
    
            "partStates" : {
              "blade" : {
                "inactive" : {
                  "properties" : {
                    "image" : ""
                  }
                },
                "extend" : {
                  "properties" : {
                    "image" : "<partImage>:extend.<frame>?<directives>?<bladeDirectives>"
                  }
                },
                "active" : {
                  "properties" : {
                    "image" : "<partImage>:active.<frame>?<directives>?<bladeDirectives>"
                  }
                },
                "retract" : {
                  "properties" : {
                    "image" : "<partImage>:retract.<frame>?<directives>?<bladeDirectives>"
                  }
                }
              }
            }
          },
          "handle" : {
            "properties" : {
              "zLevel" : 1,
              "centered" : true,
              "image" : "<partImage><paletteSwaps>?<directives>",
              "offset" : [0, 1.875],
              "transformationGroups" : ["weapon"],
              "rotationCenter" : [0, 0]
            }
          },
          "swoosh" : {
            "properties" : {
              "zLevel" : -1,
              "centered" : true,
              "fullbright" : true,
              "transformationGroups" : ["swoosh"],
              "rotationCenter" : [0, 0]
            },
    
            "partStates" : {
              "swoosh" : {
                "idle" : {
                  "properties" : {
                    "image" : ""
                  }
                },
                "fire" : {
                  "properties" : {
                    "image" : "/items/active/weapons/melee/broadsword/swoosh/solusswoosh.png:<frame>",
                    "offset" : [0, 2.5],
                    "damageArea" : [[-5, 2], [-2.5, 3], [1, 3], [4, 1.75], [5, -0.25], [4.5, -2.25], [2.5, -2.75], [0.5, -2.75]]
                  }
                },
                "fire2" : {
                  "properties" : {
                    "image" : "/items/active/weapons/melee/broadsword/swoosh2/solusswoosh.png:<frame>",
                    "offset" : [5.0, 1.0],
                    "damageArea" : [[-4, 1], [2.5, 1], [2.5, -2], [-4, -2]]
                  }
                },
                "fire3" : {
                  "properties" : {
                    "image" : "/items/active/weapons/melee/broadsword/swoosh3/solusswoosh.png:<frame>",
                    "offset" : [3.5, 0],
                    "damageArea" : [[-4.75, 1.5], [3, 1], [3, -1], [-4.75, -1.5]]
                  }
                }
              }
            }
          }
        }
      },
    
      "transformationGroups" : {
        "weapon" : {},
        "swoosh" : {}
      },
    
      "particleEmitters" : {
        "physicalswoosh" : {
          "active" : false,
          "transformationGroups" : ["swoosh"],
          "burstCount" : 4,
          "particles" : [
            { "particle" : "soluskatana1"},
            { "particle" : "soluskatana2"}
          ]
        },
        "blade" : {
          "active" : false,
          "transformationGroups" : ["weapon"],
          "offsetRegion" : [-0.5, 1.5, 0.5, 4.0],
          "emissionRate" : 5,
          "particles" : [
            { "particle" : "soluskatana1"},
            { "particle" : "soluskatana2"}
          ]
        }
      },
    
      "lights" : {
        "glow" : {
          "position" : [0, 2.0],
          "color" : [128, 72, 40],
          "transformationGroups" : ["weapon"]
        }
      },
    
      "sounds" : {
        "fire" : [],
        "fire2" : [],
        "fire3" : []
      }
    }
    
     
  2. Naddox

    Naddox Cosmic Narwhal

    Its because you saved your genjikatana activeitem under the soluskatana.activeitem

    When you do this, you completely replace that file with yours. It is best to just copy all the files you will be using for your mod, put them in their own folder, and rename them to genjiskatana.<filetype> so that you don't alter vanilla stuff unless you actually want to. And when you do want to alter vanilla code, use patch files, otherwise other mods that alter the same item will cause lots of issues and incompatibility between their and your mod.
     
  3. honjenac

    honjenac Space Hobo

    I actually didn't edit any of the files in the vanilla folder. Just double checked, and they're all still vanilla. Should I rename the files to genjikatana.filetype and see if that works? Also, I can't find a .png's path anywhere in the .frames, .animatino, or .activeitem, but I'm pretty sure it's still used. I don't want it accessing the vanilla .png
    --- Post updated ---
    Just checked in game after editing all of my filenames; the Solus is back, but my custom is still not spawning.
     
  4. Naddox

    Naddox Cosmic Narwhal

    Can you zip you mod files and upload them to dropbox or mediafire or something so I can take a better look at it?
     
  5. honjenac

    honjenac Space Hobo

  6. Naddox

    Naddox Cosmic Narwhal

  7. honjenac

    honjenac Space Hobo

    Thanks for that. Sorry that you're having trouble. Idk what I did wrong :(
     
    Last edited: Jul 29, 2016
  8. Naddox

    Naddox Cosmic Narwhal

    I'm sorry I couldn't figure it out myself. The code as far as I could tell was good. I'm not 100% sure why it isn't working myself. Maybe @The | Suit can see whats wrong.
     
  9. Peelz

    Peelz Giant Laser Beams

    There are two issues that I found:
    1. It seems that you tried to change the altAbility for the weapon. You had it set to "blinkslash" which is not a valid altAbility for your weapon's category (broadsword). Blinkslash IS in the generic category, but it seems that you need specifically a broadsword ability.
    Code:
    "altAbilityType" : "blinkslash",
    2. You specified the wrong path to your weapon's animation file. Replace this line in your .activeitem file:
    Code:
    "animation" : "/items/active/weapons/bossdrop/soluskatana/genjikatana.animation",
    with this one:
    Code:
    "animation" : "genjikatana.animation",
    Hope that helps. It worked for me :)
     
    The | Suit likes this.
  10. Naddox

    Naddox Cosmic Narwhal

    If you look at the files i uploaded and changed, I fixed that. But thanks for pointing it out.
     
  11. Peelz

    Peelz Giant Laser Beams

    Ah, sorry, I didn't notice that. I was just going off of the files that he posted originally.
     
  12. The | Suit

    The | Suit Agent S. Forum Moderator

    Whats the error log with the corrections say?
     
  13. kocka123456

    kocka123456 Big Damn Hero

    uh... hey. im seeming to have the same problem, but its a bit different...
    i uploaded the files to dropbox, if someone can help, tell me the problem. and help me fix it. this is the first ever thing i coded so i have no idea what im doing...
    https://www.dropbox.com/s/q0nz99a97vdyun9/KEEMSTAR.rar?dl=0
     

Share This Page