For the hex edit method, the term you need to search for is NumPlayers near the start of the '..\Divinity - Original Sin\Data\Main_1.pak' file.