The PlayerStatus struct shifted around recently, so I fixed the offsets
yet again. Unlocks should be persistent now, but this as usual requires
a database wipe, sorry!
I also included some refactors of the !unlock debug command that still
had references to the old unlock_action API.
-Introduce a printf helper command which can print the sending command's name for you,
and treats the message as a format string if additional params follow
I figured out a few of these while figuring out the crystal bell
event, although their purpose is still generally unknown. It doesn't
really affect anything functionally as the event still works as
well as it did before.
I also fixed the crystal bell scenes so they don't finish the event
prematurely, although it looks weird without the hairstyle menu. But
that still isn't figured out yet.
-Global.lua is no longer a catch-all dumping ground for registering actions and events
Instead, Global.lua will actually contain useful global constants and functions
-Init.lua will take over the role of being the initial script run when doing reloads or booting the servers
-Actions.lua will take over registering all actions
-Items.lua will take over registering all items
-Commands.lua will take over registering all text commands
-Events.lua will take over registering all warps, openings/quests, aetherytes, etc.
To this end, event ids now live in organized tables to reduce error-prone copy paste clutter
If we get enough actions, items or commands, we can move those to tables too.
- Summoning bell now tells you you're not authorized
- Armoire shows prompt but "remove items" option softlocks
- Crystal Bell cutscenes work slightly better but still default to not authorized
- Bed now plays cutscenes with proper fade to black, and dreamfitting works when forced in onTalk
-Implemented all aethernet shards
-Implemented more lift/ferry skipper NPCs that don't require special handling
-Commented the mysterious GenericWarps at the beginning of the list
When learning how to unlock emotes, apparently FFXIV just has one
kind of ID for all kinds of stuff. So I picked a number, stuck it
as the max (this is unconfirmed) and you can now unlock everything.
The reload command was previously implemented in Lua, but this
is a little dangerous as it could itself have an error and is
unable to work in the first place. I moved this to Rust to
ensure it's always available. I left the reload_scripts() API
in Lua as someone could still find that useful!
Additionally, I added a !finishevent debug command to forcefully
end the current event you're in. This can be useful if your script
is incomplete or has an error, as your client gets stuck very
easily.
* Implement the following actors/entities:
-Inn Toy Chest actor, which simply says you haven't unlocked mini-games
-Inn Glamour Dresser actor, which simply says you haven't unlocked the GD yet
-Orchestrion, which is fully functional as long as you have songs unlocked
Accompanying the orchestrion is the GM orchestrion command, with a caveat:
-It allows you to learn one song at a time, but id 0 (aka "all) doesn't learn a single
song for some unknown reason, so I've disabled it for now.
* Run cargo fmt
* Update USAGE.md
How many times will I forget...
* Reimplement !unlockaction in Lua
Rebased on upstream master
* Unlockaction: display the action id that was unlocked
* Reimplement GM speed in Lua
* Fix warnings and errors
* Run cargo fmt
* Reimplement GM wireframe in Lua
* Reimplement GM invis command, with a caveat
It can't toggle the invis state yet, and I'm not sure where to update it.
* Lua invis: add the gm_invisible toggle, but it still doesn't revert back to false...
* Reimplement GM aetheryte in Lua, with a caveat
It's seemingly not working right now though: it doesn't add any new aetherytes to the teleport menu.
But I can't get the command `//gm aetheryte on X` to do it either, so it's possible Kawari isn't responding correctly?
Either way this needs further testing.
* Lua invis: add the forgotten Lua file
* Reimplement GM teri in Lua
Also add a TODO for UnlockAetheryte
* Make comment in lua.rs more useful
* Run cargo fmt again
* Teri: range check the territory ID
* Update USAGE.md to reflect the new commands
Rebased on upstream master
* Clarify unlockaetheryte USAGE and in-script usage
* Refactor UnlockAetheryte.lua, and make ToggleInvisibility actually work properly.
I opted to create a Task for this, because sticking it in kawari-world.rs felt like a hack to me.
* Run cargo fmt for hopefully the last time today
* Move lua.ra:toggle_invisibility down with the other queued tasks
* Fix spaces in USAGE.md, remove stray rebase message
Scripts are normally loaded when they are needed, with the exception of
Global.lua that's only loaded once at start-up. But now you can reload
it in-game with the !reload command, which should make event and command
scripting way less of a hassle.
We send the client scene 0, which displays the menu. I guess some unlock
is checked for actually being able to hire porters, which works for us.
Fixes#29
-Renamed permissions to required_rank
-Don't panic when the script author omits required_rank
-Reset state in the global table after reading it, so scripts can refresh it each time