Add some mod docs info

This commit is contained in:
NGnius (Graham) 2021-03-18 15:30:30 -04:00
parent 14a5fc8a54
commit 7c304c8bdc

View file

@ -16,7 +16,7 @@ You can make sure CLre can find all of `.dll` files it needs by copying your Car
You can also create a symbolic link to your Cardlife install folder named `cl` in the same spot to avoid having to re-copy files.
For example, if you cloned the repo into a folder called `CLre_repo`, this is what your folder structure would look like.
If you decide to change the `cl` folder configuration, do not commit your `CLre.csproj` file otherwise your changes will be rejected.
If you decide to change the `cl` folder configuration, do not commit changes to your `CLre.csproj` or `CLre_server.csproj` files otherwise your changes will be rejected.
```
CLre_repo/ <- CLre git project files
@ -28,10 +28,11 @@ cl/ <- CardLife files
Cardlife_Data/
Managed/ <- Cardlife C# Assemblies
CardlifeGameServer_Data/
Managed/ <- Cardlife Standalone Server C# Assemblies (optional)
Managed/ <- Cardlife Server C# Assemblies (optional)
```
For any mod to work, you will have to patch your game with the Cardlife adaptation of [CLIPA](https://git.exmods.org/NGnius/CLIPA).
For any game mod to work, you will have to patch your game with the Cardlife adaptation of [CLIPA](https://git.exmods.org/NGnius/CLIPA).
FOr a server mod to work, you will have to patch the server (CardlifeGameServer.exe).
The installation process is roughly the same as for Gamecraft, except with a different name: [GCIPA Gamecraft install guide](https://git.exmods.org/modtainers/GCIPA/src/branch/master/README.md#how-to-install).
## Building
@ -44,4 +45,64 @@ If it doesn't work and you can't figure out why, ask for help on the [Exmods Dis
## Installation
To install the CLre mod, copy the build's `CLre.dll` into the `Plugins` folder where Cardlife is installed.
To install the CLre mod, copy the build's `CLre.dll` into the `Plugins` folder where Cardlife is installed.
To install the CLre_server mod, copy the CLre_server build's `CLre_server.dll` into the `Plugins` folder where Cardlife is installed.
## A Note on CLre and CLre_server mods' (lack of) cooperation
CLre is designed for the Cardlife client, and cannot be used to mod the Cardlife server.
Similarly, CLre_server is designed for the Cardlife server, and cannot be used to mod the Cardlife client.
DO NOT install CLre and CLre_server in the same `Plugins` folder, because both mods will be loaded -- guaranteeing one will break.
To install CLre and CLre_server on the same computer, create a copy of the game installation and use one copy for CLre and one for CLre_server.
# Functionality
## CLre
CLre provides a minimal modding API and useful bugfixes for the Cardlife client.
### Fixes
As of v0.0.1, six (6) bugfixes are implemented.
- InitLogSooner: Start the logger slightly sooner than Cardlife does [TARGET: CustomLoggerThread] [ID: 0] (0M/2P/1I/0W/0A/0D/3T)
- EnchantmentTableFloatParseFix: [MORE: https://trello.com/c/qawBFb7P/1-enchantment-table-fails-to-work] [ID: 1] (0M/2P/0I/0W/0A/0D/2T)
- ExclusionImprovement: [MORE: https://trello.com/c/Ue4yIqWQ/11-placing-material-in-restricted-areas] [ID: 2] (0M/2P/0I/0W/0A/0D/2T)
- ClientDurabilityNodeErrorRemover: [MORE: https://trello.com/c/YT3VbXpZ/15-durability-log-error] [ID: 3] (0M/2P/0I/0W/1A/0D/3T)
- CooldownCrossSlotSync: [MORE: https://trello.com/c/65FPrTjK/12-no-cooldown-between-inventory-slots] [ID: 4] (0M/1P/0I/0W/0A/0D/1T)
- ScrollSpeedImprovement: [MORE: https://trello.com/c/elL8IVdn/4-scroll-menus-are-insensitive] [ID: 5] (0M/1P/0I/0W/0A/0D/1T)
### API
Basic engine registration and some events are exposed for modders to use.
Documentation WIP...
## CLre_server
CLre_server provides a minimal modding API, admin HTTP server, and bugfixes for the Cardlife server.
### Fixes
As of v0.0.1, one (1) bugfix is implemented.
- InitLogSooner: Start the logger slightly sooner than Cardlife does [TARGET: CustomLoggerThread] [ID: 0] (0M/2P/1I/0W/0A/0D/3T)
### API
Basic engine registration and some events are exposed for modders to use.
Documentation WIP...
### HTTP Server
The HTTP server is enabled by the `-web` command line argument.
It is disabled by default to reduce resource usage.
When enabled, the server will listen on http://localhost:5030 and provide basic server status information.
This can be accessed through any standard web browser on the same computer.
If you wish to make this publicly accessible, it is recommended to use Nginx or another web proxy system to proxy traffic to that port securely.
Useful endpoints
```text
GET / HTML landing page with some basic server info
GET /l/current Server output log, up-to-date as of last webpage refresh
GET /d/version Cardlife, Unity and CLre version information
GET /status.json Useful status information about players and server state in JSON format
GET /c/game.json Basically GameServerSettings.json for the running Cardlife server
```