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

Feature Request: Implement the remaining countables #11621

Closed
2 tasks done
PLynx01 opened this issue May 19, 2024 · 3 comments
Closed
2 tasks done

Feature Request: Implement the remaining countables #11621

PLynx01 opened this issue May 19, 2024 · 3 comments

Comments

@PLynx01
Copy link
Contributor

PLynx01 commented May 19, 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

Two months ago, I have introduced the countable comparison uniques. For now, they support only:

  • Stockpileable stats (Gold, Science, Culture, Faith)
  • Resources
  • Years
  • Numbers

I believe it's necessary to implement more countables, including these scope-bound

Related Issue Links

#11308 #11389 #11527

Desired Solution

My desired solution is to add countables with syntax like this:

[countableName] [filterCategory] [optionalfilterCategory]

Examples:
[GlobalUnits] [mapUnitFilter] - Gets the number of all units that met the filter

[CivUnits] [mapUnitFilter] [civFilter] - Gets the number of mapUnitFilter units owned by civFilter civilization. If civFilter is empty, it denotes a number of units owned by civilization which unique applies to.

[GlobalCities] [cityFilter] [buildingFilter] - Gets the number of all cities that fit the cityFilter and having a specified building

Alternative Approaches

If you have a better idea to implement this, tell me. We can discuss it.

Additional Context

No response

@SomeTroglodyte
Copy link
Collaborator

Look - Yes Definitely. But me personally, I have an unsatisfactory feeling, like there should be a well-designed framework making extension a clean and straightforward matter, and we haven't yet seen the best approach to that. So, I'm waiting for my eureka, or letting you do as you wish without much input from me, whichever moves faster. Also, that experiment with ANTLR where Gradle almost bricked my box by downloading or generating more than 30GB of chaff for that antlr-kotlin project was pretty de-motivating.

Idea behind the ANTLR experiment: Drop translatability as prerequisite, go for a formula/expression language. That would be free to express all and anything that results in a "Countable" in one Unique parameter. Scopes can be - whatever you decide as grammar. Academically generating the parser from a proven grammar file syntax - cool and assures quality.... And user display simply gets a separate source responsibility of the modder.

As I said, you're welcome to do some smaller vision, or maybe you want to see for yourself if you can get kotlin output from one of the publicly available "calculator" grammars before version 5 of ANTLR supports it officially? First steps: pip install antlr4-tools, get a calculator grammar, antlr4 -no-listener -visitor calculator.g4... gives Java.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Aug 18, 2024
Copy link

github-actions bot commented Sep 2, 2024

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants