Project Zomboid

Project Zomboid

Foxtrot39 Sep 3, 2019 @ 2:37pm
How exactly does accuracy/targeting work?
It feels horribly random

Sometime all my shots connects and sometime because I am 1 pixel off it never hit anything

Sometime I fire straight in a massive hord and nothing get hit and sometime I fire the one in front of me and I kill a random zed 10m on my targets left side

I also noted I need to aim around 10-20m behind my target in order to get a hit (rifles) sometime too and the diagonal & left/right targeting seems to never work (its either up & down or nearly nothing will hit anything)
Last edited by Foxtrot39; Sep 3, 2019 @ 2:39pm
< >
Showing 1-15 of 17 comments
Death Sep 3, 2019 @ 2:59pm 
Guns have a progression. You should start with a shotgun to build accuracy and reloading skill, then, I think around level three or four, you switch to using a pistol and then switch to the rifle around level seven or eight.

That said there has been talk of making where you're targeting a bit more noticeable in a future update, but I don't think anything was written in stone when it was mentioned.
Foxtrot39 Sep 3, 2019 @ 3:04pm 
Just having a targeting cone would be helping a lot
Fenris_Wolf Sep 3, 2019 @ 3:29pm 
As you noticed, aiming behind the target is your best bet. The isometric view can make it difficult to gauge the targeting cone at close range.
Don't hold the cursor over the body. Remember: the Z is in the tile where its feet are.

I use the 'aim behind' method, mentally drawing a line from my feet to the mouse, which should pass through the tile where the target is standing.

Most important aiming tip: if you just moved positions, stand still a few seconds before opening fire. Movement kills any chance of accuracy at lower levels.
donnietr Sep 4, 2019 @ 2:17am 
If you are in vanilla you have to use shotgun, pistol and then rifles. 2 or 3 boxes before pistols, then the varmit and then the hunting. You have to use the upgrades to make it worth while. full choke on shotguns gives a finer, closer spread, sawn off you get a lot of damage on a lot. pistol with a red dot and laser gives best accuracy from about 6 steps.
Hydrocraft is where its at though. got a barreta p92 (i think) with 15 clips, 2x scope and suppressor. i can hit at 10 steps consistantly. My ar15 has a grip on barrel, 4x scope and 5 other things and i can hit the width of the screen. just got to the 5th box for aiming and reloading and went to mauldraugh from rosewood to clear out the storage and get books. killed 250 with pistol alone. used all the ammo, went to ar15 and got another 100 and still there. i am so far away that they dont even react to being shot down. also make sure the weapon is tip top condition. and BETA blockers. if you are scared you WILL miss. heart beat causes your hand to wiggle in tune with it. cant hit squat that way.
Last thing, watch the head swinging, if you shoot and the head wiggles away you miss. aim when its in front of barrel. there is no time delay. then most important, never shoot diagonally. the game doesnt do that. always try and have a straight line shot.
You can invest a day or 2 just loading and unloading your guns, unless your in vanilla.
Fenris_Wolf Sep 4, 2019 @ 4:48am 
Originally posted by donnietr:
Hydrocraft is where its at though. got a barreta
ORGM, not Hydrocraft.

Originally posted by donnietr:
and BETA blockers. if you are scared you WILL miss.
Panic has no effect on accuracy. I've disproved this outdated rumor many times, including pasting the whole hit chance calculation code on the forums. It nerfs damage, not accuracy (and obviously reload speed)

Originally posted by donnietr:
most important, never shoot diagonally. the game doesn't do that. always try and have a straight line shot.
Huh? It shoots fine diagonal...
ocelot629 Sep 4, 2019 @ 7:57am 
There was mention of a firearms "targeting highlight" in a dev blog.

Night Drivin’
May 2019

(a link for quicker access to the blog)
https://projectzomboid.com/blog/2019/05/7192/

"Also added to the internal build this week is an experimental system to help with gun aiming – which will also come alongside a general tightening stuff like the shotgun radius, before we fully overhaul firearms in a future build.

Please note a) this might not end up in the main game or primary game modes depending on how fun it feels, and b) the colour is WIP and will be toned down in any full release."

however this is yet to be possibly implemented.

=======================================================================

As for firearm hit chance, it is random and other factors heavily affect it, including panic and other accuracy decreases (which will take effect when you are fighting a large horde making firearms useless without beta blockers (unless you choose the veteran career))
edit: incorrect information (sorry for not reading above!)

I will admit, firearms are useless anyway, unless you need to draw thousands of zombies towards your location, they never hit anything unless you waste millions of rounds failing to hit a couple of zombies (which is comical at best and deadly at usual) in which case you get a single skill point (sometimes you still need more ammo to waste before levelling), even then they mostly just create crawler zombies.

Don't get me started on slow reload times due to panic, (even max skill level is slow when under panic) ugh!

Just stick to melee, the game combat-wise is currently designed mostly around encouraging melee combat as far as i can tell, considering the consequences and little benefit to using firearms; or you could get the mod ORGM which makes guns relevant again by making them actually hit stuff.

Guns should be more player skill with ingame skill instead of ingame skill = more luck; but they are not at the moment.
Last edited by ocelot629; Sep 4, 2019 @ 12:14pm
Fenris_Wolf Sep 4, 2019 @ 9:06am 
Originally posted by ocelot629:
There was mention of a firearms "targeting highlight"
As for firearm hit chance, it is random and other factors heavily affect it, including panic and other accuracy decreases (which will take effect when you are fighting a large horde making firearms useless without beta blockers (unless you choose the veteran career))

As mentioned in my previous post, panic has no effect on Hit Chance at all. I've gone through the entire attack and targeting code countless times during the creation of ORGM, the only things that effect Hit Chance are:

Base weapon + attachment hit chance

When the player last moved and weapon + attachment AimTime bonus (if the player has been moving)

Aiming skill level

Pain in the hands or arms.

Range bonuses for point blank, and penalties for exceeding max range or targets under min range (min range usually only applies if a scope is attached)

Marksman trait if the player has it (currently not pickable in vanilla)


Anything else like panic, stress etc effects the weapons damage, not Hit Chance.

This info is in zombie/ai/states/SwipeStatePayer.class (compiled java file) starting at line 797 and ending at line 836 where the final random roll happens.
Foxtrot39 Sep 4, 2019 @ 10:25am 
May I ask when creating ORGM has there been any leads towards the file governing repairs in the game?

All I find are what item allow to repair what, nothing on how much they repair or repair chances are

Hoping to find a lead to trace & disable that repair degradation system entirely to make a mod
Last edited by Foxtrot39; Sep 4, 2019 @ 10:26am
Fenris_Wolf Sep 4, 2019 @ 10:59am 
Its handled by the java (zombie/inventory/FixingManager.class)
best bet to bypass the degradation would be to manually reset the repair counter with item:setHaveBeenRepaired(0)

Foxtrot39 Sep 4, 2019 @ 11:03am 
Originally posted by Fenris_Wolf:
Its handled by the java (zombie/inventory/FixingManager.class)
best bet to bypass the degradation would be to manually reset the repair counter with item:setHaveBeenRepaired(0)
Id rather change the script if I can thanks for the info

And it contain no value I can exploit whatsoever only references seemingly pointing nowhere, great...
Last edited by Foxtrot39; Sep 4, 2019 @ 11:19am
Foxtrot39 Sep 4, 2019 @ 11:48am 
Well since it seems impossible for me to trace the script value and make it a constant value il just won't even try

How does one even use command in SP considering it is completely disabled
Last edited by Foxtrot39; Sep 4, 2019 @ 11:53am
Fenris_Wolf Sep 4, 2019 @ 12:14pm 
Right. Since its in the java, its not modable by normal methods, which is why I suggested manually resetting the counter.
But by 'manually' I didn't mean by using the MP commands obviously that wont work. I meant manually call that from the lua in your mod. Probably in response to a event such as OnEquipPrimary so it gets reset when the player holds the weapon.

Probably not the best event to use, but it works as a crude example:

Events.OnEquipPrimary.Add(function(player, item)
if item == nil or item.setHaveBeenRepaired == nil then return end
item:setHaveBeenRepaired(0)
end)



Foxtrot39 Sep 4, 2019 @ 12:35pm 
Damn, was hoping to be able to avoid code writting due to my total lack of experience

Well thanks for the help gonna try to make it after an extensive tutorial session
Last edited by Foxtrot39; Sep 4, 2019 @ 2:26pm
Foxtrot39 Sep 4, 2019 @ 2:37pm 
Gonna give up, nearly 2h in and the tutorial and it provided absolutely no insight of what should be put in a lua file or how even the callback actually work nor where the file containing event should be placed in


Gonna let someone else make a similar mod and cheat repair meanwhile instead, coding is just quantum physics to me
Last edited by Foxtrot39; Sep 4, 2019 @ 3:13pm
donnietr Sep 4, 2019 @ 3:33pm 
well thanks for the info fenris_Wolf. Yes orgm, rather than hydrocraft, forgot that. Second i didnt know about the way the game did the calculations. First time with either mods, i had just edited the sound noise distance for the vanilla game. Kind of strange that stress makes your bullet do less damage tho. I do know that if i stay outside of freak distance i can hit heads every time with a pistol. 1 shot kills. seldom do they get back up.
But really, thanks for the insights.
< >
Showing 1-15 of 17 comments
Per page: 1530 50

Date Posted: Sep 3, 2019 @ 2:37pm
Posts: 17