Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Page 1 of 6 1 2 3 4 5 6
Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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.

Last edited by Foodchain; 29/10/15 08:20 PM.
Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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.

Joined: Mar 2014
apprentice
Offline
apprentice
Joined: Mar 2014
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

Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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.

Joined: Oct 2015
Z
stranger
Offline
stranger
Z
Joined: Oct 2015
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?

Joined: Oct 2015
S
stranger
Offline
stranger
S
Joined: Oct 2015
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

Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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.

Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
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".

Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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?

Last edited by Foodchain; 29/10/15 07:42 PM.
Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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.

Joined: Oct 2015
Z
stranger
Offline
stranger
Z
Joined: Oct 2015
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.

Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
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

Joined: Oct 2015
K
stranger
Offline
stranger
K
Joined: Oct 2015
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

Joined: Jan 2009
veteran
Offline
veteran
Joined: Jan 2009
So you can play 4-player co-op, but only with autosaving?

Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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.

Joined: Oct 2015
B
stranger
Offline
stranger
B
Joined: Oct 2015
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.

Joined: Oct 2015
K
stranger
Offline
stranger
K
Joined: Oct 2015
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

Last edited by kamikadza13; 29/10/15 09:07 PM.
Joined: Oct 2015
A
stranger
Offline
stranger
A
Joined: Oct 2015
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.

Joined: Oct 2015
I
stranger
Offline
stranger
I
Joined: Oct 2015
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]

Last edited by ignorhunter; 29/10/15 09:56 PM.
Joined: Jul 2014
F
journeyman
OP Offline
journeyman
F
Joined: Jul 2014
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

Last edited by Foodchain; 29/10/15 10:02 PM.
Page 1 of 6 1 2 3 4 5 6

Moderated by  gbnf, Kurnster, Monodon, Stephen_Larian 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5