diff --git a/README.md b/README.md index 967d81f..3608912 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,57 @@ -# SoD-Off - School of Dragons, Offline +# SoDOff - School of Dragons, Offline -On 7th June, 2023, School of Dragons announced they were "sunsetting" the game, and turning the servers off on the 30th of June. -At that time, SoD-Off was born. Currently, it is an (almost) complete implementation of the API server for SoD (and some other JS games). +On 7th June 2023, School of Dragons announced they were "sunsetting" the game, and turning the servers off on the 30th of June. +At that time, SoDOff was born. Currently, it is an almost complete implementation of the School of Dragons API server (and some other JS games). It allows you to run SoD offline as well as host private online servers. -We provide also MMO server implementation for SoD (https://github.com/SoDOff-Project/sodoff-mmo). -We recommend using it even in offline mode, as some aspects of the single-player game depend on the MMO connection. +We also provide MMO server implementation for SoD (https://github.com/SoDOff-Project/sodoff-mmo). +It is recommended to use the MMO server even when offline, as some aspects of the single player game depend on MMO. -## Discord -[![Discord Banner](https://discordapp.com/api/guilds/1124405524679643318/widget.png?style=banner2)](https://discord.gg/bqHtMRbhM3) - -## Licence - -SoD-Off is open source, distributed under [AGPL](LICENSE) license. -This license does not cover resources obtained from the game or from responses of original api distributed with the API server, especially: - `missions.xml`, `items.xml`, `allranks.xml` and `store.xml` files from `src/Resources` directory and files inside `src/assets` directory. +## License +SoDOff is open source, distributed under the [AGPL](LICENSE) license. +This license does not cover resources obtained from the game or from responses of the original API distributed with the API server, especially: + `missions.xml`, `items.xml`, `allranks.xml` and `store.xml` files from the `src/Resources` directory and files inside the `src/assets` directory. ## Getting started -You need dotnet 6.0 SDK to build api server from sources. To do this (and start server) just run: +To build the API server from sources, you'll need the dotnet 6.0 SDK. Simply run the following command to build and start the server: ``` dotnet run --project src/sodoff.csproj ``` -### Modify client +### Modifying the Client -To play game you need to modify game client to use `http://localhost:5001/.com/DWADragonsUnity/` instead `http://media.jumpstart.com/DWADragonsUnity/` for getting main XML config file (`DWADragonsMain.xml`). -You can do this editing `DOMain_Data/resources.assets` in hex-editor and replace those URLs. +To play the game you need to modify the game client to use `http://localhost:5001/.com/DWADragonsUnity/` instead of `http://media.jumpstart.com/DWADragonsUnity/`. +You can do this by editing `DOMain_Data/resources.assets` in a hex-editor and swapping the URLs. -### Server configuration +### Server Configuration -Most configuration of server is set in `appsettings.json`. See `"// ..."` keys in this file for options description. +Most of the server configuration is stored in `appsettings.json`. Check out the "// ..." keys in there for descriptions of different options. -#### supported clients +#### Supported Clients -Each version of supported client need own file `assets/DWADragonsUnity/{PLATFORM}/{VERSION}/DWADragonsMain.xml`. -By default (can be changed in `appsettings.json`) files for version 2.5.0 and newer will be automatically encrypted (in accordance with the client's expectations). +For each supported client version, there must be a corresponding file located at `assets/DWADragonsUnity/{PLATFORM}/{VERSION}/DWADragonsMain.xml`. +By default (modifiable in appsettings.json), files for version 2.5.0 and newer will be automatically encrypted to meet the client's requirements. -Sample file for `{PLATFORM} = WIN`, `{VERSION} = 3.31.0` is provided. -It assumes that the server address is `localhost:5000` (for api) and `localhost:5000` (for assets). When running a public server, the addresses must be adjusted. +A sample file is provided for `{PLATFORM} = WIN`, `{VERSION} = 3.31.0`. +It assumes that the server address are `localhost:5000` (API) and `localhost:5001` (assets). -#### asset server +#### Asset Server -Multiple options of asset server can be customized. Most important of them is `ProviderURL` indicating the source of assets downloading in `partial` mode. -By default it's set to archive.org. Please do not abuse this server (especially do not disable `UseCache` option and do not get rid of `asset-cache` dir content). +Various settings for the asset server are customizable, with the key one being `ProviderURL`, which specifies the source for downloading assets in `partial` mode. By default, it's configured to use archive.org +Please do not abuse the archive.org server, do not disable the `UseCache` option and do not delete the contents of the `asset-cache` directory. -#### listening address/port +#### Listening address/port -By default server listening on all IPv4 and IPv6 addresses on ports 5000 (api) and 5001 (assets). -This can be changed in `appsettings.json`, but it can also requires changes in `DWADragonsMain.xml` and in clients (on change assets server address) +By default, the server listens on all IPv4 and IPv6 addresses on ports 5000 (API) and 5001 (assets). +You can tweak this in `appsettings.json`, but it might also mean adjusting `DWADragonsMain.xml` and updating clients to reflect the changes in the asset server address. -### Server side modding - -Server support server side modding like adding new items, adding them to store without modification server source. -For details see [src/mods/README-MODDING.md](src/mods/README-MODDING.md). +### Server Side Modding +The server supports server side modifications, which includes adding new items and putting them in the store without having to modify the server source code. +For more information, check out [src/mods/README-MODDING.md](src/mods/README-MODDING.md). ## Status diff --git a/src/mods/README-MODDING.md b/src/mods/README-MODDING.md index e5c7f60..1a3b61d 100644 --- a/src/mods/README-MODDING.md +++ b/src/mods/README-MODDING.md @@ -1,47 +1,47 @@ -# Server side modding +# Server Side Modding -## Mod installations +## Mod Installation -Place mods as directory inside `src/mods`. -The mod directory must contain `manifest.xml` file in the first directory tree level. +Place mods as individual directories inside `src/mods`. +Each mod folder must contain a `manifest.xml` file at its top directory level. For example: `src/mods/MyFirstMod/manifest.xml` ## `manifest.xml` syntax -Root node for `manifest.xml` is ``. It can contain child nodes: +The root node in `manifest.xml` is ``. It can include the following child nodes: * `` - item database manipulation * `` - store database manipulation (not implemented yet) * ... -### item database manipulation +### Item Database Manipulation -`` may contain may `` child nodes. Each of them define one item modification. Modification type can be specified by `action` attribute, supported values: +`` may contain `` child nodes. Each of them defines one item modification. The modification type can be specified by the `action` attribute. The supported values are: * `add` - add new item - * default when no `action` attribute + * default if the `action` attribute is not present * `remove` - remove item -* `replace` - replace item definition for existed item id +* `replace` - replace item definition for an existed item ID -`` node may contains subnodes: +`` may contain the following subnodes: -* `` - specify item id - * if not used item id will be read from item definition in `` -* `` - specify store id to add item to them - * can occur multiple times - * if not used item will be not added to any store -* `` - item definition (syntax like `` node in [src/Resources/items.xml](../Resources/items.xml)) - * can be committed in `remove` action` +* `` - item ID + * if not used, the item ID will be retrieved from the item definition within `` +* `` - specifies the store ID to which the item will be added + * can be used multiple times + * if not used, the item will not be added to any store +* `` - item definition (syntax like the `` node in [src/Resources/items.xml](../Resources/items.xml)) + * can be omitted in the `remove` action #### Example -* remove Toothless ticket item (item id `8034`) -* add Night Furry Egg item (item id `29999`) and add it to store (store id `92`, for store description see comment in [src/Resources/store.xml](../Resources/store.xml). -* item id (for new items) should be unique to avoid mod collision, recommended format to use: `prefix * 10000 + private_id`, where: - * `prefix` must be grater than 2 to avoid collision with original game and official SoDOff items - * `prefix` is unique mod author prefix (see SoDOff discord for details) - * `private_id` is for digit number (0-9999) to free use by the this author - * for example for `prefix = 789` and `private_id = 13` item id will be `7890013` +* remove the Toothless ticket item (item ID `8034`) +* add a Night Furry Egg item (item ID `29999`) and add it to store (store ID `92`, for store description see comment in [src/Resources/store.xml](../Resources/store.xml)) +* The item ID for new items should be unique to prevent mod collisions. The recommended format is: `prefix * 10000 + private_id`, where: + * `prefix` must be grater than 2 to avoid collision with the original game and official SoDOff items + * `prefix` is a unique mod author prefix + * `private_id` ranges from 0 to 9999 and is available for unrestricted use by the author + * for instance, if `prefix = 789` and `private_id = 13`, the item ID would be `7890013` ```