[Update] Dark Souls 2: Seamless Co-op - v0.0.1
Hi everyone
The mod has been out for a few days now, and I'd like to make a post talking about a few behind the scenes goings on and further development / bug fixes in the mod.
This post covers a detailed bugfix report for 0.0.1. Since 0.0.2 is already out, I will add another post shortly covering that (I've just been busy)
v0.0.1
Using the Fragment of Malevolance will now auto-search for worlds to invade
This was a feature in Elden Ring seamless co-op. I was talking to Oroboro who has been using the mod a lot for invasions, and he highlighted how annoying it is to use the item over-and-over when activity is low. To accomplish this, I added another step to the YuiNexus3 session state machine to automatically retry to re-scan for worlds to invade (after a set interval).
Fixed an issue where pre-patched games with the Deadzone fix mod causes an "Undefined error patching the game"
As mentioned before, the patch that converts the game's vanilla axial deadzone to a radial deadzone was use with permission from the mod's original author.
The way that mod originally worked was patched the game's executable file itself. This way, the patch is only needed to be used once and a new exe file is generated. The issue is that I failed to account for people who were using pre-patched game executable files with seamless, which caused seamless to panic as it failed to carry out the patch again (as the signature was now invalid)
Fixed a bug that caused a crash for phantoms when trading with the crows in Things Betwixt
Trading with the crows in Things Betwixt is a sub-class of EventManager known as "EventItemClatteryManager". Item clattery is usually disabled for phantoms in the vanilla game, so I had to make a patch and allow guests - but not invaders to activate it.
The trading works on an "event area" - the area directly around the nest sets an event flag which causes all items dropped to undergo a check to see whether they match certain item IDs, and if they do to be re-rolled into new items. I also had to make sure this event flag was not networked, otherwise one player could stand in the nest and activate item clattery for all other player's in the session.
What I failed to account for is that the RNG pool for items to be dropped returns a nullptr if you're a guest player, so although the trading technically works, when the game tries to keep track of trades and RNG it'll de reference a nullptr and generate an exception.
Fixed a bug that could cause inconsistent matchmaking amongst worlds with high-level phantoms
In seamless co-op, to counter low-level phantoms summoning in their high level friends to squash invaders, the mod works on a "highest level" based matchmaking system. I did not code this properly, and all phantoms were counted as soul level 1 (as I never actually saved the variable). Therefore it was possible to have a max level phantom with a level 10 host and still match-make in the first bracket.
Fixed a bug that allowed non-hosts to use host-only items (to no effect)
Just a visual bug. Non-hosts could use items like the dried finger but they did nothing and caused some confusion amongst players.
Fixed a bug that caused enemy health scaling setting to be applied to bosses
I just forgot to scale bosses outright. There were also issues where a boss would get scaled twice (once when it was loaded in, and again when the boss fight started).
Fixed a bug that caused the invader message to display (n-1) amount of players needed to be defeated
Off-by-one error. If there was a lone host it would say "Defeat 1 player(s)" but if there was 1 host + 1 phantom it would also say "Defeat 1 player(s)".
Fixed a bug that caused invaders to be able to see items in the host world
This is a complex interaction with MapStateActManager. I had it set to read all of the state act data from the host - not just the doors / objects etc. that it needed. This was a mostly harmless bug, but caused a lot of confusion amongst players who thought they were "stealing" items from the host world.
Fixed a bug that could very rarely cause phantom blood stains not to spawn on death
Bloodstains are a bit strange in this game. There is code to determine whether you should or should not spawn one - however since seamless co-op changes the character type of the phantoms to host-type, there's no normal use case for a guest player who is the host to die. This caused some issues when dying in an area which was unloaded when you respawned. The BloodstainSetCtrl would return a nullptr when looking up stable position to create your bloodstain and therefore none would be created.
Fixed a bug that caused invaders to not accumulate sin when killing other players
I forgot sin was a mechanic in Dark Souls II. Since all of the netcode is written from the ground-up so no vanilla game logic is used - I had to RE and re-implement this. It's now working as intended (you get +1 sin per invasion if you win)
Fixed a bug that caused invaders to not drop any bloodstain on death. They now drop from where you invaded from
Similar to the other bug with phantom bloodstains - but invaders who died in a far away area would try to find stable ground for their bloodstain using BloodstainSetCtrl. This returned a nullptr and therefore no bloodstain would be generated. I overwrote this so as soon as you get an invasion it takes a snapshot of your current position and drops your bloodstain there if you die.
Overall
I very much appreciate the feedback on the mod. If there's any suggestions or debugging help people need - then as a subscriber - you're free to message me directly and I'll try to get back to you in good time.
I hope people are enjoying the mod despite teething issues, and managing to experience the game in a different light.
As always - thank you for your patience and a huge thank you to all of my supporters <3
Take care,
Yui
