Archipelago icon indicating copy to clipboard operation
Archipelago copied to clipboard

New Game Implementation: Civilization VI

Open hesto2 opened this issue 1 year ago • 7 comments

What is this fixing or adding?

Support for Civilization VI as a new world.

How was this tested?

The world has several test suites as well as running it through alpha & beta with the community since May

hesto2 avatar Aug 06 '24 04:08 hesto2

@ScipioWright thank you for the review 🙏

hesto2 avatar Aug 06 '24 21:08 hesto2

I did some test gens with a yaml (renamed to weights.yaml so the host.yaml players can affect it) with most options set to random.

I found that if shuffle_goody_hut_rewards is on and the other options are set to random, it'll fail almost every time with a 50-player game.

I found that with it off, a 20-player game generation slows way way way down during item placement. Usually this means swap is having a hard time but hasn't outright failed, usually due to a small amount of sphere 1 locations. It's hard to say for sure without debugging.

ScipioWright avatar Sep 09 '24 13:09 ScipioWright

Oh interesting, I'll take a look. So I can make sure I'm debugging correctly, were these all civ games or was the 20/50 a mix?

On Mon, Sep 9, 2024, 7:39 AM Scipio Wright @.***> wrote:

I did some test gens with a yaml (renamed to weights.yaml so the host.yaml players can affect it) with most options set to random.

I found that if shuffle_goody_hut_rewards is on and the other options are set to random, it'll fail almost every time with a 50-player game.

I found that with it off, a 20-player game generation slows way way way down during item placement. Usually this means swap is having a hard time but hasn't outright failed, usually due to a small amount of sphere 1 locations. It's hard to say for sure without debugging.

— Reply to this email directly, view it on GitHub https://github.com/ArchipelagoMW/Archipelago/pull/3736#issuecomment-2338155698, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2A4K5XUS4ED7WLBKZU6RTZVWQHNAVCNFSM6AAAAABMBPDZBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYGE2TKNRZHA . You are receiving this because you commented.Message ID: @.***>

hesto2 avatar Sep 09 '24 13:09 hesto2

All Civ games

ScipioWright avatar Sep 09 '24 14:09 ScipioWright

I did some test gens with a yaml (renamed to weights.yaml so the host.yaml players can affect it) with most options set to random.

I found that if shuffle_goody_hut_rewards is on and the other options are set to random, it'll fail almost every time with a 50-player game.

I found that with it off, a 20-player game generation slows way way way down during item placement. Usually this means swap is having a hard time but hasn't outright failed, usually due to a small amount of sphere 1 locations. It's hard to say for sure without debugging.

Ok I think I'm going to take a pass at how the rules are setup for some of the earlier stages and refactor that a bit. It looks like it is just a little too restrictive for it to successfully gen with larger numbers of player and I think there's probably some optimizations I can add in that will make it go faster

hesto2 avatar Sep 11 '24 01:09 hesto2

I did some test gens with a yaml (renamed to weights.yaml so the host.yaml players can affect it) with most options set to random.

I found that if shuffle_goody_hut_rewards is on and the other options are set to random, it'll fail almost every time with a 50-player game.

I found that with it off, a 20-player game generation slows way way way down during item placement. Usually this means swap is having a hard time but hasn't outright failed, usually due to a small amount of sphere 1 locations. It's hard to say for sure without debugging.

Ok I got this working MUCH better, I was able to generate with a large amount of players 20, 50, 50+ and the generation times were all 30-60 seconds (previously 600+ seconds, and closer to 1000 for some of those ones that stalled out).

I had to give the randomizer some help with figuring out how to fill the first few locations (I denied late game items for the first era and forced all the items required to pass the first era to be early_items). Solid catch with this, I'll definitely keep this in my pocket as a test case for this and my Metroid apworld

hesto2 avatar Sep 13 '24 02:09 hesto2

@ScipioWright (sorry for the ping) Anything else I can look at, or any other sets of eyes you'd recommend I get on this?

hesto2 avatar Oct 07 '24 02:10 hesto2

World load times have become a serious issue for AP. Every generation has to load the worlds, and right now, it has to load all worlds (we don't have lazy / selective world loading yet)

As a result, we're no longer as willing to merge games that store their data in this many json files and use file-io to load them. These files cannot be optimised / compiled down for the .exe build and have to be read from inside zip files (.apworld) and parsed as json every time.

Your json data doesn't look very layered, so I think these could just be rewritten as Python files fully. If you want to keep the json files, there are several solutions, but they all come down to the same thing: Generate .py files from the json files. Usually people write a script for this that they include in the world, or they use something like pickle.

NewSoupVi avatar Nov 30 '24 04:11 NewSoupVi

Ah sweet good to know, I'll update it. Thanks!

On Fri, Nov 29, 2024, 9:05 PM NewSoupVi @.***> wrote:

World load times have become a serious issue for AP.

As a result, we're no longer as willing to merge games that store their data in this many json files and use file-io to load them. These files cannot be optimised / compiled down for the .exe build and have to be read from inside zip files (.apworld) and parsed as json every time.

Your json data doesn't look very layered, so I think these could just be rewritten as Python files fully. If you want to keep the json files, there are several solutions, but they all come down to the same thing: Generate .py files from the json files. Usually people write a script for this that they include in the world, or they use something like pickle.

— Reply to this email directly, view it on GitHub https://github.com/ArchipelagoMW/Archipelago/pull/3736#issuecomment-2508818858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2A4KYK5MRC5ECGZGZRD732DE2QLAVCNFSM6AAAAABMBPDZBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBYHAYTQOBVHA . You are receiving this because you commented.Message ID: @.***>

hesto2 avatar Nov 30 '24 06:11 hesto2

@NewSoupVi I've updated all the data files to be .py files. Let me know if the way I went about it solves the issue 👍

hesto2 avatar Dec 01 '24 21:12 hesto2

It'll probably be until the weekend until I can look at New Game implementations again, but yeah it seems correct! :) Thank you

NewSoupVi avatar Dec 03 '24 02:12 NewSoupVi

@NewSoupVi thanks for the review! I'll take a look and try to implement these this week!

hesto2 avatar Jan 06 '25 01:01 hesto2

I played a full game yesterday. Most things seem to be working as intended. One thing I did notice however is that toggling a technology generates era score (so you could generate infinite era score) as shown in the video below.

https://github.com/user-attachments/assets/ea4dc462-44f4-4376-b91d-b957f8ad0143


I was also wondering if it would be possible to show eureka's/inspirations on the Archipelago side of the tech tree, as currently you'd need to keep switching to see these.


Nonetheless, thanks for all the work on the mod :)

Wouter17 avatar Jan 24 '25 14:01 Wouter17

I played a full game yesterday. Most things seem to be working as intended. One thing I did notice however is that toggling a technology generates era score (so you could generate infinite era score) as shown in the video below.

https://github.com/user-attachments/assets/ea4dc462-44f4-4376-b91d-b957f8ad0143


I was also wondering if it would be possible to show eureka's/inspirations on the Archipelago side of the tech tree, as currently you'd need to keep switching to see these.


Nonetheless, thanks for all the work on the mod :)

Yeah this is a known issue, unfortunately. The way the game handles those is in a way where it is tough to get around. I have it on my list of post 1.0 improvements to make though. Thank you for the feedback! I'll also look into the inspiration on AP tree. I may not be able to do it that exact way but I can make it easier somehow

hesto2 avatar Jan 24 '25 18:01 hesto2

Hi. Unless you think something important to your world was added to AP core recently or you need to resolve conflicts, you don't need to click the "update" button all the time - It sends a notification to everyone who is following the PR

I understand tho, there is the weirdly threatening "YOUR BRANCH IS OUT OF DATE!!!!" text :D

NewSoupVi avatar Jan 31 '25 00:01 NewSoupVi

Oh geez, I had no idea. I'm so sorry!!

On Thu, Jan 30, 2025, 7:18 PM NewSoupVi @.***> wrote:

Hi. Unless you think something important to your world was added to AP core recently or you need to resolve conflicts, you don't need to click the "update" button all the time - It sends a notification to everyone who is following the PR

— Reply to this email directly, view it on GitHub https://github.com/ArchipelagoMW/Archipelago/pull/3736#issuecomment-2626001348, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2A4KZANOHJ2NHABO6A3W32NK6MDAVCNFSM6AAAAABMBPDZBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRWGAYDCMZUHA . You are receiving this because you commented.Message ID: @.***>

hesto2 avatar Jan 31 '25 00:01 hesto2

(You know this, just documenting it on the PR)

The inno setup needs to be changed to refer to ArchipelagoLauncher.exe instead of Civ6Client.exe

I have tested that this works by running inno setup myself and double clicking an .apcivvi file.

NewSoupVi avatar Mar 10 '25 01:03 NewSoupVi

(You know this, just documenting it on the PR)

The inno setup needs to be changed to refer to ArchipelagoLauncher.exe instead of Civ6Client.exe

I have tested that this works by running inno setup myself and double clicking an .apcivvi file.

Updated, thank you for looking into this!

hesto2 avatar Mar 10 '25 02:03 hesto2