Advanced
Something harder than basics I guess.
Feels boring with normal guns? Ok I will show you how to make unique guns and make the game funnier!
1. Gun's Effects
1.1. How to add a new effects?
Effects can be added through 'special' section of any gun
For example:
special:
can-pierce: <false/true>
effect: <replaceme>
hit-sound: <replaceme>
droppable: <false/true>
can-knockback: <false/true>
effects:
- '<replaceme>'
...1.2. How to build an effect?
1. Event
First, I will introduce about effect's event This help you determine in which situation this effect will be called! Currently available event: ON_HIT, ON_SHOOT, ON_HOLDING
Called while the bullet hit an entity (must be vulnerable)!
Available target:
SELF
ENEMY
TEAMMATES_IN_RADIUS
ENEMIES_IN_RADIUS
Called while player shoot a bullet!
Available target:
SELF
TEAMMATES_IN_RADIUS
ENEMIES_IN_RADIUS
Called every 2 ticks while the player is holding this gun! (This mean you should not add too much "ON_HOLDING" effects)
Available target:
SELF
TEAMMATES_IN_RADIUS
ENEMIES_IN_RADIUS
2. Type
This give the target some status, maybe negative, maybe positive!
Requirements (can be added after <target>):
Status
Duration (in seconds)
Currently available status:
FIRE
Example: ON_HIT:STATUS_EFFECT:ENEMY:FIRE:5 Explaination: It will ignite the enemy 5 seconds on bullet hit.
This give the target some potion effects such as speed, haste!
Requirements (can be added after <target>):
Potion effect type
Duration (in ticks)
Amplifier
Ambient (boolean)
Particles (boolean)
Currently available Potion effects type:
Example: ON_HIT:POTION_EFFECT:SELF:SPEED:20:1:false:false Explaination: You will gain SPEED II for 20 ticks (1 sec) with no ambient and no particles on bullet hit.
INCREASE_DAMAGE is a special type exclusive for ON_HIT event and it have different structure.
Structure: ON_HIT:INCREASE_DAMAGE:<mode>:<amplifier>
Available mode:
DISTANCE
Example: ON_HIT:INCREASE_DAMAGE:DISTANCE:2 Explaination: On bullet hit, damage will be increase by 2% per block
3. Target
The effect will be applied only for player that execute this effect!
Can only be used in ON_HIT event! The effect will be applied for enemy!
The effect will be applied for group of target in a radius!
Available:
TEAMMATES_IN_RADIUS
ENEMIES_IN_RADIUS
But this is just the start, AOE target require some more efforts You have to determine:
Radius
Center (Available: SELF)
Target's Exception
For "TEAMMATES_IN_RADIUS":
It will look like: TEAMMATES_IN_RADIUS_<radius>_<center>_<include self (true/false)>_<include despawnable (true/false)>
Example: TEAMMATES_IN_RADIUS_3_SELF_false_false Explaination: All teammates in radius 3 around executor will be affected by this effect. (not include despawnable and executor too.)
For "ENEMIES_IN_RADIUS":
It will look like: ENEMIES_IN_RADIUS_<radius>_<center>_<include despawnable (true/false)>
Example: ENEMIES_IN_RADIUS_3_SELF_false Explaination: All enemies in radius 3 around executor will be affected by this effect. (not include despawnable)
1.3. Example
You think the guide above is quite complicated to understand? I will provide you some example:
2. Gun's particle (bullet's trail)
Advance particles include: REDSTONE, BLOCK_CRACK, BLOCK_DUST, ITEM_CRACK (all of them were added since BETA-1.0.4!)
These particles require a new option called: particles-option (You can add it below 'particles'!)
Normally you only need 4 argument separated by a space to make it work! Format: 'false <R> <G> <B>' But if you set the first argument to 'true', it require 7: Format: 'true <R1> <G1> <B1> <R2> <G2> <B2>' (Use this if you need transitional particles!)
Example:
particles: REDSTONE
particles-option: 'false 16 1 1'Include BLOCK_CRACK, BLOCK_DUST, ITEM_CRACK
Format: <material> <data>
Example:
particles: BLOCK_CRACK
particles-option: 'DIRT 0'Last updated