Random Events Mod

DireAussie

Chieftain
Joined
Nov 12, 2005
Messages
60
Latest release - Version 1.31

This is a non-fully tested version of Random Events mod. It will work with the latest version of Civ 4, but the new label code hasnt been fully tested (though it should work under most circumstances). Unfortunately I dont have the time at the moment to develop this mod to its full potential.
 

Attachments

It is now a mod in its own right, which is where most of my work went into. Having it in the customassets folder causes a host of issues, such as what happens if Firaxis update their core files. Its also annoying for a user who wants to play a mod and then has to get rid of the files from customassets.

I encountered a bit of frustration with this version. As you know, the olympics screen was a type of CyGInterfaceScreen. I made another for the locust swarm but when they both popped up, the second one made the first one disappear straight away, and also made other stuff disappear like the tech discovery popup. I think this is a bug. So I have had to use Firaxis's PyPopup class. Not as versatile but it does the job, and instead of 600 lines of code across 5 files it uses about 20 with no extra files

I tried everything to try and write a 2D image on the map, but had no success. There must be some way of doing it because Civ 4 can write the 2D food, coins and hammers on the map. Landmarks do it well enough, even though they're ugly.

suggest to make it so that a civ that's at war can't host the olympiad.

I was thinking of doing this. Maybe in a later version.
 
I think the Olympics should only be hosted by Civs with high culture. I often find rivals in last place hosting the Olympics before I get to, and even though I agree they should eventually do it (i.e. after a civ hosts them once, it won't again for a while), I think the most cultured civs should get priority.

And perhaps the most advanced civs could get the World's Fair.
 
This is an awesome bit of coding! Bravo!

I wish I could add non-random events to my scenario, that mostly add historical flavor text. Any guides out there?
 
I know how you feel DireAussie... Carthage still looks like 1.0, but it's 1.2
 
I encountered a bit of frustration with this version. As you know, the olympics screen was a type of CyGInterfaceScreen. I made another for the locust swarm but when they both popped up, the second one made the first one disappear straight away, and also made other stuff disappear like the tech discovery popup. I think this is a bug. So I have had to use Firaxis's PyPopup class. Not as versatile but it does the job, and instead of 600 lines of code across 5 files it uses about 20 with no extra files

quoting from myself - I think I've fixed the screens problem, but not without more restructuring, which again took most of my time :) Now instead of creating several screens for the different popups I just have one big screen where I create and destroy the widgets for the different events. I've now gotten rid of the crappy PyPopups and brought back my own screens with nice, centred text.

Another added advantage - the popups dont all come at once, they come one after the other, so the sounds dont overlap. And even more importantly, you can hit the return or the numberpad enter key to close the popup, essential for annoying popups that you just want to get rid of while you have the romans on the brink of defeat :)

EDIT: Still in testing. Wont be until the start of next week because I have a full time job - release of version 1.1 and earthquakes! :crazyeye:

Your existing saved games (when started with the random events mod active) will be compatible with the new version :king: and will continue to be for all future releases
 
My game givesme an error when it tries to load CvEventInterface.py, and when I play a game there is, in fact, no interface. What's going on?
 
So, now that this is a full-blown mod, what file do we edit to make Civ4 launch the mod by default when the game is started? Somebody mentioned a file that can be edited to do this in a previous thread, but I don't know which file it is or which line it is. Perhaps you should edit this into the OP so people can find it straight away.

Other than that, looks great!
 
DireAussie said:
Tomorrow - release of version 1.1 and earthquakes! :crazyeye:

Great!
I was looking for any hints on the forum about how major meteorite impacts (as rare random events) could be implemented. I am looking forward to learning/borrowing from your code (I have no Python experience and am a lazy Java/JavaScript amateur).

Eventually, I would like to move towards a global climate change mod with ice ages and much better global warming events than those caused by the in-game nuclear explosions.

My ultimate goal would be to develop a vegetation/ecosystem model. A simpler one could be the succession model but a state and transition model would be more interesting.
Now … I am not sure if it would be a fun mod to play ;)

edit: found a better state and transition model example
 
Direaussie, if you were wanting a We love the King day when the Olympiad happened,couldn't you just remove all unhappiness from the city for that turn?
 
lobosan said:
Great!
I was looking for any hints on the forum about how major meteorite impacts (as rare random events) could be implemented. I am looking forward to learning/borrowing from your code (I have no Python experience and am a lazy Java/JavaScript amateur).

Eventually, I would like to move towards a global climate change mod with ice ages and much better global warming events than those caused by the in-game nuclear explosions.

My ultimate goal would be to develop a vegetation/ecosystem model. A simpler one could be the succession model but a state and transition model would be more interesting.
Now … I am not sure if it would be a fun mod to play ;)

edit: found a better state and transition model example

Heh. When I saw the title of this thread, the First thing that came to mind was to check and see if there were meteor impacts in it, and suggest them if there weren't.

I would suggest making the impact work kind of like a nuclear warhead, (anything on the tile hit, or adjacent to is just outright destroyed), but instead of fallout on the nearby tiles, make a terrain "improvement" of dustclouds, or "impact winter" that destroys any nonroad improvements already on the terrain, and decreases food and gold output by one. If possible, I'd expect the dustcloud to extend for about a 20 or 25 tile radius.

The hard part, though, I'd expect, is making the dustclouds automatically go away after 100-200 years or so. (I'm a bit fuzzy on how long the dark ages lasted, but there is evidence to suggest that they were caused by a meteor impact)
 
The hard part, though, I'd expect, is making the dustclouds automatically go away after 100-200 years or so. (I'm a bit fuzzy on how long the dark ages lasted, but there is evidence to suggest that they were caused by a meteor impact)[/QUOTE]


I hope you're kidding about the dark ages being caused by a meteor impact. Either that or I am very scared for the future. The "dark ages" are not called so due to lack of light.....it is called so due to lack of technological advance along with other cultural "backwardness" during a time of isolation and fear in Europe.
 
I have litterally no info on that dark age idea, but I assume he means that famines were started due to the light of the sun being dulled by a meteor impact which led to riots and thus led to a lack of progression, as well as the fact that the starved peoples were decimated by plauges.
 
That sounds pretty cool. Modders wouldn't dream of accomplishing something like this in Civ III. Really makes me excited about what Civ IV mods we will see in the future.
 
I thought he was referring to the real "dark ages" that took place in Europe. A meteor strike had nothing to do with the famine and plague that occured during this time period. Am I not understanding him correctly or is there some crazy history book somewhere that says the dark ages occured due to a meteor strike? This is an absolutely ridiculous.

"The poet Petrarch coins the pejorative term Dark Ages to describe the preceding 900 years in Europe, beginning with the fall of the western Roman Empire in 410 through to the renewal embodied in the Renaissance. "

http://en.wikipedia.org/wiki/Dark_Ages
 
TheRapist said:
I thought he was referring to the real "dark ages" that took place in Europe. A meteor strike had nothing to do with the famine and plague that occured during this time period. Am I not understanding him correctly or is there some crazy history book somewhere that says the dark ages occured due to a meteor strike? This is an absolutely ridiculous.

"The poet Petrarch coins the pejorative term Dark Ages to describe the preceding 900 years in Europe, beginning with the fall of the western Roman Empire in 410 through to the renewal embodied in the Renaissance. "

http://en.wikipedia.org/wiki/Dark_Ages

I was. I remember hearing about it on a Discovery Channel documentary about Meteor impacts. There is a crater in central Europe that dates to just before the Dark Ages. There are European AND Chinese documents from the time that make reference to a star falling, and great clouds obscuring the sun, and it is also linked in Arthurian legend to King Arthur's death in the late 5th century.

I don't claim that they were called the Dark Ages because of the lack of light. However, one could postulate that the dark ages were called thus because of the lack of light, and "dark" took on it's pejorative meaning after the fact, because of the general state of civilization during the dark ages (I simply prefer not to dismiss the idea entirely).

However, part of the reason that the dark ages were so barbaric, and so little progress was made towards regaining the lost culture and technology from the fall of Rome, is because most of Europe believed the end of the world was upon them, so they had little reason to struggle to regain what was lost.

However, I do not recall how long these clouds were supposed to have lasted, and the idea that they lasted from the late 400s all the way through to 1000 seems kind of preposterous.
 
upthorn said:
I was. I remember hearing about it on a Discovery Channel documentary about Meteor impacts. There is a crater in central Europe that dates to just before the Dark Ages. There are European AND Chinese documents from the time that make reference to a star falling, and great clouds obscuring the sun, and it is also linked in Arthurian legend to King Arthur's death in the late 5th century.

I don't claim that they were called the Dark Ages because of the lack of light. However, one could postulate that the dark ages were called thus because of the lack of light, and "dark" took on it's pejorative meaning after the fact, because of the general state of civilization during the dark ages (I simply prefer not to dismiss the idea entirely).

However, part of the reason that the dark ages were so barbaric, and so little progress was made towards regaining the lost culture and technology from the fall of Rome, is because most of Europe believed the end of the world was upon them, so they had little reason to struggle to regain what was lost.

However, I do not recall how long these clouds were supposed to have lasted, and the idea that they lasted from the late 400s all the way through to 1000 seems kind of preposterous.

Actually the terms "Dark ages" and "Middle ages" were created on Italian Reinessance . And, as said by Rapist, they refers to the darkness of culture between Romans and Italians of 1400 or the "middle age" between the two golden ages of Rome and Florence (and other reneissance powers).
 
Hi all, if you're wondering where the next release is...well I work shift work, 2 early shifts (6am to 6pm), 2 late shifts (6pm to 6am) then I have 4 days off, I only just started testing the new earthquakes on the end of my last day off. Also there's a bug with the olympics eras changing before they should.

On my last 4 days off I pretty much spent my whole time working on the mod. A lot of the time was spent re-writing the code after I learned how to do stuff better rather than putting in new features.

I would suggest making the impact work kind of like a nuclear warhead, (anything on the tile hit, or adjacent to is just outright destroyed), but instead of fallout on the nearby tiles, make a terrain "improvement" of dustclouds, or "impact winter" that destroys any nonroad improvements already on the terrain, and decreases food and gold output by one. If possible, I'd expect the dustcloud to extend for about a 20 or 25 tile radius.
If I put in something like this then nobody would want to play it. Imagine how you would feel if a meteorite hit the middle of your empire, having -1 food and gold in a 25 tile radius for 200 turns. Something with such major consequences sort of belongs in its own "world devastation" mod (which sounds pretty cool actually :) )

The hard part, though, I'd expect, is making the dustclouds automatically go away after 100-200 years or so.

That's easy to do in python code. The hard part would be doing the graphics because all the bonus tile graphics are done in 3d and at the moment there's no way to create your own 3d models for the game.
 
Hi there, congrats on a great mod idea, and thanks for past, current and future hard work on it.

Now, with regard to putting in events that nobody would want...Is there any way at all that some sort of random events configuration file, like an .ini or something can be included where the mod user can simply turn each random event on or off at will?

Love the mod, but don't want that massive devastating earthquake? Turn it off in the mod options. Or, even have the world devastation events defaulted to off, but included with the mod download...?

I have no clue about modding in general, let alone Civ specifically, so I don't know if that's possible at all?

Oh, and what about a nice topical bird flu event? :drool:
 
Back
Top Bottom