Larian Studios
I think I've managed to do it, but I haven't tested it fully yet because all my friends are busy or not around currently. However, the server shows up as a 4 player server, and I had 2 random people connect and a duplicate client on my desktop for a total of 4. I don't have a save where I have companions, so testing was very limited. It looks and acts consistent with the original 4 player mod, so I'm very hopeful.

http://i.imgur.com/pGIhQLG.jpg
http://i.imgur.com/7p9eyvY.jpg

How to:

Download norbyte's pak extractor from a link in this thread http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=572322#Post572322

Make a copy of the Main.pak file in a working folder on your desktop. Extract the main.pak using the tool

In the newly extracted files go to the Mods/Main/ folder and open "meta.lsx" in a hex editor. Search it for NumPlayers, though it should be pretty much in plain sight since the file is tiny. Edit the variable to 4.

Then just go to your \Steam\SteamApps\common\Divinity Original Sin Enhanced Edition\Data folder and create a folder called "Mods". In the "Mods" folder, create another folder called "Main". Place the meta.lsx file into that Main folder. So the full file tree should look like Steam\SteamApps\common\Divinity Original Sin Enhanced Edition\Data\Mods\Main\meta.lsx

Edit: You'll also need to modify the EoCApp.exe on the host client to prevent being locked into an error on the character assign screen. Open the .exe in a hex editor and do the below:

Originally Posted by norbyte

With a hex editor, search for "41 4A 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 34 38 AA FF".
Replace the bytes "40 0F B6 C7" with "31 C0 F7 D0".


Thanks Norbyte pak extractor and helping locate the memory location of the character assign error. Also thanks to Dumb "Le Doré" from the steam community for the original hex edit mod which helped me locate the value.
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 29/10/15 01:14 AM
Had an opportunity to do a little more testing and I encountered a big inconvenience.

As soon as you get a player on a server that doesn't have a main character assigned the game forces the host client into the character assign menu with an error saying "Each player must have a main character assigned". Since there's only two "main" characters you can't satisfy the game's condition of assigning a "main" character to each player. The game lets you use the menu to assign characters as you please, but it won't let you leave it until each player on the server has a main character assigned.

The current "workaround" I got is making the server 5 players. The person hosting must then start a 2nd client of the game and connect to their own server locally. You then assign a character to each client and keep the hos client with no characters. Saving the game would be a problem though I think.

Would love to see if anyone else has some ideas.
Posted By: bigironvault Re: Enhanced Edition 4 Player Mod - 29/10/15 01:19 AM
Any ideas on how to make a 4 player character generation? Sorry I know the game only out for a day. But it just stinks how old mods don't work anymore. frown
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 29/10/15 01:21 AM
Originally Posted by bigironvault
Any ideas on how to make a 4 player character generation? Sorry I know the game only out for a day. But it just stinks how old mods don't work anymore. frown


That won't be possible until mod tools are introduced.
Posted By: Zeebot Re: Enhanced Edition 4 Player Mod - 29/10/15 03:11 AM
Great write-up so far, Foodchain.

Just tried this with 2 friends and it worked well (didn't crash), until acquiring Madora- then I got the "Each player must have a main character assigned" error, and that window would not close.

However, my friends were able to control their assigned characters just fine, but I couldn't move because of the Character Assignment screen stuck in my face.

Also to note-
Trying to start a game from character creation with 3 people made the 'Accept' button stay on 'Waiting...' forever. Only starts with up to 2 people, and more can join in after the game begins.

There is another meta.lsx file located in the unpacked Shared folder. So i figured I'd try what you applied to the Main folder- edit the numPlayers value up to 4, and put it in a new directory:
"Steam\SteamApps\common\Divinity Original Sin Enhanced Edition\Data\Mods\Shared\meta.lsx"

Didn't fix the Main character assignment issue. Probably useless information, but hope this helps! If only we can find a way to move past that error... Maybe adjust party member companions to be 'Main' players?
Posted By: Stalkersasquatch Re: Enhanced Edition 4 Player Mod - 29/10/15 04:39 PM
I made an account here just to put in some information and to also say thanks for the workaround. The modification works just as you said. We had three people in a game- One inhabiting Bairdotr- and all was well for the most part. We couldn't manually save or quick save, but autosaves were still functioning correctly so it isn't a completely lost cause as long as the host sets them up in a safe manner.

We played extensively last night doing everything from getting to Cyseal, stealing everything that wasn't nailed down, one of us going to jail, and even some fights after screwing around for long enough and there was little to no crashes. All in all it's working amazingly especially for being such a convoluted work around. Aside from only being able to auto save, I think the only other issue was that loading times took upwards of ten minutes when changing maps despite the host having a great PC. Of course that isn't a complaint, just what we experienced.

We're just happy to be able to have three people in a game, so thanks to everyone who contributed to making this happen! :D
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 29/10/15 05:21 PM
Currently at work so I'm not doing much with this at the moment.

I did however play around with it a little more yesterday to see if I could break the interface to prevent the error from coming up. Here's what I learned.

I extracted the "Game.pak" file and located the GUI elements for this menu. If you extract the pak, they will be located in the Public/Game/GUI folder. They appear to use flash (.swf) files with scripting. The two files utilized in this menu are "characterAssign.swf" and "msgBox.swf". There are also 2 similarly named files for the controller UI.

characterAssign is the menu used to control assignment of characters. The msgBox is used in various places around the game, such as the exit game prompt, the "Server shutting down" notification, and of course the error preventing you from leaving the assign screen when a play doesn't have a main character assigned.

Replacing characterAssign with another .swf file to produce results like this: http://i.imgur.com/t4MZjeW.png. Of course there was still no way to escape from that menu.

I tried decompiling the characterAssign.swf in hopes of being able to break the scripting that calls for main character verification, but flash decompilers are spotty at best, and editing anything in a meaningful way is even more so arcane.

I then had this brilliant idea of taking the characterAssign menu from the original game and putting it into the EE. Unfortunately, that didn't work either. The menu works fine, but the error still pops up as normal. This leads me to believe the check isn't called from a flash script, but done elsewhere in the game engine.

At this point the only thing I can think of is using a debugger to find and then break the JMP that executes the main character check. I don't know if I'd have any luck with that and honestly I'm not sure if I should purse that either.

Either someone smarter will figure this out, or we'll have to wait for Larian to release the official tools. Didn't look like that was happening soon. I have a slim hope that someone from Larian will read it and help us out by removing the "main character" restriction next patch, but I'm not holding my breath.
Posted By: Norbyte Re: Enhanced Edition 4 Player Mod - 29/10/15 06:54 PM
Haven't tested the workaround yet, but theoretically you can bypass that dialog by patching EoCApp.exe:
With a hex editor, search for "41 4A 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 34 38 AA FF".
Replace the bytes "40 0F B6 C7" with "31 C0 F7 D0".
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 29/10/15 07:36 PM
Originally Posted by Norbyte
Haven't tested the workaround yet, but theoretically you can bypass that dialog by patching EoCApp.exe:
With a hex editor, search for "41 4A 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 34 38 AA FF".
Replace the bytes "40 0F B6 C7" with "31 C0 F7 D0".


I just made a copy of the exe and hex edited the values. This prevents the error message. Everything appears to be working like the original 4 player mod.

Haven't fully tested everything yet, but it's looking very good.

Connecting an unmodified .exe to a modded one seems to work fine as well, meaning the entire 4 player mod is fully serverside with no additional downloads needed for players.

Anyone doing the mod would have to do it themselves, since distributing a modded .exe is likely against the EULA/TOS.

I was trying to do this with a memory editor like Cheat Engine but not having any luck finding the memory value for this prompt. For my own education, how did you find the memory location for that error?
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 29/10/15 07:53 PM
https://www.youtube.com/watch?v=iCVdpCkUWwg

That's pretty much the extent of my testing, but all seems to be in order. Thanks again for your help with this thing.
Posted By: Zeebot Re: Enhanced Edition 4 Player Mod - 29/10/15 08:01 PM
Just tested this with 2 friends again, works like a charm- even when loading in a game prior to the latest patch and EoCApp.exe edit!

You did it, guys! Thanks for all your help!

Haven't played extensively yet, but zero errors so far while mucking about in town- saving works just as well.
Posted By: Norbyte Re: Enhanced Edition 4 Player Mod - 29/10/15 08:02 PM
Originally Posted by Foodchain

I was trying to do this with a memory editor like Cheat Engine but not having any luck finding the memory value for this prompt.


AFAIK Cheat Engine can only modify the heap of the process, not the native code in the .exe itself.
The replaced value is an assembly instruction, "MOVZX EAX, DIL".

Originally Posted by Foodchain

For my own education, how did you find the memory location for that error?


I disassembled the .exe and searched for references to this particular message and followed the call chain to where it'd be the most convenient to stop this check from failing.
Here is what the offending code looks like: https://dl.dropboxusercontent.com/u/32263228/dos/gr2/dos_4ply.png
Posted By: kamikadza13 Re: Enhanced Edition 4 Player Mod - 29/10/15 08:35 PM
So, guys, can you upload your .exe and sent to me? I can't do this and I need your help)
And what is your game version? maybe it's a reason of my problem
Posted By: Stabbey Re: Enhanced Edition 4 Player Mod - 29/10/15 08:44 PM
So you can play 4-player co-op, but only with autosaving?
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 29/10/15 08:53 PM
Originally Posted by kamikadza13
So, guys, can you upload your .exe and sent to me? I can't do this and I need your help)
And what is your game version? maybe it's a reason of my problem


Sorry, but I won't be uploading or distributing an exe. Hex editing it is quite easy and I'm sure someone will post a beginner friendly guide soon.

I'm running the steam version. Version number is 2.0.99.113, which the latest version at this time that steam will update too.

Originally Posted by Stabbey
So you can play 4-player co-op, but only with autosaving?


The limitations mentioned in my posts yesterday have been bypassed as of a few hours ago. The mod appears to be working in a similar fashion as the 4 player mod for the original game. Meaning you can save and load with no problem.
Posted By: Biflansala Re: Enhanced Edition 4 Player Mod - 29/10/15 09:03 PM
I confirm that is works fine. There is just an issue with the spell bar which is sometimes missing for some players, it's fixed by quitting and reconnecting to the game or by reassigning the characters. I don't know if it's due to the patch tho.
Posted By: kamikadza13 Re: Enhanced Edition 4 Player Mod - 29/10/15 09:05 PM
Originally Posted by Foodchain
Sorry, but I won't be uploading or distributing an exe. Hex editing it is quite easy and I'm sure someone will post a beginner friendly guide soon.


Okay, but it can't find necessary line :C
Posted By: Aim_Ed Re: Enhanced Edition 4 Player Mod - 29/10/15 09:41 PM
I have no idea how to do the extractor part.(which is the first step)

I put the copy of Main.pak in a folder and when I try to extract it using the tool it says https://i.imgur.com/pXXnuuY.jpg

I'm not incredibly savvy so I have no idea what to do. If anyone can help, thanks in advance.
Posted By: ignorhunter Re: Enhanced Edition 4 Player Mod - 29/10/15 09:55 PM
Hey there thanks for your work! I have a problem tho, when i Open the EoCApp.exe with the hex editor and use the search to find that pattern, it says there's no such pattern...any suggestion?

[quote]search for "41 4A 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 34 38 AA FF".
Replace the bytes "40 0F B6 C7" with "31 C0 F7 D0". [/quote]
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 29/10/15 09:57 PM
Originally Posted by Aim_Ed
I have no idea how to do the extractor part.(which is the first step)

I put the copy of Main.pak in a folder and when I try to extract it using the tool it says https://i.imgur.com/pXXnuuY.jpg

I'm not incredibly savvy so I have no idea what to do. If anyone can help, thanks in advance.


You have no source package path specified. It looks like you only specified the Extraction/Source path. The "package path" field needs to have be pointed the location of the main.pak file.

Originally Posted by ignorhunter
Hey there thanks for your work! I have a problem tho, when i Open the EoCApp.exe with the hex editor and use the search to find that pattern, it says there's no such pattern...any suggestion?


I'm using XVI32. Make sure you're searching for a HEX string and not a text string.

http://i.imgur.com/XJ1zLKR.png
Posted By: Norbyte Re: Enhanced Edition 4 Player Mod - 29/10/15 10:13 PM
Originally Posted by Aim_Ed
I have no idea how to do the extractor part.(which is the first step)

I put the copy of Main.pak in a folder and when I try to extract it using the tool it says https://i.imgur.com/pXXnuuY.jpg

I'm not incredibly savvy so I have no idea what to do. If anyone can help, thanks in advance.

Select Main.pak in the "Package path" box (no need to copy it), select the folder where you want to extract Main.pak to in the "Extraction / source path" box.

Originally Posted by ignorhunter
Hey there thanks for your work! I have a problem tho, when i Open the EoCApp.exe with the hex editor and use the search to find that pattern, it says there's no such pattern...any suggestion?

Quote
search for "41 4A 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 34 38 AA FF".
Replace the bytes "40 0F B6 C7" with "31 C0 F7 D0".


The pattern is for the latest patch (v2.0.99.113), for older versions it may be different. Which version are you using?
Posted By: Aim_Ed Re: Enhanced Edition 4 Player Mod - 29/10/15 10:29 PM
Haha, that was a bit boneheaded of me. I got it to work fully now, thank you very much!
Posted By: LAROmega Re: Enhanced Edition 4 Player Mod - 29/10/15 11:50 PM
I have the GoG version of the game and it kept saying that the mod "Main" was invalid when just copying in meta.lsx, even unmodified. I ended up copying in the entire exploded package, with the modified file. So far it hasn't complained but won't be able to test it for a few hours.

The executable is also slightly different. The chain still exists, but the third to last block is 37 instead of 38. The full sequence for the GoG executable is "41 4A 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 F4 37 AA FF".

Latest version as of the time of writing this is 2.0.99.10.
Posted By: ignorhunter Re: Enhanced Edition 4 Player Mod - 30/10/15 09:00 AM
I have the GoG version too, so it's the 2.0.99.113. I'm gonna try the new pattern suggested here and see if it works..BTW just to be clear, this mod allows you to let your 3rd/4th friend play as a companion? I mean, there's no way to start a game and create 3/4 main characters like in the first game until they release the official mod tools right?
Posted By: Foxes Re: Enhanced Edition 4 Player Mod - 30/10/15 11:48 AM
Tried this on an open server, and it worked fine. I don't mind playing a companion in the least (I love Wolgraff), so I just gave the source hunters away and ran around as the mute rogue for a few hours. I didn't see any bugs or hangs anywhere.
Posted By: ignorhunter Re: Enhanced Edition 4 Player Mod - 30/10/15 12:39 PM
Ok so when I today logged on Divinity I got this error message referred to the file in the Mods/Main folder...

https://imgur.com/KocQpLj

I found the pattern in the .exe file and it seems to be fine, but I have no idea what's wrong with the first part...I've read what LAROmega said but I dont get what "copying in the entire exploded package, with the modified file" means.
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 30/10/15 01:50 PM
Originally Posted by ignorhunter
Ok so when I today logged on Divinity I got this error message referred to the file in the Mods/Main folder...

https://imgur.com/KocQpLj

I found the pattern in the .exe file and it seems to be fine, but I have no idea what's wrong with the first part...I've read what LAROmega said but I dont get what "copying in the entire exploded package, with the modified file" means.


That just means to unpack the main.pak and placed everything you just extracted into the Divinity Original Sin Enhanced Edition\Data folder.

The game engine logic is such that it loads assets from within the Divinity Original Sin Enhanced Edition\Data\ folder. Assets can either be stored in a regular file tree, or as a an archive (a .pak file). The game engine prioritizes loading from folders over paks.

Mine worked fine by just moving the file I modified over.

The error you're getting seems to indicate you've corrupted something. It would probably be easier to start clean than trying to find the source. Get the game working again by restoring your backed up files, and then make the modifications.
Posted By: luckyme Re: Enhanced Edition 4 Player Mod - 30/10/15 02:16 PM
I got the same error. I think it was because the meta.lsx in my mods/main/ destination was from a previous patch. So I just refreshed the game cache through steam and started over. The mod works fine and I was able to play with 3 friends for a few hours without any problems.

My only concern is that the hex edit might change with future patches as well?
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 30/10/15 02:46 PM
Originally Posted by luckyme

My only concern is that the hex edit might change with future patches as well?


Should it change locating the new values wouldn't be too hard now that I know what to look for in assembly.
Posted By: Norbyte Re: Enhanced Edition 4 Player Mod - 30/10/15 08:29 PM
Originally Posted by luckyme
My only concern is that the hex edit might change with future patches as well?


Finding the new offsets / patterns is a roughly ~5 minute process, so it isn't that hard *if* the code is not changed significantly.
Posted By: ignorhunter Re: Enhanced Edition 4 Player Mod - 30/10/15 10:47 PM
Okay, thanks so much guys, me and my friends finally are able to play togheter without any issue. Everything works perfectly fine!

Just to be clear to any wanderer, the "mod" works for both GoG and Steam versions!
Posted By: LAROmega Re: Enhanced Edition 4 Player Mod - 31/10/15 12:26 AM
[quote=luckyme]I got the same error. I think it was because the meta.lsx in my mods/main/ destination was from a previous patch.[/quote]

Pretty sure this is why I had issues too. Thinking back I ran everything in the order of the thread. So when I went to modify the exe I installed the patch, which means Main.pak was changed.

Time to install the correct files. :ouch:


Edit: Is my lack of markup because the account is new?
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 31/10/15 08:33 AM
I had an idea earlier tonight and did a little bit of tinkering. I managed to get the game to start with 4 source hunter characters in the party.

http://i.imgur.com/hXuRnA2.png

This would eliminate the need for the exe modification, but makes each client require modified CharacterCreation files. It's still a work in progress sort of deal. The character creation screen still needs work. Most likely it would work by doing a character creation screen for players 1 and 2, after these players confirm their choice it would then load a 2nd copy of a character creation screen with players 3 and 4 customizing their characters. I think this would just be a matter of modifying the trigger that makes the game engine load the Cyseal map after hitting accept on the CharacterCreation level. You would just need to modify it to load a CharacterCreation2 map that has Player3 and Player4 spawned. The CharacterCreation2 map can be created using the tools for the original game.

I made this work by making a modified CharacterCreation level using the tools for the original game. In this level I have player 1, 2, 3, and 4 spawned. The character creation level wasn't changed for EE and it's able to pass the player creation data to the Cyseal map which is loaded afterwards. The meta.lsx files which the orginal game's editor creates also need to be modified for EE in a few ways, otherwise they just hard-lock the game client on level load.

I might be explaining this poorly but I just wanted to throw some more ideas out here.

Posted By: ignorhunter Re: Enhanced Edition 4 Player Mod - 31/10/15 08:53 AM
LAROmega and luckyme, yeah the error was caused by the meta.lsx file being outdated, and since the backup file was causing me some issues I just uninstalled and reinstalled the game, after that I changed the values and everything works fine ever since.
Posted By: Tyjabro Re: Enhanced Edition 4 Player Mod - 31/10/15 02:46 PM
Hey, I just made an account to ask you for a bit of help.
It seems the hex code changes from version to version, as I have version 2.0.98.842 and cannot find the hex line you've quoted. I tried the alternative line that someone else posted and still had no luck. I've used three different hex editors.

What should I do?
Posted By: flame30 Re: Enhanced Edition 4 Player Mod - 31/10/15 04:35 PM
Good to know you're progressing !

Foodchain, can you please explain how you've done your modification for 4 player creating ?
Or maybe share the file with us ? ( I don't know if sharing map file is possible...)
It seems an interesting way anyway.
Posted By: DannyMck Re: Enhanced Edition 4 Player Mod - 31/10/15 05:22 PM
I've been trying out the 4 player "Mod". The initial instructions seemed plenty to get it working. I can say, it works! I popped my connection mode to anyone and 3 people joined. We each had free control of a character and combat worked completely fine. The only issue that someone claimed they were unable to see their skills and health bar.

Now that's all fine and dandy. Good Job. 10/10

Later the same day my little brother wanted a go of divinity, I was like hell yeah pop that into split screen mode and we gonna get funky.

Played through the start of the game, got to Cyseal market and it said someone had joined? Oh.. ok.. cool. Kept playing, the guy was like "Can I play? How do I join? Can I be Jahan?" however it didn't show anyone in the assign character screen or connected players screen. I was unable to type to him (bug with controller mode?) and he left. 2 minutes later, after we got Jahan and Madora, we noticed someone else trying to join. I went to speak to Thelyron, just doing that first bloodstone quest and that, came back to cyseal market place to notice someone had joined as Jahan and went on a killing rampage in the marketplace. R.I.P Cheese man.

TL:DR - It also works using split screen PS4 controllers, you can't see connected players and cannot assign characters to them. Please feel free to disregard what I say if someone finds a workaround.

Thanks for all the hard work in getting this working so fast. :)
Posted By: Djerba Re: Enhanced Edition 4 Player Mod - 01/11/15 12:07 PM
Hello guys, can someone upload some insuctrions on how to do it?
Posted By: LAROmega Re: Enhanced Edition 4 Player Mod - 01/11/15 02:52 PM
@Djerba The first post has instructions on how to get this working.
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 01/11/15 05:50 PM
Originally Posted by flame30
Good to know you're progressing !

Foodchain, can you please explain how you've done your modification for 4 player creating ?
Or maybe share the file with us ? ( I don't know if sharing map file is possible...)
It seems an interesting way anyway.


Okay, explaining in hopes it gives people some ideas.

Firstly, the editor for the first game will -somewhat- work with the enhanced edition. You will have to unpack all your EE files as it doesn't seem to be able to read any EE .pak contents. This isn't too surprising, because a new pak extractor was needed for EE, so I'm guessing the compression method for .paks has changed in EE. The "meta.isx" file produced by the ediitor which goes into the Divinity EE\Mods\Main\ is also incompatible with EE and makes it crash on launch. This file handles some basic things like version numbers, server slots, loading of data packs, and startup level. We can get around this incompatibility by using the Enhance Edition's meta.lsx and modifying it with a hex editor to run your mod. The big thing to mod in this file would be the startup level.

This means that it is possible to run mods made in the original editor on the new game, though there are obviously some quirks.

For simplicity's sake, let's download a 4 player character creation mod and apply it to DOS:EE. I used this one http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=561153

You'll want to unpack the mod using the extractor from the original game, and then drop it's contents (sans meta.lsx) into the Divnity EE/Mods/Main folder.. You then extract your EE Main.pak and browse to the Mods/Main/ folders of the EE Extracted Main.pak. Take the main.lsx file from there, and drop it into the /Mods/Main/ folder of your EE install. So at this point in your Divinity EE/Mods/Main folder you should have the extracted contents of the 4 player mod, and the main.lsx file from the vanilla enhanced edition. You will want to hex edit the main.lsx file and change two things. First, the player count must be set to 4. Second, you will want want to change the "StrarupLevelName" value to "CharacterCreationRedux".

Now your Divinity EE will be loading this mod on startup. You'll get an error warning you Main is corrupt and you won't be able to play multiplayer. Not fully true, this just means you won't be able to play multiplayer with unmodded copies. Since there's no mod button on the menu we're forced to load mods by overwriting the main mods files. More on this later.

Let's get back to the character creation for now. So the character creation mod I linked works like this: http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=526228#Post526228. To summarize, it loads the CharacterCreationRedux level. Once you complete the level, there's a script the mod's author built which checks to see if character creation is completed, then it spawns two more characters, and autosaves. In the original game this caused the game engine to prompt a 2nd character creation for those "unassigned" characters. Script handling this is below

Code
KB
	{
		IF
		CharacterCreationFinished(CHARACTER_NULL)
		AND
		CurrentLevel("CharacterCreationRedux")
		THEN
		CharacterTeleportPartyToTrigger(TRIGGER_CharacterCreationHook, "");
		TimerLaunch("First Character Creation Complete", 1000);
		
		IF
		TimerFinished("First Character Creation Complete")
		AND
		CharacterAddToCharacterCreation(CHARACTER_Player3, 0, 1)
		AND
		CharacterAddToCharacterCreation(CHARACTER_Player4, 0, 1)
		THEN
		CharacterAddAbilityPoint(CHARACTER_Player3, 0);  //Need this to make the game reasess available stat/talent/ability points
		CharacterAddAbilityPoint(CHARACTER_Player4, 0);
		CharacterDetachFromGroup(CHARACTER_Player3); //Need this so when we teleport one player, we don't teleport the other
		CharacterDetachFromGroup(CHARACTER_Player1);
		CharacterTeleportToTrigger(CHARACTER_Player1, TRIGGER_StartPoint_000, "");
		CharacterTeleportToTrigger(CHARACTER_Player2, TRIGGER_StartPoint_001, "");
		CharacterTeleportToTrigger(CHARACTER_Player3, TRIGGER_StartPoint_002, "");
		CharacterTeleportToTrigger(CHARACTER_Player4, TRIGGER_StartPoint_003, "");
		AutoSave();  //We need this to trigger the Character Creation GUI
		
		
	}
	EXIT


This doesn't seem to work in EE. My characters get ported to the 2nd level and the game autosaves, but it doesn't seem to trigger a 2nd round of character creation. So that's kind of where I'm stuck. If I mod the script to just push the characters to cyseal it'll port all 4 characters and start the game. Basically, it looks like the little hack for getting a 2nd round of character creations going is no longer working in EE, and I'm trying to figure out if there is any alternative.

To get back to my talk about mods in EE. The EE file structure seems to be very similar to the original game. In theory one could take the menu assets from the original game and apply them to EE to enable the mod button. I don't know if the game engine code actually has any logic for that, but it's another option to explore for potentially getting a mod button in EE.

Good luck, feel free to ask questions. I know this is kind of a lot and might not make sense without more context.
Posted By: Isildur Re: Enhanced Edition 4 Player Mod - 01/11/15 08:08 PM
Nice work.
In the end, if I do what's said in the first post, what characters will player 3 and 4 get?
My companions or they'll have a character creation screen as well?
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 01/11/15 08:49 PM
Originally Posted by Isildur
Nice work.
In the end, if I do what's said in the first post, what characters will player 3 and 4 get?
My companions or they'll have a character creation screen as well?


Players 3 and 4 can control whichever character(s) you wish to assign to them though the character assign menu. Your choices are the 2 created source hunters, the 4 companions, or the henchmen you can recruit.
Posted By: R1k0 Re: Enhanced Edition 4 Player Mod - 01/11/15 11:19 PM
[quote=Foodchain]

.....

[code]
KB
{
IF
CharacterCreationFinished(CHARACTER_NULL)
AND
CurrentLevel("CharacterCreationRedux")
THEN
CharacterTeleportPartyToTrigger(TRIGGER_CharacterCreationHook, "");
TimerLaunch("First Character Creation Complete", 1000);

IF
TimerFinished("First Character Creation Complete")
AND
CharacterAddToCharacterCreation(CHARACTER_Player3, 0, 1)
AND
CharacterAddToCharacterCreation(CHARACTER_Player4, 0, 1)
THEN
CharacterAddAbilityPoint(CHARACTER_Player3, 0); //Need this to make the game reasess available stat/talent/ability points
CharacterAddAbilityPoint(CHARACTER_Player4, 0);
CharacterDetachFromGroup(CHARACTER_Player3); //Need this so when we teleport one player, we don't teleport the other
CharacterDetachFromGroup(CHARACTER_Player1);
CharacterTeleportToTrigger(CHARACTER_Player1, TRIGGER_StartPoint_000, "");
CharacterTeleportToTrigger(CHARACTER_Player2, TRIGGER_StartPoint_001, "");
CharacterTeleportToTrigger(CHARACTER_Player3, TRIGGER_StartPoint_002, "");
CharacterTeleportToTrigger(CHARACTER_Player4, TRIGGER_StartPoint_003, "");
AutoSave(); //We need this to trigger the Character Creation GUI


}
EXIT
[/code]

...

[/quote]

I think there is a error in this code

[code]
...
CharacterDetachFromGroup(CHARACTER_Player3); //Need this so when we teleport one player, we don't teleport the other
CharacterDetachFromGroup(CHARACTER_Player1);
...
[/code]

i think that maeby it is correct version

[code]
...
CharacterDetachFromGroup(CHARACTER_Player3); //Need this so when we teleport one player, we don't teleport the other
CharacterDetachFromGroup(CHARACTER_Player4);
...
[/code]
Posted By: pakhelp Re: Enhanced Edition 4 Player Mod - 02/11/15 12:41 AM
hi guys trying to follow the post but running into this error

http://imgur.com/Cx8lQfs


any help is appreciate
Posted By: Bojack316 Re: Enhanced Edition 4 Player Mod - 02/11/15 01:01 AM
Sorry if this is the wrong place to ask, but I went through the thread and one thing I was still wondering was: is it possible to play 3 Players locally (all on same screen) with this Mod or is it Online/LAN only? If Online/LAN only, can you have 2 people playing on one PC, and 1 other people joining through Online/LAN on another PC?
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 02/11/15 01:02 AM
Originally Posted by pakhelp
hi guys trying to follow the post but running into this error

http://imgur.com/Cx8lQfs


any help is appreciate


The error in the screenshot is showing calls for methods for package creation. You need to press the "Extract package" button, not the "Create package" button.
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 02/11/15 01:09 AM
Originally Posted by Bojack316
Sorry if this is the wrong place to ask, but I went through the thread and one thing I was still wondering was: is it possible to play 3 Players locally (all on same screen) with this Mod or is it Online/LAN only? If Online/LAN only, can you have 2 people playing on one PC, and 1 other people joining through Online/LAN on another PC?


3 player split screen isn't possible because the split screen stuff is game engine programming that we don't really have access to.

I don't see any reason you can't do something like 2 players split screen + 1 or 2 connecting from another PC though WAN or LAN. 2 players per PC should also work.
Posted By: pakhelp Re: Enhanced Edition 4 Player Mod - 02/11/15 01:15 AM
[quote]
The error in the screenshot is showing calls for methods for package creation. You need to press the "Extract package" button, not the "Create package" button. [/quote]


thank you for the quick reply. Sorry for my lack of experience with these programs, believe me it is frustrating seeing it work for everyone else when I am struggling. When I click extract I am given this dialog

http://i.imgur.com/drHzrZ3.png
Posted By: pakhelp Re: Enhanced Edition 4 Player Mod - 02/11/15 01:51 AM
any ideas
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 02/11/15 02:02 AM
Originally Posted by pakhelp
any ideas


Not really.

Close the program, delete the files you copied, and start the process again.
Posted By: pakhelp Re: Enhanced Edition 4 Player Mod - 02/11/15 02:14 AM
[quote=Foodchain][quote=pakhelp] any ideas [/quote]

Not really.

Close the program, delete the files you copied, and start the process again.[/quote]


I've tried copying the main.pak several times, downloaded the extractor several times (and every screenshot I've seen is using a different version than I am), tried multiple destinations, tried using the main.pak in my game's directory... I'm out of ideas myself. I'll just give it another go I suppose, maybe reinstall or something.
Posted By: flame30 Re: Enhanced Edition 4 Player Mod - 02/11/15 09:03 AM
[quote=Foodchain]
This doesn't seem to work in EE. My characters get ported to the 2nd level and the game autosaves, but it doesn't seem to trigger a 2nd round of character creation. So that's kind of where I'm stuck. If I mod the script to just push the characters to cyseal it'll port all 4 characters and start the game. Basically, it looks like the little hack for getting a 2nd round of character creations going is no longer working in EE, and I'm trying to figure out if there is any alternative.
[/quote]

Nice work !
I had already think of this mod because i had play on it on DOS but i have not succeed to install it on DOS::EE before.

Sorry, i have not enough time to dive in the game code but i really want to help for this, so i'll throw some idea to help you ( I hope....)

The intersting thing here is, why we need to autosave to get a 2nd round of creation ? Is there any trigger which can do the work ? It can interesting to see "the thing" which load you the creation menu on the first map to apply it on the second one.

Another way, but i haven't any idea to do this , maybe we can do a trick for change the focus of creation menu ? I mean , instead of reload it change the character you're editing
Posted By: Isildur Re: Enhanced Edition 4 Player Mod - 02/11/15 11:45 AM
Originally Posted by Foodchain
Originally Posted by Isildur
Nice work.
In the end, if I do what's said in the first post, what characters will player 3 and 4 get?
My companions or they'll have a character creation screen as well?


Players 3 and 4 can control whichever character(s) you wish to assign to them though the character assign menu. Your choices are the 2 created source hunters, the 4 companions, or the henchmen you can recruit.


Do you have any work around to get 4 source hunters rather than 2 + companions? Companions don't allow a lot of customization, the players 3 & 4 must feel like controling a bot smirk
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 02/11/15 02:36 PM
Originally Posted by Flame30
Nice work !
I had already think of this mod because i had play on it on DOS but i have not succeed to install it on DOS::EE before.

Sorry, i have not enough time to dive in the game code but i really want to help for this, so i'll throw some idea to help you ( I hope....)

The intersting thing here is, why we need to autosave to get a 2nd round of creation ? Is there any trigger which can do the work ? It can interesting to see "the thing" which load you the creation menu on the first map to apply it on the second one.

Another way, but i haven't any idea to do this , maybe we can do a trick for change the focus of creation menu ? I mean , instead of reload it change the character you're editing


This thread explains how a to get a 2nd round of character creation in the original game: http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=526228#Post526228

This method does not seem to work in DOS:EE. Once the first round of character creation is done, I'm ported to the 2nd character creation level but the camera is the standard top down camera, and the customization menus do not pop up. I don't have any ideas for a new method.

Originally Posted by Isildur

Do you have any work around to get 4 source hunters rather than 2 + companions? Companions don't allow a lot of customization, the players 3 & 4 must feel like controling a bot smirk


Kind of. I've been talking about it for most page 2 of this thread. I can get you to spawn on the beach with 4 source hunters, but you won't be able to customize two of them before the start of the game. No one has created a game save editor yet, but if there was a save-game editor you could start the game, save it, and then edit the other two with a save editor.
Posted By: Linio Re: Enhanced Edition 4 Player Mod - 02/11/15 02:44 PM
This would be nice, but at this states it appears a little bit hacky.
Do you intend to do a steam workshop with this?
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 02/11/15 02:59 PM
Originally Posted by Linio
This would be nice, but at this states it appears a little bit hacky.
Do you intend to do a steam workshop with this?


EE Doesn't actually have workshop. Not yet at least. I think any sort of modding done to this game at the moment is going to be pretty hacky.

Larian has said they will release editing tools for the EE at some point but there was no time-frame given, so who knows. At least I now have a pretty good understanding of how to use the editor for the original game. The scripting language they've made for it is pretty cool.
Posted By: flame30 Re: Enhanced Edition 4 Player Mod - 02/11/15 03:01 PM
Had an idea reading your post foodchain :
An alternativ way to proceed may be to spawn all 4 players with unattributed point on first map , each player can also put abilities, stats like she/he want.

The main problem of this solution is that each player can't decide of their name or pictures.... but i think its already a beginnig
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 02/11/15 03:19 PM
Originally Posted by flame30
Had an idea reading your post foodchain :
An alternativ way to proceed may be to spawn all 4 players with unattributed point on first map , each player can also put abilities, stats like she/he want.

The main problem of this solution is that each player can't decide of their name or pictures.... but i think its already a beginnig


Correct, this would work. You start with no skills either, so you'd have to do something like filling the inventory with the 3-4 basic skillbooks each magic schools gets to pick at the start. Then relying on the honor system of the player throwing away the unused books.

I haven't done this because my group of friends was content with playing henchmen and companions. The main campaign works fine with 2 source hunters and 2 companions/henchmen. Adding the 3rd and 4th source hunter to the main campaign comes with it's own set of issues that were known in the mod for the original game. A lot of scripts in the main campaign aren't written with support for that 3rd and 4th source hunter character, so weird things can happen. For example, source hunter 3 and 4 attacking townsfolk doesn't trigger guards.
Posted By: Norbyte Re: Enhanced Edition 4 Player Mod - 02/11/15 08:35 PM
A trigger that only allows you to pick up X amount of books and makes the rest disappear could work though.
The main D:OS campaigns uses this in one of the dungeons (the secret library afaik).
Hello

how do you get the EoCApp.exe?

I feel stupid /=
Posted By: R1k0 Re: Now Working - Enhanced Edition 4 Player Mod - 03/11/15 08:28 AM
EoCApp.exe is in the folder "Shipping" in the root folder of the D:OS
Posted By: Rominiust Re: Enhanced Edition 4 Player Mod - 03/11/15 09:00 AM
Hey Foodchain, real big thanks for taking the time to type up how to get to the character creation for 4 players, but I'm having some issues if you don't mind giving me a hand.

I can get to the 4 player character creation screen, but it doesn't go anywhere after player 1 & 2 hit "Accept" when they're done creating their characters, and it looks like this: http://puu.sh/l7GW8/2bdd92f42d.jpg with the top right being player 2, the bottom left being player 1, although the top right was the main client the others joined off of.

I've changed the meta.lsx so it looks like this: http://puu.sh/l7H5C/13dddcb656.png (NumPlayers is now 4, and StartupLevelName has the value "CharacterCreationRedux").

Finally, my Mods\Main folder looks like this: http://puu.sh/l7HcZ/b608a54320.png

So I don't personally see anything wrong, but knowing my luck I've failed somewhere majorly, thanks for any help you can provide!
Posted By: Foodchain Re: Enhanced Edition 4 Player Mod - 03/11/15 02:57 PM
Originally Posted by Rominiust
Hey Foodchain, real big thanks for taking the time to type up how to get to the character creation for 4 players, but I'm having some issues if you don't mind giving me a hand.

I can get to the 4 player character creation screen, but it doesn't go anywhere after player 1 & 2 hit "Accept" when they're done creating their characters, and it looks like this: http://puu.sh/l7GW8/2bdd92f42d.jpg with the top right being player 2, the bottom left being player 1, although the top right was the main client the others joined off of.

I've changed the meta.lsx so it looks like this: http://puu.sh/l7H5C/13dddcb656.png (NumPlayers is now 4, and StartupLevelName has the value "CharacterCreationRedux").

Finally, my Mods\Main folder looks like this: http://puu.sh/l7HcZ/b608a54320.png

So I don't personally see anything wrong, but knowing my luck I've failed somewhere majorly, thanks for any help you can provide!


You're not doing anything wrong. I encountered this sort of thing if I got 4 clients connected before players 1 and 2 finished their character creation. Even if you do get past this the next thing it's going to load is going to be a character creation screen with a top down cameras and no menu. The 4 player character creation stuff isn't really working in any practical way. It was more just proof that you could run mods from the original game, weird behavior is expected.

The way I was getting 4 source hunters onto the Cyseal beach was starting with the 2nd level that mod usually loads (CharacterCreation). That level has players 3 and 4 spanwed. When you hit accept on that level's character creation, the game runs a script that pushes all the players to the intro movie and then loads Cyseal with 4 source hunters standing on the beach.

The optimal way of achieving 4 player character creation would be done by creating a character creation menu that supports 4 people. Of course, that's difficult at well. Larian only includes the .swf files with the game. These files only play the content and don't lend themselves to any modification. Wtihout the source .fla files it's hard to understand how exactly how the menus work. The mod's author asked a Larian guy about the source .fla files for the menu and got this response. Seems like it's a "no" on ever sharing the source of their menu files. It would be nice if Larian gave some documentation on what scripting a flash file needs to use to interface with rest of the game.
I already look with in the .exe with XVI32 but is diferent or something, I can't find the HEX line, I already did the rest well, In my ui I can see the 4 slots but they dont work without that hex edit.

Images here http://imgur.com/a/irNIm
Originally Posted by FokkusuES
I already look with in the .exe with XVI32 but is diferent or something, I can't find the HEX line, I already did the rest well, In my ui I can see the 4 slots but they dont work without that hex edit.

Images here http://imgur.com/a/irNIm


You're likely running a different version of the game. Are you running an unpatched GOG version by any chance?

2.0.99.10 steam version, but steam or GOG that shouldn't make any diferent.
Isn't steam supposed to auto-update that for you? (or have you disabled updates?)
Originally Posted by FokkusuES
2.0.99.10 steam version, but steam or GOG that shouldn't make any diferent.


Yeah, the memory location of this value will change depending on the version of the game. The latest Steam version is 2.0.99.113. There's really no reason to not update. Just start up steam and launch the game though Steam once, it'll do it automatically. The patch itself is tiny if bandwidth was a concern.
I believe the Steam version updated, since then it's removed the ability for 4 players. Any chance anyone can tell me the hex numbers to change in the EoCapp since the update?

edit:
Never mind, I'm just an idiot.
[quote=Foodchain]

The optimal way of achieving 4 player character creation would be done by creating a character creation menu that supports 4 people. Of course, that's difficult at well. Larian only includes the .swf files with the game. These files only play the content and don't lend themselves to any modification. Wtihout the source .fla files it's hard to understand how exactly how the menus work. The mod's author asked a Larian guy about the source .fla files for the menu and got [url=http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=536722#Post536722]this[/url] response. Seems like it's a "no" on ever sharing the source of their menu files. It would be nice if Larian gave some documentation on what scripting a flash file needs to use to interface with rest of the game. [/quote]

Have you tried using a Flash decompiler? That should give you the script references.
Originally Posted by Zackbleus
Originally Posted by Foodchain


The optimal way of achieving 4 player character creation would be done by creating a character creation menu that supports 4 people. Of course, that's difficult at well. Larian only includes the .swf files with the game. These files only play the content and don't lend themselves to any modification. Wtihout the source .fla files it's hard to understand how exactly how the menus work. The mod's author asked a Larian guy about the source .fla files for the menu and got this response. Seems like it's a "no" on ever sharing the source of their menu files. It would be nice if Larian gave some documentation on what scripting a flash file needs to use to interface with rest of the game.


Have you tried using a Flash decompiler? That should give you the script references.


Yeah I did. Decompilers spit out pretty messy results. Someone who has a lot of Flash experience could probably make sense of it. The last time I used Flash for any development was over 10 years ago. I don't actually have a license for a modern Flash editor either. So I kind of glanced over the decompiled scripts used in the flash file before deciding that I didn't understand what was actually happening to make it at all work.

Typically when I glance at code or script I can get a decent idea of the of what the program is doing even if I'm unfamiliar with the language. That wasn't the case with the decompiled flash file.
[quote=Foodchain]

Yeah I did. Decompilers spit out pretty messy results. Someone who has a lot of Flash experience could probably make sense of it. The last time I used Flash for any development was over 10 years ago. I don't actually have a license for a modern Flash editor either. So I kind of glanced over the decompiled scripts used in the flash file before deciding that I didn't understand what was actually happening to make it at all work.

Typically when I glance at code or script I can get a decent idea of the of what the program is doing even if I'm unfamiliar with the language. That wasn't the case with the decompiled flash file.[/quote]

I'll take a look and see what I can find. I'll let you know if I get any results.
Does anyone found a way to have 2 Main characters and plus 3 or 4 more companions(hechmans)?

Playing with files even in Original sin(not in EE)does not made any result.Changing in all possible files with DB_MaxComp and DB_MaxCount don't gave any results.
Alright, after a few hours of work I manage to get the .fla files for characterCreation.swf and characterCreation_c.swf.

Download link is here for both: http://puu.sh/l8NeS/183024d777.zip

A lot of the code is initialized in the characterCreation_c.fla under characterCreation_c_fla/MainTimeline.cs

p1_mc, p2_mc, placeholder_mc_1, and placeholder_mc_2 are the references to the players.
[quote=Norbyte]Isn't steam supposed to auto-update that for you? (or have you disabled updates?) [/quote]

I have them disabled for all games, I like to update them manually, call me crazy xd, well, I'll update and try again
When trying to mod the exe I don't think it's working anymore. I was able to find a unique instance of a substring of the hex but appears to not be working as before.

I now get "error: each player has to control one main character." after the patch. Anyone else having this issue now or am I missing something?

Thanks!
Originally Posted by Davidcw6
When trying to mod the exe I don't think it's working anymore. I was able to find a unique instance of a substring of the hex but appears to not be working as before.

I now get "error: each player has to control one main character." after the patch. Anyone else having this issue now or am I missing something?

Thanks!


Yes, this is expected. Patches to the game will overwrite the .exe and nullify previous modifications you made to the exe. The memory values are likely to change as well. I'll update this soon with the new values sometime today.
Yup. Understood and expected here too.

I'll take a stab at finding the location too unless you can get it sometime earlier. :)
I was wondering...What are you guys using to disassemble?
Signature for v2.0.99.676:
48 89 6C 24 28 FF 15 CD F4 50 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 24 2D 91

Replace "40 0F B6 C7" with "31 C0 F7 D0".
You'll have to delete and re-extract the main.lsx file as well, or the game is going to give you an error about file corruption in the main campaign due to the MD5 in the main.lsx file not matching what the game expects.
Ok guys i have a problem...

I can't find the Hex you say on the .exe because i have the version v2.0.98.842 ... So the message ''Every player need to control a main character'' appears .

Can anyone help me with the hex i need to look for? Please...
Originally Posted by Shincry
Ok guys i have a problem...

I can't find the Hex you say on the .exe because i have the version v2.0.98.842 ... So the message ''Every player need to control a main character'' appears .

Can anyone help me with the hex i need to look for? Please...


I don't have the .exe nor do I have any way of getting it. I have it purchased through Steam and it will only download the latest version.

I suggest updating your game. There are no downsides. Steam will download the latest version if you launch the game through Steam. GOG should have the updates posted in the "My Account" section right next to the link for downloading the game.
[quote=Foodchain]

I don't have the .exe nor do I have any way of getting it. I have it purchased through Steam and it will only download the latest version.

I suggest updating your game. There are no downsides. Steam will download the latest version if you launch the game through Steam. GOG should have the updates posted in the "My Account" section right next to the link for downloading the game. [/quote]

Well...I would but you see...I dont own the game in a ''legal'' way ... <_<
Originally Posted by Norbyte
Signature for v2.0.99.676:
48 89 6C 24 28 FF 15 CD F4 50 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 24 2D 91

Replace "40 0F B6 C7" with "31 C0 F7 D0".


Dude you Rock!

Had a brief panic attack when I couldn't find the old hex string. You are on point, duder. Working smooth once again.
Great work guys please keep it up. I just wish Larian would support native 4 player already sheesh. IMHO no real reason in the main campaign restricting it to only 2 players.
Originally Posted by Shincry
Originally Posted by Foodchain


I don't have the .exe nor do I have any way of getting it. I have it purchased through Steam and it will only download the latest version.

I suggest updating your game. There are no downsides. Steam will download the latest version if you launch the game through Steam. GOG should have the updates posted in the "My Account" section right next to the link for downloading the game.


Well...I would but you see...I dont own the game in a ''legal'' way ... <_<


You should buy the game. One of the advantages of genuine software are the updates. Plus I'm all for supporting a developer that releases a fully voiced acted enhanced edition at no extra cost to owners.

Originally Posted by bigironvault
Great work guys please keep it up. I just wish Larian would support native 4 player already sheesh. IMHO no real reason in the main campaign restricting it to only 2 players.


Letting 4 players join a server is one thing, having all 4 players engaged in the story is another. Just reviewing the story of the game makes it clear how much rewriting and reworking you would have to do to have 4 players getting an equal experience with none feeling like they're a shadow of a main character. There's also issues with split screen only supporting 2 players. The player banter/disagreement system also only supports 2 people. They have a pretty good reason for not supporting 4 players. The campaign just wasn't built with 4 source hunters in mind.

Larian clearly acknowledged the demand for 4 player co-op as demonstrated by the sequel having 4 player support.

-

Also, I'm going to rework the OP sometime tonight The thread is a little messy and hard to follow so I plan to fix that. I'll post a guide on Steamcommunity at some point as well, but I'll be using this thread for any updates or discussion.
I can't actually edit the original post anymore due to forum settings. As such I've posted a comprehensive guide on the Steam Community.

I'll continue using this thread for any updates, support, or general idea discussion.
Originally Posted by Zeebot
Originally Posted by Norbyte
Signature for v2.0.99.676:
48 89 6C 24 28 FF 15 CD F4 50 00 40 0F B6 C7 48 8B 4C 24 60 48 33 CC E8 24 2D 91

Replace "40 0F B6 C7" with "31 C0 F7 D0".


Dude you Rock!

Had a brief panic attack when I couldn't find the old hex string. You are on point, duder. Working smooth once again.


ditto, thanks norbyte
ty for all you done so far
New patch up on steam. Version v2.0.100.40

This should be the hex value to edit for disabling the main character check
Search for: 30 8B 81 64 03 00 00 48 3B D0 40 0F 93 C7 48 8B CB 48
Replace "40 0F 93 C7" with "31 C0 F7 D0".
Hi guys thanks for the fixes.
I'm using the version 2.0.100.40, when I replace "40 0F 93 C7" with "31 C0 F7 D0" the application crashes with error code 0xc0000142 on windows 7.

Can you please confirm this works ?

It worked for me in the previous version...
Yeah, it should work.
The pattern "40 0F 93 C7" can be found multiple times (!) in the file. Make sure that you only replace the one that matches the "30 8B 81 64 03 00 00 48 3B D0 40 0F 93 C7 48 8B CB 48" pattern exactly, otherwise you'll be overwriting unrelated code/data that may cause the game to crash.
Also make sure that you're replacing those bytes, not adding new ones (in some hex editors the default behavior is "overwrite", while others append new bytes and you have to explicitly delete the old ones).
Guide on steam community updated with the hex string for the new patch.

Version v2.0.103.346
Search for: 9C 03 00 00 48 3B D0 40 0F 93 C7 48 8B CB 48 89 6C 24
Replace "40 0F 93 C7" with "31 C0 F7 D0".

I also had a PM from Raze dated about a month ago to let me know I now had permissions to edit the original post of this thread. I missed that PM earlier, but I'm going to update the post with the guide sometime later today.

Thanks everyone.
Hello, on start i would like to say sorry for my english :) i have kind of a problem with just editing eocapp.exe
Well i have GoG version i tested your solution and well it dont work on my relaese and i already know it like u do too propobly after others people already writed here or in steam community guide. I was searching i think everywhere for an solution and i would like to ask if mayby anyone already find it? I would like to really like to play normaly with 3-4 people. I find out temp. solution but its well "unconfortable" (Host turn on game twice and at first game he get stucked in an error "every player need main character..." and he just control no characters and at second game turned on he actualy playing his character with others controling rest) So as u can see i would really be thankfull for an solution for GoG version , i could even upload .exe file or just edit it on my pc even better for me or just an part of hex if needed. The error - "application was unable to start correctly 0xc0000142" after replace in hex.

Best Regards

Tired player
Originally Posted by Tro1L
Hello, on start i would like to say sorry for my english smile i have kind of a problem with just editing eocapp.exe
Well i have GoG version i tested your solution and well it dont work on my relaese and i already know it like u do too propobly after others people already writed here or in steam community guide. I was searching i think everywhere for an solution and i would like to ask if mayby anyone already find it? I would like to really like to play normaly with 3-4 people. I find out temp. solution but its well "unconfortable" (Host turn on game twice and at first game he get stucked in an error "every player need main character..." and he just control no characters and at second game turned on he actualy playing his character with others controling rest) So as u can see i would really be thankfull for an solution for GoG version , i could even upload .exe file or just edit it on my pc even better for me or just an part of hex if needed. The error - "application was unable to start correctly 0xc0000142" after replace in hex.

Best Regards

Tired player


I don't have the GOG version so I don't know if the exe is somehow different. We can verify by checking an MD5 hash for an exe. Download something like http://www.winmd5.com/ and check the MD5 of the GOG version of EoCapp.exe

The latest one on Steam returns this hash: 251d065887f36b40b8fac21b9ec81d34

If the GOG one returns a different hash it means the exe files are different and therefore the memory locations posted would be different as well.
New version 2.0.103.737 has been pushed to Steam. I'll look for the hex strings when I finish work in a few hours. If you had your game modded this latest patch will prevent the main module from loading correctly. If you're seeing a menu with a background picture of two source hunters and some greyed out menu buttons you need to delete the "Mods" folder you created inside your Divinity folder.

This version of Divinity appears to have native mod support (though the editor has not yet been pushed live for what I can tell).

Anyway, I just wanted to post this in hopes of reducing some of the inevitable "my buttons are greyed out I can't play after this patch" posts.
@Foodchain any update on the fix?
It's actually the same as the previous patch.

Version v2.0.104.737
Search for: 9C 03 00 00 48 3B D0 40 0F 93 C7 48 8B CB 48 89 6C 24
Replace "40 0F 93 C7" with "31 C0 F7 D0".

You'll still have to redo the edits as the patch undid them.
Posted By: Obbu Re: Now Working - Enhanced Edition 4 Player Mod - 27/12/15 03:15 AM
Couple of questions:

Every time the game updates, and you need to re-edit files etc, are your saved games functioning still post-update?

I really appreciate the work you're doing here, as I'm sure a lot of other people do: hope the devs get those tools to you ASAP so we can get the user friendly version :D

I'm presently discussing getting another playthrough going with friends, but progress on the mod tools release is slowing it down :P

Originally Posted by Obbu
Couple of questions:

Every time the game updates, and you need to re-edit files etc, are your saved games functioning still post-update?

I really appreciate the work you're doing here, as I'm sure a lot of other people do: hope the devs get those tools to you ASAP so we can get the user friendly version laugh

I'm presently discussing getting another playthrough going with friends, but progress on the mod tools release is slowing it down :P



Save games are forwards and backwards compatible.
Yes every time the game updates you have to change the files again. Your save files will work again after you change the files.
Posted By: Obbu Re: Now Working - Enhanced Edition 4 Player Mod - 27/12/15 06:28 AM
Ok I've got it going: So we have to assign companions to people - no current way to get 4 people going at the start?

I might have to wait on the mod tools :P
Hi Guys, just made this account to post here.
Ive done everything as stated above and my 2 friends can join, but at character creation, i can only assign characters to 2/3 people. Do i need a save with a companion already? The 3rd person is stuck on waiting and cant click anything.
Any help would be great.
Thanks
Posted By: Raze Re: Now Working - Enhanced Edition 4 Player Mod - 07/01/16 04:59 AM

You need a companion before the third person will be able to play; this mod doesn't alter the character creation for the main game (that might be possible after the editor for the EE is released).
Hey there guys! Haven't really messed with any of the coding so sorry for the noob quesetion, but do I only need to do the most recent patch files? or do I need to search/change each the code for each previous patch as well?
Posted By: Raze Re: Now Working - Enhanced Edition 4 Player Mod - 01/02/16 03:27 AM

You only need to do the edit for the most recent version.
Thank you very much Raze!
So I have double checked my version, and what file I am extracting, but for some reason can not find the string for my version. I got 2.0.104.737
Hex chain
9C 03 00 00 48 3B D0 40 0F 93 C7 48 8B CB 48 89 6C 24

is this correct?
Never mind found the issue!
Hello.
I have a bproblem with "Extract package" - http://imgur.com/1PNf2FQ
Any ideas? Delete\reupload did't work.
upd: "метод не найден" = "Method not found"
Posted By: Raze Re: Now Working - Enhanced Edition 4 Player Mod - 03/04/16 08:11 AM

Is there a known issue with this working when using a controller? Someone in the Steam forum reported it worked fine using a keyboard and mouse, but not after switching to a controller.
Originally Posted by Finnik
Hello.
I have a bproblem with "Extract package" - http://imgur.com/1PNf2FQ
Any ideas? Delete\reupload did't work.
upd: "метод не найден" = "Method not found"


Hi. I didn't make the pak extractor so I'm not sure what's causing the error. I'd try installing the latest .net framework and see if that fixes it. https://www.microsoft.com/net/default.aspx

Originally Posted by Raze

Is there a known issue with this working when using a controller? Someone in the Steam forum reported it worked fine using a keyboard and mouse, but not after switching to a controller.


I just tested it on the latest version using a controller and it worked fine. It would depend on what kind of the error the user is getting. The most common is that "Each player must have a main character assigned" error loop. If that's the issue, the user needs to verify that the exe is modified and the correct exe is being used when launching the game.
Any next hexa code for version:
2.0.119.430

I cant find this code in exe:
9C 03 00 00 48 3B D0 40 0F 93 C7 48 8B CB 48 89 6C 24
Version v2.0.119.430
Search for: B4 03 00 00 48 3B D0 40 0F 93 C7 48 8B CB 48 89 6C 24
Replace "40 0F 93 C7" with "31 C0 F7 D0".'

I use my Steam community guide to provide immediate updates as I find it easier to maintain. Bookmark http://steamcommunity.com/sharedfiles/filedetails/?id=548760493 for updates on latest patches.
Hello! With this 4 connected players hex mod:

1. Does it still work if you only have 3 human players (and one of us could control the 4th character)?
2. Does anyone know if human player #3 and human player #4 still get Steam achievements?
© Larian Studios forums