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

Quicker selection of civilizations for custom maps #11229

Closed
2 tasks done
PLynx01 opened this issue Mar 1, 2024 · 8 comments · Fixed by #11423
Closed
2 tasks done

Quicker selection of civilizations for custom maps #11229

PLynx01 opened this issue Mar 1, 2024 · 8 comments · Fixed by #11423
Labels

Comments

@PLynx01
Copy link
Contributor

PLynx01 commented Mar 1, 2024

Before creating

  • This is NOT a gameplay feature from Civ VI, BNW, or outside - see Roadmap
  • This is NOT a gameplay feature from Vanilla Civ V or from G&K - If so, it should be a comment in Missing features from Civ V - G&K #4697

Problem Description

I enjoy playing on custom maps with predefined starting locations. Unfortunately the only way to select the civilizations is to pick them manually. This is a inconvenient process and it may turn out that civilizations are spawned in the wrong place, too sparsely, too densely or the density is inconsistent, which make it necessary to do it again.

Related Issue Links

No response

Desired Solution

Add a game option to auto-fill the rest of civilizations after selecting human-controlled civilization.

Add also the presets of civilizations for map makers, that would enable the players to choose the different amount of civilizations, according to their civilization density preferences.

Alternative Approaches

If implementing the civilizations presets is not viable, add at least the option to auto-fill the civilizations list when they have a defined starting locations on a selected map.

Additional Context

I have some coding skills, so I can try to implement that feature. If I will have a problem, you can help me with that.

@PLynx01 PLynx01 added the feature label Mar 1, 2024
@SomeTroglodyte
Copy link
Collaborator

Sounds familiar. Didn't we already do something in this direction? Wasn't there a similar issue not too long ago?

@PLynx01
Copy link
Contributor Author

PLynx01 commented Mar 3, 2024

Sounds familiar. Didn't we already do something in this direction? Wasn't there a similar issue not too long ago?

I've posted similar issue several months ago, but I wasn't able to implement it back then.

I recently took a second try to implement that function, so maybe I will post a PR with that feature.

@PLynx01
Copy link
Contributor Author

PLynx01 commented Mar 3, 2024

That's it:
#10255

@SomeTroglodyte
Copy link
Collaborator

See - even if we ignore you, we remember 🙃 🤪 - bad joke.

Without Studio open I associate

  • I think New game screen is a mess. Too cluttered, the portrait mode works - maybe, not really optimal, and the implementation of interrelations between different controls is too complicated. Said so before. Very tempted to ditch the thing and start over, with a "wizard" approach - then anything on "done" pages is static and won't need to adapt to new choices. Started once, didn't get far - reusing existing elements isn't trivial either.
  • That story just means - For any new UI element taking space - think small or think really big.
  • You need the map json parsed to read out starting locations. Long ago, new game didn't load the map at all until you were done. Now - map preview (the graphical one) must load something. Or - is there a TileMapPreview class? Look into what that does and how and which usecase it serves. Might be fine to add the starting locs to the preview to parse them quicker...
  • Don't forget Coroutines. At least map preview (the graphical one) runs async, so make sure the info you need now doesn't arrive until later.
  • I believe it possible the random civ placement routine already favours nations with a starting loc - check that. No, it's not the code in MapRegions, that stuff isn't used for loaded maps.

Once you know which nations a map "endorses", you can play around. Simply sort them to the top in Nation Picker? New buttons for auto-population? Possibilities...

@PLynx01
Copy link
Contributor Author

PLynx01 commented Mar 4, 2024

See - even if we ignore you, we remember 🙃 🤪 - bad joke.

Without Studio open I associate

  • I think New game screen is a mess. Too cluttered, the portrait mode works - maybe, not really optimal, and the implementation of interrelations between different controls is too complicated. Said so before. Very tempted to ditch the thing and start over, with a "wizard" approach - then anything on "done" pages is static and won't need to adapt to new choices. Started once, didn't get far - reusing existing elements isn't trivial either.

Yes, I agree with you that new game screen is somewhat cluttered. I think we should make the "Specified Starting Locations Mode Wizard". It would be the separate screen, partially independent from the new game screen.

  • That story just means - For any new UI element taking space - think small or think really big.
  • You need the map json parsed to read out starting locations. Long ago, new game didn't load the map at all until you were done. Now - map preview (the graphical one) must load something. Or - is there a TileMapPreview class? Look into what that does and how and which usecase it serves. Might be fine to add the starting locs to the preview to parse them quicker...

I used the MapSaver class to get the starting locations. I made them as a public variable

  • Don't forget Coroutines. At least map preview (the graphical one) runs async, so make sure the info you need now doesn't arrive until later.

Coroutines? When I used the MapSaver class I didn't use coroutines or async. The map loaded quickly. (My CPU is i5-13500, so it's very powerful). But on low-end android device it might be a problem.

  • I believe it possible the random civ placement routine already favours nations with a starting loc - check that. No, it's not the code in MapRegions, that stuff isn't used for loaded maps.

Once you know which nations a map "endorses", you can play around. Simply sort them to the top in Nation Picker? New buttons for auto-population? Possibilities...

There is indeed many possibilities, especially when making the separate wizard screen, mentioned above.

You could list the UI elements necessary for the "Specified Starting Locations Mode Wizard". We need to discuss that with @yairm210 , other devs and players.

@PLynx01
Copy link
Contributor Author

PLynx01 commented Mar 5, 2024

@SomeTroglodyte what is your opinion? Please reply.

@SomeTroglodyte
Copy link
Collaborator

Please reply

Can't quite imagine - either I invest time and basically do half the work to see what could work, or you do the work and show off mock-ups, or - you ask specific questions. But also - I'll be offline soon for a few weeks.

Idea while typing this - there was that thing where you could limit the "pool" of nations "random" is allowed to choose from. What if you do no more UI than a Toast "Hey there were starting locations, so we set your random pool to those, go look over there" - for a first minimalistic version? Sounds too easy - what if there's just one st-loc in there, or some but less than the user asks for...

@SeventhM
Copy link
Collaborator

@PLynx01 Probably some one will look over this issue and find a good way to implement it (For maps with predefined Civs, I would assume something where the Civs themselves are listed as normal, but can't be changed besides who is or isn't AI, But I can imagine it maybe being messy on the backend. Haven't checked).But please don't have two issue for the same thing. Since this is almost entirely the other issue, I'm closing the other issue

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

Successfully merging a pull request may close this issue.

3 participants