Add effect template for GTA V Chaos Mod effects

This commit is contained in:
2026-01-17 21:27:51 +00:00
commit 9adccd279b
2 changed files with 59 additions and 0 deletions

37
effect_template.lua Normal file
View File

@@ -0,0 +1,37 @@
-- Short coherent template for a Chaos Mod effect.
-- Edit the fields below to describe the effect and adjust timing/weighting.
-- Full reference: https://github.com/gta-chaos-mod/ChaosModV/wiki/Lua-Scripting
EffectInfo = { -- ScriptInfo for mod version < 2.0
Name = "Template Effect",
EffectId = "effect_template", -- ScriptId for mod version < 2.0, must be unique
Description = "A short one-line description of what this effect does.",
TimedType = "Normal", -- None, Normal, Short, Permanent, or "Custom"
-- CustomTime = 10, -- (seconds) only if TimedType = "Custom"
WeightMultiplier = 1, -- Relative probability of being chosen
HideRealNameOnStart = false, -- true to hide the effect's real name when it starts
EffectCategory = "None", -- Optional category
EffectGroup = "", -- Optional grouping (leave empty if unused)
IncompatibleIds = {
-- Example: "other_effect_id", -- add EffectIds that cannot run simultaneously
}
}
-- Called once when the effect starts
function OnStart()
print("[effect_template] OnStart: " .. ((EffectInfo and EffectInfo.Name) or "unknown"))
-- Initialize effect state here (e.g. set timers, spawn helpers)
end
-- Called once when the effect stops/ends
function OnStop()
print("[effect_template] OnStop: " .. ((EffectInfo and EffectInfo.Name) or "unknown"))
-- Cleanup state here (e.g. remove entities, clear timers)
end
-- Called every game tick while the effect is active
function OnTick()
-- Keep this lightweight. Use this for per-frame checks or gradual changes.
end
-- Add custom helper functions below.