1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-25 08:27:44 +00:00
Commit graph

60 commits

Author SHA1 Message Date
c29f8ad7df Run Clippy auto-fix, disable large enum size warning 2025-03-23 18:14:14 -04:00
70ec1b99c9 Fill inventory with racial starting gear 2025-03-23 17:49:53 -04:00
8a03c82480 Create Inventory struct, move inventory filling logic to ZoneConnection
This still uses hardcoded item ids, but this should much more extensible.
2025-03-23 17:43:06 -04:00
a36c6dff90 Send a (currently hardcoded) list of equipped items to the client 2025-03-23 17:10:47 -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
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
b3f5500d2f Check user-agent in Patch server 2025-03-23 07:25:23 -04:00
d8971b09cc Remove erroneous Position import 2025-03-23 06:34:47 -04:00
fb05caaa31 Store zone id and position in the World database
This isn't updated by the server yet, but will be soon in the future.
2025-03-22 19:05:29 -04:00
4b740068d4 Remove hardcoded initial zone, derive it from selected City-State
This currently might spawn you in the ground in Ul'dah and probably Limsa too,
until I determine the correct spawn location.
2025-03-22 18:53:53 -04:00
15ed586fd0 Fix CharaMake structure, derive City-State from class picked in creation 2025-03-22 18:34:27 -04:00
107a00aa92 Move lobby character actions to LobbyConnection, support deleting characters 2025-03-22 17:32:00 -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
3f27d2b3df Change configuration format to YAML, allow configuring the address and ports
This removes all of the hardcoded localhost stuff, and allows changing the ports
of various services.
2025-03-22 16:47:21 -04:00
f523aa189f Move login & world database code/logic to their own modules and structs
This should remove some of the pollution I added while working on these
features.
2025-03-22 16:15:29 -04:00
4b67b22c9f Show the actual character list on the lobby screen
This doesn't do any actual account checking yet, but it works pretty well.
2025-03-21 21:26:32 -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
f4536f2cb7 Implement basic support for actions
This only works for sprint, and it adds 30 sprint buffs. It also regularly
crashes the server afterwards usually.
2025-03-19 00:28:47 -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
1f2283af14 Specify a connection type when sending packets 2025-03-18 20:33:12 -04:00
fecfa821ad Use PatchList from Physis
This is what the Physis implementation was based off of anyway, so it should be
more or less a drop-in replacement.
2025-03-17 17:36:43 -04:00
aee23a200b Create timestamp_msecs function, run Clippy auto-fix 2025-03-17 17:31:22 -04:00
a7f56a62a1 Rename FFXIVOodle to OodleNetwork, move out of a folder
I was thinking I was going to add other modules but it wasn't needed, so it
doesn't need to live in a folder.
2025-03-17 17:22:09 -04:00
c510d955bd Document more random things, move session_id from PacketState to LobbyConnection 2025-03-17 16:58:48 -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
22acdc4a3b Print IP address when lobby & world servers are started 2025-03-16 14:51:18 -04:00
053730017f Remove unused code & imports 2025-03-16 14:50:40 -04:00
b1b0d9ac9f Only send the welcome server message on initial login, not for every zone change 2025-03-16 14:49:18 -04:00
a72199e5af Use the same nameday/deity/etc information everywhere, add tests for PlayerSpawn
This doesn't really fix anything functionally, but makes the Character window
look nicer. The same (currently unchangable) data is now reflected in the lobby.
2025-03-16 14:43:30 -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
3aaa8ae3eb Move zone changing into ZoneConnection's purview
I suspect that we have to rigidly control the fade in/out or whatever
PrepareZoning is, and it's just a good idea in general.
2025-03-15 20:49:07 -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
059becf55f Detect when players enter exit zones, and transistion them to the correct place
It's a hack and only really works going from New -> Old Gridania, but this does
work! It also means Kawari now actually requires a valid game installation,
since it has to read layer group information.
2025-03-15 19:34:29 -04:00
dbe1ef208c Initialize the weather correctly, add test for InitZone packet
This makes the lighting not a horrible dark mess!
2025-03-14 20:47:36 -04:00
640aeb797c Fix a few problems with ClientSelectData, use the same character in both servers
I apparently had a few fields missing here. Also just some general clean up,
make it the same looking character in both the Lobby and World server. I also
chose Gridania as the test zone.
2025-03-14 00:30:37 -04:00
45be3835bb Add more init IPC packets
This doesn't improve the loading situation unfortunately, but I guess it's more
"correct". Unk7/Unk11 is still a complete mystery to me, though.
2025-03-13 21:49:03 -04:00
8bfc6cafb3 Send a message when logging in 2025-03-13 21:11:20 -04:00
1141f6fb35 Add !setpos debug command to forcefully move the player
This is useful in some territories where you might not spawn in the correct
position. It currently locks up movement afterwards, but it's still useful.
2025-03-13 19:52:01 -04:00
74f7554aa8 Support the GM command for changing territories 2025-03-13 00:41:16 -04:00
34aa046b21 Fix padding in Player Spawn IPC data
I spent HOURS fixing this, only to realize that it was all offset by 16 bytes. I
hate myself.
2025-03-13 00:02:37 -04:00