How do I add a weapon in game as a mod?

2 posts / 0 new
Last post
How do I add a weapon in game as a mod?

Hello everyone, rick here.
I'm kind of confused as to what I should do regarding the addition of a new weapon that I'd like to add.
The weapon itself is an "AR-15", and It would have a 24-round magazine.
It'll have 2 modes of fire, Semi and Burst, with the addition of a butt stock being a melee for people to use.
Now the problem is, how would I implement such a thing?
I've all the images made for this, but I am not sure how I'd proceed since I have an inadequate knowledge of XML.

Showcasing a snippet of my AR-15's progress.

Spoiler: Highlight to view

How the gun would look like if it's hung from your shoulders.

Spoiler: Highlight to view

I have yet to implement a function where it'll be chambered in 5.56 JHP, AP and FMJ. It is still in the works as I have nil knowledge of this game's code right now. As always, if anyone could help me with this, that would be greatly appreciated!

hi hello i made a things

I was just thinking the other day that there should be a 5.56 rifle in the game.
To implement it in the XML, you'll need some attackmodes for using it in combat, an itemtype for it to exist as an item, and recipes and ingredients entries to add/remove the sling, for starters.
You'll also need to add it to treasuretables in order for it to be found while looting.

There is some documentation for modding: