-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Logic keywords inside unique filters #4713
Comments
I'm against this. |
I see. I'll close this then, and maybe re-open it if nested templates are ever implemented. |
Nesting is already used by the "and" (expressed as blank) variant? Reaching a point where all translations can be made to read nicely is beyond what the current system can do anyway - that would at least need a provision for gendered nouns. So, perfection is out of reach, and the movement into the unique system has very slowly deteriorated translated readability in the past months. Another hit to that wouldn't really weigh in much. Once it gets too bad that could be some next little project / challenge. (I can even imagine a system to allow distinguishing genders that wouldn't need changing any english in code or templates, just a lot more code in the i10n file reader and a little more in the tr engine...) Small point: complex possibilities in filters wouldn't force us to use them, if we see in any specific case that resulting language sounds nicer with an extra unique - why not, and leave the combined filters for modders and cases where they help without incurring hickups. I suggest we all let the idea stew in our brainboxes for a while. If we go that way, I'd tend to a very limited syntax - one operator only, and " " plus whatever we choose for "or" allowed to chain, only with itself. |
See also #4712 |
I feel like at some point we have to bite the bullet and just start using |
this would be great |
This was inspired by #4708 and the discussion in #4697.
Some unique filters already support "and" logic by concatenating two filters, e.g. "[{Military} {Water}] units". It would be useful to have access to more kinds of logic, by means of "logic keywords" inside unique filters. The ones I have in mind specifically are:
Examples: "[{filter1} without {filter2}]", "[{filter1} {filter2} without {filter3} {filter4}]"
This would logically behave like "or", but "and" makes more sense for natural language.
Examples: "[{filter1} and {filter2}]", "[{filter1} {filter2} and {filter3} {filter4}]"
Examples: "[non-{filter1}]"
Ideally, these keywords would be implemented at a low level, so that they can be used for every filter type. This would immediately open up many new options for uniques.
Examples of uniques that would be made possible with this system:
This system would also remove the need for hard-coded logic uniques like "[stats] from [tileFilter] tiles without [tileFilter] [cityFilter]" (which was used in #4708).
I can however think of a few disadvantages as well:
I'm leaving this idea here as an issue, because I'm not sure whether there are any more glaring disadvantages that I've missed and I'm also not currently planning to implement this system myself.
The text was updated successfully, but these errors were encountered: