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

345 commits

Author SHA1 Message Date
b6a445cc34 Complete navmesh generation
Still no idea if it's actually correct yet, but the function calls
pass.
2025-07-09 20:37:11 -04:00
5bea7f9b34 Generate more Recast data, start using Detour functions 2025-07-09 20:24:11 -04:00
e929f40e94 Begin building the various bits of Recast navigation
I got it to "work" (not checked, but the calls at least don't fail)
and now it's time to include the detour portion.
2025-07-09 19:17:07 -04:00
e269806248 Begin integrating recastnavigation-sys 2025-07-09 15:58:57 -04:00
85cec9f092 Begin adding zone collision visualization
If you run kawari-navimesh and give it a zone ID, it can now show
you the loaded collision meshes. I only tested it in inn rooms so
far, but already works super well.
2025-07-09 14:59:02 -04:00
20b26377dc Begin logging collision asset paths in naivmesh gen 2025-07-08 23:38:03 -04:00
e26820f777 Begin working on a navimesh generation tool
This just lays the groundwork for processing a zone, given an ID.
2025-07-08 23:33:33 -04:00
d16c2c6583 Allow loading unpacked game files, add unpacking mode
This enables you to subsitute game files with your own more easily,
along with running a server with only a limited amount of game
data.
2025-07-08 22:39:31 -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
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
7ccd132129 Unify version and file checking behind one config parameter
And make it affect the patch server as well, if you really want to
use an unsupported version.
2025-07-04 11:56:12 -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
b3c954ed83 Fix error string 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
The Dax
57b90ca3dd Address "warning: this expression borrows a value the compiler would automatically borrow" 2025-07-04 11:42:08 -04:00
The Dax
b3b7b2e57f Address two of "warning: function call inside of expect" 2025-07-04 11:42:08 -04:00
The Dax
72915e11d9 Address two of "warning: redundant pattern matching, consider using is_ok()"
-We should really refactor this part of the code, it's a bunch of copy paste.
2025-07-04 11:42:08 -04:00
The Dax
fe25cc6210 Address three of "warning: casting to the same type is unnecessary (u32 -> u32)" 2025-07-04 11:42:08 -04:00
The Dax
3a9912776f Address "warning: useless use of format!" 2025-07-04 11:42:08 -04:00
The Dax
86c8d58fe3 Address "warning: this expression creates a reference which is immediately dereferenced by the compiler" 2025-07-04 11:42:08 -04:00
The Dax
05f83459c1 Address "warning: deref which would be done by auto-deref" 2025-07-04 11:42:08 -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
thedax
bc7ab11deb
Lobby server: send back more accurate error messages for problems (#97)
* Lobby server: send back more accurate error messages for problems

* Send the dreaded 2002 error code instead. Exact error codes would probably be better.
-It is unknown if there's a list somewhere.
2025-07-02 21:59:25 -04:00
thedax
01b396a656
Refactor gamedata to use a more general get_item_info function (#96)
-You can search for items by id or name
-The logic is all centrally located, eliminating all of the duplicated loops everywhere
2025-07-02 17:30:48 +00:00
thedax
9bed7595cc
Implement items costing money now (#94)
-Includes an extra check for trying to bypass the client-side
-Update dependencies
-Include a message that selling isn't supported yet
-Display a message indicating an item was bought
2025-07-01 21:21:47 -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
3695ee4352 Begin implementing gil shops, add free item to inventory
Tested against the Florist in New Gridania, although we don't
deduct the item price from you and such.
2025-06-30 21:38:04 -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
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
670d25a980 Disable sending exp again 2025-06-28 15:27:53 -04:00
fd4436db01 Fix a few more fields in PlayerStatus
Class is determined correctly now, and we now set the expansion
level too.
2025-06-28 15:23:56 -04:00
ff3a7d6835 Remove more leftover debugging code 2025-06-28 15:10:57 -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
9a3652fb42 When equipping items, network that to other players
See #50
2025-06-28 11:13:11 -04:00
dfac7702fa Expose a zone's intended use ID in the Lua API 2025-06-28 10:27:56 -04:00
e6536da9dd Split up the command arguments on the Rust side
This removes some boilerplate code we need in every command to do
this ourselves.

See #65
2025-06-28 10:27:56 -04:00
ed1263d587 Pass all four arguments to GM command scripts
No GM command we have implemented currently uses these, but just
a little bit of future-proofing.
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
d3647a4b3b Fix unlocking all aetherytes
I also made it possible to toggle them off properly, that should be
saved now too.
2025-06-28 00:07: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
05f909497c More unknown IPC handling fixes 2025-06-26 21:06:54 -04:00
4f364ae330 Don't make packet parsing async
This doesn't need to be marked as async, the code isn't.
2025-06-26 19:09:13 -04:00
The Dax
94e13fa281 Remove commented testing log output 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
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