World effects
Each marker in game can have its own FX world effects for example such as smoke/any other effect/your custom coded one
You can add another world effect list in directory: xdiskjockey/worldeffects/config/*.lua
Each file in the directory mentioned above represent the DJ mixer and its own custom effects
The basic code to make a new one would look like this:
-- The key must be same like in Config.MixerList otherwise it wont show in mixer
Config.WorldEffects["Galaxy club"] = {
effects = {
-- first effect
{
-- effect enum name (Will be described below)
name = Effects.COMET,
-- What kind of button type it is (Will be described below)
ButtonType = ButtonType.TOGGLE,
-- position list where all the effect will happen
position = {
-- first position
{
-- the mixer position
mixerPosition = vector3(-1595, -3012, -79),
particlesPosition = {
-- pos = position where the effect will happened
-- rot = rotation of the effect
-- the last argument for rotation is unusually the scale of the effect.
{ pos = vector3(-1596.2, -3008.02, -80.8), rot = vector4(-90.0, 0, 0, 1.5) },
{ pos = vector3(-1598.43, -3015.68, -80.8), rot = vector4(-90.0, 0, 0, 1.5) },
}
},
-- another one
{
--......
},
},
},
-- second effect
{
--....
},
},
}So what is the: Effects?
Effects is enum of existing and ready to use in-game effects, can be used for EVERY mixer in game ( beside player spawned one )
You can find all existing effects in xdiskjockey/const.lua
-- do not change anything from here
Effects = {
------------------------------------
--- FX Effects
------------------------------------
SMOKE_FLOOR = "smoke_floor",
SPARKLERS = "sparklers",
YELLOW_BAR = "yellow_bar",
RED_BAR = "red_bar",
COMET = "comet",
RGB = "rgb",
FIREWORK_ONE = "FIREWORK_ONE",
FIREWORK_TWO = "FIREWORK_TWO",
FIREWORK_THREE = "FIREWORK_THREE",
FIREWORK_STREAM = "FIREWORK_STREAM",
------------------------------------
--- objects list
------------------------------------
PANEL_OBJECTS = "PANEL_OBJECTS",
REMOVE_PANEL = "REMOVE_PANEL",
PANEL_PURPLE = "PANEL_PURPLE",
PANEL_GREEN = "PANEL_GREEN",
PANEL_PINK = "PANEL_PINK",
--
NEON_OBJECTS = "NEON_OBJECTS",
REMOVE_NEON = "REMOVE_NEON",
NEON_OBJECT_YELLOW = "NEON_OBJECT_YELLOW",
NEON_OBJECT_WHITE = "NEON_OBJECT_WHITE",
NEON_OBJECT_PURPLE = "NEON_OBJECT_PURPLE",
NEON_OBJECT_CYAN = "NEON_OBJECT_CYAN",
--
LIGHT_OBJECTS = "LIGHT_OBJECTS",
REMOVE_LIGHT = "REMOVE_LIGHT",
LIGHT_OBJECT_YELLOW = "LIGHT_OBJECT_YELLOW",
LIGHT_OBJECT_GREEN = "LIGHT_OBJECT_GREEN",
LIGHT_OBJECT_WHITE = "LIGHT_OBJECT_WHITE",
LIGHT_OBJECT_PURPLE = "LIGHT_OBJECT_PURPLE",
--
BANDS_OBJECTS = "BANDS_OBJECTS",
REMOVE_BANDS = "REMOVE_BANDS",
BANDS_OBJECT_YELLOW = "BANDS_OBJECT_YELLOW",
BANDS_OBJECT_GREEN = "BANDS_OBJECT_GREEN",
BANDS_OBJECT_WHITE = "BANDS_OBJECT_WHITE",
BANDS_OBJECT_CYAN = "BANDS_OBJECT_CYAN",
}So what is the: ButtonType?
ButtonType are all kind of buttons type lets see which one are which
Button: simple UI button (for one time use)
Toggle: it is switch button (this is used for effects you want to turn off in for example 5/10/20 minutes or never thats up to you)
list: list of the FX effects that are possible to use
You can find all existing button types in xdiskjockey/const.lua
ButtonType = {
BUTTON = "button",
TOGGLE = "toggle",
LIST = "list",
}Let's see some example for some button types
ButtonType.BUTTON example
-- The key must be same like in Config.MixerList otherwise it wont show in mixer
Config.WorldEffects["Vinewood Bowl"] = {
effects = {
{
name = Effects.SPARKLERS,
ButtonType = ButtonType.BUTTON,
-- this variable will work only with Button type effects
RemoveAfterTime = 10000,
-- this is working for both vanilla unicorn + gabz map aswell
position = {
{
-- This is a center position / mixer position where the effects will be rendered
mixerPosition = vector3(684.02, 571.54, 130.46),
particlesPosition = {
{ pos = vector3(687.64, 567.76, 129.46), rot = vector4(0, 0, 0, 0.6) },
{ pos = vector3(679.02, 571.07, 129.46), rot = vector4(0, 0, 0, 0.6) },
{ pos = vector3(681.29, 568.09, 129.46), rot = vector4(0, 0, 0, 0.6) },
{ pos = vector3(684.18, 567.04, 129.46), rot = vector4(0, 0, 0, 0.6) },
}
},
},
},
}
}ButtonType.LIST example
-- The key must be same like in Config.MixerList otherwise it wont show in mixer
Config.WorldEffects["Vinewood Bowl"] = {
effects = {
{
-- this need an extra identifier which should describe all effects in the "name"
-- in this case PANEL_OBJECTS
identifier = Effects.PANEL_OBJECTS,
name = {
Effects.REMOVE_PANEL,
Effects.PANEL_PURPLE,
Effects.PANEL_GREEN,
Effects.PANEL_PINK
},
ButtonType = ButtonType.LIST,
position = {
{
-- This is a center position / mixer position where the effects will be rendered
mixerPosition = vector3(684.02, 571.54, 130.46),
particlesPosition = {
{ pos = vector3(694.5, 563.5466, 126.465), rot = vector4(0, 0, 250, 0.0) },
{ pos = vector3(672.8753, 571.6515, 126.465), rot = vector4(0, 0, 250, 0.0) },
}
},
},
},
}
}ButtonType.TOGGLE example
-- The key must be same like in Config.MixerList otherwise it wont show in mixer
Config.WorldEffects["Vinewood Bowl"] = {
effects = {
{
label = "Gold bars",
name = Effects.YELLOW_BAR,
-- on toggle it will spawn gold bars, on disable it will disable them
ButtonType = ButtonType.TOGGLE,
position = {
{
-- This is a center position / mixer position where the effects will be rendered
mixerPosition = vec3(-1387.117432, -620.849243, 30.819593),
particlesPosition = {
{ pos = vec3(-1381.110352, -624.237183, 30.819550), rot = vector4(90, 0, 0, 1.0) },
{ pos = vec3(-1391.769897, -624.655151, 30.819599), rot = vector4(90, 0, 0, 1.0) },
{ pos = vec3(-1394.501709, -620.457947, 30.819548), rot = vector4(90, 0, 0, 1.0) },
}
},
},
},
}
}Last updated
Was this helpful?