Mario384 Posted May 1, 2015 Share Posted May 1, 2015 Not sure what exactly causes this, but in my mod where players can be mobs, if certain types of mobs miss an attack, it will crash the server. Any idea on what this could be? Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/ Share on other sites More sharing options...
DarkXero Posted May 1, 2015 Share Posted May 1, 2015 Well, what certain mobs are those? And what attacks? Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633703 Share on other sites More sharing options...
Mario384 Posted May 1, 2015 Author Share Posted May 1, 2015 (edited) Well, what certain mobs are those? And what attacks? Well, I asked, and apparently it's Deerclops and Warg (only, mind you) and their basic attacks. Not really sure why them, but it appears to be an issue. Edited May 1, 2015 by Mario384 Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633710 Share on other sites More sharing options...
DarkXero Posted May 1, 2015 Share Posted May 1, 2015 @Mario384, can you get a log of those errors? I can't replicate them. Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633743 Share on other sites More sharing options...
Mario384 Posted May 1, 2015 Author Share Posted May 1, 2015 (edited) @Mario384, can you get a log of those errors? I can't replicate them. I just talked with my informee, aparently it happens only when you attempt to attack a moleworm that's underground. I can replicate this. Along with this, unlike my informee saying it only occurs with the two mobs specified above, it seems to happen with ANY character. Going to test it with the vanilla characters, see if it's not on the mod's end. And I will be getting a log of it soon. EDIT: Well, while vanilla characters don't crash it, they appear to be able to hit Moleworms underground. I don't believe that's right. EDIT 2: The crash specifically occurs when you attempt to attack the raised dirt BEHIND the Moleworm.Then you get a crash about it having no description. Edited May 1, 2015 by Mario384 Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633755 Share on other sites More sharing options...
DarkXero Posted May 1, 2015 Share Posted May 1, 2015 (edited) @Mario384, yes, that's a bug. If you get the function that gets called during the crash, we can append code so that if the target is a mole, nothing happens. The crash is caused by attacking, or just hovering over the dirt? Edited May 1, 2015 by DarkXero Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633759 Share on other sites More sharing options...
Mario384 Posted May 1, 2015 Author Share Posted May 1, 2015 (edited) @Mario384, yes, that's a bug. If you get the function that gets called during the crash, we can append code so that if the target is a mole, nothing happens. The crash is caused by attacking, or just hovering over the dirt? It's caused by attempting to Examine Raised Dirt. Not the Moleworm's actual location, but the raised dirt it's trail is made of. It's stringutil attempt to index local "ret" (a nil value) EDIT: Also, while testing a new method of making Examine not an option (AKA basically Werebeaver controls) that would also fix it. Also, I know this might be unrelated, but so I don't have to make another topic, is it possible to hook up a custom button to trigger an action, no matter where the character is? Edited May 2, 2015 by Mario384 Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633782 Share on other sites More sharing options...
DarkXero Posted May 2, 2015 Share Posted May 2, 2015 @Mario384, or you can just remove all the speeches, so that the players get the Wilson speech, that has MOLE = { HELD = "Nowhere left to dig, my friend.", UNDERGROUND = "Something's under there, searching for minerals.", ABOVEGROUND = "I'd sure like to whack that mole... thing.", },whereas all your speeches don't. And they don't have anything different, really. Remove the speeches. They only need to say "It's a thing". Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633799 Share on other sites More sharing options...
Mario384 Posted May 2, 2015 Author Share Posted May 2, 2015 @Mario384, or you can just remove all the speeches, so that the players get the Wilson speech, that has MOLE = { HELD = "Nowhere left to dig, my friend.", UNDERGROUND = "Something's under there, searching for minerals.", ABOVEGROUND = "I'd sure like to whack that mole... thing.", },whereas all your speeches don't. And they don't have anything different, really. Remove the speeches. They only need to say "It's a thing". This appears to work. Thanks! Now, I still want to ask you, if I wanted to make an actionhandler go off when I press a button (something like Z), how would I go about doing that? Currently, I have everything rigged so when you attempt to "pick" something, your certain ability goes off. But, if I wanted to to be able to trigger it anywhere, anytime with the press of a button, is that possible? Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633817 Share on other sites More sharing options...
Kzisor Posted May 2, 2015 Share Posted May 2, 2015 @Mario384, check out this tutorial for how to learn how to do that. http://forums.kleientertainment.com/files/file/1126-tutorial-mod-rpcs-with-keyhandler/ Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633840 Share on other sites More sharing options...
DarkXero Posted May 2, 2015 Share Posted May 2, 2015 @Kzisor, I was just looking for this to point him out there. Anyways, I got a compact example here:AddModRPCHandler(modname, "TriggerZ", function(player) player.sg:GoToState("refuseeat")end)AddPlayerPostInit(function(inst) GLOBAL.TheInput:AddKeyHandler(function(key, down) if down and (key == GLOBAL.KEY_Z) then SendModRPCToServer(MOD_RPC[modname]["TriggerZ"]) end end)end) Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633844 Share on other sites More sharing options...
Mario384 Posted May 2, 2015 Author Share Posted May 2, 2015 (edited) Hmm, this looks like it will help. Thanks! EDIT: I believe I have everything set up right... But anytime I try to even load the mod, I get crashes not even related to it. Edited May 2, 2015 by Mario384 Link to comment https://forums.kleientertainment.com/forums/topic/53414-missing-an-attack-crashes-the-game/#findComment-633954 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