PixaL SKulLKid Posted June 3, 2020 Share Posted June 3, 2020 Uh hey... so my friend was trying to make a character on her own, using tutorials and i tried my best to help her along the way, but now we've came across a problem neither of us can fix. Everything works fine, able to hop on a world, and see the weapon down on the ground AND our inventory. But the problem is the character holds nothing when its equipped. modinfo.luamodmain.luaareadbhar.lua Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/ Share on other sites More sharing options...
IronHunter Posted June 3, 2020 Share Posted June 3, 2020 (edited) This is a really simple mistake of overriding the wrong symbol. AnimState:OverrideSymbol takes 3 parameters: target symbol, build containing new symbol, symbol in the build you want to override the target with. In this case this is a handslot item so you need to override the symbol "swap_object" inst.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "areadbhar") Edited June 3, 2020 by IronHunter grammar 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1339706 Share on other sites More sharing options...
PixaL SKulLKid Posted June 3, 2020 Author Share Posted June 3, 2020 (edited) Oh! Ok so it's not just us... Cool, good to know for next time thanks! EDIT: It didnt work... unless i put it in the wrong spot... Quote local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("areadbhar") inst.AnimState:SetBuild("areadbhar") inst.AnimState:PlayAnimation("idle") inst.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "areadbhar") Thats where i put it in the areadbhar.lua, right at the bottom there and it seemed it didnt work.. Edited June 3, 2020 by PixaL SKulLKid Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1339716 Share on other sites More sharing options...
IronHunter Posted June 4, 2020 Share Posted June 4, 2020 59 minutes ago, PixaL SKulLKid said: Oh! Ok so it's not just us... Cool, good to know for next time thanks! EDIT: It didnt work... unless i put it in the wrong spot... Thats where i put it in the areadbhar.lua, right at the bottom there and it seemed it didnt work.. If you look at your item you have the inst.AnimState:OverrideSymbol in your onequip function, you needed to change that, without your spriter file or folder structure its impossible for me to know what you named your symbol internally for further troubleshooting. 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1339726 Share on other sites More sharing options...
PixaL SKulLKid Posted June 4, 2020 Author Share Posted June 4, 2020 I tried replacing that line and it still didn't work, would you just be needing the anim folder to troubleshoot more or the whole thing? Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1339880 Share on other sites More sharing options...
IronHunter Posted June 4, 2020 Share Posted June 4, 2020 Can you attach your spriterfile and equipment lua file please and thank you, I don't need the sprites or folders at this time as I'll just open up the spriter file in a text editor to see what your build's symbol names are. 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1339892 Share on other sites More sharing options...
PixaL SKulLKid Posted June 5, 2020 Author Share Posted June 5, 2020 um... this might sound stupid and i know im taking a while and i thank you for trying your best, but i'm not sure what the spriter file is, i have an animation, bigportraits, exported, images and scripts folder. So is the thing your looking for in the exported folder? (Again thank you for pretty much dragging me through this, but once were done here i should know for next time) Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1340147 Share on other sites More sharing options...
IronHunter Posted June 5, 2020 Share Posted June 5, 2020 2 hours ago, PixaL SKulLKid said: um... this might sound stupid and i know im taking a while and i thank you for trying your best, but i'm not sure what the spriter file is, i have an animation, bigportraits, exported, images and scripts folder. So is the thing your looking for in the exported folder? (Again thank you for pretty much dragging me through this, but once were done here i should know for next time) Your spriter file or .scml file is in your exported folder and contains information for your anim and build when it gets compiled. The textures are converted into a .tex file. If you want you can either attach your exported folder or your .scml file as I really just want to know what you named your swap items symbol so I can tell you which one is the overridesymbol. 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1340189 Share on other sites More sharing options...
PixaL SKulLKid Posted June 6, 2020 Author Share Posted June 6, 2020 ah, so the scml files are the spriter, thanks! here's both for the weapon, since its going to be a weapon with a character. swap_areadbhar.scml areadbhar.scml Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1340245 Share on other sites More sharing options...
IronHunter Posted June 6, 2020 Share Posted June 6, 2020 (edited) 3 hours ago, PixaL SKulLKid said: ah, so the scml files are the spriter, thanks! here's both for the weapon, since its going to be a weapon with a character. swap_areadbhar.scml 1.2 kB · 0 downloads areadbhar.scml 1.03 kB · 0 downloads Ok I think the problem is a small hindsight on my part but its owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "swap_areadbhar") or owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "areadbhar") in your onequip function. If you change your original areadbhar.lua file so it just uses swap_object it should work. And you can try one of those two symbols. Edit The reason why we want to override owner is because the owner is the player character in most cases, inst in this case will be the equipment itself which only shows its animation when dropped on the ground, it also doesn't have a "swap_object" symbol. Edited June 6, 2020 by IronHunter 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1340272 Share on other sites More sharing options...
PixaL SKulLKid Posted June 6, 2020 Author Share Posted June 6, 2020 11 hours ago, IronHunter said: Ok I think the problem is a small hindsight on my part but its owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "swap_areadbhar") or owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "areadbhar") in your onequip function. If you change your original areadbhar.lua file so it just uses swap_object it should work. And you can try one of those two symbols. Edit The reason why we want to override owner is because the owner is the player character in most cases, inst in this case will be the equipment itself which only shows its animation when dropped on the ground, it also doesn't have a "swap_object" symbol. Tried all three options and it still isn't working. owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "swap_areadbhar") owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "areadbhar") owner.AnimState:OverrideSymbol("swap_object") I've tried putting each of these in the areadbhar.lua separately, and the last one gave the "string expected, no value" error (kinda makes sense). but the others still showed up invisible. perhaps im putting it in the wrong spot? Ive always been putting it right under the: local function OnEquip(inst, owner) Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1340397 Share on other sites More sharing options...
IronHunter Posted June 6, 2020 Share Posted June 6, 2020 1 hour ago, PixaL SKulLKid said: Tried all three options and it still isn't working. owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "swap_areadbhar") owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "areadbhar") owner.AnimState:OverrideSymbol("swap_object") I've tried putting each of these in the areadbhar.lua separately, and the last one gave the "string expected, no value" error (kinda makes sense). but the others still showed up invisible. perhaps im putting it in the wrong spot? Ive always been putting it right under the: local function OnEquip(inst, owner) This is very odd, "swap_object" is the correct symbol we are trying to override Your swap's .zip file is called "swap_areadbhar" and the symbol in the spriter file is the folder name containing sharing its name "swap_areadbar" local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_areadbhar", "swap_areadbhar") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end Is what it should look like, is your swap file compiling? I noticed it had 2 symbol folders in there one with a texture dimensions of 0 and 0. If you check your anim folder does it exist? Because at this point the only thing I can think of is the assets are missing or their is a typo somewhere. I could look deeper with the mod folder attached as a .zip but first just double check those things. 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1340415 Share on other sites More sharing options...
PixaL SKulLKid Posted June 10, 2020 Author Share Posted June 10, 2020 (edited) Yeah its compiling, i'm able to get into a game, and in the anim folder i do see the files. If it's that 0x0 texture than i have a feeling its that... but i'll let you take it and see for yourself (just don't upload it and stuff alright?) (and sorry it took awhile i actually forgot about this because i was busy) dimitriew (2).zip Edited June 10, 2020 by PixaL SKulLKid Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1341299 Share on other sites More sharing options...
IronHunter Posted June 11, 2020 Share Posted June 11, 2020 (edited) 20 hours ago, PixaL SKulLKid said: Yeah its compiling, i'm able to get into a game, and in the anim folder i do see the files. If it's that 0x0 texture than i have a feeling its that... but i'll let you take it and see for yourself (just don't upload it and stuff alright?) (and sorry it took awhile i actually forgot about this because i was busy) dimitriew (2).zip 4.45 MB · 1 download So after a quick autocompiler test it seems like you were missing a image or something in your most recent version, I simply fixed your spriter file. It compiled and now it works in game for both on the ground and in hand. Dimitri.rar Edited June 11, 2020 by IronHunter 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1341777 Share on other sites More sharing options...
PixaL SKulLKid Posted June 11, 2020 Author Share Posted June 11, 2020 Ah, thank you for helping me out on this! 1 Link to comment https://forums.kleientertainment.com/forums/topic/118772-not-holding-weapon/#findComment-1341800 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