Skip to content

Conversation

@Jump-Suit
Copy link
Contributor

@Jump-Suit Jump-Suit commented Dec 30, 2025

SSFW Server based on MultiServer3 prior to Agent's MS4 merge, however it is FEATURE COMPLETE now.
Ported from my fork of MS3, adapted to MS4 now in this PR.

Spent the past week or two on those off-and-on when I can, but am pleased with the results.
This is a experimental release consisting of the following changes, please test extensively:

NEW

  • PlayerLookupService - Simply returns the ServerServices(ss) PersonId
  • TradingService - Apart of the Inventory.lua system with Rewards Inventory, micromanages handling of trading in this case cards between two clients.
  • FriendsService - Currently used in SoundShapes, however can easily be coded in lua (which i might do) in PS Home to support this service

Updated

  • Moved Login code to IdentityService
  • Moved KeepAlive/Ping to KeepAliveService
  • Redundancy but consistency change for AvatarService
  • AuditService with 2 debug endpoints for returning a list of a player's event logs
  • Reward Inventory Service with 2 debug endpoints to WipeInventory, or DeleteCardTrackingData only, AdminRole gated.
  • AdminObjectService to have a helper function IsAdminVerified for other areas to check if IGA is granted in config than just AdminObjectService only.

Additional Commit changes:

  • Externalize the two default layouts into the repo on build, additionally adds 4 new envs.
  • Move the KeepAlive Regex pattern to constant for clarity.
  • Optimizes TradingService json serializing and inheritance for responding appropriately.
  • Adjusts Status endpoint for bullet point 3.
  • Adjusts RewardServiceInventory error to return TrackingGUID variable simply.
  • Fix some .cs missing usings.
  • Moved functions out of Misc.cs and eliminated it from the csproj as the helper functions and classes were better positioned for consistency.
  • Moved GetFileList debug endpoints to "new" SaveDataService for consistency.
  • Moved Scenelist parser to FileHelper
  • Fixes typo in status response message along with some small code tweaks for JSON serializer, added missing ownerId entry, fix the error response for null existing trades.
  • Fixes double slash in counts folder path along with function/log edits for consistency to what they do.
  • Further adjusts AvatarService to move the code from Processor to inside the Service itself.
  • Move HomeEnvs to Program.cs along with ExtractPortion
  • UserData now is in SSFWAccountManagement.
  • Made various function and variable methods static and readonly ( static if not accessing instanced data, and readonly if data isn't being written too, only instantiated when the class is created and passed through there)
  • Moves SSFWServerConfiguration to seperate class for clarity.
  • Optimize Jsonproperty declaration based on Visual Studio info messages.
  • Added null checks for cases where it should NOT be null to reduce warnings.
  • Moves more Regex GUID checks to GUIDValidator.
  • Fix SSFWProcessor compile error on static instanced methods.
  • Added DEBUG AchievementService GET endpoint.

NOTE: With the Release of MS4, these changes are no longer nessecary.

  • GUIDGen Base64 key gen to also be standalone helper function.
  • Duplicated legacykey code in SSFW to reduce filesize by 1.5mbs overall with the removal of WebAPIService dependency.

…on build, additionally adds 4 new envs.

- Move the KeepAlive Regex pattern to constant for clarity.
- Optimizes TradingService json serializing and inheritance for responding appropriately.
- Adjusts Status endpoint for bullet point 3.
- Adjusts RewardServiceInventory error to return TrackingGUID variable simply.
- Fix some .cs missing usings.
@Jump-Suit
Copy link
Contributor Author

I've updated the PR with changes based on the feedback.

…for use elsewhere in SSFW.

Further optimize TradingService Status json serializer response.
- Moved functions out of Misc.cs and eliminated it from the csproj as the helper functions and classes were better positioned for consistency.
- Moved GetFileList debug endpoints to "new" SaveDataService for consistency.
- Moved Scenelist parser to FileHelper
- Fixes typo in status response message along with some small code tweaks for JSON serializer, added missing ownerId entry, fix the error response for null existing trades.
- Fixes double slash in counts folder path along with function/log edits for consistency to what they do.
- Further adjusts AvatarService to move the code from Processor to inside the Service itself.
- Move HomeEnvs to Program.cs along with ExtractPortion
- UserData now is in SSFWAccountManagement.
@Jump-Suit
Copy link
Contributor Author

My final optimization sweep on the SSFW additions until others chime in.

@Jump-Suit
Copy link
Contributor Author

Additionally i've updated the original post comment to reflect all the new changes.

Copy link
Contributor

@ZephyrCodesStuff ZephyrCodesStuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's at least one other service (ClanService) currently using a hardcoded JSON response approach, instead of a proper class.

Aside from that, the rest looks alright.

- Fixed reference on ExtractPortion in IdentityService on compile
- Made various function and variable methods static and readonly, static if not accessing instanced data, and readonly if data isn't being written too, only instatiated when the class is created.
- Moves SSFWServerConfiguration to seperate class for clarity.
- Optimize Jsonproperty declaration based on Visual Studio info messages.
- added null checks for cases where it should NOT be null to reduce warnings.
- Moves more Regex GUID checks to GUIDValidator.
@Jump-Suit
Copy link
Contributor Author

For feature and function sake, this is fine for ClanService since it isn't too elaborate. If you would like to address further serialization efforts across SSFW, this should be discussed preferably in another PR on this topic, or a issue opened than outside the scope of the PR itself.
I've completed my feature additions, optimizations, and refactors that I see fit, alongside your feedback. Thank you.

- Fix SSFWProcessor compile error on static instanced methods.
- Added DEBUG AchievementService GET endpoint.
- Add missing entries to generate the SSFWLayoutsFolder in the serverconfig
- Updated WebService SessionId header to match Home Client for consistency.
@GitHubProUser67
Copy link
Owner

Ok, thanks booth of you for an initial code checkup, I will do my own now, and then it will be merge ready. It will be minor stuff as the code is nicely done, so hopefully it will not be long (probably next week the merge).

- Adjusts some Log comments to be enabled only on DEBUG compile

- Removed identityService login dispose
- Some new() code simplification

- Added ReadOnly ConcurrentBag declaration for homeEnvs

- Added a version check function filter for specific filtering if a player is on two different home clients at same time with SSFW.. If so this helps somewhat mitigate that collision.
@Jump-Suit
Copy link
Contributor Author

All review comments have been resolved and adjusted for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants