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

271 commits

Author SHA1 Message Date
edf0643990 Grab navimesh paths from LVB, warn when navimesh is missing
Of course we don't even generate the navimeshes to begin with, but
it's a start.
2025-07-08 23:21:34 -04:00
7b6605b018 Update Icarus, switch to the new Physis Resource system
While there isn't a functional difference in Kawari yet, this is
paving the way to allow loading unpacked game files.
2025-07-08 21:54:42 -04:00
The Dax
c72526a34d Address two of "warning: this expression creates a reference which is immediately dereferenced by the compiler" 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
The Dax
7801398590 Fix a small issue with the !equip command
-It wasn't setting the item's condition, causing the game UI to behave strangely when looking at the item's tooltip
-Added a constant for the maximum item durability
2025-07-04 13:39:48 -04:00
7291863481 Move scrambler module to packet
This is to make WebAssembly builds work again, because the world
module isn't compiled there.
2025-07-04 12:22:49 -04:00
thedax
ca90d8b787
Move the login message from Lua scripts into the config file. (#100)
-Provide a new API function: getLoginMessage which will fetch it from the config file.
2025-07-04 11:42:52 -04:00
The Dax
9532abcaa6 Address "warning: you should consider adding a Default implementation for ScramblerKeyGenerator" 2025-07-04 11:42:08 -04:00
The Dax
4cae9a649a Address two of "warning: casting to the same type is unnecessary (i32 -> i32)" 2025-07-04 11:42:08 -04:00
c65e413900 Make loading zone LGBs more accurate
The game actually has a list of LGBs for the territory/zone in a
LVB file, so we don't have to hardcode a list of names.
2025-07-04 11:33:01 -04:00
5035dcab82 Begin implementing more packet obsfucation
It's not complete yet, notably the correct model IDs don't show up.

See #9
2025-07-03 17:00:55 -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
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
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
The Dax
3b6fcb7ba1 Extend the Lua API:
-Implement GM command collect (subtracts gil from player), but the ingame command's params are unknown, Lua only
-Implement GM command inspect, but the IPC opcode for it is different than GMCommand and is thus far unimplemented, Lua only
-The Lua API can now access all of the player's inventory (read-only)
2025-07-01 13:06:49 -04:00
The Dax
d14dd3ccd9 Address: "warning: the variable sequence is used as a loop counter" 2025-06-30 21:55:11 -04:00
The Dax
b0282eb6bc Address "warning: you seem to be trying to use match for destructuring a single pattern. Consider using if let" 2025-06-30 21:55:11 -04:00
The Dax
1fe3e3e81d Address "warning: using clone on type [u32; 10] which implements the Copy trait" 2025-06-30 21:55:11 -04:00
The Dax
1f065472d0 Address "warning: casting to the same type is unnecessary (u32 -> u32)" 2025-06-30 21:55:11 -04:00
The Dax
3fc863616c Address "warning: unneeded return statement" 2025-06-30 21:55:11 -04:00
f778f9a571 Support sending an arbitrary amount of event params
This ended up as a giant, disgusting match statement but I don't
really have anything better right now.
2025-06-28 16:17:54 -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
0a740198f8 Initial support for item glamours and condition
The only way to glamour items is to import them from Auracite, same
with condition. But these are actually sent to the client now!
2025-06-28 14:57:21 -04:00
66da9abc90 Fix bad assumption with EXP/Level array indices
They don't always correspond to their classjob id, because jobs share
the same EXP/Levels as their base classes.
2025-06-28 14:15:46 -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
b2f14dffee Add the !item debug command to give items by name
Compared to the //gm item command which only accepts IDs.

Fixes #50
2025-06-28 11:22:21 -04:00
f1b9461eb2 Add the //gm item command back
I never actually finished the Lua version, oops.
2025-06-28 11:18:17 -04:00
99a165e405 When changing equip display flags, store that for new spawns
See #50
2025-06-28 11:13:11 -04:00
9a3652fb42 When equipping items, network that to other players
See #50
2025-06-28 11:13:11 -04:00
554d42a904 Equip the correct starting weapon for your selected classjob
This prevents all sorts of oopsies because the client will refuse
to equip certain items, if you happen to be using a Gladiator
weapon on an Archer or vice-versa.

See #50
2025-06-28 10:44:25 -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
dfac7702fa Expose a zone's intended use ID in the Lua API 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
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
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
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
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
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
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
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
ddb67383af Fix more easy Clippy warnings 2025-06-23 21:14:38 -04:00
The Dax
86310c7c22 Address warnings:
warning: usage of `contains_key` followed by `insert` on a `HashMap`
warning: you seem to want to iterate on the values of a map
2025-06-23 15:28:24 -04:00