Merkava's Mods

Disasters!

Current version: 0.4

This mod will be built up gradually in several updates over the next few weeks. Right now it has 6 disasters, configurable through XML, which do damage and then disappear after a few turns. They can also spread other disasters (storms can spread fire) or themselves (fire spreads fire, disease spreads disease via trade routes). They can also move toward certain targets - storms just move toward land or randomly; locusts move toward a nearby farm.

Now includes warnings based on techs; if a player gets the tech "astronomy" for example, they will be warned in advance about meteor strikes. Does not affect the AI whatsoever.

Disasters Mod - currently under development

Version 0.4 additions:
Spoiler :

  • Changed the way art is read into the XML so that you can add as many art effects to a disaster as you want.
  • Added messaging for damage and spawning of disasters and made sure it works.
  • Somehow, the hurricane artwork broke and won't display now. Yippee
  • Added "warnings" that can require anything the player has (tech/civic/trait) before displaying a warning a couple turns before a disaster occurs. I intend to expand this to things on specific tiles but haven't quite finished that yet


Previous versions
Spoiler :

Version 0.3 additions:
Spoiler :

  • Disasters now have the ability to move toward XML-defined targets, or just toward land, or just randomly.
  • Disasters can now spread copies of themselves, or entirely different disasters.
  • Added "Locusts" (they move from farm to farm, destroying them) and "Disease" (spreads via trade routes and kills population).
  • Updated other disasters to include movement and relevant spreads.
  • Fixed a bug where the lifetime of a disaster could be zero even if iMinLifeTime was set to something greater.


Version 0.2 additions:
Spoiler :

  • Disasters now have a lifetime, after which they will be removed.
  • Disasters can now cause damages, as many as you want.
  • A "damage" has a chance of occurring each turn the disaster is alive.
  • Damage done to buildings will destroy the building, but production will be replaced in the city to bring the hammers for the building close to the original. For example, doing 25% damage to a building would destroy it, but you'd get 75% of the production cost added back to the city. So it's like repairing buildings.
  • Otherwise, damage done to improvements is a random chance of pillaging it, and for population and units damage is just straight % damage.
  • Added a disaster "Meteor" with an effect from Himan.
  • Changed tornado to one by Himan.


Version 0.1:
Spoiler :

  • Natural disasters are set up through an XML file called DisasterInfos.xml
  • Each turn there is a 10% chance of spawning any disaster
  • Each type of disaster has a weight, set in the XML, that determines how likely a spawned disaster will be that type of disaster
  • Disasters can have up to two art effects, set through the XML
  • Adds a unit called "God" which can be used to test any disasters added through the XML. If you want to add your own disaster and test it, make sure to add the disaster as "EVENT_<tag you used in the xml>" in the EventInfos file, and then add that event to the god trigger in EventTriggerInfos file. The mod will take care of the rest.
  • Includes: Fire, Storm, Hurricane, Tornado


Credits
Spoiler :

Thanks to Hrochland for the rain and the beautiful tornado, Walter Hawkwood for the hurricane (stripped from a storm drake crag from Fantasy Pack 2: Lairs & Ruins), Lord Tirian for the locusts (found here, thanks Himan), FFH for the cloud part of the storm, Gods of Old for half of the disease effect (the other half is the stock city-is-sick effect), and Civ4 for the fire.

 
Last edited:
im honored!
let me know if i can assist.
if you need access to more stuff from me.
also - interested in what mods you added!

I haven't added any yet, haha :mischief: right now I'm working on getting my core python mods all figured out - Disasters, Seasons + Snowfall, animal spawning/hunting (I think) - and putting together a list of mods I would ideally add to your mod once I am ready to go. Conqueror's Delight is at the top of the list, and most of the classic "dynamic" mods (dynamic civics, civic linked leaders, dynamic civ names) are on the list.

also planning out a dynamic tech tree, which is surprisingly difficult. I want to keep uniqueness of civs, but also have different paths that they could unlock, but also give the player a chance to decide which paths to follow, but also base it on available circumstances...haha. :crazyeye:
 
Downloaded. I was looking at the picture. It's been a long time since I've been a hurricane. I see that he needs a few adjustments.
 
@Merkava120
Maybe this thread is also interesting to you.

WTP already has stuff like Storms / Winds / Tornados / Volcanos / ... as well.
(And if you want to check and use our graphics, you of course can.)

Storms / Winds are constantly generated / reforming on the Ocean (controled by TerrainFeatures XML).
Tornados / Volcanos spawn and de-spawn on Land (controlled by Python Events).

Now however I am experimenting with a new System to do stuff like this.
(Adding Sandstorms and Fog.)

It is however still a "prototype".


 
Last edited:
@Merkava120
Maybe this thread is also interesting to you.

WTP already has stuff like Storms / Winds / Tornados / Volcanos / ... as well.
(And if you want to check and use our graphics, you of course can.)

Storms / Winds are constantly generated / reforming on the Ocean (controled by TerrainFeatures XML).
Tornados / Volcanos spawn and de-spawn on Land (controlled by Python Events).

Now however I am experimenting with a new System to do stuff like this.
(Adding Sandstorms and Fog.)

It is however still a "prototype".

Sorry for taking so long to reply - that is a seriously cool mod! Especially the sandstorms and fog.
 
Dynamica progress update - I ran into some seriously annoying mystery crashes with the disasters mod and basically abandoned it a couple months ago. Meanwhile I've been focusing on learning SDK for the tactical mod, which is going quite well now.

I've decided I want to focus entirely on the Dynamic Techs part of Dynamica for now - since a mod like that has never been seen in any version of civ (as far as I know). I am currently trying to develop a tech tree that is a) realistic and b) dynamic with multiple paths. Once I get that figured out and tweak the Dynamic Techs python mod, I'll be uploading a fully dynamic version of Civ4 as soon as I can.

From there I plan to move on to the more complicated things like nomadic start/disasters/factions/etc., possibly using SDK. But for now, Dynamic Techs is the main focus.

(if anyone reading this is super good at designing tech trees and wants to lend a hand please message me :lol:)
 
Hi. I finally found time to deal with incorporating disasters into my mod. I set modular loading to 1 first.
I have a game around year 0 and no disasters anywhere.
In the event log about disasters or a word. Do you know where I made a mistake?
 
Hi. I finally found time to deal with incorporating disasters into my mod. I set modular loading to 1 first.
I have a game around year 0 and no disasters anywhere.
In the event log about disasters or a word. Do you know where I made a mistake?

Hmmm, I really don't know. Are you merging it into your mod?

Tbh I have not touched python all school year because I figured out how to get SDK working smoothly and it's much, much more powerful. In spare moments I'm working on dynamic techs, but in the SDK this time, as well as tactical mods and factions...and disasters have fallen way down todo list...

I will help you fix this, though, because I was pretty sure I at least had the fires spawning correctly.
 
No No. I'm trying it separately, I have modular loading 1. So far, I can't think of anything that might be wrong.
 
I appear to have the same problem on my development version...I really don't know what's going on.

What happens if you turn python errors on in the CivilizationIV.ini file? Sometimes python mods break and if you don't have the errors turned on you don't see any signs of anything, modded or broken.
 
I apologize for the delay.
Civ4ScreenShot0016.JPG
 
Ah I literally just had this happen with a different merge. You will have to go into Disasters.py and find the line where it looks for the XML file - ctrl+f for "mods/disasters" should find it - and switch the folder from "mods/disasters" to "mods/yourmodsname".
I can't really remember how I set up the python but you might have to look in CvEventManager.py too... :undecide:

Soon, very very soon, I am going to finish up the SDK version of dynamica, and that will be way way better than this. It will have a lot of XML modification but I can make a version that is just vanilla + SDK so the disasters could be added to another mod if you want.
 
I've already watched it. The problem is that I'm trying your mod separately. I haven't added it to mine yet :( So the path Mods/Disasters/Assets/XML/DisasterInfos.xml is right...
Anyway, I'm really looking forward to any way I work, because I have some ideas in reserve and I'd like to add them :)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

EDIT:
My latest finding is that the recommended directory for win10 is Documents / MyGames etc etc. Your mod doesn't work from it.
I just found that load from the C directory
: / ProgramFiles (86) ect ect works, although by 250AD I saw DISASTER_STORM almost everywhere, in large numbers and remained in the game for over 500 years. I'll investigate. :)
 
Last edited:
Top Bottom