I'm learning how to create... everything related to mods, and ran into an issue. I'm trying to add the new weapon secondary ability "laser" to a new weapon, "tac_ar". Thought it would work, but it keeps using the Flashlight ability, not Laser. I also don't want to just do a replace/patch of the flashlight ability, as that would make the point of learning, moot. Basically, idk what I'm doing wrong, looks like it should work.
When you created a weapon in the game, all the things inside "weaponName.activeitem" get saved inside the weapon, so even if you change the file, the weapon in your game will not change. If you want to test the differents changes you made, then you should spawn or craft a new weapon for every change.
And this only happens with weapons? Good to know, since I was able to edit items like flashlights without having to respawn them. Recrafted one, and yup, no weapon ability, but it did crash the game... Will keep working on it. Any suggestions?
Also trying to make a modified Riot Shield that shines a light in front of it, not really working... It's something obvious, like how I'm just adding the light function, or rather WHERE I'm adding it... Code: { "itemName" : "lighted_riot", "price" : 420, "maxStack" : 1, "rarity" : "Rare", "category" : "shield", "description" : "Putting some lights on this was a good idea!", "shortdescription" : "Lighted Riot Shield", "tooltipKind" : "Shield", "twoHanded" : false, "itemTags" : ["shield"], "inventoryIcon" : "images/lighted_riot.png:nearidle", "animation" : "shield.animation", "animationParts" : { "shield" : "images/lighted_riot.png" }, "animationCustom" : { "sounds" : { "raiseShield" : [ "/sfx/melee/sword_guard.ogg" ], "perfectBlock" : [ "/sfx/melee/shield_block_metal_perfect.ogg" ], "block" : [ "/sfx/melee/shield_block_metal.ogg" ], "break" : [ "/sfx/melee/shield_break_metal.ogg" ] } }, "scripts" : ["/items/active/shields/shield.lua"], "minActiveTime" : 0.2, "forceWalk" : true, "baseShieldHealth" : 100, "cooldownTime" : 0.5, "perfectBlockDirectives" : "?border=2;AACCFFFF;00000000", "perfectBlockTime" : 0.2, "knockback" : 10, "stances" : { "idle" : { "armRotation" : -90, "shieldRotation" : 0, "allowRotate" : false, "allowFlip" : true }, "raised" : { "armRotation" : 0, "shieldRotation" : 0, "allowRotate" : false, "allowFlip" : true, "lightposition" : [4,0 ], "lightColor" : [255, 255, 255], "beamlevel" : 5, "beamAmbience" : 0.1 } }, "builder" : "/items/buildscripts/buildunrandshield.lua" }
Post your Starbound.log. In there is it all the information you need to know of why it's not working.
Also adding a crafting table, "magic_table", which is supposed to be a recolored lava lamp you can craft at (for now).
Well, the only error there (that is crashing the game) is that the animation file of the magic table ( /objects/crafting/test_bench/magic_table/magic_table.animation ) have some syntax error. I suggest you to use the linter on this website to check the syntax of that object, and fix the error. Also when you're moding, as a recomendation, you should work on only one thing at the time. It's easiest to find and fix error that way.
Ok, so... the lava lamp (vanilla item) references lavalamp1.animation, which either doesn't exist, or is labelled differently- which means that the Magic Table is trying to reference magic_table.animation, which I didn't make because I had no idea what would be in it, since I can't find lavalamp1.animation to compare it to... And thanks for the idea of using a linter, it's a thing I was hoping existed, but I hadn't seen yet.