Modding Help mod doesnt work, for some reason i dont know why, new weapon mod

Discussion in 'Starbound Modding' started by tetracontagon, Jun 23, 2023.

  1. tetracontagon

    tetracontagon Void-Bound Voyager

    So i was trying to make a mod that adds a new weapon to the game. I followed a, very outdated, modding tutorial by firespark81. The tutorial showed me how to make a gun. Buuuut... I wanted to make a laser gun. Otherwise known as a weapon that continously fires a laser as its primary ability.

    I have all the images i want to use for the weapon. I have all the necessary files in the right place {I think}.
    I found out the mod wasnt working by opening the crafting menu where the weapon was supposed to be made. Instead of the weapon, i found a perfectly generic item. When i crafted the item, the game showed this error, see attachment.

    Just if anyone can help, please do, much appreciated.
    Anyways i hope this gives enough info, if not, a reply would be usefull.
    I know that the file 1 uploaded has .txt at the end but thats just so that I could upload it.

    My apologies for my english, if there are any mistakes.
     

    Attached Files:

  2. Rezetrx

    Rezetrx Void-Bound Voyager

    Could you provide the starbound.log file?
    It gives further Information on which line or function has errored here.
     
  3. tetracontagon

    tetracontagon Void-Bound Voyager

    Well... I managed to fix to problem. but now i have another problem. Whenever I hold the weapon, its invisble, and I cant use the weapon in any way or form. I tried rescaling the image, thinking it was too small. I tried putting the weapon icon in the center of the .png, thinking it was misplaced. Both did not work. I also messed around with the offset of stuff, also thinking it was misplaced.

    for this problem, no file errors show up. But here's the latest starbound.log. I fixed the first problem by looking at errors in the .log file. Turns out it was missing the .animation file from the original weapon, Lazercaster. So i made a random file and named it correspondingly, That ave no error, so i changed to .activeitem file so that it would use the correct file. And now, the correct image is shown in game, in the crafting menu inventory and hotbar. For everything else. it all works, i think.

    Help is much appreciated.
    My apologies for my english, if there are any mistakes.
     

    Attached Files:

  4. tetracontagon

    tetracontagon Void-Bound Voyager

    Could you specify wich file? And a very long shot but, wich error?
    No worries if you dont have the awnser i want.
    I tried fixing most related errors that showed up in starbound.log, some i managed to fix, some are unclear to me.

    Or is it an error in like, you cant open any of the files that I sent? That might be it, but I have no knowledge of this.

    Help is much appreciated.
    My apologies for my english, if there are any mistakes.
     
  5. Rezetrx

    Rezetrx Void-Bound Voyager

    This line implies that there is an error in resetting an animationgroup as it was not able to find it.

    [Error] Exception while invoking lua function 'update'. (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:117: (MapException) Key 'weapon' not found in OrderedMap::get()


    So within your animation file you are missing either of these two "weapon" entries within the two groups (if it exists with just empty brackets, than that is already fine)
    Code:
      "rotationGroups" : {
        "weapon" : {
          "angularVelocity" : 0
        }
      },
    
    Code:
      "transformationGroups" : {
        "weapon" : {},
        "muzzle" : {}
      },
    
    Edit: it is the "weapon" entry within "transformationGroups" that is missing.
     
  6. tetracontagon

    tetracontagon Void-Bound Voyager

    Quick update here, I dont think ill need help anymore with this.
    Turns out the files i obtained by unpacking the packed.pak folder were only like 25% of the total amount of files. i was just missing a lot of files in the assets. I got confused alot. but i unpacked it again, properly this time. And i have made alot of progress with the weapon now. And yes, the help given was usefull, but only for a time. thanks again.

    My apologies for my english, if there are any mistakes.
     

Share This Page