-
Notifications
You must be signed in to change notification settings - Fork 57
Adding an Event
Make a folder called data
in the folder your mod is in (unless it already exists), then make another folder called event data
in the data
folder you just made (no, not the data
folder in _append
just the one in your mod's folder).
Make a folder called _append
in the folder your mod is in (unless it already exists), make another one called data
in _append
. Then make a file called eventList.txt
this is the file where you put your events.
The events in eventList.txt are formatted like this: [Name Of Event]~[First Value Description]~[Second Value Description]
An example would be: Set Character X~Character to set x of (BF, Dad, GF)~X Value (can be a decimal)
Now that you have your event setup in the eventList, the next step is to actually code it in-game.
If you need examples, then you can look in 'assets/data/event data/' where you'll find the base game event Luas.
Here is an example of a basic event that sets the x position of a character:
function onEvent(name, position, argument1, argument2)
if string.lower(name) == "set character x" then
local charString = string.lower(argument1)
if charString == "bf" or charString == "boyfriend" or charString == "player" or charString == "player1" then
setActorX(tonumber(argument2), "boyfriend")
elseif charString == "gf" or charString == "girlfriend" or charString == "player3" then
setActorX(tonumber(argument2), "girlfriend")
else
setActorX(tonumber(argument2), "dad")
end
end
end
Also keep in mind, any function available in a regular modchart or stage will be available in event luas too!