Unofficial CardLife revival project, pronounced like "celery"
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. # CLre
  2. Always eat your celery, so you'll grow up to be big and strong like me.
  3. Work-in-progress mod for [Cardlife](http://Cardlifegame.com/).
  4. Cardlife has stopped receiving updates, but that doesn't mean it's free from bugs.
  5. CLre is a mod to rejuvenate Cardlife by fixing old bugs and adding some modding sprinkles.
  6. ## Development
  7. ### Setup
  8. This project requires most of Cardlife's `.dll` files to function correctly.
  9. Most, but not all, of these files are stored in Cardlife's `Cardlife_Data\Managed` folder.
  10. The project is pre-configured to look in a folder called cl in the solution's main directory or one level up from that.
  11. You can make sure CLre can find all of `.dll` files it needs by copying your Cardlife folder beside this repo's folder and renaming it to `cl`, but that's a bit of a waste of disk space.
  12. 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.
  13. For example, if you cloned the repo into a folder called `CLre_repo`, this is what your folder structure would look like.
  14. 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.
  15. ```
  16. CLre_repo/ <- CLre git project files
  17. CLre/ <- Code files
  18. README.md <- This file
  19. etc.
  20. cl/ <- Cardlife files
  21. Cardlife_Data/
  22. Managed/ <- Cardlife C# Assemblies
  23. CardlifeGameServer_Data/
  24. Managed/ <- Cardlife Server C# Assemblies (optional)
  25. ```
  26. 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).
  27. FOr a server mod to work, you will have to patch the server (CardlifeGameServer.exe).
  28. 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).
  29. ### Building
  30. After you've completed the setup, open the solution file `CLre.sln` in your prefered C# .NET/Mono development environment.
  31. I'd recommend Visual Studio Community Edition or JetBrains Rider.
  32. If you've successfully completed setup, you should be able to build the CLre project without errors.
  33. If it doesn't work and you can't figure out why, ask for help on the [Exmods Discord server](https://discord.exmods.org).
  34. ## Installation
  35. To install the CLre mod, copy the build's `CLre.dll` into the `Plugins` folder where Cardlife is installed.
  36. To install the CLre_server mod, copy the CLre_server build's `CLre_server.dll` into the `Plugins` folder where Cardlife is installed.
  37. ## A Note on CLre and CLre_server mods' (lack of) cooperation
  38. CLre is designed for the Cardlife client, and cannot be used to mod the Cardlife server.
  39. Similarly, CLre_server is designed for the Cardlife server, and cannot be used to mod the Cardlife client.
  40. DO NOT install CLre and CLre_server in the same `Plugins` folder, because both mods will be loaded -- guaranteeing one will break.
  41. 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.
  42. # Functionality
  43. ## CLre
  44. CLre provides a minimal modding API and useful bugfixes for the Cardlife client.
  45. ### Fixes
  46. As of v0.0.3, ten (10) bugfixes are implemented.
  47. - InitLogSooner: Start the logger slightly sooner than Cardlife does [TARGET: CustomLoggerThread] [ID: 0] (0M/2P/1I/0W/0A/0D/3T)
  48. - EnchantmentTableFloatParseFix: [MORE: https://trello.com/c/qawBFb7P/1-enchantment-table-fails-to-work] [ID: 1] (0M/2P/0I/0W/0A/0D/2T)
  49. - ExclusionImprovement: [MORE: https://trello.com/c/Ue4yIqWQ/11-placing-material-in-restricted-areas] [ID: 2] (0M/2P/0I/0W/0A/0D/2T)
  50. - ClientDurabilityNodeErrorRemover: [MORE: https://trello.com/c/YT3VbXpZ/15-durability-log-error] [ID: 3] (0M/2P/0I/0W/1A/0D/3T)
  51. - CooldownCrossSlotSync: [MORE: https://trello.com/c/65FPrTjK/12-no-cooldown-between-inventory-slots] [ID: 4] (0M/1P/0I/0W/0A/0D/1T)
  52. - ScrollSpeedImprovement: [MORE: https://trello.com/c/elL8IVdn/4-scroll-menus-are-insensitive] [ID: 5] (0M/1P/0I/0W/0A/0D/1T)
  53. - MiniScreenEmbiggener: [MORE: https://trello.com/c/NAls3XaE/17-game-starts-minimized-and-wont-restore] [ID: 6] (0M/0P/1I/0W/0A/0D/1T)
  54. - UnderStructureCollider: [MORE: https://trello.com/c/nfuaZWQZ/10-passing-through-structures] [ID: 7] (1M/1P/1I/0W/0A/0D/3T)
  55. - TerrainModificationFailedHandler: [MORE: https://trello.com/c/Pq5lcB1p/23-moderation-tools] [ID: 8] (0M/2P/1I/1W/0A/2D/6T)
  56. - OfflineSpawnpointSavingFloatFix: [MORE: https://trello.com/c/hpADhDhQ/21-login-goes-to-original-spawn] [ID: 9] (0M/2P/0I/0W/0A/0D/2T)
  57. - AntiStupidFloats: Force language-agnostic float->string behaviour internally (DISABLED BY DEFAULT) [ID: 10] (0M/1P/1I/0W/0A/0D/2T)
  58. ### API
  59. Basic engine registration and some events are exposed for modders to use.
  60. Documentation WIP... (read the code files in the `CLre/API` directory for now)
  61. ## CLre_server
  62. CLre_server provides a minimal modding API, admin HTTP server, and bugfixes for the Cardlife server.
  63. ### Fixes
  64. As of v0.0.3, one (1) bugfix is implemented.
  65. - InitLogSooner: Start the logger slightly sooner than Cardlife does [TARGET: CustomLoggerThread] [ID: 0] (0M/2P/1I/0W/0A/0D/3T)
  66. ### API
  67. Basic engine registration and some events are exposed for modders to use.
  68. Documentation WIP... (read the code files in the `CLre_server/API` directory for now)
  69. ### Tweaks
  70. CLre_server also offers a few improvements for the Cardlife server.
  71. These are not bugfixes, but are quality-of-life additions to bring server functionality up to par with other game servers.
  72. Improvements can be enabled and customized by modifying the `CLre_server.json` configuration file in Cardlife's install directory.
  73. #### HTTP Server
  74. The HTTP server is enabled by the `-web` command line argument, or in `CLre_server.json`.
  75. It is disabled by default to reduce resource usage.
  76. When enabled, the server will listen on http://localhost:5030 and provide basic server status information.
  77. This can be accessed through any standard web browser on the same computer.
  78. 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.
  79. Useful endpoints
  80. ```text
  81. GET / HTML landing page with some basic server info
  82. GET /l/current Server output log, up-to-date as of last webpage refresh
  83. GET /d/version Cardlife, Unity and CLre version information
  84. GET /status.json Useful status information about players and server state in JSON format
  85. GET /c/game.json Basically GameServerSettings.json for the running Cardlife server
  86. ```
  87. #### Server Commands
  88. CLre_server can accept chat commands from connected players.
  89. Chat commands can be enabled in `CLre_server.json`.
  90. For this functionality to work, valid user credentials must also be configured.
  91. Commands
  92. ```text
  93. /echo <msg> - say <msg>
  94. /help - show a list of commands
  95. /list - display online users
  96. /version - display version information
  97. /ban <user> - permanently remove <user> from this server
  98. /deop <user> - revoke <user> moderator permissions
  99. /kick <user> - disconnect <user> from this server
  100. /op <user> - grant <user> moderator permissions
  101. ```
  102. #### Terrain Modification Exclusion Zone
  103. This exclusion zone improvement can be enabled in `CLre_server.json`.
  104. This prevents players from digging under a building that they do not own.
  105. This improves on the existing exclusion zone functionality which already prevents a player from placing materials and building structures too close to another player's building.
  106. #### CLre-only Mode
  107. To prevent vanilla clients from connecting to this server, enable this restriction in `CLre_server.json`.
  108. Enabling this functionality is not recommended.
  109. This functionality should only be used when other code mods are installed which break compatibility with unmodded Cardlife clients.