Skip to content

A set of .NET libraries and applications that support hosting components of an XI game server.

License

Notifications You must be signed in to change notification settings

CarbyShop/xi-host

Repository files navigation

xi-host

XI Host is a set of .NET libraries and applications that support hosting components of an XI game server.

State of the Code

XI Host is in the refinement, refactoring, and functional parity phases with LandSandBoat server. It is the intent of this software to provide an alternate solution to the login (and/or messaging and world) functionality and not a direct port.

Please familiarize yourself with the expectations indicated in CONTRIBUTING.md and CODE_OF_CONDUCT.md.

License

GNU GPL v3

Requirements

  1. Visual Studio 2022 or MS Build Tools 2022
  2. .NET 6.0
  3. An OS capable of running the above stuff

Building On Windows For

Debug mode will build assemblies with placeholder information. Release mode will build assemblies with dynamic information.

Windows

Nothing special.

Linux

dotnet publish XI.Host.sln -c Release --os linux --self-contained

The above command will not output some required files to the publish directory. Use these commands from the Solution root.

copy /Y host.json "Output\net6.0\linux-x64\publish\host.json"
xcopy "clrzmq4\build\amd64" "Output\net6.0\linux-x64\publish" /Y

Use your favorite way to zip the published files for transport to Linux, or use the following PowerShell command.

Compress-Archive 'Output\net6.0\linux-x64\publish' -DestinationPath 'Output\net6.0\linux-x64\XI.Host.zip'

Building On Linux

Untested. PowerShell may be necessary (or delete the PowerShell call in the pre-build step in the Common project).

Running

Overview

  • Update the Solution Items' host.json with the location of the server settings (relative or absolute) path.
  • Build or rebuild the solution (Release mode will version the assemblies with the current days' date).
  • Make sure all game server applications are closed.
  • From the output directory, run the World App. World App may fail to bind if the map servers are already running.
  • Run the xi_search and map applications.
  • From the output directory, run the Login App.

On Windows

All details in this section are optional.

In the case of a fresh Windows Server instance. Update the admin account, so that the credentials do not expire.

WMIC USERACCOUNT WHERE Name='admin' SET PasswordExpires=FALSE

Check expiration with:

net user admin | findstr /C:expires

If Japanese Standard Time is needed, run the following command, and then reboot:

tzutil /s "Tokyo Standard Time_dstoff"

Add in-bound rules to the firewall as necessary. For example:

netsh advfirewall firewall add rule name="XI Login 54230" dir=in action=allow protocol=TCP localport=54230

On Linux

Make sure to set these files with execute permission. For example:

chmod +x XI.Host.Login.App
chmod +x XI.Host.World.App

Update ServerSettingsDirectory host.json value with the relative or absolute path to the server settings. For example:

from
"ServerSettingsDirectory": "../server/settings",
to
"ServerSettingsDirectory": "../../your-server/settings",

To run, always start the World App first, as it needs to bind the socket to work properly. Also, do not close the World App and leave xi_map running, as one of the xi_map will attempt to bind to the same socket, which is typically only allowed once for all application running on the system. Refer to the following example order:

./XI.Host.World.App
./xi_search
./xi_map --ip 1.1.1.1 --port 54230
./xi_map --ip 1.1.1.1 --port 54231
./XI.Host.Login.App

Wait for all xi_map instances to report ready, check maintenance mode is correct (either on or off), and then start the Login App. This will ensure players attempting to select a character after logging in can also zone-in without black screen waiting.

Note: Going between maintenance mode on and off requires restarting Login App.

Debugging

Visual Studio

  1. If the client reports (for example) error 3308, search (Ctrl + F) for 308, and a result should be found in Common.Response project.
  2. Left-click on an entry in the Find pane to navigate automatically to the entry.
  3. Right-click on the constant name, and then select Find All References from the context menu.
  4. In the references pane, cycle through each entry, and, for each, left-click the breakpoint bar on the left side of the code editing pane to set a breakpoint (indicated by a red dot).
  5. Repeat the action that caused the initial client error, and then one of the breakpoints should get hit.

Waiting too long at any breakpoint will cause the client to timeout.

Testing

Checklist

  1. Able to login
  2. Able to logout from the title screen
  3. Able to login again after logging out from the title screen
  4. Able to create a character
  5. Able to create a second character
  6. Able to select a character and zone-in
  7. TODO: Able to delete a character
  8. Able to /say and others see it
  9. Able to /shout and others see it
  10. Able to /yell and others see it
  11. Able to /tell and the expected player sees it
  12. Not able to /party when not in a party
  13. Able to join a party
  14. Able to /party and other party members see it
  15. Able to leave a party
  16. Able to disband a party
  17. Able to join an alliance
  18. Able to /party and the alliance sees it
  19. Not able to /linkshell when not in a linkshell
  20. Able to join a linkshell by equiping a pearl
  21. Able to /linkshell and linkshell members see it
  22. Able to promote a linkshell member from pearl to sack
  23. Able to see auction sales when they happen
  24. Able to logout to the title screen, re-select a character, and zone-in
  25. Able to login with multiple accounts from the same IP address
  26. FIX: Not able to return to the title screen from a computer with multiple accounts logged in
  27. Able to return to the title screen from a computer that had multiple accounts logged in
  28. TODO: Able to logout to the title screen from a computer with multiple accounts logged in
  29. GM characters are able to send system messages and others see it
  30. GM characters can use various commands, such as !bring, !goto, and !jail as expected

Behavioral Notes

  • This code manages memory and network connections gracefully. It should not require restarting.
  • In combination with xiloader updates made in branch xi-host, login and logout of multiple game clients from the same IP address is supported.
  • If maintenance is on, only accounts with GM characters can login and any non-GM character on the account will fail to character select with a world server maintenance error message. This reduces stress on the login during maintenance, so that accounts with GM characters can login with priority.

Not Implemented

  • Renaming of a character that has been marked for rename by the server administrator.

Credits and History

This software was originally ported from Darkstar Project and re-designed by Brian Kesecker specifically for Eden Server in February 2020. See the State of the Code section for what is currently going on.

About

A set of .NET libraries and applications that support hosting components of an XI game server.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages