Closed SomeTroglodyte closed 7 months ago
Expectation: The second Unique is of "higher quality" somehow and should take precedence
Other similar things of this nature (see here) usually spawns the same prompt multiple times (once for each instance). I would assume expected behavior is that multiple found city uniques would show all of them
(see here)
I know - that's how I came up with checking this. But that multiple prompt isn't really optimal is it? Would the same logic improve that UX over there as well?
I'm not sure how important it is to police mod makers on what shows up or what doesn't. While this may work fine for something like UnitActionConsumeUnit, how would this work if the mod maker has both one for that and one that uses movement instead? What if we add unit action conditionals? That seems like something that could end up as a can of worms fast I can see centralizing some of the code for actions to all function the same (or at least similarly), and maybe some optimization regarding actions to group up ones that aren't hyper specific. But otherwise, I think maybe the better solution might be to just show each one and request mod makers to address the layout themselves
I am also against this. The new system supports adding additional 'charges', the old does not, we shouldn't retrofit to allow combinations of the two
Against what? Multiple UniqueType.FoundCity behave entirely different in getFoundCityAction than multiple ConstructImprovementInstantly in getImprovementConstructionActions. Sync direction? Fix which one to match the other?
I don't think they do, though.
The root of the problem is that getMaxUsages() doesn't consider 'by consuming this unit' to be a one time thing, thus when you ask 'how many times can it X' it says just the extra amount.
What we should be doing is treating "
Not sure what the best course of action would be though - just replace all instances of A with B and C would work, but not exactly clear, but then again I can't think of another cleaner solution right now
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.
Can close?
Yes A base game can specify "can found once after which is consumed" if it wants to enable mods to add founding charges
This is relevant only to weird mods... Imagine one where a Settler can gain a Promotion through - say, a Fountain-of-Youth-alike. That promotion grants
Founds a new city <[3] times> <after which this unit is consumed>
. The idea of course - make the unit better...Status quo: The second Unique is ignored. That Settler can still only found once. Expectation: The second Unique is of "higher quality" somehow and should take precedence.
Cause: The
firstOrNull
ingetFoundCityAction
, UnitActions.L183, goes by whatever order MapUnit.getMatchingUniques decides (UniqueMap addition order which is baseUnit, type, promotions)Possible approaches:
Side comments: