1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 19:57:46 +00:00
Commit graph

463 commits

Author SHA1 Message Date
cdcce88c5f Log, don't panic for syntax errors in Global.lua
See #39
2025-06-22 08:35:25 -04:00
thedax
92a5cc48eb
Apply a temporary-ish fix so that not all chat messages appear as unknown commands. (#46) 2025-06-21 21:16:31 -04:00
0cdd20fb50 Allow loading invalid zone IDs 2025-06-21 19:01:56 -04:00
53a3d5d6a4 Load the actual weather rates for zones instead of using Sunny
This doesn't match up with retail yet (I don't know why.) But this
fixes the appearance of lots of dungeons and other instanced
content that have their own special weather.
2025-06-21 14:55:17 -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
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
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
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
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
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
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
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
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
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
8cc59f4793 Fix clippy warning 2025-06-18 12:55:18 -04:00
The Dax
80885f0eeb Port the nudge gm/debug command from Project Meteor Server.
It's a command that moves the user forward, backward, up, or down a specified amount of yalms.
It's quite helpful for exploration convenience, and doesn't replace setpos, rather, it's meant to complement it.
The set_position function was also extended to allow for lua code to specify the rotation/direction facing.
2025-06-18 12:55:18 -04:00
94e005d4f5 Initial update for 7.25h
Some of the opcodes didn't update properly as per usual with the new
process, but you can log back into the World server.
2025-06-17 16:24:19 -04:00
b84d5daafe Add CORS headers to the login API
A retail launcher update broke this (probably just the WebView2 upgrade)
and it requires us to declare Access-Control-Allow-Origin. This makes
the retail launcher functional again.

See #19
2025-06-17 16:16:28 -04:00
2576c49246 Change the default listen address to all addresses
This makes it slightly easier to share the server between machines, or
in my case - virtual machines.
2025-06-17 16:05:36 -04:00
37a9702a29 Send a better patchlist
This isn't correct yet, but closer to being usable.
2025-06-08 16:00:14 -04:00
ac595fcf6f Initial version bump for 7.25
Nothing packet-wise has been updated yet, but this will at least allow
the launcher and client to login.
2025-06-07 10:57:13 -04:00
5accb992a9 Add !equip command to quickly change your equipped item
See USAGE, this is actually extremely useful! No more hunting for item
IDs!
2025-05-12 22:32:03 -04:00
d1bbfdfbfd Send voice id when spawning player
Forgot to do this, so everyone sounded like a man - oops?
2025-05-12 22:00:23 -04:00