Closed will-ca closed 2 years ago
This goes against our principles of following Civ V mechanics, and this is big change. Denied.
But, for modding request. Then yes.
For base ruleset, we can ignore even denied this. but modding flexibility, this absolutely good idea.
TL;DR: Actually, IDC about transient terrain phenomena. Real question is: How should I structure a PR to add mushroom cloud graphics for nukes? (Terrain phenomena is just the extreme limit of scope creep on that question.)
@yairm210 Well, Civ V has animations, that comprise both flair and tactical data. Unciv doesn't, and won't for the foreseeable future, hence trying to find non-Civ-V ways of accomplishing similar goals.
What if it were restricted to a much, much smaller scope? Contents I've been considering PR'ing:
terrainsCountdown
property and accessor in TileInfo
— No unified "phenomena" framework or anything, just checking the existing terrainFeatures
each turn."Creates [Mushroom Cloud] for [1] turn at targeted tile"
.Or, actually: How should a mushroom cloud be displayed in a way that fits with project principles? I mean, even the function name for "NUKE" is capitalized, and it can turn the tide of an entire war; There 'ought to be a more dramatic on-screen indication than a notification which doesn't even get displayed in spectator mode. It's simple in principle and probably quick to whip up a PR for; I'm just not sure what the best approach would be.
An AlertPopup is probably the way to go - we can have an AlertPopup with unique text, the nuke image, and have it pop up for all players after the first nuke in the game is launched (probably one per game, maybe one per civ? each neww civ that joins the nuclear war generates another one? not sure)
I would really like to show it on the tilemap, though.
I was watching an every-Civ AI spectator game on the biggest map size to test the arrows PR. Hundreds of turns of suspense, watching Rome steamroll half a dozen other Civs while all the other major powers were too busy squabbling to seriously compete. Then dozens of turns of anticipation as I realized what was coming— Getting the notifications that each Civ had advanced to the Atomic Era, then that they were working on the Manhattan project— Short red attack arrows coming first from riflemen, then longer ones from submarines, and then finally laser-like rays from the bombers in cities and on carriers— Seeing the two biggest powers start building nukes in their cities, Augustus moving his towards his invasion of Korea and Ramesses moving his towards Egypt's border with Rome.
And then... Nothing. Zip, nada. Five or six cities got covered in fallout in just as many turns, and I wouldn't have even noticed if I hadn't already been looking at that part of the map. I still don't know where all the nukes went; I assume the cities that ended up with more fallout around them must have been hit two or three times. Would have probably had notifications as a non-spectator player, of course, but still: Why read if you can just see?
A popup would certainly help with the flair, but only once, and without adding any clearer visual indication of location. And since last turn's attacks are/will be (pending merge and player opinion) already tracked to show overlay arrows, it would actually be considerably more complexity to keep track of which Civs still need the popup than to add a sprite in the TileGroup
for every nuclear strike.
I mean, show, don't tell, right?
"Phenomena" would be a subcategory of Terrain Features, but with a finite duration, at the end of which they are removed. As they would be a type of terrain feature, they would be usable in Uniques' terrainFilters and conditionals, and they would have moddable stats, movement costs, uniques, and textures like all Terrains do.
All Uniques relevant with terrains would be relevant with phenomena too, but Uniques like the following could be implemented specifically for phenomena:
(About the last one: A zero-turn phenomenon with this Unique would be used to make sure that the real phenomenon always spawns in groups, or control its spreading behaviour.)
Example moddable use cases:
(More practical examples: Wildfire/tornado/earthquake/volcano, rain dance/firefighter, Great Person improvement but temporary, landmines, canals, wonder/social policy temporary effect visualization.)
Some of this does go into or near territory that I myself think is possibly too far out of scope from Civ V mechanics to be implemented in the core. (A lot of it is similar to stuff I was actually already planning as Python scripting examples/tests.)
…But ultimately, this entire proposal actually comes from trying to generalize in as moddable of a form as possible the very simple question: "How do I make nukes display a mushroom cloud where they impact?"
(Original thought was to do something like my arrows PR, but displayed like terrain features… but stripping away unneeded functionality would have been close to hardcoding for nukes… So let mods specify which units create which sprites through a Unique, then… But a Unique should be able to affect gameplay and not just add a sprite— At which point, I'm basically describing temporary terrain features.)
(I'm thinking the best way to implement this might be to just add an "Is temporary phenomenon" unique that can go in "Terrains.json"… Or honestly, for the most basic use case of a unit spawning a temporary feature, could just use terrains without any special distinction.)