An open source client for Endless Online written in C#
As of 2020-05-09, this project is relicensed under the MIT license. Older versions of the code are still licensed under the GNU GPLv2 license. The tag gplv2
has been added to the final commit for which this project is licensed under the GPLv2.
- Contributing
- Getting started
- Todo list
- New features (also todo)
- Changes from the Original Client
- Included Utility Projects
- EOBot
Source builds require Visual Studio, the .Net 6.0 SDK, and the .Net 3.1 runtime (for building content with the MonoGame content builder pipeline tool). Other dependencies are installed via Nuget. MonoGame no longer needs to be installed ahead of time!
.Net 6.0 runtime is required to run the pre-built binary.
See releases on GitHub for Linux and Windows binaries. .Net 6.0 runtime must be installed.
Download the appropriate release for your platform, then copy the data directories (data, gfx, jbox, mfx, sfx) from whichever client you normally use to EndlessClient's unzip location. Run EndlessClient by double-clicking the icon (any platform) or running ./EndlessClient
(Linux).
After installing, clone (or fork+clone) this repository locally and open the solution in your IDE of choice for your platform.
⚠️ If you have previously built EndlessClient, you mean need to clear your dotnet tool cache and nuget package cacheRun the following commands:
dotnet nuget locals all --clear
- Windows:
rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache
- Linux:
rm -rf ~/.dotnet/toolResolverCache
⚠️ If you get build errors due to formattingRun the following commands:
- Windows:
dotnet format EndlessClient.sln
- Linux:
dotnet format EndlessClient.Linux.sln
- Download and install the .NET 6.0 SDK (x64).
- Link the binary to so it's in path
sudo ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin/dotnet
- Install XCode from the AppStore
- Run
dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient
- The build will fail due to a using alias already being declared
- Run
echo '' > EndlessClient/obj/Debug/net6.0-macos/osx-x64/EndlessClient.GlobalUsings.g.*.generated.cs
- Run the build again
dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient
Problem: error NETSDK1139: The target platform identifier macos was not recognized.
Solution: run the command sudo dotnet workload restore EndlessClient/EndlessClient.csproj
which will install the macos workload for you.
See the Github issues for planned features. Anything marked with the 'in progress' label is actively being worked on.
Here's a working list of things I want to add that would be additional features on top of the original client specs:
- Use built-in patching system prior to log-in to transfer files
- More than 3 characters per account
- Trading items between characters on the same account
- Better display scaling, resizable display
- Timed map weather systems
- Passive skills
- Better inventory
--host Overrides the server set in the config file with a different value. Convenient for testing against different servers from Visual Studio, since the build process will overwrite the configuration file in the output directory.
--port Overrides the port set in the config file with a different value.
--version Overrides the version set in the config file or hard-coded into the client. Convenient for connecting to different servers that might require different version numbers.
--account_delay_ms Sets the delay when creating an account. Some servers enforce a specific limit. Defaults to 2 seconds if unset.
For easily switching servers, there's a version number config setting so it isn't limited to the hard-coded value build into the client by default. This can be set by server operators, or you can use the --version
command line argument.
Since the transition was pretty quick between maps, I added a cool little animation that slowly fades tiles in starting from the player and moving outward. This can be disabled in the config file if you don't like it.
Some of the audio files (sfx) from the original client are malformed. The WAV format includes in the header a length of the file in bytes - and for certain files, this length was different than the actual length of the audio data. The original client was able to read these without a problem, as were programs such as Windows Media Player and Audacity. However, the C# code for loading sound in XNA was throwing an exception for these audio files because of the improper length.
Part of the sound processing involves reading the audio data and rewriting the length to the WAV file if the length in the file is incorrect. This modification will occur for any invalid WAV files.
A configuration file is included with that controls how hat items are rendered. This file is based on the EO main hat items. For example:
186 = Facemask # Bandana
187 = Standard # Mystic hat
188 = HideHair # Hood
Item ID 186 will render as a facemask (below hair), 187 will render over hair, and 188 will hide hair entirely.
The in-game experience can be modified for larger displays by setting the following configuration options in config/settings.ini
:
[SETTINGS]
InGameWidth=1280
InGameHeight=720
This enables "resizable" mode, using the default window size specified. The game window can be further resized. The minimum window size is 640*480.
While resizable mode is enabled, hud panels may be toggled on/off. Multiple hud panels may be visible on-screen at once. Hud panels may also be rearranged by dragging and dropping the panel itself to a different area of the screen. Additionally pressing the keyboard shortcut alt
+{num}
will toggle the appropriate panel, with inventory = 1, minimap = 2, etc. alt
+~
will bring the news panel back up, but this panel is subsequently hidden whenever another panel is toggled.
Removing either of these configuration options or setting them to zero will disable resizable mode and the in-game experience will remain unchanged.
There are a few other projects included with the EndlessClient solution that are designed to make the development process much easier.
The core projects are EndlessClient and the EOLib projects under the "Lib" solution directory. They are the only required projects in order for the game to run.
Any projects with a ".Test" suffix in the name contain unit tests. These will be expanded for as much code coverage as possible.
BatchMap is designed to do batch processing and error correction on the original EMF files. When running EOSERV with the default map files, a number of warning messages during map loading will pop up. BatchMap processes files and corrects these errors so that the output of EOSERV is much less verbose when starting up.
BatchMap corrects for a number of errors, including:
- Tiles out of map bounds
- Warps out of map bounds
- NPC spawn using non-existent NPC
- NPC spawn out of map bounds
- NPC spawn is invalid (ie NPC may not be able to spawn in area)
- Chest spawn using non-existent item
- Chest spawn pointing to non-chest
BatchMap can easily be modified to take care of other batch processing tasks, such as dumping out values in map files for debugging or comparison.
BatchPub is designed to do batch processing of items within the EIF file. It can be used to bulk change properties in the pubs based on certain criteria.
EOBot has recently been updated with an interpreter to make scripting of bots possible. The scripting language is the unholy offspring of javascript and php (really just inspired by the syntax of those languages). Run EOBot --help
without any arguments to see more information on the command-line parameters it expects.
The default behavior of EOBot when not running in script mode is as a TrainerBot. See TrainerBot.cs
for more details on the implementation.
EOBot is used by https://www.github.com/ethanmoffat/etheos to execute integration tests against server instances.
PacketDecoder analyzes raw WireShark packet data. It provides a way to decode the raw data and convert the byte stream into values used in EO.