1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00
Commit graph

147 commits

Author SHA1 Message Date
6951f9448d Port GM commands to Lua
This removes a ton of implementation overlap between the two
command systems. For example, we had two different implementations
of unlocking aetherytes which is just unnecessary.

On the flipside, this makes implementing new GM commands just as
easy as writing debug ones. I moved the existing debug Lua
implementations into their GM counterparts and updated the USAGE
accordingly.
2025-06-28 10:27:56 -04:00
db0bdd511c Fix the !unlockaetheryte command not working as expected 2025-06-27 23:59:09 -04:00
02b8e92d6b Reduce the amount of unlocks to what's actually possible
This stops the !unlock all debug command from crashing the server.
There's only 511 possible unlocks in the game, I guess.
2025-06-27 23:40:19 -04:00
0b470dc28b Make unlocks persistent, fix player name in chat
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.
2025-06-27 23:28:56 -04:00
thedax
1fa861a35a
Rewrite the inn bed logic for hopefully the final time (#71)
It is now ~99% accurate. If we need to adjust the player's positioning after the cutscenes, we can do that at some other point
2025-06-27 22:40:40 -04:00
The Dax
ee3a7c54bb Update event scripts to use tables, since passing params now gets dropped into a Vec<u32> on the rust side. 2025-06-27 21:26:10 -04:00
thedax
a3d32b67aa
Rename forgotten variable in Events.lua (#70) 2025-06-26 21:02:15 -04:00
thedax
b560642978
Implement Gold Saucer lift operators, aethernet shards, and every MGP vendor (#69)
Except for the mahjong vendor. He needs something different apparently.
2025-06-26 20:48:09 -04:00
thedax
c5695f5ed7
Parially implement Gemstone Traders and Hunt currency exchangers (#67) 2025-06-26 08:04:13 -04:00
The Dax
2c60e4f8fa Fix a typo in Events.lua 2025-06-26 07:47:05 -04:00
The Dax
385672d797 Add support on the Rust side for resetting the command identifier.
-sender was also renamed to command_sender in case we'd like to reserve the word "sender" in the future.
2025-06-26 07:47:05 -04:00
The Dax
0f7e068ba3 Further reduce boilerplate in various scripts
-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
2025-06-26 07:47:05 -04:00
476958a054 Move crystal bell script
I finally found what client-side script it's calling into, they
call it "BeautySalon" internally.
2025-06-25 23:20:37 -04:00
96aece36cf Implement more back and forth packets for events
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.
2025-06-25 23:11:49 -04:00
b099d0a7f4 Implement the Crystal Bell menu
It will start the second scene if you request a summon now, but
we still need to implement the opcodes for bringing up the menu.
2025-06-25 21:50:57 -04:00
58e4e89765 Support toggling displaying your weapon and other flags
This is now networked and shown both to you and other players. This
still needs to be persisted for other player spawns.
2025-06-25 21:30:14 -04:00
69e8e4055e Finish implementing currency
I made various mistakes in the initial implementation, which
are now fixed.
2025-06-25 17:02:19 -04:00
thedax
75993bf933
Update to Lua 5.4, adjust scripts accordingly (#64) 2025-06-25 15:21:09 -04:00
thedax
6d99bef66c
Refactor and reorganize numerous Lua systems: (#63)
-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.
2025-06-25 13:25:48 -04:00
thedax
d73ab383e8
Document the previously unknown parameter for the ServerChatMessage opcode (#62)
Document the previously unknown parameter for the ServerChatMessage opcode
Credit goes to Sapphire as usual (see comments)
2025-06-25 10:05:34 -04:00
The Dax
c926ceb17b Implement a generic lift operator in Eulmore 2025-06-24 19:17:18 -04:00
The Dax
feb0ffb869 Implement the aethernet for aetherytes and ensure both aetherytes and aethernet shards
do better about not yeeting you into invalid zones, crashing the client, or softlocking
2025-06-24 19:17:18 -04:00
01697c8f62 Begin implementing currency, add //gm gil command and more
This doesn't work yet though , and I'm not sure why. I also fixed a bug
where new characters doesn't get their inventories initialized properly.
2025-06-24 19:16:32 -04:00
thedax
9d01a5d595
Update opcodes for 7.25h2 (#60)
* Attempt to update opcodes for 7.25h2, but it's possible I missed some

* Disconnect might be 370

* Edit README.md to reflect the new update
2025-06-24 16:21:25 -04:00
thedax
1a5f80482f
Partially implement more actors (#59)
- 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
2025-06-24 14:38:16 -04:00
d612a95be9 Move restoring character backup to it's own page 2025-06-23 21:42:30 -04:00
thedax
6ca828bb38
Add a placeholder script for the market board and a couple more gatekeepers (#55) 2025-06-22 18:22:44 -04:00
thedax
4a234e08d1
Add the missing Azim Steppe aetherytes (#54) 2025-06-22 17:32:47 -04:00
The Dax
17823ae30e Fix name of actor 2025-06-22 16:19:29 -04:00
The Dax
063ad78a84 Don't need tonumber for results 2025-06-22 16:19:29 -04:00
The Dax
2abb44b6d9 Bring up the aethernet
-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
2025-06-22 16:19:29 -04:00
fd249a2342 Rename !unlockaction to !unlock
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.
2025-06-22 11:18:07 -04:00
b38b347c15 Add scripting for the Delivery Moogle NPC
See #48
2025-06-22 09:06:09 -04:00
198a8a3e2c Make !reload command always available, add !finishevent
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.
2025-06-22 08:49:06 -04:00
thedax
e1b261c7d8
Implement several actors/entities (#49)
* 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...
2025-06-22 08:46:11 -04:00
thedax
12d381e25d
"Implement" generic menders (#47)
...in the sense that they bring up the repair menu, but that menu isn't implemented yet.
2025-06-21 21:14:30 -04:00
fa2158bd22 Oops, reorder Wineport Aetheryte
I misread a 9 as an 8.
2025-06-21 19:06:52 -04:00
fa8e28893e Add missing Wineport Aetheryte
Thanks to @thedax, I merged the last PR so fast it wasn't included.
2025-06-21 19:06:12 -04:00
thedax
a2661ead9e
Hook up ARR aetherytes, with some caveats (see comments in Global.lua) (#45) 2025-06-21 19:02:54 -04:00
The Dax
37cdde3703 Hook up Heavensward and Stormblood aetheryte events 2025-06-21 17:35:53 -04:00
The Dax
77621fbaf7 Remove unused aetheryte events 2025-06-21 17:35:53 -04:00
The Dax
0a7ee8d27e Hook up Shadowbringers aetherytes 2025-06-21 17:35:53 -04:00
thedax
185ea84bd2
Hook up Endwalker aetheryte events (#42) 2025-06-21 16:08:52 -04:00
thedax
5b1023f94f
Hook up Dawntrail aetheryte events (#41) 2025-06-21 15:13:57 -04:00
4146261c40 Script the Mothercrystal exit, stop panicking if warp isn't found
I guess this might be because a planevent fails to load, but I'm not
confident about that.
2025-06-21 14:23:56 -04:00
thedax
61616df842
Reimplement several commands in Lua (#37)
* 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
2025-06-21 13:30:52 -04:00
bb2cc9e0ec Log in-game and in the server when encountering an unknown command
Instead of printing nothing and you're just left scratching your head.
2025-06-21 12:23:25 -04:00
f07d16b949 Allow reloading Global.lua with the new !reload debug command
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.
2025-06-21 12:16:27 -04:00
0c967f8a56 Add generic Aetheryte event script, document the interesting scenes
This also scripts the Central Meadows Aetheryte.
2025-06-21 12:01:11 -04:00
d04a2cb9c1 Add dummy event script for Central Shroud's Chocobokeep
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
2025-06-21 11:34:56 -04:00