Victory status, towards victory conditions - #983
Conversation
…lve more independently
|
This victory conditions PR is now open for reviews. See first post for changes. Plan is to implement victory conditions and related scaffolding here, and then take on actual game winning wiring in a separate effort. |
stavrosfa
left a comment
There was a problem hiding this comment.
As far as I can tell, without being able to win/lose, it looks ok. I have left some comments.
I would also rather in the future that we split such big PRs into smaller, more managable chunks, so that they can be evaluated better and be easier to revisit in the future.
| // "Power is an amalgam of cities, gold, culture, advances, resources, military strength, | ||
| // nuclear weapons, and wonder." | ||
| // Exact formula is unknown, so we repeat the previous value. | ||
| // TODO: Figure out power formula |
There was a problem hiding this comment.
I would add a TODO here to make this formula/score calculations moddable (where it makes sense)
| } | ||
| } | ||
|
|
||
| private static bool IsDefeated(SavePlayer player, QueryCiv3.Sav.LEAD leader) { |
There was a problem hiding this comment.
Is this really that simple in the base game, or should we add a few TODOs here?
There was a problem hiding this comment.
Added a TODO.
Probably good enough for now. No cities means civ is almost certainly dead, except for the very beginning of the game - hence the unit counter. I think civs that are killed in the original do have their remaining units wiped, so this should be reasonably correct for Civ3 save files.
| dominationVictory.Toggled += (state) => { victoryConditions.AllowDominationVictory = state; }; | ||
| rulesContainer.AddChild(dominationVictory); | ||
|
|
||
| var placeholder1 = new Civ3Checkbox() { Text = "Placeholder" }; |
There was a problem hiding this comment.
Not sure what's going on here. Why the placeholder?
There was a problem hiding this comment.
Godot wants to fill a GirdContainer by row. Couldn't immediately figure out how to make it fill by column. The placeholder makes it so the first and third elements go in the first column.
I've removed the placeholder: having just the two win conditions on the same row is fine for now.
There was a problem hiding this comment.
Did a quick search, it seems that indeed Godot doesn't offer that out of the box, it's only been 2+ years since there was a proposal/PR for this, so fingers crossed, we might be getting this in this decade 😆
As for our thing, it's fine, I just wasn't sure what the purpose was.
|
Yeah, not happy with how much stuff there is in this one. I think I'll slice off some of the util stuff and UI bits in separate PRs. |
Adds victory conditions and various scaffolding needed for their evaluation.
Victory conditions can be evaluated (and are, for VictoryStatusView), but the game cannot be won yet. Full game loop wiring and the mechanics of winning the game need more thought.
Per turn score calculation looks pretty good, per turn culture calc is not quite there, per turn power is unimplemented. (Per turn power formula is not known to the modding community, AFAICT).
Checkboxes from C7-Game/Assets#14