How to Set Up a Dedicated Server for The Planet Crafter: Step-by-Step Guide


Summary

Setting up a dedicated server for The Planet Crafter can significantly enhance your gaming experience. This guide provides essential steps to optimize your server setup, ensuring a personalized and high-performing environment. Summary List:

  • Enhance gameplay with immersive server customizations through mods and commands.
  • Leverage scalable and adaptable server infrastructure to improve performance.
  • Utilize dnSpy for game file modifications and create unique plugins.
By following this guide, you can customize your server, boost its scalability, and modify game files to create an unparalleled gaming experience.

Enhance Your Gaming Experience with Custom Commands and Server Mods

Enhancing your gaming experience can be achieved through the effective use of custom command-line arguments and server-side modifications. One powerful method is launching the game with specific command-line parameters that bypass the main menu, directly initiating world generation. By adding `-batchmode -autostart` to your game's shortcut or executable launch target, you streamline the startup process, making it especially useful for automated setups on remote servers.

Furthermore, configuring your game to function as a dedicated server enhances multiplayer interaction significantly. Utilizing mods such as "The Planet Crafter Headless Server Mod" allows the game to run continuously without requiring an active host player. This setup facilitates seamless connectivity for all players, enabling collaborative gameplay without dependence on one user's computer being active constantly. These strategies collectively contribute to a more efficient and enjoyable gaming environment.

Enhanced Server Functionality and Scalability in Recent Game Updates

In recent updates, the game developers have made significant improvements to enhance both functionality and user experience. One of the most notable additions is a new command-line parameter "userver" that can be utilized in conjunction with "-batchmode". This allows the game to start in server mode while still having graphics enabled, which is particularly beneficial for debugging and monitoring purposes during runtime. Furthermore, they've increased the maximum number of players that can join a server to 32, making it possible for larger groups to participate simultaneously. These enhancements are poised to significantly improve both the flexibility and scalability of managing game servers.

Modifying Game Files with dnSpy

To effectively modify the game "The Planet Crafter," you first need to utilize dnSpy, a powerful .NET assembly editor. Start by installing dnSpy and then locate the Assembly-CSharp.dll file in your game directory, typically found at C:\GOG Games\The Planet Crafter\Planet Crafter_Data\Managed. Drag this file into dnSpy to begin editing.

Next, navigate through the Assembly-CSharp.dll structure until you find SpaceCraft and then Intro. Within Intro, focus on the Start() method as this is where you'll implement changes. Specifically, you need to add code that will load the "Server-1" save file upon starting the game. By doing so without altering any other parts of the code, multiplayer mode should activate automatically.

This approach ensures that your modifications are both targeted and efficient, allowing for a seamless gaming experience enhanced by custom configurations or debugging capabilities provided by dnSpy's robust toolset.

Unlock Cross-Platform Multiplayer: Manipulating the Join Multiplayer Button′s Visibility for Steam Users

To enhance the multiplayer experience for Steam users, understanding how to manipulate the visibility of the Join Multiplayer button is crucial. In the Steam version, this button's visibility is controlled by a specific line of code:

this.multiplayerButton.SetActive(!SteamManager.Initialized);

By modifying this parameter to "true," you can ensure that the button remains consistently visible. This adjustment opens up possibilities for Steam users to join GOG servers by simply entering the IP address and port information. Therefore, making such a change not only improves accessibility but also fosters greater connectivity between different gaming platforms.

Essential Measures for Safeguarding Player Data in Online Games

Ensuring the seamless operation of an online game involves several critical steps. One pivotal measure is to implement a mechanism for saving game progress on the server whenever a chat message is received. This proactive approach, which utilizes the SaveWorldData function with the server name as a parameter, plays a crucial role in safeguarding player data. By doing so, it mitigates the risk of losing valuable progress should the server encounter an unexpected shutdown.

Moreover, fine-tuning the frequency of auto-saves can significantly enhance data protection. For instance, reducing the default auto-save interval from 10 minutes to just 1 minute via the StartHiddenAutoSave() method ensures that players will lose no more than sixty seconds of gameplay in case of an abrupt restart. This strategy not only preserves user experience but also builds resilience against potential disruptions. Together, these measures form a robust framework for maintaining game integrity and ensuring player satisfaction.

Smooth Gameplay and Reliable Save Management in The Planet Crafter

Integrating the modified Assembly-CSharp.dll file into The Planet Crafter server installation significantly enhances user experience by enabling seamless auto-saving. This modification eliminates the necessity for manual configuration and ensures that the game world is regularly backed up every 60 seconds without disrupting gameplay.

When setting up a new server, it is strongly recommended to create a fresh world specifically for this purpose. The default "Landing Site" can become problematic as it may eventually be submerged underwater during later stages of the game. This scenario can lead to players joining the server being caught in an inescapable loop upon arrival. Although using an existing world remains an option, awareness of this potential issue is critical to avoid complications.
To embark on your adventure in a new world, start by selecting "New game". On the subsequent "New save file" screen, make sure to switch the "Game Mode" to "Custom". Here, you have the freedom to tailor your difficulty settings and choose your preferred landing site. After finalizing these options, hit "Apply settings" followed by "Create". Your freshly created save file will now appear in the list. Load it up, watch the introductory video, exit and re-enter the capsule, then move your character away from the crafting station to avoid obstructing new players. Finally, press Escape and save your game. Everything should be set up correctly now.

Set Up a Game Server for Multiplayer


When preparing to set up a server for your game, it's crucial to have both the game installer and the modified Assembly-CSharp.dll ready, as these are fundamental components in ensuring a smooth installation process. First, complete the game installation but refrain from launching it immediately.

Next, navigate to the specific save file location on your computer (%APPDATA%\..\LocalLow\MijuGames\Planet Crafter). Here, you'll need to rename your existing save file to "Server-1.json" and move it over to the server directory. This step is essential for enabling auto-loading of custom worlds when players connect.

Once you've placed the renamed save file into its proper location on the server and replaced the standard Assembly-CSharp.dll with your modified version, you can proceed to run the server. Upon startup—whether after an "Exit to Main Menu" or a full restart—the game will now automatically load this custom world for all connecting players.

If at any point you wish to revert back to default settings or troubleshoot issues related to custom worlds not loading correctly, simply remove or rename "Server-1.json" from its current folder. This action will restore the game's original behavior.

Elevate Your Gaming with Essential Modifications and Seamless Progress Transfer

To enhance your gaming experience, it is essential to integrate certain modifications and save files effectively. One such modification involves replacing the original Assembly-CSharp.dll file with a modified version. This crucial step unlocks specific enhancements or features that are not available in the standard edition of the game. By doing so, players can enjoy new content, benefit from bug fixes, and experience improved performance, all contributing to a more enjoyable gameplay.

Another important aspect of maintaining continuity in your gaming journey is transferring game progress seamlessly between installations. This can be achieved by copying the Server-1.json save file to its designated location. Doing this ensures that users can pick up right where they left off without any loss of progress, making for a smooth transition and uninterrupted gameplay.

Together, these modifications not only elevate the overall quality of the game but also provide players with a richer and more satisfying gaming experience.

Optimize Dedicated Server Performance with Batchmode and Nographics Parameters

When setting up a dedicated server for your game, utilizing certain command-line parameters can significantly enhance performance and efficiency. One of the most critical parameters is `-batchmode`, which allows the game to run in headless mode. This means that while the core functionalities of the game continue to operate, no graphics are displayed, enabling it to function seamlessly in the background as a server. In conjunction with this, implementing the `-nographics` parameter disables graphical rendering altogether. By doing so, you optimize your server's performance even further by allocating system resources exclusively to gameplay and network operations rather than visual elements. These adjustments ensure that your dedicated server runs smoothly and efficiently, providing players with a stable and reliable gaming experience.
With our new automatic save feature, halting the server has never been easier. Simply open Task Manager, find Planet Crafter.exe, and click on End Task. The game saves your progress through a chat message trigger; as long as no one is sending a message at the precise moment you stop the server, there's no risk of corrupting your data. Additionally, the built-in Backup.json file will always be there for extra security. For those with dedicated server experience, setting up a script to periodically save copies of your world file to another location can provide an added layer of protection.
This piece isn't solely focused on the addition of a dedicated server mode for The Planet Crafter, though that’s certainly what prompted me to start writing it. It also serves to illustrate how straightforward it can be to integrate such a feature into Unity games; headless mode nearly accomplishes this on its own, requiring only minimal input from the game developer for complete implementation.

I sincerely hope that the team behind The Planet Crafter will soon officially introduce this feature, rendering this entire guide unnecessary. Until then, you now have the ability to run a dedicated server and terraform a planet with your friends without worrying about whether the host is available online. Have fun!

T.T.

Expert

Discuss

❖ Columns