Civ 6 Multiplayer Save Hex Editing

CornMaster

Romulan Commander
Retired Moderator
Joined
Nov 19, 2000
Messages
3,761
Location
Cloaked Warbird in the Neutral Zone
Hello Folks,
I've found a few posts, and a few google searches resulting in some information regarding hex editing save files, although most were specific to single player changes.

A few friends and I play regularly, and are trying to spice up the gameplay a bit by creating our own game mode. Essentially, we will have a set number of turns to play the game regularly in an enforced peace among human players, while trying to court favour with AI players. Once the turn limit expires, we would set teams (and permanent war) based upon which AI viewed which human player most favourably. Think some space 4Xs where they vote for the leader of the galaxy, and you can accept the results, or battle to the death. This would be the battle to the death part. :)

Anyway, all I really need to do to make this work is change who is on what team once the turn limit expires. So we would save the game, I tweak the save, and reload. I have to tweak the save file because as far as I can tell, there is no way in game to change teams once the game is started.

I've played around a bit, and edited the save such that the teams in the lobby on a reload reflect the teams that I want in the game (not working 100%, but I'm getting there). What didn't work was actually being on a team once the game was reloaded. So I seem to have impacted the lobby display, but not every part of the file where teams are defined.

Before I dive deep into this for another few hours and work out if it is possible, wondering if anyone has tried something like this before, or if they can point me in the direction of any hex editing instructions relating to changing teams in a save file?

Thanks
 
Thought I'd post my progress so far.

Changing those two hex values may have actually made the changes I needed, but I found another 4 hex values that looks like they should be updated. So I updated those from FFFFFFFF to 00000000 (Team 1 [displays as team 0 in the game though]). I didn't have automatic diplomatic relations with the team members, but once I finally found them, it showed shared vision and open borders.

So the important piece to look for was 54 B4 8A 0D 02 00 00 00 00 00 00 00 00 00 00 00

After that, the next two digits (in most cases) is the team number. But only when shortly followed by a civ leader. See the screenshot for an example:

HxD_ZgVst2EhsZ.png


You will likely need to renumber the other players as well. Barbarians should be the last number available, and free cities the number before that. While your players use up the other numbers.

So if you were playing a game with 4 players and no teams, you would have something like this:
p1 = 00
p2 = 01
p3 = 02
p4 = 03
free cities = 04
barbs = 05

So if you want to put p1, p2 and p3 on a team, then you would renumber like this:
p1 = 00
p2 = 00
p3 = 00
p4 = 01
free cities = 02
barbs = 03

I'm not sure if this renumbering is strictly necessary, I'll do more testing later.

The last piece is to update the 8 additional hex digits to switch the teams. Again, not sure if this is strictly necessary either, but I suspect it may be, and may control things like shared vision and open borders. But this is purely speculation at this point. These appear towards the end of the file, and looks like this for someone not on a team:
HxD_YHGVY1rOpi.png


Switched to this to match the team number that they are now on:
HxD_9WxGpGqV6N.png


I've tried this once, with one save file, so I'm going to do more testing to see if it will work again, and with a game that has been going for a while versus a turn 1 save. I'll let you know the progress.
 
Top Bottom