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


PropertyDescriptionAllowed values
General.ItemThe item that's used for this gunItemID/ItemID,ItemData
General.AmmoThe item that's needed to reload this gunItemID or ItemID,ItemData
General.LoreThe lore of the gunList of strings (- LINE)
General.SoundSound that is played when shootingAssaultRifle/SubMachineGun/Shotgun/Sniper/RocketLauncher/Pistol
Shooting.DelayDelay between shots in millisecondsNumber
Shooting.VelocityVelocity of the bulletsNumber
Shooting.DamageDamage a single bullet will dealNumber
Shooting.HeadshotBonusBonus damage of the bullet when shot into the headNumber/Point number
Shooting.SpreadBullet spread of the gunNumber/Point number
Shooting.ShotsAmount of bullets the gun will fire at onceNumber
Shooting.RangeHow far the bullet flies in blocksNumber
Shooting.BulletType of the bullet that is shotSnowball/Egg/Arrow
Burst.EnabledValue if burst shots are enabledtrue/false
Burst.DelayBetweenDelay between the burst shots in ticks (1 tick = 20 seconds)Number
Burst.ShotAmountAmount of shots of a single burstNumber
Magazine.SizeAmount of shots in a single magazineNumber
Magazine.ReloadTimeHow long a reload takes in secondsNumber
Scope.EnabledValue if the gun has a scopetrue/false
Scope.ZoomAmount of the zoom of the gun's scopeNumber
Scope.SpreadBonusInfluence of the scope to spreadNumber
Explosion.EnabledValue if the gun's bullets will explode on impacttrue/false
Explosion.RangeRange of the explosion damage in blocksNumber
BoltAction.EnabledValue if the gun has bolt actiontrue/false
BoltAction.DelayHow long should it take to do the bolt action in ticks (1 tick = 20 seconds)Number
Effects.BulletHitParticle effect that is displayed when a bullet hits somethingParticleEffectName,ParticleEffectData (see list of particle effects below)
Effects.BulletShootParticle effect that is displayed when the player shootsParticleEffectName,ParticleEffectData (see list of particle effects below)


Name of the particle effectVisual effectInfluence of the particle effect data
EnderSignalImploding circle of purple ender particlesNone
BlockBreakParticles similar to the ones when breaking a blockColor of the particles referring to the block (BlockID)
PotionBreakParticles similar to the ones when a splash potion hits the groundColour of the potion particles
FlamesFire particles of a mobspawnerNone
SmokeSmoke particleNone




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
PropertyDescriptionAllowed values
General.ItemThe item that's used for this grenadeItemID/ItemID,ItemData
General.LoreThe lore of the grenadeList of strings (- LINE)
General.CooldownThe cooldown between throwing grenades in millisecondsNumber
Explosion.DelayHow long the grenade takes to explode after being thrown in secondsNumber
Explosion.DamageAmount of damage the grenade will dealNumber
Exploson.SmokeValue if the grenade will create smoketrue/false
Explosion.RangeRange within enemies are affected by the grenade in blocksNumber
Ability.StickyValue if the grenade sticks to enemiestrue/false
Ability.EffectsEffects of this grenadeList of effects (- EFFECT,DURATION) (see the list of effects below)


Name of the effectEffect
SpeedIncreases movement speed
SlowDecreases movement speed
Fast_DiggingIncreases dig speed
Slow_DiggingDecreases dig speed
Increase_DamageIncreases damage dealt
HealHeals an affected
HarmHurts an affected
JumpIncreases jump height
ConfusionWarped vision
RegenerationRegenerates health
Damage_ResistanceDecreases damage dealt to the affected
Fire_ResistanceStops fire damage
Water_BreathingAllows breathing underwater
InvisibilityGrants invisibility
BlindnessBlinds an affected
Night_VisionAllows an affected to see in the dark
HungerIncreases hunger
WeaknessDecreases damage dealt by an affected
PoisonDeals damage to an affected over time
WitherDeals damage to an affected over time and gives the health to the thrower