Shroudtopia

Modloader for Enshrouded (Server & Client)

I'm excited to share a behind-the-scenes look at the creation of Shroudtopia, a powerful modloader designed to enhance the gameplay of Enshrouded by allowing seamless integration and management of mods. What started as a humble, single-purpose mod has now grown into a full-fledged tool that opens the doors to endless modding possibilities.



The Origins of Shroudtopia
It all began with a personal frustration while playing Enshrouded. As fun as the glider was, I found myself wishing for full flight rather than just gliding downwards. This led me to explore the game’s code and figure out how I could manipulate its behavior.

After a lot of digging, I decided to go the route of memory manipulation using a detour technique. By detouring the existing function that handled glider mechanics, I was able to alter the downward motion into full, controlled flight. The result was my very first standalone mod for Enshrouded – the Flight Mod.



Getting Feature-Rich

Before Shroudtopia became a full modloader, it gradually evolved into a feature-packed mod.

After implementing the Flight Mod, it quickly became clear that to fully enjoy flying around the world, other tweaks were necessary. Two key features that were added early on were no_fall_damage and no_stamina_use. The first was essential to prevent awkward crashes when landing, and the second allowed uninterrupted flight without worrying about stamina depletion.

These enhancements made the gameplay more fluid and fun, transforming the project into more than just a flight mod. It was at this stage that the mod gained the name Shroudtopia, inspired by the dedicated server where it was initially tested. The name stuck as the project continued to grow in scope and ambition.



From Standalone Mod to Modloader

The success of Shroudtopia sparked a bigger idea. Why stop at one mod? I wanted to give players the ability to not only load mods like mine but manage them dynamically—without restarting the game or server. This vision ultimately gave birth to a modloader for both the client and server side of Enshrouded.

Creating a modloader wasn’t easy. I had to rethink how mods could be integrated into the game seamlessly. The first challenge was setting up a system that would allow mods to be loaded, activated, and deactivated while the game was running.

I realized that every mod would need a standard way to interact with the game’s core systems—things like configuration, logging, and event hooks. Thus, the idea of `ModContext` was born. With this, each mod has access to common utilities, making mod development easier and more standardized.

Another essential feature was the ability to modify mod settings on the fly. In many games, changing mod settings requires a full game restart, but with Shroudtopia, we’ve built a system where mod configurations can be tweaked in real-time. This makes experimenting with gameplay changes fast and hassle-free.



Making Mods for Shroudtopia

Creating mods for Shroudtopia is just writing dynamic libraries (DLLs). By implementing the Mod interface and exposing a simple factory function, modders can quickly get their mods up and running.

Writing mods with Shroudtopia is fairly straight forward once you get the grisp of the framework. I´ll walk you trough the Flight Mod as example.

The goal was simple: instead of gliding downward with the glider, why not just fly?

First off the mods meta information is defined to later get instantiated:

ModMetaData metaData = {
"Flight Mod",
"Enables free glider flight.",
"1.0",
"s0T7x",
"0.0.1",
true,
true,
};


The key part of the mod is locating the original function responsible for the glide mechanics. To achieve this, I wrote a memory scans the game’s memory, looking for a specific pattern of bytes that represent the function controlling gliding. After that, I used a detour technique to hook into the game’s execution flow and replace the glide logic with something new.

The real magic happens when you dynamically activate or deactivate the mod. This is done by implementing the Mod interface:


class FlightMod : public Mod {
public:
void Load(ModContext* modContext) { }
void Unload(ModContext* modContext) { }
void Update(ModContext* modContext) { }

ModMetaData GetMetaData() {
return metaData;
}

void Activate(ModContext* modContext) {
active = mod->activate();
modContext->Log(std::string().append(metaData.name).append(" activated").c_str());
}

void Deactivate(ModContext* modContext) {
mod->deactivate();
active = false;
modContext->Log(std::string().append(metaData.name).append(" deactivated").c_str());
}
}


What I found most enjoyable in this process was how fluid and seamless it became to turn these mods on and off. The mod context works, and it's incredibly satisfying to see “Flight Mod activated” in the game’s console.

With this first mod in place, I knew there was potential to do more.



Looking Ahead

As of now, Shroudtopia is fully functional and supports both server and client mods. However, we’re still just scratching the surface. There are plenty of ideas in the pipeline, like enhancing the `ModContext` to include more game-specific functions and possibly even creating a mod marketplace.
I’m excited to see what the community comes up with using Shroudtopia. Whether it’s game-changing mechanics or simple quality-of-life improvements, this modloader has the potential to revolutionize how Enshrouded is played. 



Get Involved!

If you’re interested in modding for Enshrouded, or simply want to try out some cool new mods, check out the latest release of Shroudtopia. Contributions are always welcome, and I’d love to see what other mods can be created.

Together, let’s take Enshrouded to new heights!

Article information

Added on

Edited on

Written by

s0t7x

0 comments