SamSuka
Yui
Yui

patreon


[Update] Dark Souls 2: Seamless Co-op - Warps and Map loading

Hi everyone

Following the previous post I made a few days ago, I wanted to give some information on some of the behind-the-scenes goings on with the mod development. The post will go a bit more in-depth to the reverse engineering aspect of two elements of the mod I've been working on today.

Hi everyone

Following the previous post I made a few days ago, I wanted to give some information on some of the behind-the-scenes goings on with the mod development. The post will go a bit more in-depth to the reverse engineering aspect of two elements of the mod I've been working on today.

Game progression warps

There are several points in the game where players will either be warped by a cut-scene or moved to another area from interacting with a map objects.

One important aspect of seamless is considering how to handle these warps, do I:

An good example is the warp that can be triggered to take the player to The Lost Bastille (via touching the nest) just past where the player encounters an instance of the Pursuer.

By default, the object interaction is disabled in multiplayer by checking the "EventCondition" to enable or disable the interaction flag. This is a direct comparison to the "EcTest" callbacks that Elden Ring, Dark Souls III, and Sekiro uses. Specifically, for this interaction, the game uses "EventConditionNet_IsMultiPlay" to determine the object state.

After modifying this virtual method to allow players in seamless to bypass this condition, I was able to find the function to do the warp and realised it's just a general function for interacting with any map object - I put together a quick script in Cheat Engine just to make sure I'd got it right:

One of the many unlabelled random scripts sitting in my DS2 seamless cheat table

It works so long as the map area is loaded, and thankfully also works with the seamless-specific map loading modifications that I will describe in the next section. In the process I have also found the functions to get references to map objects by their IDs, and also force player interactions with said objects which may be useful later (or not).

Multiplayer map loading

In Dark Souls II - the way that map loading works online is a bit of a complicated issue. Inside the "NetSummonJoinMultiplayCtrl" class which, as the name suggests, handles joining a multiplayer session (as a guest joining a host world) you have a fixed map ID which is given to you on initial connect. Any data received which does not match that map ID (e.g. enemy deaths, map object interactions) will be refused.

This makes navigating through the world in a session seamlessly rather difficult as if two players are in different maps then their interactions with the world will remain unknown to one another and then if they joined up later there may be considerable desync.

To combat this, I spend the afternoon reverse engineering how maps are loaded into memory. It's rather the same as the other games which is quite nice, and therefore I was able to make a quick fix whereby players will always broadcast the map ID which they currently occupy to the rest of the session. Other players will receive those IDs and make sure they are always loaded into memory regardless of how far away they are.

By default, DS2 allows you to load 2 different maps maximum at any one time. I've increased this to 7 as this should be more than enough. Whether or not this causes issues further down the line or explodes my computer I'll find out during play-testing. But I can say confidently for now that it works as intended.

How it looks when you hit the maximum map loading cap

Luckily this was fairly easy to fix and now you can walk far away from other players (although this is not how I play seamless, I understand some people like splitting up)

I have a few real-life things to take care of during this week so I will be away until early next week, however when I'm available again I'm excited to check out how the mod runs and hopefully get working on a teaser video to release on my YouTube channel.

As always - thank you for your patience and a huge thank you to all of my supporters <3

Take care

~ Yui

[Update] Dark Souls 2: Seamless Co-op - Warps and Map loading

Comments

Absolute legend.

Erroneous

You are the absolute best, half of my family is waiting for this 🥰. I wanted to kindly ask if you could address homeward bones and such items at some point in the future, a lot of times in DS3 we ran into an issue where we would want to bone out so both of us appear in the same spot, but they are disabled. But in DSR the host was able to use them and it would teleport all the players to the host’s last bonfire. Could that be a feature to enable and disable in the config of the mod? And what is your vision on teleportation items in DS2 Development? Thank you again for you amazing work ❤️

Hidden Is Classified


More Creators