Commit graph

13 commits

Author SHA1 Message Date
Fate-JH b17d699b5f
Decode Packets, Again (#1156)
* fixing issue where the iterator of a closed stream produces no output; added option to include an entire directory of input files; streamlined workflow between gcapy and preprocessed files

* added documentation; restored functionality of the source's iterator; tidied code

* restored functionlaity/reliability of skip-existing and management of duplicate files and file cleanup; added exclusive log for decode error messages

* collects all literal decode errors falling through the logging cracks

* finally eliminating log spam; tidying up the decoded log files's format

* better subclassing and management of the decoy OutStream

* tightening of the noose

* fixing the readme to account for the -f flag
2023-12-19 14:52:12 -05:00
Fate-JH 6f4ceaee29
Utility Vehicle Drivers (#1102)
* recalcalating name offsets for later; primary test is this player-driven AMS (see PSMU for details)

* found fields in the ConnectToWorldRequest packet; clarifying field names in a variety of places; enough modifications to make an old packet transcode properly

* it works?

* giving VehicleFormat its own file; fixing imports
2023-05-30 13:05:38 -04:00
Jakob Gillich 77263833fa
client: zone to z1 after login 2023-04-14 14:12:53 +00:00
Jakob Gillich 6584bdff9b
update client: implement character creation, log in 20 characters 2023-04-14 14:12:50 +00:00
Jakob Gillich 0d4a5ad40e basic client
it's able to join the world and perform basic state updates. packet parsing is very primitive.
2022-05-17 19:20:57 +02:00
Fate-JH e58f1d5987
Amenity Auto-Repair (#594)
* working proof of concept for ntu request/flow

* ntu is now measured in Float rather than Int; adjusted the type declarations in ChatActor, as it was complaining

* added auto repair information for amenities; modified terminal working example to include periodic repair timer

* crude power state acknowledgement exchange between ntu silo and building, following by building and amenities; better management and control over auto-repair

* separated auto-repair from terminal control; resource silo publishes an appropriate power state message upon formal start-up

* various Damageble objects have been granted auto-repair; doors no longer report no event for intercepting unhandled messages

* documentation and comments; unit tests and integration tests for AmneityAutoRepair, ResourceSilo, and BuildingActor

* merge plus some fixes

* addition checks for auto-repairing cavern equipment and for auto-repairing un-owned equipment
2020-10-03 00:13:41 -04:00
Jakob Gillich 4dd414589b
Fix client not compiling 2020-09-27 00:08:39 +02:00
Jakob Gillich 407429ee21 Networking
The game uses a UDP-based protocol. Unlike TCP, UDP does not guarantee that
packets arrive, or that they arrive in the correct order. For this reason,
the game protocol implements those features using the following:

* All packets have a sequence number that is utilized for reordering
* Important packets are wrapped in a SlottedMetaPacket with a subslot number
* RelatedA packets ae used to request lost packets using the subslot number
* RelatedB packets are used to confirm received SlottedMetaPackets

All of these go both ways, server <-> client. We used to only partially
implement these features: Outgoing packet bundles used SMPs and could be
resent, but not all packets were bundled and there was no logic for requesting
lost packets from the client and there was no packet reordering, which resulted
in dire consequences in the case of packet loss (zoning failures, crashes and many
other odd bugs). This patch addresses all of these issues.

* Packet bundling: Packets are now automatically bundled and sent as
  SlottedMetaPackets using a recurring timer. All manual bundling functionality
  was removed.

* Packet reordering: Incoming packets, if received out of order, are stashed and
  reordered. The maximum wait time for reordering is 20ms.

* Packet requesting: Missing SlottedMetaPackets are requested from the client.

* PacketCoding refactor: Dropped confusing packet container types. Fixes #5.

* Crypto rewrite: PSCrypto is based on a ancient buggy version of cryptopp.
  Updating to a current version was not possible because it removed the
  MD5-MAC algorithm. For more details, see Md5Mac.scala.
  This patch replaces PSCrypto with native Scala code.

* Added two new actors:
  * SocketActor: A simple typed UDP socket actor
  * MiddlewareActor: The old session pipeline greatly simplified into a
    typed actor that does most of the things mentioned above.

* Begun work on a headless client

* Fixed anniversary gun breaking stamina regen

* Resolved a few sentry errors
2020-09-26 23:58:09 +02:00
Jakob Gillich f4fd78fc5d Restructure repository
* Move /common/src to /src
* Move services to net.psforever package
* Move /pslogin to /server
2020-08-26 06:19:00 +02:00
Jakob Gillich 3bdc681c9d Avatar Persistence
* Add AvatarActor: Responsible for managing the session's avatar object
* Convert Avatar object to case class
* Add persistence for BEP, CEP, implants, certs and cosmetics
* Add cosmetic chat commands and handle UI packet
* Add /setbr, /setcr, /certadd, /addbep, /addcep GM commands
* Convert zone maps to JSON
* Update to Scala 2.13.3 and fix warnings
* Fix MAX cooldowns not being applied when purchased manually
* Normalize database table names to singular
* Add docker image build
2020-08-22 16:19:13 +02:00
Jakob Gillich 116860b3be
XTools V3
* Use command line interface instead of hard-coded paths
* Takes in both .gcap and parsed gcapy files
* Add pack config to allow system-wide installation
* Slightly change output format from [C|S] -> [C|s] to C [<<<|>>>] S
* Add some documentation to README
2020-06-10 14:26:32 +02:00
Mazo 46bd2aca50 Include a copy of the old xtoolspar for historical reference 2020-06-05 21:08:57 +01:00
Mazo 094cb3046f Move XToolsV2 into a new tools/decode-packets project 2020-06-05 21:08:54 +01:00