[DONE] Invalid number of civs in save file

Hi!

We started a six-player game with simultaneous turns (https://www.playyourdamnturn.com/game/9c0c9b5a-aea1-4104-929b-cbdcfde631a2), and now we want to convert it to a Hotseat game played through PYDT. However, when I click Create Save File → Select File To Upload… and choose the save file, I get the following error message:

“Invalid number of civs in save file! (actual: 7, expected: 6)”

Do you know what would cause that? The only thing we can think of is that one of the players (Harald Hardrada) had disconnected and been replaced by an AI when I saved the simultaneous game. I switched that slot back to a Human player in the Hotseat game setup screen.

Thank you!
John

Can you post a screenshot of the staging room screen when you load the file? I can’t easily load the game file without finding the mods. It does look like there’s 7 civs in the file (Russia being the 7th).

Interesting . . . Player 6 (Charlezard) switched from Russia to Arabia right before we started the game to avoid a color conflict.

Hmm, weird - maybe there’s a bug in the parser, I’ll try and look into it soon but not sure if I’ll find a quick fix.

I wouldn’t call it a bug in the parser, more like a bug in Civ VI to work around!

Forgive me if this is unhelpful, but could the parser theoretically be changed so that it only counts civs where ACTOR_AI_HUMAN is 1 or 3 (AI or Human), not when it’s 2? SLOT_HEADER is also different for the fake Russian civ, but I don’t know what that refers to.

Thanks, yeah, I think that’s it! I took a quick look and was fixated on the SLOT_HEADER being different, but whatever that means that was just a red herring. I added a check for ACTOR_AI_HUMAN !== 2 and all the tests still pass, so I think we’re good. It’s deployed, give it another shot, and thanks again!

Wow! That worked! Thanks for the fix and your amazing tech support!

1 Like

I just noticed one other thing. In the ACTORS section of the file, sometimes ACTOR_AI_HUMAN is 2, and I think we do need to count those actors. Again, I apologize if I’m telling you something you already know, I’d just hate for our fix to break something somewhere else.

I think we’re OK, but thanks for digging in - the change I made was in the area where we’re determining if something is a “civilization” or not - i think it’ll still show up in the actors area. PYDT doesn’t use the actors area much anyway, that’s all actors (city states/barbs/etc) that we don’t really care about.

Wonderful, thank you!