-
Notifications
You must be signed in to change notification settings - Fork 5
Equipment Configuration
Equipment is stored under ./equipment/
.
Under ./equipment/
, there is a subfolder for each gun type.
Certain Minecraft objects are serialized within files.
Components are serialized with MiniMessage.
key
: The Minecraft key of the sound.
source
: The Source of the sound. (MASTER, MUSIC, RECORD, WEATHER, BLOCK, HOSTILE, NEUTRAL, PLAYER, AMBIENT, VOICE).
volume
: The volume of the sound.
pitch
: The pitch of the sound.
Item stacks are serialized with SNBT (String NBT).
effect
: A Minecraft Key of the potion effect.
amplifier
: An amplifier for the potion.
duration
: The duration of the potion (I think in seconds, whatever the /effect command in Minecraft uses).
Guns are stored under ./equipment/guns/
.
Each folder in this directory is a gun.
The structure of the folder looks like:
\---Gun Folder
| info.yaml
|
\---levels
level0.yaml
level1.yaml
...
info.yaml should contain a Key called name
which represents the unique name for the gun.
Gun level files should be inside the levels
directory. These files may have any name but should end in .yaml
The level file should contain a Key called mainKey
which represents the key for the gun level. Gun level keys should not clash with each other.
The level file should then contain a table for each of the objects related to the gun level. One table should be the gun level data table. The name of the table should be the same as the mainKey
defined at the top of the file.
Every object is in the format of a YAML object.
Every object has a serialKey that specifies the type of the object.
The name of the YAML object is considered its Key. When referencing other objects, use the name of the corresponding YAML table.
The format of a Key is namespace:value
. If you leave namespace:
blank, the namespace will be set to phantazm
by default. Serial keys listed in the objects implicitly have the namespace phantazm
if no namespace is specified.
General data for a gun level.
Serial Key: gun.level
order
: The numerical level of the gun. Each gun file should have a different numerical level. Levels start at 0. These levels must be continuous or the config will not be parsed.
stack
: SNBT for the gun's item stack.
stats
: A Key to the gun's stats.
shootTester
: A Key to the gun's shoot tester.
reloadTester
: A Key to the gun's reload tester.
firer
: A Key to the gun's firer.
shootEffects
: An array of effects to execute when a gun is shot.
reloadEffects
: An array of effects to execute when a gun is reloaded.
tickEffects
: An array of effects to execute every gun tick. While other effects may be updated by ticks, these effects should be specifically executed on ticks. Certain effects lend themselves to being tick effects.
noAmmoEffects
: An array of effects to execute when a gun has no more ammo.
General stats for a gun.
Serial Key: gun.stats
shootSpeed
: The number of ticks between shots. A gun may fire multiple times per shot.
reloadSpeed
: The number of ticks it takes for the gun to reload.
maxAmmo
: The max ammo for the gun.
maxClip
: The max clip for the gun.
shots
: The number of shots to fire each time the gun shoots.
shotInterval
: The number of ticks between individual shots every time a gun shoots. If the shotInterval is greater than the shootSpeed, a gun will not shoot again until the shotInterval time has elapsed. For guns that shoot only one bullet per shot, make sure shotInterval is sufficiently low.
Provides the shooter itself.
Serial Key: gun.audience_provider.entity
Provides the instance of the shooter. Use this if you want to play the sound to an entire world.
Serial Key: gun.audience_provider.entity_instance
Sets the player's level according to remaining ammo in a gun. This should typically be a tick effect.
Serial Key: gun.effect.level.ammo
Plays a sound to the player.
Serial Key: gun.effect.play_sound
audienceProviderKey
: A Key to the effect's audience provider
sound
: The sound to play
Displays an action bar to the player as they reload. This should typically be a tick effect.
Serial Key: gun.effect.action_bar.reload
statsKey
: A Key to the gun's stats.
reloadTesterKey
: A Key to the gun's reload tester.
reloadActionBarChooserKey
: A Key to this effect's reloadActionBarChooser.
Sends a message to the player.
Serial Key: gun.effect.send_message
message
: The message to send.
Sets the player's exp according to the time before they are able to shoot again. This should typically be a tick effect.
Serial Key: gun.effect.exp.shoot
statsKey
: A Key to the gun's stats.
Produces an action bar Component based on the progress of a gun's reload with a gradient over time.
Serial Key: gun.action_bar.chooser.gradient
message
: The message to send in the action bar.
from
: A hex string for the initial RGB color of the action bar.
to
: A hex string for the final RGB color of the action bar.
Produces a static action bar Component.
Serial Key: gun.action_bar.chooser.static
message
: The message to send in the action bar.
Tests for reload ability based on state.
Serial Key: gun.reload_tester.state
statsKey
: A Key to the gun's stats.
Tests for shoot ability based on state.
Serial Key: gun.shoot_tester.state
statsKey
: A Key to the gun's stats.
reloadTesterKey
: A Key to the gun's reload tester.
Finds the endpoint of a shot.
Serial Key: gun.end_selector.basic
blockIterationKey
: A Key to the selector's block iteration method.
maxDistance
: The maximum distance that a shot may travel.
Iterates blocks using raytracing.
Serial Key: gun.block_iteration.ray_trace
Similar to ray trace block iteration, but if the shot passes through a partial block, it accepts all later blocks. This concept can be used for a technique called wallshooting.
Serial Key: gun.block_iteration.wallshot
Firer that uses hit scan to shoot.
Serial Key: gun.firer.hit_scan
endSelectorKey
: A Key to the firer's endpoint selector.
targetFinderKey
: A Key to the firer's target finder.
shotHandlerKeys
: An array of the firer's shot handlers.
Firer that uses a projectile to shoot.
Serial Key: gun.firer.projectile
endSelectorKey
: A Key to the firer's endpoint selector.
targetFinderKey
: A Key to the firer's target finder.
collisionFilter
: A Key to the firer's collision filter.
shotHandlerKeys
: An array of Keys to the firer's shot handlers.
entityType
: A Minecraft Key of the entity type of the projectile.
power
: A multiplier on the projectile's velocity.
spread
: idk check a Minecraft wiki
hasGravity
: Whether the projectile should have gravity as it travels.
maxAliveTime
: The time after which the projectile should self-destruct if it has not collided.
Firer that fires multiple firers.
Serial Key: gun.firer.spread
subFirerKeys
: An array of Keys to the firer's sub-firers.
angleVariance
: Variance in the angle of the firer's from the direction of the shot.
A filter that only explodes when it comes into contact with an Entity if the entity is a Phantazm mob.
Serial Key: gun.firer.projectile.collision_filter.phantazm
A shot handler that fires a new shot.
Serial Key: gun.shot_handler.chain
finderKey
: A Key to the shot handler's positional target finder. The firer will shoot in the direction of these targets.
firerKey
: A Key to the firer for the shot handler.
ignorePreviousHits
: Whether the shot handler should fire in the direction of previously hit targets.
fireAttempts
: The number times the shot handler should attempt to fire at a new target.
Damages targets.
Serial Key: gun.shot_handler.damage
damage
: Damage for regular targets.
headshotTarget
: Damage for headshots.
Makes an explosion at the endpoint of the shot.
Serial Key: gun.shot_handler.explosion
radius
: The radius of the explosion.
Sends a message to the player.
Serial Key: gun.shot_handler.feedback
message
: The message to send for regular hits.
headshotMessage
: The message to send for headshots.
Sends a guardian beam in the direction of the shot.
Serial Key: gun.shot_handler.guardian_beam
isElder
: Whether the beam should be from an elder guardian.
beamTime
: The duration of the beam in ticks.
Sets targets on fire.
Serial Key: gun.shot_handler.ignite
duration
: The duration of the fire for regular hits.
headshotDuration
: The duration of the fire for headshots.
Applies knockbacks to targets.
Serial Key: gun.shot_handler.knockback
knockback
: Knockback for regular hits.
headshotKnockback
: Knockback for headshots.
Sends a trail of particles in the direction of the shot.
Serial Key: gun.shot_handler.particle_trail
particle
: A key of the particle type. This is a Minecraft key.
distance
: idk check a Minecraft wiki
offsetX
: idk check a Minecraft wiki
offsetY
: idk check a Minecraft wiki
offsetZ
: idk check a Minecraft wiki
particleData
: idk check a Minecraft wiki
count
: idk check a Minecraft wiki
trailCount
: The number of particles to send in the trail.
Applies a potion effect to a target.
Serial Key: gun.shot_handler.potion
potion
: The potion to apply to regular targets.
headshotPotion
: The potion to apply to headshots.
Plays a sound. As opposed to the play sound effect, this would typically be used to play a sound indicating headshot status.
Serial Key: gun.shot_handler.sound
audienceProviderKey
: A key to the handler's audience provider.
sound
: The sound to play for regular targets.
headshotSound
: The sound to play for headshots.
Finds entities around the end of a shot.
Serial Key: gun.entity_finder.directional.around_end
range
: The range to find entities
Finds entities between the start and the end of a shot.
Serial Key: gun.entity_finder.directional.between_points
Finds nearby Entities.
Serial Key: gun.target.entity_finder.positional.nearby_entity
Tests for headshots based on whether a shot pierced a target above its eye height.
Serial Key: gun.headshot_tester.eye_height
A headshot tester that always headshots or always does not headshot.
Serial Key: gun.headshot_tester.static
shouldHeadshot
: Whether targets should be headshotted.
An intersection finder that conditionally finds an intersection with ray tracing.
Serial Key: gun.intersection_finder.ray_trace
An intersection finder that always shoots a given target through its center.
Serial Key: gun.intersection_finder.static
A target tester that filters for Phantazm mobs.
Serial Key: gun.target_tester.phantazm
ignorePreviousHits
: Whether the target tester should ignore previously hit mobs.
A target limiter that chooses mobs to hit based on distance.
Serial Key: gun.target_limiter.distance
targetLimit
: The maximum number of targets to hit.
prioritizeClosest
: Whether closer targets should be prioritized (true) or farther targets should be prioritized (false).
Finds targets for a Firer to shoot.
Serial Key: gun.target_finder.basic
entityFinderKey
: A Key to the target finder's directional entity finder.
targetTesterKey
: A Key to the target finder's target tester.
intersectionTesterKey
: A Key to the target finder's intersection tester.
headshotTesterKey
: A Key to the target finder's headshot tester.
targetLimiterKey
: A Key to the target finder's target limiter.
Sets the amount of a gun's item stack based on the gun's clip.
Serial Key: gun.stack_mapper.clip.stack_count
reloadTesterKey
: A Key to the stack mapper's reload tester.
Sets the durability of a gun's item stack based on the gun's reload status.
Serial Key: gun.stack_mapper.reload.durability
statsKey
: A Key to the gun's stats
reloadTesterKey
: A Key to the gun's reload tester