1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-10 16:07:45 +00:00
Commit graph

69 commits

Author SHA1 Message Date
The Dax
93ddff8ed4 Address "warning: this impl can be derived" 2025-07-08 21:54:10 -04:00
thedax
22dc1dbaaa
Refactor lua.rs: (#109)
-The match has been moved into src/ipc/zone/event_scene.rs and slimmed down
-EventScene now provides a function to decide the opcode based on how many params it has
-The tests for EventScene were updated to acommodate the new changes
2025-07-08 17:18:30 -04:00
thedax
17967c9d6a
Attempt to improve the accuracy of a couple things (#105)
Attempt to improve the accuracy of:
-ItemOperation: Now sends back ItemAcknowledgeAck as well as InventorySlotDiscard and *Fin when discarding items
-ClientTrigger::EventRelatedUnk -> send back commonly observed ActorControlSelf responses
2025-07-05 19:05:43 -04:00
cd55653077 Implement necessary packets for the Unending Journey event
This doesn't make cutscenes play *yet*, but stops the client from
getting stuck waiting for a cutscene to begin. Now the event script
continues, and ends the event.
2025-07-04 16:18:39 -04:00
f2239378f6 Add ClientChatIpcSegment
This is just a dummy for now, we just need it downstream in Packet
Analzyer.
2025-07-04 16:01:15 -04:00
5acf6580f3 Remove TestActorControl
This was leftover from some other debugging and shouldn't be here.
2025-07-04 15:58:34 -04:00
10d4d957fa Parse unknown actor controls
For use downstream in Packet Analzyer, instead of showing nothing.
2025-07-04 15:55:48 -04:00
thedax
68f6747598
Fix size of InventoryActionAck (#104)
-If it's 16 bytes, there can't be 12 bytes of padding, 4 bytes of u32 and 2 bytes of u16. :)
2025-07-04 19:48:03 +00:00
2f1aee9d09 Fill out more unknowns in lobby IPC packets
Mostly based off of Sapphire, but fixed in the more modern age.
2025-07-04 15:40:10 -04:00
24edee6548 Fix various size issues with lobby IPC packets
Some of these were the wrong size, and were affecting both the
server and packet analyzer alike. This should now more accurately
reflect retail.
2025-07-04 15:01:27 -04:00
The Dax
1c7570c696 Bounds check the string parts vecs.
Fix off by one error

Style nit.
2025-07-04 11:44:35 -04:00
The Dax
d011f11e54 Lobby server: implement a server-side version check against the version info the client sends.
-TLDR: it checks file length and sha1 hash of the game exe, and all of the version strings.
2025-07-04 11:44:35 -04:00
5c8e0f3e62 Change Unk1 ClientTrigger to BeginLoading 2025-07-04 11:33:48 -04:00
fb46a44e18 Begin correctly implementing packet obsfucation
I re-implemented Unscrambler, but in reverse! This currently only
affects names in the PlayerSpawn packet, it needs to be extended
into others to be considered complete.

See #9
2025-07-03 16:12:19 -04:00
927c093915 Send your completed quests list
We aren't going to be adding quests ever or anytime soon, so all you
can do right now is force every quest to unlock with the aptly named
!completeallquests.
2025-07-01 19:51:33 -04:00
thedax
5a580149b4
Document some opcodes related to shops and implement a generic gil shopkeeper script (#85)
Document some opcodes related to shops and implement a generic gil shopkeeper script
* You can now interact with shopkeepers, and if you have enough gil, you can attempt to purchase items
* Upon trying to buy items the event will auto-cancel for now, because we're missing implementations of several opcodes related to inventory management
2025-06-30 15:21:08 -04:00
5b8a61c1ce Add the various sizes of EventScene
This isn't hooked up to the Lua API yet, it's just the
needed opcode bits.
2025-06-28 16:05:36 -04:00
2762407585 Rename EventReturnHandler to EventYieldHandler, make generic
This also makes EventScene generic for use in the future.
2025-06-28 15:57:45 -04:00
41d8424615 Read unknown packet data in more places 2025-06-28 15:15:45 -04:00
d230a86844 Fix leftover test debugging thing 2025-06-28 15:01:26 -04:00
f46b62ad9e Store classjob EXP
This isn't sent in the PlayerStatus packet *yet*, only on
UpdateClassInfo. For some reason, passing it makes the client freak
out and I'm not sure why yet.
2025-06-28 14:57:21 -04:00
8f61fc36bd Support importing even more data from Auracite
This includes unlocked class jobs, levels, your inventory and unlock
flags.
2025-06-28 14:15:46 -04:00
61f0ccdacd Fix deleting characters in the lobby not working
This statement broke at some point, and the size of the custom IPC
was wrong too.
2025-06-28 10:43:53 -04:00
776bac9463 Add padding to the GMCommand IPC packet
This fixes the warning that the sizes don't match, because I think
there's padding at the end.
2025-06-28 10:27:56 -04:00
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
6ecdae840c Continue parsing when encountering unknown packets
This reads the unknown packet data, just throwing it in a byte
buffer. This allows us to read the rest of the segmenets in
the packet, and fixes parsing.

Note that this still log spams with "wrong size" as we can't
determine the size of the unknown packet ahead of time. This is
easy to fix, but it's not a high priority yet.

Fixes #73
2025-06-28 08:48:59 -04:00
db2ee114a9 Fix the size of the aetheryte unlock bitmask
This should really be calculated instead of guessed, because I already
made a mistake. I didn't do that, only added a TODO for it.

Fixes #74
2025-06-28 08:22:01 -04:00
74f32121ef Make size of bitmasks constants so they're easier to change, fix tests 2025-06-27 23:28:56 -04:00
5272439bca Store aetherytes in the database
This requires yet another database wipe, but this is worth it as you no
longer have to aetheryte unlock spam on login.
2025-06-27 23:28:56 -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
The Dax
53748c33f0 Document the EventScene struct more: We'll support only two params for now.
We'll have a generic version soon™️, though.
2025-06-27 21:26:10 -04:00
05f909497c More unknown IPC handling fixes 2025-06-26 21:06:54 -04:00
db3166d8b3 Add various things useful for using Kawari downstream
Such as better unknown packet parsing, IPC opcode names and
more stuff exposed as public API.
2025-06-26 20:59:46 -04:00
d292e1d676 Fix signedness of scene yield params
According to the decompiled Lua code, they sometimes can return
negative numbers (like -1, to indicate an error.) I also improved
the debug display of these in the server log a bit.
2025-06-25 23:28:12 -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
381098b1c5 ClientTrigger Unk2 is actually FinishZoning 2025-06-25 22:12:09 -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
7d203d1de5 Add documentation about the supported client triggers 2025-06-25 20:58:21 -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
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
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
03609fb8c1 Add a comment to rename EventHandlerReturn 2025-06-24 18:31:19 -04:00
cc5d9ae7bc Return both parameters in EventHandlerReturn
This allows scripting things like Aetherytes in the future.
2025-06-24 18:30:22 -04:00
thedax
82e5021979
Implement the //gm teri_info command, and fix a typo (#56)
Implement the `//gm teri_info` command, and fix a typo. Said typo was in gamedata.rs, confusing the FingerL column for the SoulCrystal column.
2025-06-23 13:39:37 -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
b41cb478e7 Display unsheathed weapon to other players
It doesn't play the animation correctly, yet.
2025-06-22 10:08:29 -04:00
e1b01299c9 Show emotes from other players
If you move it doesn't cancel them yet, but still cool to see them play.
2025-06-22 09:45:24 -04:00
fbe6862c7b Begin implementing EXP
This doesn't actually do things like level you up, but if you use the
GM EXP command then it will update the UI.
2025-06-22 09:19: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
d821c838cb Send your character's actual levels during setup
This fixes their display in the Character window. Sometimes the display
is a bit bugged, but there's not much I can do about that right now.
2025-06-21 11:50:09 -04:00