K1NGT1GER609 Posted January 15, 2015 Share Posted January 15, 2015 My mod that's in the don't starve custom character and skins is experiencing a problem with his weapon not being available to multiple dusts in one server. I'm pretty much worn down from doing this mod mainly by myself (and help with a few people for provided me templates) and need help on how to make ahrah aka wand to work. The wand I downloaded here was the most difficult template to work with and didn't allow me to rename it as it gave me a ton of headaches. Some one please take the time to help me make the wand available to multiple users who use dust on the same server. Here's a quicklink to the mod:http://forums.kleientertainment.com/files/file/1050-dust/ Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted January 17, 2015 Author Share Posted January 17, 2015 My mod that's in the don't starve custom character and skins is experiencing a problem with his weapon not being available to multiple dusts in one server. I'm pretty much worn down from doing this mod mainly by myself (and help with a few people for provided me templates) and need help on how to make ahrah aka wand to work. The wand I downloaded here was the most difficult template to work with and didn't allow me to rename it as it gave me a ton of headaches. Some one please take the time to help me make the wand available to multiple users who use dust on the same server. Here's a quicklink to the mod:http://forums.kleientertainment.com/files/file/1050-dust/ My word no one has responded? That's a bit discouraging. Link to comment Share on other sites More sharing options...
Kzisor Posted January 17, 2015 Share Posted January 17, 2015 @K1NGT1GER609, sorry I'm quite confused as to the issue. Are you saying that you are only able to create a single instance of your weapon? Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted January 17, 2015 Author Share Posted January 17, 2015 @K1NGT1GER609, sorry I'm quite confused as to the issue. Are you saying that you are only able to create a single instance of your weapon? Correct. No other player who plays as dust can get a duplicate. Link to comment Share on other sites More sharing options...
Kzisor Posted January 17, 2015 Share Posted January 17, 2015 (edited) @K1NGT1GER609, you need to add this to the function fn(colour): inst.entity:AddNetwork() It's not that your wand isn't being spawned properly, it's that it's not being sent over the network to the clients. This should also fix the issues with it dropping to the ground and disappearing. Edit:Ironically your satget had that particular line of code, but the wand.lua did not. Edited January 17, 2015 by Kzisor Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted January 17, 2015 Author Share Posted January 17, 2015 @K1NGT1GER609, you need to add this to the function fn(colour): inst.entity:AddNetwork() It's not that your wand isn't being spawned properly, it's that it's not being sent over the network to the clients. This should also fix the issues with it dropping to the ground and disappearing. Alright thanks ill see if it works. Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted January 18, 2015 Author Share Posted January 18, 2015 (edited) @K1NGT1GER609, you need to add this to the function fn(colour): inst.entity:AddNetwork() It's not that your wand isn't being spawned properly, it's that it's not being sent over the network to the clients. This should also fix the issues with it dropping to the ground and disappearing. Edit:Ironically your satget had that particular line of code, but the wand.lua did not. Other player got a inventoryitem error after I added "inst.entity:Addnetwork()" Edited January 18, 2015 by K1NGT1GER609 Link to comment Share on other sites More sharing options...
Kzisor Posted January 18, 2015 Share Posted January 18, 2015 (edited) @K1NGT1GER609, Make sure Network has a capital N. Lower case N will cause errors. Edit: Also add the following above any components you are adding. if not TheWorld.ismastersim then return instend For completeness your fn(colour) should look as followed:local function fn(colour) local function OnEquip(inst, owner) --owner.AnimState:OverrideSymbol("swap_object", "swap_wands", "purplestaff") owner.AnimState:OverrideSymbol("swap_object", "swap_wand", "wand") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end local function OnUnequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end local function ondrop(inst) inst.isDropped = true inst.isWeared = false saniup(inst)end local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() MakeInventoryPhysics(inst) inst.entity:AddNetwork() anim:SetBank("wand") anim:SetBuild("wand") anim:PlayAnimation("idle") inst:AddTag("sharp")if not TheWorld.ismastersim then return instend inst:AddComponent("weapon") inst.components.weapon:SetDamage(TUNING.BATBAT_DAMAGE) inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "wand" inst.components.inventoryitem.atlasname = "images/inventoryimages/wand.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) return instend Edited January 18, 2015 by Kzisor Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted January 18, 2015 Author Share Posted January 18, 2015 @K1NGT1GER609, Make sure Network has a capital N. Lower case N will cause errors. Edit: Also add the following above any components you are adding. if not TheWorld.ismastersim then return instend For completeness your fn(colour) should look as followed:local function fn(colour) local function OnEquip(inst, owner) --owner.AnimState:OverrideSymbol("swap_object", "swap_wands", "purplestaff") owner.AnimState:OverrideSymbol("swap_object", "swap_wand", "wand") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end local function OnUnequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end local function ondrop(inst) inst.isDropped = true inst.isWeared = false saniup(inst)end local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() MakeInventoryPhysics(inst) inst.entity:AddNetwork() anim:SetBank("wand") anim:SetBuild("wand") anim:PlayAnimation("idle") inst:AddTag("sharp")if not TheWorld.ismastersim then return instend inst:AddComponent("weapon") inst.components.weapon:SetDamage(TUNING.BATBAT_DAMAGE) inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "wand" inst.components.inventoryitem.atlasname = "images/inventoryimages/wand.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) return instend Alright that fixed it, thanks (also thanks to another person for checking it). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now