-
Notifications
You must be signed in to change notification settings - Fork 5
Weapons
Weapons are another plugin feature that modifies the gameplay. It can enable players to shoot special bullets when they
are holding items or allow pets to shoot like turret. Let's look at how to create a custom weapon. Once egan Plugin
generates default weapons.json that can be found in mindustry-server\config\mods\The_Worst\config. It should look
like this:
{
"weapons":[
{
"name":"copperGun",
"bullet":"standardCopper",
"item":"copper",
"velMul":1.0,
"liveMul":1.0,
"fireRate":5.0,
"accuracy":4.0,
"bulletsPerShot":2,
"consumes":1,
"ammoMultiplier":10
}
]
}First up is a "name" property.
"name":"copperGun",This is important only when you want to use weapon in pet as a "weapon" property.
"weapon":"copperGun",Next one, that you have to get right, is "bullet".
"bullet":"standardCopper",You can go here to se all available bullet types. This just determinate what weapon will shoot. If you provide invalid type it will throw ugly error. you just cate about first line of error witch tells witch weapon has invalid bullet, that's another reason to name your weapons. Lsat string property is "item".
"item":"copper",This tells witch item a weapon consumes. You can check list of items here. if you want a weapon to be available ony for pets you have to omit "item" property. Then there are "velMul" and "liveMul".
"velMul":1.0,
"liveMul":1.0,Every bullet has its own speed and live-time. Bullet speed will be multiplied by "velMul" and live-time by "liveMul". Next is "fireRate" and "accuracy".
"fireRate":5.0,
"accuracy":4.0,All I am willing to say about this is that accuracy is in angles. Last tree properties are "bulletsPerShot", "consumes" and "ammoMultiplier".
"bulletsPerShot":2,
"consumes":1,
"ammoMultiplier":10First one specifies how many bullets are fired per one reload, second one indicates how match items are used to produce one pack of ammo nad third one determinate how big is one ammo pack. So to summarize this, weapon will fire standardCopper bullets, will consume one copper to fire 10 shots and every shot will contain 2 bullets.