-
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
Countable comparison conditional uniques #11308
Countable comparison conditional uniques #11308
Conversation
OK, I've applied your suggestions. But there are more countables than just stats, resources and years. Should I left it as it is now, or should I add support for more countables? If so, please give me some ideas, so I can implement them. |
@yairm210 I've applied your suggestions. What else is necessary to merge my PR? |
@yairm210 Please review! |
ConditionalCountableDifferentThan("when number of [countable] is different than [countable]", UniqueTarget.Conditional), | ||
ConditionalCountableGreaterThan("when number of [countable] is greater than [countable]", UniqueTarget.Conditional), | ||
ConditionalCountableLessThan("when number of [countable] is less than [countable]", UniqueTarget.Conditional), | ||
ConditionalCountableBetween("when number of [countable] between [countable] and [countable]", UniqueTarget.Conditional), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is between"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than one minor text issue, looks mergeable!!
@yairm210 Check out my PRs. I've made some corrections |
@PLynx01 My actual inquiry is whether we can enable these uniques to accommodate |
What do you mean by saying (per turn)? I suppose you're talking about stat income or growth of resources per turn. I am right? |
Yes that what I mean by |
In that case it should be parameter not a unique |
If so we can introduce the concept of statResourceModifierFilter !!! For instance, unique like
Then your new uniques would also become What do you think ? |
@woo1127 They are
And also diplomacy-related scopes |
The template would be something like this: when [scope] [countable] is larger than [scope] [countable] @woo1127 |
Can I have few examples to clarify what you mean ? |
That's a good idea. We can use filters to define scope. But we need to group countables by these scopes:
|
@woo1127 Game-wide:
Civ scope (supports Game-wide scope)
City-wide (supports civ and game wide)
Unit-wide (supports previous scopes)
|
100 hours of work would be required to implement all of these 😅💀 |
As I promised two days ago #11280 , I've made a pull request which contains five new uniques for comparing countables.
Countables can be numbers (both integer and float) and numeric variables. For now, only these variables are supported:
If you have more ideas for the countables, give me a lot of them, as adding new countables is a quick and easy process.
I would also like to add two TriggerCondition uniques, which are true when the number of one countable becomes higher or lower than another countable. Please give me some advice about it.
Better yet, we can add support of nested parameters or even evaluation of mathematical expressions into numbers, either by using this https://github.com/notKamui/Keval or similar library or our custom code for that task.