OldWorld Posted August 29, 2013 Share Posted August 29, 2013 Hey guys, I'm looking to modify the pistol damage as I'm trying to 'bypass' the effect of zombies playing dead after shot. I downloaded an item spawner mod as I wanted to fool around with sprinting zombies in Sandbox, to find that after zombies are shot, they always play dead, no exceptions. I had 20 sprinters.. sprint towards me, I shot them, for them all to lie dormant on the floor until I approached them.I think it should be a random chance of them playing dead as opposed to always doing it, so I'm looking to raise pistol damage slightly to negate this effect.Thanks in advance.Okay so I found this: http://www.pzwiki.net/wiki/PistolWhere is the code stored?Found it. Link to comment Share on other sites More sharing options...
OldWorld Posted August 29, 2013 Author Share Posted August 29, 2013 So I'm trying to stop zombies from playing dead when knocked down by a pistol, and I think I may have found something interesting. In scripts>items, there's a line that says: KnockdownMod = 2, I haven't a clue about modding, but I'm guessing maybe this affects how often the zombies are knocked down? I've tried changing 2 to 1 or 0, but nothing changed. Any ideas guys? Link to comment Share on other sites More sharing options...
RoboMat Posted August 29, 2013 Share Posted August 29, 2013 Merged and moved to Mod Help section. I haven't a clue about modding, but I'm guessing maybe this affects how often the zombies are knocked down? I've tried changing 2 to 1 or 0, but nothing changed. Any ideas guys? Yep, I have an idea: Do like all the others and read some tutorials, look at the source code, do a trial and error run or short: learn to mod. Link to comment Share on other sites More sharing options...
OldWorld Posted August 29, 2013 Author Share Posted August 29, 2013 It seems that them playing dead is actually a different 'phase' in itself. You could set the damage of a weapon to 10,000, and they'd still be alive whilst knocked down. Edit: What do you think I've been doing? Maybe you have some ideas, though? Help would be greatly appreciated. Link to comment Share on other sites More sharing options...
RoboMat Posted August 29, 2013 Share Posted August 29, 2013 Edit: What do you think I've been doing? Posting multiple threads about the same issue? Link to comment Share on other sites More sharing options...
OldWorld Posted August 29, 2013 Author Share Posted August 29, 2013 Maybe you have some ideas, though? Help would be greatly appreciated. Link to comment Share on other sites More sharing options...
EnigmaGrey Posted August 29, 2013 Share Posted August 29, 2013 Maybe you have some ideas, though? Help would be greatly appreciated.Do not spam. Do not bump your own threads when an edit will do.Be patient.Be lovely. Link to comment Share on other sites More sharing options...
RoboMat Posted August 29, 2013 Share Posted August 29, 2013 My idea would be, that it is hardcoded, so you would have to modify some of the java.classes in order to change the behaviour. Where it is done? I don't know. Look here if you can find anything about it: http://theindiestone.com/zomboidjavadocs/ Link to comment Share on other sites More sharing options...
EnigmaGrey Posted August 29, 2013 Share Posted August 29, 2013 I'd be particularly interested inzombie.ai.states.FakeDeadZombieState RoboMat 1 Link to comment Share on other sites More sharing options...
OldWorld Posted August 29, 2013 Author Share Posted August 29, 2013 This is beyond me. I'm reading through it but I wouldn't know where to start. There's this 'asleep' Boolean, but I don't know if that's even relevant. I don't remember much from college, but isn't a Boolean either a yes/no thing? Only 2 choices? Link to comment Share on other sites More sharing options...
Eggplanticus Posted August 29, 2013 Share Posted August 29, 2013 You could probably use IsoZombie:setFakeDead (public method) along with the rng to have a random chance of zombies entering the dead state. Link to comment Share on other sites More sharing options...
OldWorld Posted August 29, 2013 Author Share Posted August 29, 2013 I.. honestly don't know what to say. I wish that meant something to me. I appreciate it though. I don't suppose you would mind trying it out and seeing if it worked? That would be absolutely fantastic. Either that, or would you be happy to walk me through it? Link to comment Share on other sites More sharing options...
Eggplanticus Posted August 29, 2013 Share Posted August 29, 2013 I don't want to do that. Read up about modding and try it yourself. nasKo, RoboMat and kinyoshi 3 Link to comment Share on other sites More sharing options...
EnigmaGrey Posted August 29, 2013 Share Posted August 29, 2013 You've posted so much on this issue so much only to finally get the attention you desire, and your reaction is to wait until someone else does it for you? Link to comment Share on other sites More sharing options...
RegularX Posted August 30, 2013 Share Posted August 30, 2013 Here is the radius KillAllZombies code I'm using for various Xmod items:XWeapons.KillAllZombies = function(target,radius) local square = target:getSquare(); local squareAround = luautils.getNextTiles(getWorld():getCell(), square, radius); for u,j in pairs(squareAround) do for k,l in pairs(j:getLuaMovingObjectList()) do if luautils.stringStarts(l:toString(), "zombie.characters.IsoZombie") then l:setFakeDead(false); l:setForceFakeDead(false); l:setOnFloor(true); l:Kill(getPlayer()); l:PlayAnim("ZombieStaggerBack"); l:Hit(null,getPlayer(),0,true,0); end end endendThis was a really tough nut to crack, actually. I first riffed off the nascent landmine code that is still in the Lua files somewhere. You'd think "kill" would ... kill, but if it is a standing zombie that hasn't been set to the stagger state yet, it will get back up. So the trick was to make the logic think it was an "onfloor" zombie, then knock it down (anim). The hit call is required to make the zombie cough up inventory. RoboMat 1 Link to comment Share on other sites More sharing options...
OldWorld Posted August 30, 2013 Author Share Posted August 30, 2013 Thanks a lot, so does this stop the zombies from playing dead? I'm guessing it does, with setFakeDead being false. Where would I put this code? Thanks in advance! Link to comment Share on other sites More sharing options...
EnigmaGrey Posted August 30, 2013 Share Posted August 30, 2013 Where would I put this code? Thanks in advance!http://www.youtube.com/watch?v=5B0xe_iaTjs Link to comment Share on other sites More sharing options...
OldWorld Posted August 30, 2013 Author Share Posted August 30, 2013 There's me thinking you had something worth contributing. Link to comment Share on other sites More sharing options...
RoboMat Posted August 30, 2013 Share Posted August 30, 2013 There's me thinking you had something worth contributing. Well all the information is there ... and as all the others have said - go and read up about modding if you want to mod ... or pay me some money and I will do it You probably could also use the OnZombieUpdate event to check if a zombie is a crawler and instakill him... Link to comment Share on other sites More sharing options...
OldWorld Posted August 30, 2013 Author Share Posted August 30, 2013 I don't aspire to learn modding, I just thought someone wouldn't mind spending 5 minutes showing me how to modify a certain file. But if it's too much to ask, don't worry about it. I'll wait patiently until it's fixed. Link to comment Share on other sites More sharing options...
RoboMat Posted August 30, 2013 Share Posted August 30, 2013 I don't aspire to learn modding, I just thought someone wouldn't mind spending 5 minutes showing me how to modify a certain file. But if it's too much to ask, don't worry about it. I'll wait patiently until it's fixed. I present you:http://theindiestone.com/forums/index.php/topic/393-please-read-before-posting/ Show some effortWhile we are glad to help any way we can, don't expect us to write your mods for you. Link to comment Share on other sites More sharing options...
OldWorld Posted August 30, 2013 Author Share Posted August 30, 2013 I don't even know which file to open that shows me the java code. I literally don't know where to begin. I can edit some lua files, but that's not hard. Where exactly do I find the code itself? Link to comment Share on other sites More sharing options...
EnigmaGrey Posted August 30, 2013 Share Posted August 30, 2013 You download XmodYou install it in PZYou find and replace the function XWeapons.KillAllZombiesYou test this to see if this is the result you want, likely by acquiring one of these 'Xmod items'You then read one of RoboMat's tutorials on moddingYou search this forum for Lua hooks and eventsYou read the Lua manualYou do your own due diligence. Link to comment Share on other sites More sharing options...
OldWorld Posted August 30, 2013 Author Share Posted August 30, 2013 Thanks Enigma, never heard of Xmod before, where can I download it? I tried the forums, didn't find anything. Tried Google but all I found was Mac-related things. Link to comment Share on other sites More sharing options...
EnigmaGrey Posted August 30, 2013 Share Posted August 30, 2013 Thanks Enigma, never heard of Xmod before, where can I download it? I tried the forums, didn't find anything. Tried Google but all I found was Mac-related things.Looks like you can't: http://theindiestone.com/forums/index.php/topic/912-wip-xmod/I guess you'll just have to skip to the "You then read one of RoboMat's tutorials on modding" step and proceed from there. 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