tutorial
ModernWeapons - Weapon tutorial
This page teaches you how to setup weapons and what properties they can have! Please note that these properties are referring to the newest version of ModernWeapons.
Setting up a gun
Open the "ModernWeapons" folder and search for "guns.yml", there you have to add a new entry with the name of your gun.
Now it should look like this:
NAME:
You can add different sections with properties to your gun's entry. I recommend the sections "General", "Shooting" and "Magazine".
Below is a list of properties which will look like "SECTION.PROPERTY", if you want to add this property it should look like this:
NAME: SECTION: PROPERTY: VALUE
Property | Description | Allowed values | |
General.Item | The item that's used for this gun | ItemID/ItemID,ItemData | |
General.Ammo | The item that's needed to reload this gun | ItemID or ItemID,ItemData | |
General.Lore | The lore of the gun | List of strings (- LINE) | |
General.Sound | Sound that is played when shooting | AssaultRifle/SubMachineGun/Shotgun/Sniper/RocketLauncher/Pistol | |
Shooting.Delay | Delay between shots in milliseconds | Number | |
Shooting.Velocity | Velocity of the bullets | Number | |
Shooting.Damage | Damage a single bullet will deal | Number | |
Shooting.HeadshotBonus | Bonus damage of the bullet when shot into the head | Number/Point number | |
Shooting.Spread | Bullet spread of the gun | Number/Point number | |
Shooting.Shots | Amount of bullets the gun will fire at once | Number | |
Shooting.Range | How far the bullet flies in blocks | Number | |
Shooting.Bullet | Type of the bullet that is shot | Snowball/Egg/Arrow | |
Burst.Enabled | Value if burst shots are enabled | true/false | |
Burst.DelayBetween | Delay between the burst shots in ticks (1 tick = 20 seconds) | Number | |
Burst.ShotAmount | Amount of shots of a single burst | Number | |
Magazine.Size | Amount of shots in a single magazine | Number | |
Magazine.ReloadTime | How long a reload takes in seconds | Number | |
Scope.Enabled | Value if the gun has a scope | true/false | |
Scope.Zoom | Amount of the zoom of the gun's scope | Number | |
Scope.SpreadBonus | Influence of the scope to spread | Number | |
Explosion.Enabled | Value if the gun's bullets will explode on impact | true/false | |
Explosion.Range | Range of the explosion damage in blocks | Number | |
BoltAction.Enabled | Value if the gun has bolt action | true/false | |
BoltAction.Delay | How long should it take to do the bolt action in ticks (1 tick = 20 seconds) | Number | |
Effects.BulletHit | Particle effect that is displayed when a bullet hits something | ParticleEffectName,ParticleEffectData (see list of particle effects below) | |
Effects.BulletShoot | Particle effect that is displayed when the player shoots | ParticleEffectName,ParticleEffectData (see list of particle effects below) |
Name of the particle effect | Visual effect | Influence of the particle effect data |
EnderSignal | Imploding circle of purple ender particles | None |
BlockBreak | Particles similar to the ones when breaking a block | Color of the particles referring to the block (BlockID) |
PotionBreak | Particles similar to the ones when a splash potion hits the ground | Colour of the potion particles |
Flames | Fire particles of a mobspawner | None |
Smoke | Smoke particle | None |
Setting up a grenade
Open the "ModernWeapons" folder and search for "grenades.yml", there you have to add a new entry with the name of your grenade.
Now it should look like this:
NAME:
You can add different sections with properties to your gun's entry. I recommend the sections "General" and "Explosion".
Below is a list of properties which will look like "SECTION.PROPERTY", if you want to add this property it should look like this:
NAME: SECTION: PROPERTY: VALUE
Property | Description | Allowed values |
General.Item | The item that's used for this grenade | ItemID/ItemID,ItemData |
General.Lore | The lore of the grenade | List of strings (- LINE) |
General.Cooldown | The cooldown between throwing grenades in milliseconds | Number |
Explosion.Delay | How long the grenade takes to explode after being thrown in seconds | Number |
Explosion.Damage | Amount of damage the grenade will deal | Number |
Exploson.Smoke | Value if the grenade will create smoke | true/false |
Explosion.Range | Range within enemies are affected by the grenade in blocks | Number |
Ability.Sticky | Value if the grenade sticks to enemies | true/false |
Ability.Effects | Effects of this grenade | List of effects (- EFFECT,DURATION) (see the list of effects below) |
Name of the effect | Effect |
Speed | Increases movement speed |
Slow | Decreases movement speed |
Fast_Digging | Increases dig speed |
Slow_Digging | Decreases dig speed |
Increase_Damage | Increases damage dealt |
Heal | Heals an affected |
Harm | Hurts an affected |
Jump | Increases jump height |
Confusion | Warped vision |
Regeneration | Regenerates health |
Damage_Resistance | Decreases damage dealt to the affected |
Fire_Resistance | Stops fire damage |
Water_Breathing | Allows breathing underwater |
Invisibility | Grants invisibility |
Blindness | Blinds an affected |
Night_Vision | Allows an affected to see in the dark |
Hunger | Increases hunger |
Weakness | Decreases damage dealt by an affected |
Poison | Deals damage to an affected over time |
Wither | Deals damage to an affected over time and gives the health to the thrower |