Setup
WP Fireworks Setup Instructions
Configuration
Add the script to your server config.
Open the config.lua
file and make any necessary adjustments.
Make sure to update the framework / script configuration section with the relevant scripts that you use.
Framework Implementations
External script implementations are handled in the framework.lua
file. This file provides the necessary functions and hooks to integrate with different frameworks and scripts.
Out of the box, the script includes implementations for:
Framework
Notify
Inventory
If you are using a different framework or script, you will need to add the relevant implementations in the framework.lua
file.
Add Items to Inventory
Add the items to the item file in your inventory script.
Copy / paste all of the images from the images/
folder into your inventory script.
Setup Shop
Setup a shop to sell the fireworks at.
Setup Waypoint Placeables
Waypoint Placeables is a required dependency to support the placeable fireworks.
In wp-placeables/config.lua
, search for -- Uncomment this line if you are using wp-fireworks
and uncomment the following lines
Uncomment the firework items Config.PlaceableProps
Add a new firework
Add a new item to the
items.lua
Update wp-placeables config (if you are adding a placeable firework)
Ensure you add the new firework to wp-placeables
Config.PlaceableProps
following the pattern above.Include
shouldUseItemNameState = true
only if you are using the same prop model for more than one item. This is necessary so that the placeable object will return the correct item when it is picked up.
Add your new firework itemName to the
Config.FireworkProps
list and define the properties for this fireworkAdd it to your shop
Config Properties
Below is an explanation of each variable that you can define on a firework effect.
propName
The name of the prop that will be spawned in the players hand
Throwable + Handheld
propBone
The bone that the prop will be attached to
Throwable + Handheld
propPlacement
Define the placement and rotation offsets for how the prop will be held
Throwable + Handheld
ammo
The number of times a firework can be used before it disappears
Handheld
delayTimer
If otherParticleEffects are defined, it will wait at most up to this amount of time (in millieseconds) before playing the next particle effect. Lower number means each effect is shot off faster
Throwable + Handheld + Placeable
minParticles
The minimum number of particles that will be used for this firework
Throwable + Handheld + Placeable
maxParticles
The maximum number of particles that will be used for this firework
Throwable + Handheld + Placeable
colors
Accepts a list of colors (ex {r = 1.0, g = 1.0, b = 1.0}
) that will be randomly chosen from for the firework. To use fully random colors pass { colors = false}
. Values are 0.0 - 1.0 (not 0 to 255). Note colors may not apply to the expected color if the effect already has a color on it
Throwable + Handheld + Placeable
mainParticles
Accepts a list of effects and will pick one at random. This will be the first effect that is fired from the firework.
Throwable + Handheld + Placeable
otherParticles
Accepts a list of effects and will pick one at random. The effects here will be fired a total of `math.random(minParticles, maxParticles)`` times.
Throwable + Handheld + Placeable
asset
The name of the particle asset that will be used for the firework
Throwable + Handheld + Placeable
name
The name of the particle that will be used
Throwable + Handheld + Placeable
scale
A float number that determines how big the particle effect will be
Throwable + Handheld + Placeable
scaleRange
Float number, applies +/- random variance to the scale value. Use 0.0 for no variance. (ex: If the scale is 1.0 and scaleRange is 0.5, the value will be between 0.5 and 1.5)
Throwable + Handheld + Placeable
particlePlacement
List containing offset and rotation values for the particle effect
Throwable + Handheld + Placeable
offset
Add offset to the start position of the particle effect and allow it to start +/- within offsetRange (for placeables its recommended to only use offsets on the static explosions that dont have a trail, otherwise smaller adjustments to align with handheld props)
Throwable + Handheld + Placeable
offsetRange
Add +/- variance to the offset. Use 0.0 for no variance.
Throwable + Handheld + Placeable
rot
Add variance to the rotation of the particle effect
Throwable + Handheld + Placeable
rotationRadius
Fireworks will fire at random angles within this radius. Add +/- variance to the rotation of the particle effect. Use 0.0 for no variance. (Ex: Picture an upside down cone, where the bottom point is where the firework shoots from and it can land anywhere along the top circle of the cone)
Throwable + Handheld + Placeable
Last updated