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

47 commits

Author SHA1 Message Date
477380c8b9 When using the !spawnmonster command, send it to all players
You can't attack it and see it on other clients yet, that will take some
more plumbing.
2025-05-09 20:09:22 -04:00
7c96edc9a4 "Implement" the Crystal Bell
Like the Unending Journey, just tell the player they aren't authorized
to summon him.
2025-05-06 22:39:57 -04:00
ed44de8956 "Implement" the Unending Journey
Apparently there's a scene that's super easy to use, that omniously says
"You cannot consult The Unending Journey at this time". That's cool,
though.
2025-05-06 22:37:02 -04:00
515ec59d92 Port classjob debug command to Lua 2025-05-06 22:03:31 -04:00
4c17f28eb0 Add Lua API for commands
This is super simple, you get the player and the args (which you can
choose to split if you so choose.) I reimplemented the !setpos, and will
start doing the rest of the commands.
2025-05-06 21:57:52 -04:00
e237cbe84d Create GenericWarp script to handle simple warps
It turns out that most warps are just a yes/no, and can be handled by
one single script. I scripted the lift attendants from Bulwark Hall <->
Airship Landing <-> Drowning Wench this way.
2025-05-05 23:30:36 -04:00
de5e6cfb94 Use Default trait in more segment construction 2025-05-02 23:38:44 -04:00
5111a38424 Re-organize IPC segments into the ipc module
These were kind of scattered everywhere, instead we should move them
into their own module. Kawari's custom IPC is moved here too.
2025-05-02 00:47:11 -04:00
fb69689f2a Change server_id field in IpcSegment to option 2025-05-02 00:17:15 -04:00
f3f25eb219 Overhaul segment types, their names and their order 2025-05-02 00:03:36 -04:00
16af49cea4 Allow attacking the monster spawned by !spawnmonster again
I broke this while refactoring other actor things.
2025-04-15 16:27:49 -04:00
79f3ac73b6 Move player stat sending function to ZoneConnection 2025-04-14 16:18:03 -04:00
10c1369119 Add opcode for despawning actors, send that when changing zones
This is to workaround a bigger bug where I don't properly enclose actors
in their zone, so you can hit an assert while traveling between zones.
But this is something that has been needed anyway, and also fixes that.
2025-04-14 16:09:14 -04:00
121415b163 Add !classjob debug command to change your class/job
This is the workaround for lack of a proper class/job switch when
equipping different weapons.
2025-04-01 21:53:10 -04:00
216778ea8b Add more inventory management
Instead of one single slot available in your inventory, all four pages
should be available now. Moving items around should be less buggy, and
it's now possible to discard items.

Items cannot stack still, and when given will always take up the next
free slot.
2025-04-01 21:37:41 -04:00
4f8f0d1fe2 Add !spawnclone command, rename !spawnactor
Curiously the spawned clone shows up as a player, despite not using the
NPCSpawn packet. This might be a suitable workaround for the
PlayerSpawn packet being buggy from our side.
2025-04-01 19:15:08 -04:00
ae1ca2f92d Replicate actor spawning and movement to other clients
This now works and Kawari has achieved basic multiplayer! This is of course with
a hundred caveats:
* Previously spawned players are not backfilled
* There is no range or zone detection
* They are carbuncle clones of you, not the other character's data

But it actually WORKS!
2025-03-30 18:03:42 -04:00
ff3313a0f9 Add UpdateHpMpTp packet, make sprint take away debug monster health
This is just for debugging, I want to make attack actions do this
instead.
2025-03-29 12:25:22 -04:00
5b7e07642a Commit dynamic character values back to the database
This now saves the current zone id, position and the rotation of your
character to the database when you log out. This isn't restored yet
though.
2025-03-29 00:15:29 -04:00
6bb6377315 Add stubs for the other two starting City-States
Also document how to access and play these scenes in USAGE.
2025-03-28 23:00:32 -04:00
2bf9385079 Load the starting position from the LGB
It turns out (amazingly) that this data exists client-side, I guess because the
server and the client share the same planevent LGB file. So instead of
hardcoding the starting location in each city, it's now literally like retail*

* Except for the fact that we don't support rotation yet, and positions in pop
ranges are probably randomized too. But it's close!
2025-03-28 23:00:32 -04:00
c4b9ad060b Add basic Event scripting capaibilities
This implements the first event script, going from the first Ul'dah opening
cutscene to the next.
2025-03-28 23:00:32 -04:00
bcbe62af06 Add packets related to playing events and scenes 2025-03-28 23:00:32 -04:00
4142143bc8 Move Zone IPC over to the new JSON opcodes file 2025-03-26 19:23:14 -04:00
c29f8ad7df Run Clippy auto-fix, disable large enum size warning 2025-03-23 18:14:14 -04:00
90a78fcaa8 ActorControl and ActorMove packet fixes, add support for //gm invis
I don't think this is the right kind of invisibility, but it's more of a test of
ActorControlSelf really. I have also been trying (and failing) to make the
client show another player.
2025-03-23 15:28:53 -04:00
d47779c8d6 Add display flags
This is based off of the display flags from Sapphire, and the weird UNK one that
I see in game.
2025-03-23 13:03:58 -04:00
37dbef99db More CommonSpawn, PlayerSpawn and NPCSpawn struct improvements
This is just a barrage of random stuff I needed to fix, along with finally
figuring out what subkinds are.
2025-03-23 12:16:15 -04:00
45f92e9e54 Add OnlineStatus and GameMasterRank enums 2025-03-23 11:37:00 -04:00
3f23eea9c7 Add ObjectId and ObjectTypeId structs
This is to make it easier to defaut to INVALID_OBJECT_ID. To test if this works,
the actor from !spawnnpc should target the player.
2025-03-23 10:53:22 -04:00
9111ef6a82 Add debug command to spawn a monster (Tiny Mandragora), various fixes
This fixes various problems in CommonSpawn, adds a test for an enemy NPC spawn,
and an unkwon packet I get when entering some zones.
2025-03-23 10:33:49 -04:00
1acf73c484 Move Position struct to common module 2025-03-22 22:01:32 -04:00
0069196e3c Move some constants to common module 2025-03-22 19:17:01 -04:00
6190001caa Remove more hardcoded values for character
Since we are now backed by a database, the remaining usages are erroneous and
should be removed.
2025-03-22 17:06:16 -04:00
a91c59aaaa Remove hardcoded world id & name, make it configurable
Now the world isn't hardcoded to Gilgamesh, and is configurable. It's also now
the "Dev" server listed in the excel sheet which makes a more sensible default.
2025-03-22 17:00:21 -04:00
0900d0b94e Implement basic character persistence, World <-> Lobby server communication
This is unfortunately lumped into one big commit, and is very hacky and WIP but
does indeed work! Since the Lobby and World server are two separate servers, it
uses it's own custom IPC packets (reusing the same packet structures as regular
game ones.)

The characters you create in the Lobby server are now saved in the World server,
but this is not yet reflected in the Lobby screen.
2025-03-21 19:56:16 -04:00
788cbf114a Add support for the GM command to change the weather
You can now change the weather with `//gm weather <id>`.
2025-03-18 23:48:00 -04:00
4927fa9119 Send ActorControl and StatusEffectList packets in vain
This was hopefully supposed to show the player spawned by !spawnactor, but it
still doesn't work...
2025-03-18 23:30:59 -04:00
bd67eb0127 Add support for spawning NPCs, and a debug command to do it
Since the structs are so similar, I created a CommonSpawn struct to hold most of
the interesting fields.
2025-03-18 22:13:28 -04:00
3140dad378 Remove leftover bits of debugging logging 2025-03-16 18:35:11 -04:00
f5d75301b2 Re-organize the IPC structures so they live in their own server-specific module
My old setup of throwing *all* of the IPC types and opcodes into *one* enum was
becoming unbearable. Now that we have multiple things using the same opcodes
(because they can overlap) I think it's time to repay this technical debt.

This overhauls the structure of the project to move IPC structs into their own
modules, and separate the opcode data/lists into separate ones depending on if
it's clientbound and serverbound.

Nothing has changed functionall, but this is going to make it way easier to add
more IPC in the future.
2025-03-16 17:43:29 -04:00
23050e7b95 Move more structs out of the root src/ folder and into their respective server 2025-03-16 15:39:44 -04:00
053730017f Remove unused code & imports 2025-03-16 14:50:40 -04:00
0bf4cd1264 Create CharacterMode enum 2025-03-16 14:13:26 -04:00
3bbf345cd6 Run Clippy auto-fix 2025-03-16 14:09:12 -04:00
51f6ad6744 Grab bag of various fixes
I have unsuccessfully tried to spawn another actor, the game recieves it (and
adds it to the object table) but they are marked invisible. Besises, this also
contains various field improvements and initial support for social lists.
2025-03-16 14:07:56 -04:00
f372f3173d Create dedicated Connection implementations to handle future server work
The current situation of throw-every-piece-of-logic-into-one-file for each
server isn't working out. So now there is a new ZoneConnection/LobbyConnection
struct that will be delegating tasks to their own Handlers (for example, there
could be a ChatHandler.)

I'm not sure how well this architecture will scale, but it's better than what
we have right now.
2025-03-15 20:38:10 -04:00