Skip to content

Adds basic muskets#298

Merged
kyres1 merged 17 commits intoEncore-Server:masterfrom
Hockaa:gunsgunsguns
Jul 25, 2025
Merged

Adds basic muskets#298
kyres1 merged 17 commits intoEncore-Server:masterfrom
Hockaa:gunsgunsguns

Conversation

@Hockaa
Copy link
Contributor

@Hockaa Hockaa commented Apr 26, 2025

Adds a basic flintlock musket to the game.
Planned tasks, in no particular order:

  • Advanced reloading system & making sure the gun adheres to it (flash pan must be full and closed, a bullet needs to be loaded in and packed into the powder
  • Special examine text with colour-coding to indicate what the status of the gun is for reloading purposes (is there a bullet in the barrel? is it packed in? is the flash pan full and open or closed?)
  • Gunpowder horn - what is says on the tin, you use it for filling the gun's flash pan. Currently this is planned to be an unlimited supply for the sake of gun gameplay being fun, ammo is your limited resource
  • Sprites for all of the new items (thank you Lancer.)
  • Add a smoke effect, either on the location of the shooter or the location ahead of them, after firing the musket when it's powdered.
  • A way to craft more musket balls, as they are not re-usable like arrows and bolts, and are expended once shot. Unsure of whether this should be tied to engineering or weaponsmithing - it would probably make a nice novice engineering recipe?
  • A shot pouch to carry musket balls, This is sort-of implemented right now, but not in a way I'm satisfied with. I'm going to be changing up quivers a bit in a separate PR so that I can have ballpouches run off of the same code without conflict, instead of just having two different versions of the quiver's code written out and operating separately.
  • Make muskets as balanced and bug-free as I can get them on my own, anything after that will have to come from experience with them in actual gameplay. This includes how much damage they do, how accurate they are, how much armour they penetrate, how long they take to reload. (Gameplay balance takes full priority over realism here.)
  • Figure out how I want muskets to be obtainable in-game and then implement it (specific classes? virtue? probably both, but classes would come a little later, crafting is another angle to look at too)
  • Figure out some of the shenanigans with intents such as chargedrain/chargetime - also, should muskets have arc intent/something similar to arc intent so that you can fire past a single person, or would that be OP?
  • Change the font colour code for the musket description to use the new defines added in Adds customisability to Local, Direct and Global Narrates + some new font defines #293 (when it gets merged.)
  • Get the musket code I've written myself to a state I feel is clean and "good." (I feel like I'm utilising too many defines for the check_barrel() proc and powder var, especially given how those 2 interact each other. I should look closer at this to see if I can remove extraneous defines and whatnot.)
  • Maybe add a sound for putting the bullet in the musket's barrel and opening/closing the flash pan - though this is probably superfluous.

Also tweaks gun code a little bit, to check when emptying a weapon if the "bullet" should go straight to your inactive hand (assuming it's not full already), this will affect crossbows and bows as well.

Adds the Cudao Marksman mercenary subclass. In the future, this class will have a choice between types of firearm, but is limited to the flintlock musket for now.

Adds the musketeer virtue - gives you musket equipment and basic skills for firearm operation.

And a few things I've probably also forgot about.

Musket Acquisition

Currently, there are five ways to get your hands on a musket (and the tools necessary to make it works.)

  • Cudao Marksman mercenary subclass
  • Musketeer virtue
  • Merchant machine
  • Crafting
  • Town watch's armoury

Musket Operation

Compared to bows and crossbows, muskets have a slightly more complex reloading process - meaning trying to use this weapon solo will likely not go well for you. The steps for reloading the musket are as follows:

  1. Open the flash pan
  2. Use the gunpowder horn on the musket to prime the pan
  3. Close the pan
  4. Load a shot into the barrel
  5. Pack the shot into the barrel (the time this takes will vary depending on firearms skill.)

To shoot, simply make sure you're on shoot or arc intent, then hold down left click. If you let go of LMB before the crosshair shows the "ready" icon (looks like a cross) the shot will have terribly spread. The time this takes is affected by firearms skill and perception stat, much like bows and crossbows.

The pan does not necessarily need to be closed on step 3, just make sure you close it before trying to fire. If you add the shot before the powder, you will need to remove the bullet first. If you don't pack the powder, the shot will be inert. If you don't put any powder in at all, the same will happen. You can check the musket's reload status by examining it.

Activate in hand - Removes the bullet (if one is present) from the barrel. If there was powder present in the pan at this time, it will become unpacked and require re-packing when you put the bullet back in.
Right Click - Opens/closes the flash pan.
Middle Click - Packs the bullet into the powder.

@Hockaa
Copy link
Contributor Author

Hockaa commented Apr 27, 2025

dreamseeker_x7qBa0Zux7
uh oh

@Hockaa Hockaa mentioned this pull request Jun 21, 2025
@Hockaa Hockaa changed the title [WIP] Adds basic muskets Adds basic muskets Jun 29, 2025
@kyres1 kyres1 merged commit 2e7da9d into Encore-Server:master Jul 25, 2025
1 check passed
@kyres1 kyres1 mentioned this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments