Maritime Weather+

Maritime Weather+ 4

Tekamthi

Emperor
Joined
Aug 12, 2016
Messages
1,947

Standalone (and improved) version of the ocean storms in Maritime Battles+....

This mod adds a Storm plot, and procedural rules for how this storm plot spawns and moves around the map:
Spoiler :
civ5MBPstorm (1).gif


Storm plot rules
  • storm is a hybrid improvement/feature -- units can move through it like any other plot
  • 3 movement cost
  • blocks sight similar to forest/jungle
  • submarine ignores move cost
  • hover unit +1 extra move cost in plot
  • cannot be pillaged or removed by player
  • worker cannot start a build in a storm
  • city cannot be founded in a storm
"Season" mechanism:
  • storms spawn and move according to one of 4 sets of procedural rulesets
  • season rulesets are applied consecutively for a period of turns set according to map size and game speed (min 4, well into the 20s on larger maps and longer turn times)
  • season rulesets are applied per region, divided by latitude ie the equator and tropics
  • seasonal weather update events occur on rotating basis (ie on turn 1 weather updates on player 1's turn, turn 2 on player 2's etc.)
Spawn mechanism
  • there are 4 ocean spawn areas and 4 lake spawn areas, ie equator/tropic divisions
  • each season, storms will spawn in one ocean region and one lake region
  • storms may spawn in adjacent plots on a recursive basis, a storm spawn may involve just one plot or several
  • no spawns outside of ocean and lake plots (though recursive adjacency may grow a storm spawn into any eligible plot)
Move mechanism
  • storms may move to any adjacent plot with no improvement, feature, mountain, or worker build
  • possible move directions change per season (min 2 move options, max 3 move options)
  • storm that cannot move may despawn on % chance
  • storm that is over land and not adjacent to water may despawn on % chance
Bugfix mechanism - there is a bug in civ 5/vp that any feature in ocean allows early movement, even without required tech or other means of crossing ocean
  • any unit that should not be in ocean at end of turn is moved into adjacent coast closest to capital, or moved closer to capital continuously until in coast plot. Any storm plots through which the unit passes are removed.
  • this sometimes means a unit can take a shortcut across ocean -- think of it as a fortuitous wind
  • also serves as inadvertent unstuck mechanism for trapped recon with coast access
This was a component of another mod but has seen many changes, some of which were written by chatgpt o3-mini :lol: Treat as semi-experimental. I will change the version number to v4x if/when it is confirmed as viable for full-game.

Current state (v4): Tested for 100+ turns in observer mode on large map standard speed, no issues detected, storm amounts seem appropriate. So far, performance-hit is not noticeable. Road pillage chance is disabled by default but works if set in options. Several issues identified & eliminated in v2/3, both big and small; still have not observed in late-game, but nonetheless I anticipate this may be close to full-fledged game-ready state.

 
Last edited:
Roadmap:

Planned:
Spoiler :

  1. Observe & refine existing lua mechanism to optimize performance, ensure stable play into lategame, etc.
  2. adjust spawn & despawn rates for consistent effect across all maps & sizes etc.
  3. add more userOptions per community feedback
  4. test/create artDefines so that resources can appear under storms
  5. integrate storm spawn with vp events system, where appropriate (hurricane event etc.)
  6. fill out appropriate in-plot gameplay effects
    1. air units
    2. distinguish sail vs self-propelled units
    3. others?
  7. Rework model in blender to allow for a 2nd row of clouds, and fuller-looking storm plot


Speculative:
Spoiler :

  • storm specializing promos/beliefs/buildings etc.
  • investigate whether ice art defines can be co-opted into improvement system for 'seasonal ice' plot
  • desert sand storm plot
  • fog plot
  • flood plot
  • wind mechanism


blender work needed
  • reworked storm model (see description in thread below)
  • reworked lake victoria model, removing the small peninsula that juts into it (and thus makes it distinctive), and recolored to match coast (will use this as a major flood plot)
  • some more minor depiction of flooding that can be applied to any terrain, perhaps a reworked version of marsh with only the water and no greenery
 
Last edited:
Tekamthi updated Maritime Weather+ with a new update entry:

more bugfixes, adjustments

sorry to anyone that started new game on last version -- problems for poly mainly, and also discovered other means of improving the mod:
  • 'storm fixer' function, intended to correct bug in civ 5/vp pre-astro ocean movement when features are present, was fixing units it shouldn't. fixed.
  • storms can now move over resources
  • submarine should be immune to storm movement cost
  • hover units should have extra move cost in storm

Read the rest of this update entry...
 
Hello I've started a game with version 2 and I'm at turn 200 now. I think it's a cool idea but I thought there would be more weather features other than only some tiles of storm that block vision and movement (this is partly my mistake as when I read 4 different seasons I thought there would be 4 different weather types or something akin to that). But well, overall I don't think it's very impactful at the moment. Granted, no one has a massive ship army in this game so naval combat has just been a few ships here and there; unsure if it makes big naval combat more interesting.
 
I thought there would be 4 different weather types
I'll try to clarify the OP for newcomers to understand what they're getting into. The seasons will only be noticeable if you really pay close attention to storm placement from turn to turn, though in some regions you'll notice that storms are fairly abundant at times and completely absent at others, depending on geography. The code involved here is a big upgrade from the previous pure-RNG it relied on. Though only recently broken off, this was theorycrafted in another naval-focused mod many years ago, and first implemented about 2-3 years ago -- perhaps my description presumes some knowledge of its evolution. The original purpose in this sense was simply to break up the monotony of vast samey ocean plots; as such it was only intended to be one layer of several naval effects. That remains its primary gameplay intention for now, and I will leave it to other mods to layer in things that render our naval game overall to where it should be; this effort is very much intended as a companion mod, a background mod...

Nonetheless will look into other features in the future -- there are no firm plans necessarily, its possible that this mod may remain 'just storms' for a long while. There are some possibilities for other things of which i am already aware, however: there is an effect that resembles a sand storm for example, which might bring some life to the deserts and surrounding terrain. I speculate that we might be able to co-opt the ice art defines via some means to have a 'temporary' version of ice, etc. There are only so many possibilities to re-purpose existing effects, and thats what these 'weather' effects rely on, so at best we will have 'some' weather features, but not everything we might want. Even so, feel free to make suggestions, no promises but will consider all good ideas, more detailed the better.

For me personally as a dedicated civ franchise player turned casual modder, this was probably one of the first mods i came to CF looking for for civ 5 (along with forests that grow) -- figured somehow someone must've found a way to make clouds and storms etc. Never found such, nor any way to accomplish it initially, and it was just an idea for many years. I probably sketched out the concept long ago in various threads, hoping someone more knowledgeable than I might pick it up -- my first reference to it in mb+ thread, labelled 'highly speculative', was back in early 2018! -- but there were no takers lol. Many years and much learning later, both on the model side and lua-wise, here we are finally with a basic procedural storm. So it may not look like all that much just yet, but a lot of heavy lifting is now out of the way, and the method of creating this effect will hopefully be source for more prominent things in the future. @ghost toast deserves honorable mention as he does with most of our 'modern' civ 5 on-map visual mods, and maybe will update our model even further for a fuller cloud? (hint hint :lol: its pretty awesome tho as-is)

My dev work will focus for now on making sure the storms and the code that runs them works really well and is viable in full play. Once thats all confirmed, it will be relatively trivial to use this framework to add more effects. That said i'm winding down on civ 5 dev stuff for now, so 'big' things will probably only be in summer or beyond. In the meantime, I'd welcome any other modders using the model developed here or in treesuccession to create more weather-like systems (between both we should be able to create on-ground and in-air effects). All of my code is also open for repurposing.

unsure if it makes big naval combat more interesting.

This is very much on-point to this mod's current focus -- I have applied some slightly more intricate rules in v4 -- possibly a big indirect buff to subs, we'll have to see how it plays. v4 also has more storms present inland than v2 (at least early on). Probably needs to affect air units as well though I haven't settled on exactly how yet.

I'd like this mod to have an effect that validly abstracts the effect of bad weather irl, and adds thematic value to the map -- we probably won't get down to distinguishing rain from snow, just storms, that level of detail -- aim is a moderately impactful gameplay effect dynamically-applied, while remaining ai-accessible. The relatively minor current effect is very ai accessible, they can pathfind around it just fine. If there are obvious effects the storms should have that are currently missing, those can be added in the short-term (assuming the db allows for it).

For other, non-weather naval-related things, I will look at those in the next revision of MB+, probably 2nd half of 2025.

edit: OP updated with functionality details
 
Last edited:
no i don't generally upload my mods to workshop, there are a few reasons:
  1. workshop can cause unfixable bugs with mod load order in rare circumstances (imo its very rare but nonetheless happens sometimes).
  2. all of my mods require a modded .dll such as VP or Sapiens etc. and these communities are generally aware of CF, whereas most of the workshop audience are not
  3. this mod in particular was previously part of an experimental compilation I had been only intermittently revisiting, and only recently broken off as a standalone; while it seems to be pretty stable and performing well, its still pretty fresh and remains in what I consider a development state
  4. the licensing inherent to uploading to CF is more appropriate imo
this one may or may not make it on there eventually, once I'm confident all edge case issues have had a chance to be found and fixed. maybe there aren't any, but its only been a few months since this implementation was created, and theres a lot of new code here that didnt exist prior
 
Last edited:
I see. I actually don't download any dll mods.

This wasn't always the case. Back around 2017-2019 I did use one, but I had a big game going, in which I ended up reaching a particular turn and crashed every time, even if I reloaded from like 10 turns earlier and changed my actions.

Between that and the fact that I can only have one dll mod at a time, I determined to focus on non-dll mods, and try to find the best of xml mods basically. Someday I do think it would be awesome to use a dll mod again. But which one?

You mentioned Sapiens and VP, and I believe Gaia has a big dll mod, and there are tons of small ones, and possibly some other big ones I don't know about. If I can only choose one, which one then?

Back in the day I used to play a lot of Elder Scrolls: Oblivion, which had a big modding community, maybe the biggest on the internet. There were some big mods available for it, including some overhaul mods. Someone combined I believe the three biggest ones into a single mod.

I've been wondering, why can't something like that happen for Civ 5? Get the best pieces from all the big mods out there and combine it all into one big mod.


On that note: I haven't played Civ VI or VII, but from what I can tell, Civ V seems to be the best of the three--probably has the most staying power. If in ten years a new civ game hasn't come out, it seems to me that Civ V probably will be the most played of the three. It would be nice for Civ 5 to have its own . . . renaissance era.

I don't really know how many Civ V modders are still active. I haven't really been active in 3 years. But with a decent effort from a fair number of people, I think we could all come up with a truly amazing mod.
 
Nice! Very cool.

It would be nice if the rain started below the clouds rather than above.
From a brief watch there are maybe too many storms? Or perhaps they are a bit too spaced out, they dont seem to join up much?
Also database error of
Code:
"FEATURE_RESTRICTED_VISIBILITY_COAST" does not exist in Features
 
It would be nice if the rain started below the clouds rather than above
right now the model has a single bone from which both effects are triggered -- they're technically at same height but a second row of clouds would have the desired effect -- i theorize that if the bone were simply copied and offset, so that the model had 2 identical bones, we'd be all set for a fuller storm. Could also use one right at surface level to make splash effect... However my attempts to do this have all failed with no indication as to why... maybe one day i can blender on my own but for now I rely on others for the model, and this is as far as others got it lol

From a brief watch there are maybe too many storms? Or perhaps they are a bit too spaced out, they dont seem to join up much?
there's no logic implemented to create any specific shapes -- storms spawn in single eligible plot on rng basis, then attempt to grow recursively into adjacent plots. everything has been intentionally kept very simple -- I wasn't sure how this would fare on the performance side, though it seems fine, can probably do some more complicated things. In future version i will look at spawning them in specific patterns -- for now maybe can try lowering the general spawn rate and increasing the recursive growth, should be variables for both at top the lua -- that might result in the storms clumped together a bit more

if you find good settings pls share -- to test different settings, best way i've found is to flip into observer, turn on quick everything, and watch the map in SV -- gives a good view of how the storms spawn and move en-masse -- if you try to do this from the normal map, the effects dont load in quick enough before the storms change position again

Also database error of
there used to be a separate 'coast' version of the storm but it was deprecated then removed altogether -- guessing there's some table entry i missed that still references it, will clean it up on my next revision. good catch!
 
Last edited:
Yes we need a blender messiah to come save us.
There's something about trying to learn blender that I find utterly unpleasant... That said it seems it will be THE tool for all things 3d for a while, and the process involved here sounds fairly simple. I'm determined to do it one day, but most of the learning resources and tutorials I've come across say "learn blender in only 100 hours" or similar. I don't have 100 hours to dedicate to this hobby in one shot lol... Maybe 5 hours per month tops

The Fuji cloud effect, which we're relying on here (it's the only suitable cloud like effect imo... Next best is the smoke we see in TreeSuccession) only appears in a semi circle (ie it assumes Fuji will be in the plot too). My assumption to develop it further is that we just need to trigger a second instance of it in each plot to fill in the cloud above the rain. In case anyone browsing through here has the skill, here's the theoretical steps involved:
  1. convert the storm gr2 to blender accessible file -- it is a very simple model, theres not texture & its mostly empty
  2. find the tiny triangle in the mostly-empty model -- i believe this is the "bone" that allows effects to be triggered off of
  3. copy the triangle and/or any other necessary components, offset the copy triangle further back in the x & y planes but at same z value
  4. convert back to gr2 and confirm fuji cloud can be triggered off the copied triangle
Not sure why this doesn't work for me, I can make it as far as 3, but my attempt never loads again in-game after i try to convert back -- not sure if i'm failing at 3 or 4. This model itself was created by moving the triangle from surface level up higher into the z, so the cloud can float in the air (I didn't do this however)
Storms prevent City founding too it seems.
Is this a deal breaker from your perspective? Didn't strike me as such a big deal here as the storms move every turn and gradually despawn over land, so most commonly it will only be a 1 turn delay if at all. City found will remove the storm every time, ie slightly thematically jarring -- i could add a function to re-add the storm immediately afterwards (i think), requires more code and at least one additional lua hook we're not currently using in this mod (we could then ditch the city found hook, however the new one will trigger significantly more often, every time an improvement state changes) -- anyway open to adjusting, need more feedback to get a sense of community consensus
 
Last edited:
Is this a deal breaker from your perspective?
Well it's irritating and there is no way to know why the founding button has disappeared by looking, unlike e.g. when you cannot found because another City is too close.
Of course to the extent that the mod is quite experimental it's understandable if you think it would have performance implications.

On the polish: I assume the code sometimes moves storms from inland areas out to sea? Because often I see the animation kinda zoom across the screen out of sight. It would be nice if that didn't happen it's quite unpleasant.
The other thing that's not great is how resources disappear when storms come over them. I guess the Sheep burrow underground? :D

In general I think the storms probably need to live more in the sea and less on the land. See screenshot
Spoiler :

1745754045074.png

 
Well it's irritating and there is no way to know why the founding button has disappeared by looking, unlike e.g. when you cannot found because another City is too close.
Of course to the extent that the mod is quite experimental it's understandable if you think it would have performance implications.
the hook for this is at line 124 of the MBweatherEvents.lua -- can delete it or comment it out and everything will still run fine, the city block with be gone. Right now the malus of this storm is very slight, so i am inclined to leave it as-is (also i don't have any significant additions nor fixes to make to justify a new version just yet).

Of course to the extent that the mod is quite experimental it's understandable if you think it would have performance implications.
it might be better performance to eliminate the build block, its more a design choice rn, as I wanted some kind of thematic effect but fairly subtle. This weather lasting for a whole turn (ie years at a time) is very abstract from irl, and thus subject to our interpretation as to the effects it should have. I interpret it as a general hostile climate in the region that limits human activity. Considering the game lore ties the idea of cities to agriculture, I figure there's no way for a city to get all its foundational agriculture started in these conditions. As a compromise for human, I could make a text show on screen when settler moves into a storm plot and vice versa. Can we get some more comments from users of this mod on this issue? should storm block a city build? i will adjust on a consensus basis

I assume the code sometimes moves storms from inland areas out to sea?
my script only ever moves a storm by one plot -- storm can indeed move from land back to water, but...

Because often I see the animation kinda zoom across the screen out of sight.
I believe this is artifacting from the engine itself, as it redraws things on the map, ie limitation of the engine and not something we can affect. Perhaps this is why firaxis did not create any kind of weather dlc for civ 5. I suspect there's nothing to be done for this on the lua (mod) side, and likely not on the dll side either unfortunately, but idk for sure. My script is pretty simple, it just does some boolean checks and moves the storm plot improvement & feature accordingly. The animations themselves are triggered much like any improvement effects are triggered in the game: if the storm is in the plot, the game makes it appear, if not, it makes it not appear, and the engine handles any transition between the two visual states without any special input from the mod, i just toggle the improvements in the plots. Outside chance there's some lua command I dont know about that might redraw things in a better way, or some other hack that might smooth things out, but idk what that is rn, and imagine this would be pretty obscure knowledge.

I have a theoretical fix for this in mind, however -- notice how its just the rain and not the clouds that do this? The clouds fade in and out, if we had a civ 5 blender messiah as we've previously 🙏 prayed for in other threads, perhaps this fade effect could be given to the rain animation as well, and end that zooming rain curtain effect. This is very advanced civ5 modding task though, i think only 2-3 in our community have ever accomplished anything like it (eg ghost toast's more effects).

To my tastes, the visual deficiencies are tolerable but i do agree they could be improved -- requires more time/learning/skill, and its possible that we're simply pushing right up against the engine's limits on this one.

The other thing that's not great is how resources disappear when storms come over them. I guess the Sheep burrow underground? :D
lol maybe they liquify for the duration and then reconstitute when they dry out -- for this i *think* it can be addressed by making a special art define for every resource. I've never done this tho in any mods, just guessing from how i see the same farm or mine etc. able to show up on different resources. There's some tedium to this, which is why i haven't tried it lol, but i'll add it to the to-do's

In general I think the storms probably need to live more in the sea and less on the land. See screenshot
to some extent this can maybe be managed by existing useroptions. Every storm that is over land and not adjacent to water will do a despawn roll, could set it to 100 and the storms will disappear every time this condition is met.

I can add same user options for the shoreline plots too -- currently the despawn roll only occurs if a storm is inland or stuck (unable to move per the procedural rules) -- more despawn rolls is probably the answer, i will add one for land adjacent to water and that way all land storms can be turn off if desired. Here's current list of options (see top of mbweather.lua), let me know what else y'all would like to have control over:
Spoiler :
1745765620502.png
 
Last edited:
since first posting this mod i've experimented a little with repurposing lake victoria as a "major flood" plot -- however the result looks nothing like the lake victoria NW. It sorta works as a flood plot but the water is very black. im literally just applying lake victoria model as improvement here, i think the texture is not applying -- even so i'm kinda 50/50 on whether this could serve as a form of "flood" or "mud" plot, especially since it won't be permanent. But my tastes for visuals aren't as demanding maybe....

I have a procedural ruleset in mind that could make the storms over land a little more interesting -- these plots themselves would have increased movement cost and not much else, maybe some yield changes, and would move then despawn in a similar style to storms...

pls comment on how this strikes you, and if you have any modder's voodoo thoughts on how we can make this turn blue/green:

Spoiler :
1745771047730.png
 
since first posting this mod i've experimented a little with repurposing lake victoria as a "major flood" plot -- however the result looks nothing like the lake victoria NW. It sorta works as a flood plot but the water is very black. im literally just applying lake victoria model as improvement here, i think the texture is not applying -- even so i'm kinda 50/50 on whether this could serve as a form of "flood" or "mud" plot, especially since it won't be permanent. But my tastes for visuals aren't as demanding maybe....

I have a procedural ruleset in mind that could make the storms over land a little more interesting -- these plots themselves would have increased movement cost and not much else, maybe some yield changes, and would move then despawn in a similar style to storms...

pls comment on how this strikes you, and if you have any modder's voodoo thoughts on how we can make this turn blue/green:

I looked into the lake victoria model files (I attached here for convenience).
It seems the black spot is due to lake_victoria_decal_diff.dds that looks like this.
lake_victoria_decal_diff.png

In the attached folder Edited Lake Victoria I copied the main files of interest and renamed them so you won't have to touch the Lake Victoria files.
You can edit "feature_flood_tekamthi_diff.png" file (the black blot above) and change the color as you prefer, then save it back as dds (A8R8B8G8) replacing the existing one and it should work.
 

Attachments

Back
Top Bottom