Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinLinksPerRegion is not properly respected when spawning region links #1303

Open
Tedster59 opened this issue Feb 24, 2024 · 1 comment
Open

Comments

@Tedster59
Copy link
Contributor

Relevant discord discussion: https://discord.com/channels/165245941664710656/273238884433788928/1210722316166897756

When the game starts a new campaign, it generates all region links and then removes them based on the max links per region setting. However, there are two issues with this:

  1. GraphIsValid does not check if the region has below the minimum number of links, so when links are removed, it does not fail if links go below the minimum.
  2. IsEligibleStartRegion hardcodes the min region links to 2 instead of using the config value in its return (Count > 1); statement.

For LWoTC, I'm trying to ensure that the starting region has a minimum of 3 links.

Potential solutions:

  1. Add an override event to IsEligibleStartRegion to allow mods to change whether a region is valid starting region.
  2. Adjust IsEligibleStartRegion to use the Min regions config instead of hardcoding it
  3. Adjust GraphIsValid to check the minimum regions when validating whether removing a link is acceptable.
@Tedster59
Copy link
Contributor Author

Tedster59 commented Feb 24, 2024

Example from a LWoTC campaign. The starting region is New Arctic, it does not have a connection to Western US because Western US has 4 links and I believe the link to New Arctic was removed during the campaign creation. LWoTC sets the min links per region to 3 and the max links to 4.
image

Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 24, 2024
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 24, 2024
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 25, 2024
Implement new override event for starting region eligibility hook

Fixes issue X2CommunityCore#1303
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 25, 2024
Fix doc errors

Implement new override event for starting region eligibility hook

Fixes issue X2CommunityCore#1303
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 25, 2024
Fix review comments

Fix doc errors

Implement new override event for starting region eligibility hook

Fixes issue X2CommunityCore#1303
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 25, 2024
Fix review comments

Fix doc errors

Implement new override event for starting region eligibility hook

Fixes issue X2CommunityCore#1303

Mark function final
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 25, 2024
Fix review comments

Fix doc errors

Implement new override event for starting region eligibility hook

Fixes issue X2CommunityCore#1303

Mark function final
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Feb 25, 2024
Fix review comments

Fix doc errors

Implement new override event for starting region eligibility hook

Fixes issue X2CommunityCore#1303

Mark function final
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant