[Update] Dark Souls 2: Seamless Co-op - Undoing (and preserving) niche vanilla mechanics
Hi everyone
Development of the mod continues. The production is a little slower this month as I am preparing for another exam in March.
In this post I will be discussing the direction for the mod in terms of the more unique mechanics of Dark Souls II, and some issues I've ran into along the way.
NetSummonSlotCtrl
One of the many sub-classes inside of NetManager is the aptly named "NetSummonSlotCtrl". I have not yet fully reversed the structure of this class, but from what I understand it looks something like this:
Each instance of NetSummonSlotCtrlJoinSlot is 8-bytes long, and determines:
How many players can occupy the slot
A bitset to determine invade type can join the slot in question
There are a total of 19 "Invade Types" in Dark Souls II. A lot of them I haven't yet mapped. But for example invade type 1 is for friendly phantoms summoned via the white soapstone, and invade type 8 is for invaders using the cracked red eye orb. Invade type 16 and 17 is used for the PvP arenas.
These summon slot pointers play a very interesting (and annoying) role in gameplay. They can change dynamically based on the area that you're in and most importantly which covenant you're currently in.
Something I did not realise before consulting the wiki, is that the Covenant of Champions restricts your character from online play in the sense that you cannot summon co-operators and can only be invaded by others. I confirmed this by hooking the constructor and updater for the summon slots and printing out which had changed:
Summon slot parameters updated for covenant 0: (N/A)
Summon slot 1: Phantom: false | Invader: false
Summon slot 2: Phantom: true | Invader: false
Summon slot 3: Phantom: false | Invader: false
Summon slot 4: Phantom: false | Invader: true
Summon slot 5: Phantom: false | Invader: false
Summon slot parameters updated for covenant 8: (CoC)
Summon slot 1: Phantom: false | Invader: false
Summon slot 2: Phantom: false | Invader: false
Summon slot 3: Phantom: false | Invader: true
Summon slot 4: Phantom: false | Invader: false
The reason I had to get so involved with this class, is that one of the main selling points of seamless co-op is that you can play with (up to) 5 other friends including yourself. Having restrictions on who can join what slot causes an issue where, if no slot is compatible with the invade type who's connecting, the joining process just fails and the connecting client is left in limbo.
The solution I came up with is to re-write a large portion of the NetSummonSlotCtrl class and replace it with my own version which lets any invade type join into any slot at any time. Though I will likely preserve the mechanic of the covenant of champions so that players who wish to complete challenge runs can join the covenant and leave themselves open to 5 invaders instead.
Covenants
As mentioned, some covenant mechanics are not really compatible with seamless co-op and it's core design:
Heirs of the Sun
Since there is no "random" co-op/matchmaking with seamless co-op. This covenant will likely have to be re-done. In the other souls games I make it so that invading with this covenant active gives covenant medals, though this is against the lore of the game.
Way of the Blue
Should play a role in seamless co-op. Hosts who equip Way of the Blue will have a chance to summon a player from the Blue Sentinel covenant to help them when they get invaded by another player.
Brotherhood of Blood
The red arena is present and functional in seamless co-op, so this covenant should be preserved.
Blue Sentinels
The blue arena is also present and functional in seamless co-op. Equipping this covenant may also cause you to be summoned as a Blue Sentinel to help a player in the Way of Blue covenant with an invader.
Bell Keepers
N/A (currently not implemented)
Rat King
N/A (currently not implemented)
Dragon Remnants
N/A (currently not implemented)
Company of Champions
In seamless co-op, this will function as it does in the vanilla game. You will leave yourself open to invasions but cannot be joined by any co-operators.
Pilgrims of Dark
N/A (currently not implemented)
Note that any covenant with "N/A (currently not implemented)" means I haven't thought of what to do with it yet. Not that it is being left out altogether.
If you have any suggestions for covenants or their functions please let me know. (The mirror knight boss should also be fully functional somehow)
As always - thank you for your patience and a huge thank you to all of my supporters <3
Take care,
Yui