I'm making a simple mod that adds a custom spear to the game in .activeitem format, but when I spawn it in game using /spawnitem, it gives me a perfectlygeneric item. Maybe the pathing is incorrect in my player.config.patch, or maybe the directory for my .activeitem and .png isn't right. Can someone help firgure this out?
Remember to always check your logs for errors as to why things don't work. If you want help with it, you need to post your log. Can't help otherwise.
Oh yeah, sorry I was in a hurry for something. Here it is: Error: Could not instantiate item '[firespear, 1, {}]'. (MapException) Key 'handle' not found in Map::get() It's talking about this: Code: "animationParts" : { "blade" : "/items/active/FSWeapons/spearBlade.png", "handle" : "/items/active/FSWeapons/spearHandle.png" }, Since it doesn't like me adding my custom handle to that part of the code, where would I put it in the following code?: Code: { "itemName" : "firespear", "price" : 170, "level" : 6, "maxStack" : 1, "rarity" : "legendary", "description" : "Sharp end towards enemy.", "shortdescription" : "Fire Spear", "tooltipKind" : "sword", "weaponType" : "Spear", "twoHanded" : true, "itemTags" : ["weapon","melee","spear"], "inventoryIcon" : "firespearicon.png", "animation" : "/items/active/weapons/melee/spear/tieredspear.animation", "animationParts" : { "blade" : "/items/active/FSWeapons/spearBlade.png", "handle" : "/items/active/FSWeapons/spearHandle.png" }, "animationCustom" : { "sounds" : { "fire" : [ "/sfx/melee/swing_spear.ogg" ] } }, "scripts" : ["/items/active/weapons/melee/spear/spear.lua"], "elementalType" : "fire", "aimOffset" : -1.0, "primaryAttack" : { "fireTime" : 0.8, "baseDps" : 10.0, "damageConfig" : { "damageSourceKind" : "spear", "statusEffects" : [ ], "knockbackMode" : "aim", "knockback" : 30, "timeoutGroup" : "primary" }, "holdDamageMultiplier" : 0.1, "holdDamageConfig" : { "timeoutGroup" : "hold", "timeout" : 0.5 } }, "stances" : { "idle" : { "armRotation" : -90, "weaponRotation" : 0, "twoHanded" : false, "weaponOffset" : [0, 0.5], "allowRotate" : true, "allowFlip" : true }, "windup" : { "duration" : 0.1, "armRotation" : -110, "weaponRotation" : 20, "twoHanded" : true, "weaponOffset" : [0, 0.5], "allowRotate" : false, "allowFlip" : false }, "fire" : { "duration" : 0.3, "armRotation" : -20, "weaponRotation" : -70, "twoHanded" : true, "weaponOffset" : [0, 2.5], "allowRotate" : false, "allowFlip" : false }, "hold" : { "armRotation" : -30, "weaponRotation" : -60, "twoHanded" : true, "weaponOffset" : [0, 2.0], "allowRotate" : true, "allowFlip" : true } }, "altAbilitySource" : "/items/active/weapons/melee/altabilities/spear/rocketspear/rocketspear.altability", "builder" : "/items/buildscripts/buildunrandweapon.lua" }
The animation file you have set doesn't use a "handle" image. Change it from tieredspear to just spear.
It did work. But when I use the alternate ability, The head of my spear turns yellow. There is nothing in the log that is out of the ordinary.
Another problem you might find is that when you've attacked enemy with the fire spear, but you don't kill it, and then you stop using the fire spear, the next time you use it on that same enemy, you cant attack the enemy with the fire spear. How ever you can finish the enemy off with other weapons.
Well i don't see anything inharently wrong with it. On the bad news, the format changes a little bit in the next version, so you will have to remake it then.