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

518 commits

Author SHA1 Message Date
bdd98820e7 Stop panicking when receiving None segments from the client
This apparently happens when you send chat messages super quick, and
they seem harmless to ignore.

Fixes #40
2025-06-21 14:04:09 -04:00
0d37dd7b6e Fix the size of None segments
It should be 0, not 16 bytes.

See #40
2025-06-21 13:59:58 -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
6561e63fd4 Send a message in-game when trying to start a non-scripted event
This should make it more obvious than in the usually spammy server log.
2025-06-21 12:26:58 -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
183555b858 Remove old workaround for Aether data center in USAGE
This should no longer be true anymore.
2025-06-21 11:52:59 -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
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
b593d87ef7 Only execute actions at the end of their cast timer, if any
This makes actions like teleport not turn you into a zombie, because now
the action *somewhat* matches up with your client's animation. Note that
teleporting specifically still looks wrong, because I think on retail
the client is informed to preload the zone you're going to and we don't
do that.

Fixes #36
2025-06-21 11:20:21 -04:00
39beefbef3 Send action requests to global server state
This is to lay the groundwork for keeping track of cast spell timings,
and eventually networking actions to other players.

See #36
2025-06-21 10:36:44 -04:00
01508fd506 Add function to get an action's cast time
For future spell-related stuff.
2025-06-21 10:36:21 -04:00
6ecea26646 Update Physis to fix several issues with loading LGBs
This fixes loading LGBs from expansions, which means some zones are now
semi-functional. It should also stop panicking when loading certain
LGBs.

Fixes #35
2025-06-21 09:47:49 -04:00
9405714e56 Emit better warnings when loading LGB files
Now the "Loading XYZ.lgb" message only shows up *if* we find the file,
and if it fails to parse then we tell people to report it to us.

See #35
2025-06-21 09:28:27 -04:00
347a12a1b5 Update dependencies 2025-06-21 09:23:00 -04:00
The Dax
45d67c4b1c Forgot Gridania's inn name 2025-06-21 09:12:28 -04:00
The Dax
db5a81528f Consolidate exit-to-inn scripts into a generic one.
-Also comment what most generic warps are for
-Might move the loose/magic event IDs into their own file in the future...
2025-06-21 09:12:28 -04:00
2a1491c8f9 Make the current classjob persistent, and your levels too
This requires another database wipe, or if you're savvy enough a few
schema edits.
2025-06-20 19:08:53 -04:00
The Dax
a24e0a5658 Overhaul the Lua permissions:
-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
2025-06-20 14:02:46 -04:00
The Dax
579bef8cd6 Adjust logging slightly 2025-06-20 14:02:46 -04:00
The Dax
276e183d85 Fix Nudge GM rank requirement 2025-06-20 14:02:46 -04:00
The Dax
be20b0f604 Add a basic permission system to Lua scripts to bring them in line with ingame GM commands. 2025-06-20 14:02:46 -04:00
b488cfb348
Add screenshot to README 2025-06-19 20:19:53 -04:00
777cb8b2a3 When failing to parse a packet segment, print it's size
This can be helpful to determine what the heck this opcode is.
2025-06-19 16:07:39 -04:00
355572d97a Remove some unknown packet spam
The "Received UnkXX" log messages are completely useless, let's get rid
of them.
2025-06-19 16:01:31 -04:00
2dc3a899bb Run cargo fmt 2025-06-19 16:01:16 -04:00
OTCompa
efdec9b4c5 Rename added variables/functions for better consistency 2025-06-19 15:54:42 -04:00
OTCompa
6d79a365f3 Add config for world address to be served by lobby server 2025-06-19 15:54:42 -04:00
OTCompa
086cd24b09 Connect to server name instead of listening address 2025-06-19 15:54:42 -04:00
The Dax
ae96de1ee6 Stop the world server from becoming upset when a Lua command is invoked with no arguments.
Allows commands that have a default set of arg(s) to use those when none are specified, as well as
allowing commands to act as toggles (such as a wireframe toggle, or disabling any set festivals).
2025-06-19 15:27:01 -04:00
thedax
961cb92ab1
New Lua command proposal: !festival (#26)
This command enables the user to set the current zone's festival.
For example, you can toggle the Starlight festival in any of the starting cities.

Thanks, OTCompa!
2025-06-19 12:29:10 -04:00
The Dax
792316dce5 USAGE.md: add description of new GM speed command.
Sorry, I keep forgetting to do this!
2025-06-19 10:09:07 -04:00
The Dax
1edcdf3de6 Implement GM speed command, and make GM invis command actually toggle invis status 2025-06-19 10:09:07 -04:00
The Dax
749b499db6 Refactor portions of lua.rs to reduce boilerplate
-Create common methods create_segment_self and create_segment_target.
These reduce the amount of copy-paste boilerplate code since the IPC queueing stuff basically never changes
as far as I can tell. Now we simply specify the opcode and the data that goes with it, and off we go.
Create_segment_self retains the current behaviour of using the player's actor id as both the source and target,
and create_segment_target allows us to change the source and target in case commands are written that require
one or the other to be different (Sending targeted players to other coords/zones? Bringing a player to the GM/source user? Several possibilities.).
2025-06-19 08:32:06 -04:00
9567c8f38e Change default GM rank back to 90
I originally did this thinking I would engineer a user management
interface afterwards, but this hasn't materialized yet and just makes
testing Kawari harder.

This should stop having to manually edit your Kawari World database to
gain access to GM and debug commands.
2025-06-18 21:00:20 -04:00
ed08fc2fdc Reject certain debug commands based on GM rank
This only affects the commands implemented in Rust for now.
2025-06-18 20:58:32 -04:00
9770497fe5 Remove spammy log message from chat handler 2025-06-18 20:57:51 -04:00
c1dc138e3c Make !spawnclone debug command networked 2025-06-18 20:57:20 -04:00
d216bebce9 Remove !playscene debug command
This doesn't really scale right now with the new events system, and I
don't use it anymore so let's remove it for now.
2025-06-18 20:53:07 -04:00
eb6b6409da Generate new actor IDs for debug NPCs, unify actor network paths
I don't know why I created a new message kind just for spawning NPCs
when ActorSpawn does this just fine. But what this actually means is
that the debug NPCs can now be spawned more than once.
2025-06-18 20:49:05 -04:00
97cdc66ec7 Make !spawnnpc debug command networked
Next step is allocating actor IDs properly, instead of using a fixed
value.
2025-06-18 20:38:55 -04:00
3757f4e0db Make !spawnmonster put the NPC at your location again
Also included some refactoring that will help networking these better.
2025-06-18 20:28:03 -04:00
1b6fdab000 Add warnings in more lobby fail cases
For example, if your World server is down and no service accounts were
returned.
2025-06-18 20:08:35 -04:00
7d6c8a8c14 Advertise in all retail lobbies instead of just Aether in LauncherTweaks
This should make it somewhat nicer for non-American users.
2025-06-18 20:03:41 -04:00
e175bd072e Fix Unk2 and Disconnected opcodes for 7.25h
Fixes #23
2025-06-18 19:48:22 -04:00
cbde0f74b3 Clarify in USAGE that the server is setup for Aether/Gilgamesh
I thought this was documented, but I guess not. Saves users a bit of
troubleshooting, especially if they don't play on American data centers.
2025-06-18 19:42:29 -04:00
97a1836e77 Don't panic in the Lobby server if the Login server is unavailable
See #21
2025-06-18 19:38:00 -04:00
The Dax
3118ef2a5a Write description of !nudge in USAGE.md 2025-06-18 12:55:18 -04:00
The Dax
74479198e8 Nudge.lua: clarify usage 2025-06-18 12:55:18 -04:00