Project Zomboid

Project Zomboid

2,291 ratings
Bow and Arrow
7
13
6
8
3
4
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
881.574 KB
24 Aug, 2020 @ 2:25pm
26 Mar @ 12:01pm
86 Change Notes ( view )

Subscribe to download
Bow and Arrow

Description
Adds archery.
Glitched in multiplayer (Arrows are more lethal because of a game limitation (This could be worked around). The bow looks different to other players when it is drawn (A fix was attempted but with only one instance of the game running, for lack of RAM)).
Not working with a controller (For lack of a controller to test with. Oh, a controller can be emulated).
In the latest game version the arrows do not pitch up or down.

(I am currently not playing project zomboid or modding it much though)

You assemble arrows with the right-click menu, like with firearm attachments, instead of with the recipe menu.

How fast your character can nock an arrow and how well he can aim depend on his archery skill (and panic and tiredness). Your character can start with the "Archer" trait. Hitting targets is easier when they are close than when they are far away. An arrow is nocked with the reload button. The bow uses the same controls as firearms, so you can check the controls page. This mod shows green circles over the targets' heads as part of a custom targeting system.

It's not exactly balanced right now, but it might be a bit of fun, maybe. (This sentence was typed long ago :/ )

A wooden bow can be made by the character. There is also a compound bow without a recipe.
Bow: Plank + knife
Bow string: Twine
Arrow shaft: Sturdy stick + knife
Arrowhead: Either a nail hammered against a big hammerhead; or spoon/butterknife and saw; or a sharpned stone
Fletchings: DuctTape or something + scissors; or from butchering a bird


This mod uses its own aiming system, so it doesn't intermesh with any other mod that does things with aiming systems unless the other mod is specifically programmed to do so. For example it probably does not collaborate with Advanced Trajectory.


Possible additions (Though actually perhaps I am unlikely to put the time into doing most of these. Also archery is going to be added to the base game which makes me extra unlikely to so much more work on this mod):
. Adding more detail to bow making, like different sorts of wood and different bow designs and humidity (Probably not. It would ideally involve finding how to get the Lua to distinguish conifer wood from deciduous wood).
. Balancing (Two different ways of aiming - looking down the arrow, and not looking down the arrow. The Archer trait giving good looking-down-the-arrow skill. Looking down the arrow being slow to aim and bad against moving targets. Instinctive archery being good for hitting moving targets, and at shooting without spending time aiming)
. Seeing arrows stuck in zombies (partly done)
. A quiver (done. added compatibility with another mod's quiver)
. Translations (got some Russian and Korean)
. Other sorts of bow like recurve laminated and composite and mechanical, and stone-shooting (added one)
. Shooting at zombies lower down than the archer.
. Shooting at superb and subpar survivors.
. Target practice.
. Getting tired from drawing the bow
. Having separate aim and draw buttons
. The sounds someone made (or maybe not eew)
. Shooting over fences
. A bow holster
. Shooting molotovs
. Strings snapping
. Making the compound bow look better on the back with a bag
. Aiming with a controller (using a controller emulator)
. Note to self on reduced action time mod incompatibility.

Acknowledgements:
. To make the arrow move and detect collisions I used Driving Cars Mod by nolanritchie to start with, where the item is picked up and put down again to move it.
. The lua tooltip things were originally copied from something like ORGM.

Zomboid log file for error messages:
HardDrive:\Users\Username\Zomboid\Logs

Someone made this mod for this mod:
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2824362101
"Bow and Arrow Addon" "QoL Addon"

There is also a mod for alternative drawing. And there's another one that implements that mod differently. This code has not yet been merged with this mod, my apology for being tardy :c

Compatible with the quiver in the mod "Better Belts". The quiver makes nocking an arrow a bit faster too.

There's a mod that does something with this mod and others. (I wonder what I meant by this line)

In case you want to know how to do things with this mod's modular arrow system, There's an example mod that adds a glass arrowhead and things in the "discussions" section of this page.

I remember there was a mod that makes changes to this mod like adding flint arrowheads and more ways of making fletchings but it's not listed in this mod description, which is inconvenient.

I'm all right with mods of this mod being made, like retextures and other things, and also mod packs.

Workshop ID: 2208315526
Mod ID: MandelaBowAndArrow
Popular Discussions View All (18)
17
4 Jul, 2023 @ 9:12am
Error Log - Continuous errors -
tinytea.
4
25 Oct @ 2:03am
Translation of "Bow and Arrow"
Texaliuz
5
13 hours ago
Bow with controller
Syam
1,131 Comments
Gluten the Sensitive  [author] 11 hours ago 
DoktorFar thanks accepted sire (even if I left this mod part-way done because I'm weird)

@@@
@@
_||____
|______|
|__[]_o_|
Gluten the Sensitive  [author] 11 hours ago 
grammarn't
Gluten the Sensitive  [author] 11 hours ago 
Oh so it already does, someone wrote.
NekoMilo isn't
Shaman2525 I've not used that mod but it should be possible
JOKESTER215 I understandn't
To other people saying they have a problem months ago: :steamsad:
georgedorn I don't think arrows collider with player characters, actually. It should be just zombies.
Oh, yeah, having a separate build 42 mod makes sense.
Plz updaet: I think arrow trajectory would likely have to work quite differently. If they've added new anti-cheat, maybe the client can't just spawn items like arrows, so the server will have to do it, so the arrow flight will look laggy. That said, I wonder if my code is takes up a lot of bandwidth by moving an item every frame. So I might have to think about what to do server-side and what to do client-side and how to communicate between the two for a good result. I... don't feel like doing it :steamsad: :steamsad: :steamsad:
Gluten the Sensitive  [author] 11 hours ago 
MarrsJ Oh yeah that seems like a massive mistake if sprinting doesn't cancel nocking an arrow.
Gluten the Sensitive  [author] 11 hours ago 
DoktorFar yeah I didn't really finish this mod but at least I managed to make it somewhat. :steamsad:

Five months later, okay, so wikipedia has a page on projectile motion. Someone edited it to delete a load of maths citing a wikipedia rule but here's an old version
https://en.wikipedia.org/w/index.php?title=Projectile_motion&oldid=995634941#Angle_%CE%B8_required_to_hit_coordinate_(x,_y)
I notice someone edited it again and brought back the maths, though, which is nice. https://en.wikipedia.org/wiki/Projectile_motion#Angle_%CE%B8_required_to_hit_coordinate_(x,_y)
So I just copied that formula in Lua and it worked.
DoktorFar 11 hours ago 
@Gluten the Sensitive thanks for the work you did on this mod, very appreciative. Who knows maybe one day in some future maybe you will come back again, who knows :gman:

Also merry christmas :dwayneelf:
Gluten the Sensitive  [author] 11 hours ago 
I meant stronger, not stringer
Gluten the Sensitive  [author] 11 hours ago 
NerdCuddles yeah that's a nice idea, someone stronger could use a stringer bow. That would definitely make sense in addition to aiming skill. I don't feel like it though...

Someone trying the mod and it not working: :steamsad:
Gluten the Sensitive  [author] 11 hours ago 
RobRendell Oh yeah, that "if(player:getZ() < 3) then" is odd. Oh, you found the/a bug that was pushing the mod over and eating its snacks, half a year ago. Yeah that's pretty good, I should fix it. But now Build 42 unstable is out and I'm guessing I'm probably only going to want to port/patch this mod to it if I play build 42 and I've not been playing video games much and when I have it's not been PZ... Project Zomboid has been a fun game to spend a lot of hours playing but I don't feel like it...
Gluten the Sensitive  [author] 12 hours ago 
Mechavelli that looks like a problem you'd um do something......

柴柴 you could try disabling something in MBA_UI_ModelShower.lua. Perhaps:
function Client.MBA_UI_ModelShower:render()
--Nothing
end