|
Author
|
|
Topic: creating natural disasters via SLIC???? |  |
|
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted January 16, 2001 03:33
  |
 |
 |  |
I did some testing as well last night and couldn't recreate any kind of bug with the Random function, I generated random numbers up to 1000 and even generated hundreds of locations on my map using (the relevant part of) the above mentioned algorithm without problems. I tried to use the CutImprovements on a random location only twice and the game crashed immediately both times, so it would seem that it is indeed the CutImprovements event that's causing problems. I will look into this problem again tonight, since using it on a completely explored map crashed the game just as well as using it on a unexplored map (though I used the cheat menu to set the map explored, that might be the problem). [This message has been edited by Locutus (edited January 16, 2001).] |
Radical_Manuvr Chieftain Maryland, USA Dec 2000
|
 |
posted January 17, 2001 01:00
|
 |
 |  |
Sorry, I kinda forgot all about this. I've been so busy helping on the Alex scenario. I found two functions that might be useful. TileHasImprovement(location, imptype) and CellOwner(location). TileHasImprovement is probably the one to use. If so, just add a for and an if to check to be sure there is actually an improvement to destroy before trying to destroy it. Sorry I didn't think about that and put it in my original code. I haven't looked to see what the values are for imptype. I might try to work on this tomorrow to add TileHasImprovement. Just an FYI, Random(500) has worked for hundreds of turns with no known problems in the Alex scenario. |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted January 17, 2001 05:43
  |
 |
 |  |
Yes, I'm pretty sure Random isn't the problem. I suspect that checking with TileHasImprovement first and then killing the improvements will solve the problem, but I got hold up with some personal stuff last night so I didn't get to do my final testing on this. Hopefully tonight... |
Radical_Manuvr Chieftain Maryland, USA Dec 2000
|
 |
posted January 17, 2001 20:44
|
 |
 |  |
I think I have it so it won't crash anymore. I replacedEvent:CutImprovements(disasterLoc2); with if (CellOwner(disasterLoc2) >= 1 && CellOwner(disasterLoc2) <=8) { Event:CutImprovements(disasterLoc2); } Then did the same with the other CutImprovements. Watch it. One of the CutImprovements is just disasterLoc not disasterLoc2. Thanks Jerk, for figuring out the problem. I ran this over 40 times with no crash. It's possible I just got lucky, so it may still crash. In the random location part, I make it so that x & y are never < 2 or greater than maxX - 2 or maxY - 2. I figure that way it won't try to do something off the edge of the map. Though I think the CellOwner addition should probably solve the problem. I was still crashing with CellOwner >= 0, so I changed it to >= 1. I don't know what CellOwner returns if there is no owner. So barbarian areas will not have earthquakes, neither will unowned areas. That stinks. I was looking forward to having units wander around and get hit by an earthquake. I still have a problem to work out before I post the entire revised code. Anybody know how to clear a city variable? Before I end the "if" below, I need to clear tmpCity or it won't change until it happens to hit another city and it never runs the non-city earthquake code again. GetCityByLocation(disasterLoc, tmpCity); if (CityIsValid(tmpCity)) { |
Jerk Chieftain Green Bay, WI USA Nov 2000
|
 |
posted January 18, 2001 05:23
|
 |
 |  |
Hmm, I put in the check for cellowner and used: tmpCellOwner = CellOwner(disasterLoc); if (tmpCellOwner >= 0) { Event:CutImprovements(disasterLoc); } I got no crashes at all after adding this in the appropriate spots (wherever just CutImprovements was). Not sure right now why I didn't crash and yours did. I have altered the orignal posted code a bit (I threw in test messageboxes and stuff). By just putting the CutImprovements in the if statement it will still damage units wandering around the epicenter. I found that CellOwner returns -1 if its unowned. I have yet to have the script land on a barbarian city radius. I assume it would return 0 (the index number for barbarians). An interesting side note, I used the cheat menu to reveal the entire map, then place a barbarian city. When you hover over a tile you will see little information on the bottom under your control panel that says the owner of the tile or units there. Barbarian cities I placed did not seem to have any owned tiles. I could see the little white dashed line around the city that indicates its resource harvest border but they had no national border and under the control panel it did not say it was owned by anyone. [This message has been edited by Jerk (edited January 18, 2001).] |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted January 18, 2001 07:37
  |
 |
 |  |
Radical, You don't have to clear the tmpCity variable. It's a local variable, right? That means that as soon as the eventhandler this variable is in stops executing, the tmpCity variable will be 'destroyed', it will no longer exist. In the next eventhandler you can't use it anymore because it won't exist anymore and when at some later point the same eventhandler is called again, it won't know the tmpCity variable either, it will declare a new variable that's also called tmpCity, but this isn't the same variable, it just happens to have the same name. Thus it won't have a valid city in it either and hence there's no need to worry about the code never not executing.I encountered some problems with this several times with eventhandlers that were pre, but I haven't figured out the details of this yet. So whenever you can, use post instead of pre and also, test your code to verify that I'm correct, just to be sure. BTW if you really need to, you can get an invalid city in a city-variable by taking a random neighbor of another, valid, city location and use GetCityFromLocation to assign the city at that location (which doesn't exist because cities are AFAIK always 1 tile apart minimum) to your city variable. Jerk, Hmm, I'd swear I've seen barbarian national borders in the past. Maybe this only happens when barbarians conquer existing cities? You could try to do that. Create a bunch of empty cities and an army of barbarians next to each of them. Then move them in (I think you can do this manually from the cheat menu when you have player 0 selected and you open the unit-section of the cheat menu). If it's not that it's probably a pre-patch or pre-release thing. The best way to test if it works for barbarians is of course to create barbarian cities all over the place so the odds that barbarians will be hit is relatively large. |
Radical_Manuvr Chieftain Maryland, USA Dec 2000
|
 |
posted January 18, 2001 12:13
|
 |
 |  |
I think I'll replace my fix with Jerk's fix and see if I have any problems. When I crashed I was thinking the unowned tiles might return 0, so that's why I changed it to >= 1.I've seen the barbarian borders before but I'm sure I only saw them when they capture a city. I've never placed a barbarian city. tmpCity is local but it seemed to stick once I hit a city. I need to do further testing and have the x,y appear in a message box so I can determine exactly what is happening. I'll have to create more messages for testing. I should have posted more of the code and explained why I think I need to clear tmpCity. GetCityByLocation(disasterLoc, tmpCity); if (CityIsValid(tmpCity)) { city[0] = tmpCity; value[0] = tmpRichter; Message(1, 'EQHitCity'); On turn thirty-something a quake hit a city. Every turn after that I got a message that the same city was hit. It did not appear to "really" be hitting the same city since the units were not being damaged. It's very unlikely to hit a city on any given turn, so CityIsValid(tmpCity) should have been false and I should not even get the message that a city was hit. Once I display the x,y coords I'll know what is really happening and probably find I have a mistake somewhere. I'd post the whole thing but I'm leaving the buildings the way I had them, so there's a million lines. Someone wanted (and I might want this also) to be able to give certain buildings a greater or lesser chance of being destroyed. I think leaving the buildings all listed, adjusting the random #, then adding or's for the new random #'s is the easiest way to do that. If I knew what building was a certain index #, I might use a different method. That's a problem I've been running into a lot. What's the best way to determine index numbers for buildings, tile improvements, etc? Are they listed somewhere? I really wanted to use TileHasImprovement instead of CellOwner but one of the tileimp files I looked at had terraform stuff in it. I think that was the icon file for TI. Is it as simple as the order they are listed in in the text files? Thanks again for the help.
|
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted January 18, 2001 15:30
  |
 |
 |  |
Jugding from the code you posted the problem seems to be in disasterLoc, not in tmpCity, but then again, you'd have to post the entire code before I can draw any conclusions about it. If you don't want to post the entire code, put it on a website (if you don't have a website, email me, I'll post them on my website for you). That way anyone that wants to figure out what the problem is, can look at the whole code. You can't draw any conclusions if you don't have all the code. It's like watching a game of football: watching only the first half isn't enough to say who will win (well, not in most cases anyway )...Building index (as well as any other index): AFAIK it's the order in buildings.txt that determines this. So the first building is 0, the second 1, etc. For the standard game this means 0 = Academy, 1 = Airport, etc. If you're gonna use this info, double check this though, I'm fairly certain of this but not 100%. |
Jerk Chieftain Green Bay, WI USA Nov 2000
|
 |
posted January 18, 2001 16:32
|
 |
 |  |
Is it possible to access the player built in variables for a civ that is not player[0]? With this quake mod I would like to message the human player if a quake hits another civilization. Any attempts to do this so far have resulted in slic syntax or out of bounds errors. To do this I would like to use the results of CellOwner() when its >= 0 like in my previous post. If I try to use player[tmpCellOwner].country_name I get out of bounds errors. I get a syntax error if I try player.tmpCellOwner.country_name. forcing player[0] = tmpCellOwner doesnt cause a slic error when it does player[0].country_name but it also doesn't work (it's not getting set to the country name at all). I am probably overlooking something simple. Help appreciated. |
Radical_Manuvr Chieftain Maryland, USA Dec 2000
|
 |
posted January 18, 2001 16:56
|
 |
 |  |
Well, I'm probably missing something or have something in the wrong place but as far as I can tell tmpCity is not cleared, reinitialized or whatever. I know that's the way it should work but it doesn't appear to be working that way.Here's the code with most comments removed. I didn't include the QuakeDamage function since I don't believe it's causing a problem. I haven't changed that anyway. I also took out most of the buildings and elseifs to take up less space. That section has not changed. I just added the relevent stuff from my string file at the bottom so you could see what I'm displaying. Right now it's set where x is always 4 and y is set so I have a good chance of hitting 2 cities on my test map. Everything appears to work fine until it hits a city the first time. Then the EQHitCity message displays every time with the first city name until it hits the other city. Then the 2nd city's name displays until it hits another city. Until the first city is hit, EQWhatCity prints city[0].name. After the first city is hit EQWhatCity displays the city name that was hit the previous turn and then continues to display that name until another city is hit. Once the first city is hit, EQNoCity never displays again. The x and y values continue to change. In this code just y, since I have x fixed at 4 for testing. I shouldn't say never, I advanced maybe 15 turns max after hitting the first city. Locutus, I'll send you the complete set of files.
Jerk, this is displaying a message every turn, regardless of where it hits. Very annoying really, but I won't have quakes occuring every turn in my final version. Doesn't solve your problem exactly, since you want the civ. You probably know how to display without the civ anyway. ////////////////////// // Global variables // //////////////////////
int_t humanPlayer; int_t tmpYloc; int_t tmpXloc; int_t turnCount; int_t turnMax; #include "EQ_func.slc" //--------------------------------- // Stuff to do when the game starts //----------------------------------- HandleEvent(BeginTurn) 'EQStart_F' pre { int_t tmpPlayer; if(IsHumanPlayer(player[0])) { humanPlayer = player[0]; turnMax = 600; turnCount = 0; DisableTrigger('EQStart_F'); } } //----------------------- // Stuff to do every turn //------------------------- HandleEvent(BeginTurn) 'EQEachTurn_F' post { city_t tmpCity; int_t i; int_t tmpPlayer; int_t tmpRichter; int_t tmpDestroy; int_t tmpnumberUnits; location_t disasterLoc; location_t disasterLoc2; tmpPlayer = player[0]; //tmpXloc = Random(62); tmpYloc = Random(10) + 87; //if (tmpXloc < 2) { tmpXloc = 4; //} if (tmpYloc < 2) { tmpYloc = 2; } if (tmpPlayer == 1) { turnCount = turnCount + 1; if (turnCount > turnMax) { if (humanPlayer == 1) { Event:GiveMap(2,1); } } // temp for testing take out later MakeLocation(disasterLoc, tmpXloc, tmpYloc); tmpRichter = Random(9); tmpDestroy = Random(53); // value[0] = tmpRichter; city[0] = tmpCity; Message(1, 'EQWhatCity'); GetCityByLocation(disasterLoc, tmpCity); if (CityIsValid(tmpCity)) { value[0] = tmpRichter; city[0] = tmpCity; Message(1, 'EQHitCity'); tmpnumberUnits = UnitsInCell(disasterLoc); if (tmpnumberUnits > 0) { QuakeDamage (disasterLoc, tmpnumberUnits, tmpRichter); } for (i = 0; i < tmpRichter; i = i + 1) { GetRandomNeighbor(disasterLoc, disasterLoc2); if (CellOwner(disasterLoc2) >= 1 && CellOwner(disasterLoc2) <=8) { Event:CutImprovements(disasterLoc2); } tmpnumberUnits = UnitsInCell(disasterLoc2); if (tmpnumberUnits > 0) { QuakeDamage (disasterLoc2, tmpnumberUnits, tmpRichter); } } if (tmpRichter > 5) { if (tmpDestroy == 0 | | tmpDestroy == 1) { DestroyBuilding(tmpCity, BuildingDB(IMPROVE_VR_AMUSEMENT_PARK)); } elseif (tmpDestroy == 2) { DestroyBuilding(tmpCity, BuildingDB(IMPROVE_ACADEMY)); // lots more elseifs and buildings between these 2 lines } elseif (tmpDestroy == 52) { DestroyBuilding(tmpCity, BuildingDB(IMPROVE_UNIVERSITY)); } if (tmpRichter == 8) { DestroyBuilding(tmpCity, BuildingDB(IMPROVE_CITY_WALLS)); } } } else { value[0] = tmpRichter; Message(1, 'EQNoCity'); if (CellOwner(disasterLoc) >= 1 && CellOwner(disasterLoc) <=8) { Event:CutImprovements(disasterLoc); } tmpnumberUnits = UnitsInCell(disasterLoc); if (tmpnumberUnits > 0) { QuakeDamage (disasterLoc, tmpnumberUnits, tmpRichter); } for (i = 0; i < tmpRichter; i = i + 1) { GetRandomNeighbor(disasterLoc, disasterLoc2); if (CellOwner(disasterLoc2) >= 1 && CellOwner(disasterLoc2) <=8) { Event:CutImprovements(disasterLoc2); } tmpnumberUnits = UnitsInCell(disasterLoc2); if (tmpnumberUnits > 0) { QuakeDamage (disasterLoc2, tmpnumberUnits, tmpRichter); } } } } } #include "EQ_msg.slc" EQ_NO_CITY "An earthquake of magnitude {value[0]} has struck {tmpXloc}, {tmpYloc}." EQ_HIT_CITY "An earthquake of magnitude {value[0]} has struck the city of {city[0].name} at location {tmpXloc}, {tmpYloc}." EQ_WHAT_CITY "What! An earthquake of magnitude {value[0]} has struck the city of {city[0].name} at location {tmpXloc}, {tmpYloc}." |
Harlan ctpmaps.apolyton/harlan Berkeley, CA, USA b.02-15-99
|
 |
posted February 01, 2001 14:31
 |
 |
 |  |
This thread has been dead for a bit. Are people still on this? Its needed more than ever, as the following article shows:Climate change blamed for Mayans' downfall ANNE McILROY Globe and Mail Tuesday, January 30, 2001 Abrupt climate change triggered the collapse of the Classic Mayan civilization in the ninth century and the sudden downfall of other ancient civilizations around the world, a paper in the journal Science says. New information from lake-sediment cores shows that prolonged, severe drought helped bring about the end of the Classic Mayans, who built elaborate city-states in the jungles of Mexico and parts of Central America, produced beautiful works of art and developed a sophisticated writing system. That civilization disappeared within a span of a few years near the end of the ninth century AD, coinciding with the most severe drought of the millennium. Ice or sediment-core evidence also suggests that drought or a sudden drop in temperature were linked to the collapse of the ancient hunting and gathering Natufian communities in southwest Asia-Middle East between 12,500 and 11,500 years ago. A catastrophic drought and drop in temperature contributed to the death of several societies in the Middle East and Greece around 2290 BC, including the Old Kingdom civilizations of Egypt, the paper said. In the past, archeologists have concluded that social, political and economic factors brought an end to the Maya and other societies that once flourished. Now, Henry Weiss of Yale University is arguing that climate change was also a factor, and that modern societies should take note, because global warming could radically change our world. "There is mounting evidence that many cases of societal collapse were associated with changes in climate. These climatic events were abrupt, involved new conditions that were unfamiliar to the inhabitants of the time, and persisted for decades," he writes in the latest issue of Science. Dr. Weiss says there may be lessons in the past as the governments of the modern world grapple with climate change caused by increased amounts of carbon dioxide and other heat-trapping gases building up in the atmosphere |
Harlan ctpmaps.apolyton/harlan Berkeley, CA, USA b.02-15-99
|
 |
posted February 01, 2001 14:43
 |
 |
 |  |
Oh, and here's another one.Analysis: Giant quakes shook human history Wednesday, 31 January 2001 9:11 (ET) Analysis: Giant quakes shook human history By MARTIN SIEFF, UPI Senior News Analyst
WASHINGTON, Jan. 31 (UPI) -- The death toll from the Gujarat earthquake in India continues to climb, with fears that it may pass the 100,000 mark, making it the worst natural disaster the world has seen in nearly 25 years. The tragedy is a sobering reminder of the vulnerability of human society against such cataclysmic events. Throughout history, earthquakes and other natural disasters often have been seen as the wrath of God or signs of divine displeasure on existing governments. But they have been as good for religion as they have been disruptive for the state. The 1976 Tangshan quake in China, which killed 240,000 people, caused the largest loss of life in more than 400 years of history. It was widely seen at the time as an omen that the era of Mao Zedong was over after 28 years and that a new epoch in Chinese history was about to begin. Sure enough, within two years, paramount leader Deng Xiaoping would launch his dramatically successful free-market reforms to enthusiastic popular support. The Richter scale, on which quakes are measured, is arranged logarithmically so that an increase in magnitude of one unit represents a tenfold increase in earthquake size. So, a quake of magnitude 8 is 10,000 times more powerful than one of magnitude 4. The Tanghsan quake registered 7.8 on the Richter scale. By contrast, the Gujarat quake had a magnitude of 7.9. If current estimates prove accurate, then last week's quake was by far the worst India has experienced this century in terms of the casualties it inflicted. The two most destructive earthquakes in human history are believed to have been the 1556 quake in Shansi Province, China, which killed around 830,000 people, and a medieval quake in Upper Egypt in 1201 that is estimated by chroniclers at the time to have killed 1 million people. The French archaeologist Claude Schaeffer, excavator of the Bronze Age city of Ugarit in Syria, believed that enormous quakes thousands of years ago periodically wrecked cities throughout the Near East, bringing to an end the Early Bronze Age and later disrupting civilization repeatedly. Schaeffer, who held the chair of Western Asian archaeology at the College de France, documented his evidence in his 1948 book, "Stratigraphee Comparee et Chronologie de l'Asie Occidentale (IIIe et IIe Millenaires)" - ("Comparative Stratigraphy and Chronology of Western Asia in the 3rd and 2nd Millennia.") A massive earthquake in Crete -- still a seismically sensitive zone -- is believed by many archaeologists to have destroyed the high civilization of Middle Bronze Age Crete. Half a millennium later, the Minoan civilization of Crete was devastated again, this time by a volcanic explosion on the island of Santorini, thought by many to have been the inspiration for the legend of Atlantis. The city of Troy, immortalized by Homer in his Iliad, was found by archaeologists to have been destroyed by earthquake many times and repeatedly rebuilt. The most physically powerful earthquakes recorded this century registered 8.6 on the Richter scale and occurred in Kashmir in India in 1905, killing 19,000 people, and Valparaiso, Chile, in 1906, killing 1,500 people. The contrast in casualties reflected the thin population in the Chilean quake zone. However, the most powerful earthquake ever believed to have occurred in documented history occurred in the continental United States. It was the 1811 New Madrid, Mo., quake, believed to have touched 8.7 on the Richter scale. It was so powerful, it radically changed the course of the Mississippi River. In those days, the region was lightly populated and so the Indian tribes there were not exposed to death from collapsing buildings. But if a quake of that magnitude were to occur in that region today, near St. Louis, hundreds of thousands would die. In 1923, Tokyo was destroyed by an earthquake that registered 8.3 on the Richter scale. It is believed to have been the most severe earthquake to strike a major city in recorded history. Estimates of the death toll vary from 99,000 to 150,000. It was at least as destructive as the U.S. firebombing of Tokyo in 1945. Some psychologists and anthropologists have even theorized that the immense popularity of Godzilla and other monster movies in Japan in the 1950s and 1960s was in some way a reaction to the 1923 quake and the 1945 fire bombing. Earthquakes are testimony not only to the wrath of God and the implacable power of nature, they also bear witness to the sloppiness and stupidity of humankind. The huge death tolls in most earthquakes are not caused by the quakes themselves. They are the result of the collapse of thousands of buildings in the quake zone. In 1923, modern buildings in Tokyo, including a hotel designed by Frank Lloyd Wright, rode out the shock. If a major quake, against all odds, were ever to hit Manhattan, the safest places to be would probably be the Empire State Building, the Chrysler Building or the World Trade Center. That is because buildings with modern stressed steel frameworks move as units when the ground shakes in an earthquake and do not collapse. By contrast, the heavy death toll -- possibly as high as 45,000 -- in last year's Golkar quake in northwest Turkey was due to the casual abandon with which so many construction companies had run up apartment buildings, ignoring existing building codes. The colossal death toll in Tangshan 25 years ago was in large part because planners had allowed coal-mine managers to extend their tunnels beneath the city. When the quake came, dozens of blocks of apartment buildings literally collapsed into the tunnels and were swallowed up by the earth. Their inhabitants were instantly buried alive and entombed hundreds of feet below the ground. A similar fate seems to have befallen Ancient Egypt at the end of the Middle Kingdom. The Ipuwer Papyrus, now housed in the Heritage Museum in St. Petersburg, Russia, lamented, "The (royal) residence is overturned in a minute....The towns are destroyed. Upper Egypt has become waste....All is ruin." These are sentiments with which the people of India's Gujarat region suddenly became all too familiar over the past week.
|
Harlan ctpmaps.apolyton/harlan Berkeley, CA, USA b.02-15-99
|
 |
posted February 01, 2001 14:48
 |
 |
 |  |
Oh, and here's another one.Analysis: Giant quakes shook human history Wednesday, 31 January 2001 9:11 (ET) Analysis: Giant quakes shook human history By MARTIN SIEFF, UPI Senior News Analyst
WASHINGTON, Jan. 31 (UPI) -- The death toll from the Gujarat earthquake in India continues to climb, with fears that it may pass the 100,000 mark, making it the worst natural disaster the world has seen in nearly 25 years. The tragedy is a sobering reminder of the vulnerability of human society against such cataclysmic events. Throughout history, earthquakes and other natural disasters often have been seen as the wrath of God or signs of divine displeasure on existing governments. But they have been as good for religion as they have been disruptive for the state. The 1976 Tangshan quake in China, which killed 240,000 people, caused the largest loss of life in more than 400 years of history. It was widely seen at the time as an omen that the era of Mao Zedong was over after 28 years and that a new epoch in Chinese history was about to begin. Sure enough, within two years, paramount leader Deng Xiaoping would launch his dramatically successful free-market reforms to enthusiastic popular support. The Richter scale, on which quakes are measured, is arranged logarithmically so that an increase in magnitude of one unit represents a tenfold increase in earthquake size. So, a quake of magnitude 8 is 10,000 times more powerful than one of magnitude 4. The Tanghsan quake registered 7.8 on the Richter scale. By contrast, the Gujarat quake had a magnitude of 7.9. If current estimates prove accurate, then last week's quake was by far the worst India has experienced this century in terms of the casualties it inflicted. The two most destructive earthquakes in human history are believed to have been the 1556 quake in Shansi Province, China, which killed around 830,000 people, and a medieval quake in Upper Egypt in 1201 that is estimated by chroniclers at the time to have killed 1 million people. The French archaeologist Claude Schaeffer, excavator of the Bronze Age city of Ugarit in Syria, believed that enormous quakes thousands of years ago periodically wrecked cities throughout the Near East, bringing to an end the Early Bronze Age and later disrupting civilization repeatedly. Schaeffer, who held the chair of Western Asian archaeology at the College de France, documented his evidence in his 1948 book, "Stratigraphee Comparee et Chronologie de l'Asie Occidentale (IIIe et IIe Millenaires)" - ("Comparative Stratigraphy and Chronology of Western Asia in the 3rd and 2nd Millennia.") A massive earthquake in Crete -- still a seismically sensitive zone -- is believed by many archaeologists to have destroyed the high civilization of Middle Bronze Age Crete. Half a millennium later, the Minoan civilization of Crete was devastated again, this time by a volcanic explosion on the island of Santorini, thought by many to have been the inspiration for the legend of Atlantis. The city of Troy, immortalized by Homer in his Iliad, was found by archaeologists to have been destroyed by earthquake many times and repeatedly rebuilt. The most physically powerful earthquakes recorded this century registered 8.6 on the Richter scale and occurred in Kashmir in India in 1905, killing 19,000 people, and Valparaiso, Chile, in 1906, killing 1,500 people. The contrast in casualties reflected the thin population in the Chilean quake zone. However, the most powerful earthquake ever believed to have occurred in documented history occurred in the continental United States. It was the 1811 New Madrid, Mo., quake, believed to have touched 8.7 on the Richter scale. It was so powerful, it radically changed the course of the Mississippi River. In those days, the region was lightly populated and so the Indian tribes there were not exposed to death from collapsing buildings. But if a quake of that magnitude were to occur in that region today, near St. Louis, hundreds of thousands would die. In 1923, Tokyo was destroyed by an earthquake that registered 8.3 on the Richter scale. It is believed to have been the most severe earthquake to strike a major city in recorded history. Estimates of the death toll vary from 99,000 to 150,000. It was at least as destructive as the U.S. firebombing of Tokyo in 1945. Some psychologists and anthropologists have even theorized that the immense popularity of Godzilla and other monster movies in Japan in the 1950s and 1960s was in some way a reaction to the 1923 quake and the 1945 fire bombing. Earthquakes are testimony not only to the wrath of God and the implacable power of nature, they also bear witness to the sloppiness and stupidity of humankind. The huge death tolls in most earthquakes are not caused by the quakes themselves. They are the result of the collapse of thousands of buildings in the quake zone. In 1923, modern buildings in Tokyo, including a hotel designed by Frank Lloyd Wright, rode out the shock. If a major quake, against all odds, were ever to hit Manhattan, the safest places to be would probably be the Empire State Building, the Chrysler Building or the World Trade Center. That is because buildings with modern stressed steel frameworks move as units when the ground shakes in an earthquake and do not collapse. By contrast, the heavy death toll -- possibly as high as 45,000 -- in last year's Golkar quake in northwest Turkey was due to the casual abandon with which so many construction companies had run up apartment buildings, ignoring existing building codes. The colossal death toll in Tangshan 25 years ago was in large part because planners had allowed coal-mine managers to extend their tunnels beneath the city. When the quake came, dozens of blocks of apartment buildings literally collapsed into the tunnels and were swallowed up by the earth. Their inhabitants were instantly buried alive and entombed hundreds of feet below the ground. A similar fate seems to have befallen Ancient Egypt at the end of the Middle Kingdom. The Ipuwer Papyrus, now housed in the Heritage Museum in St. Petersburg, Russia, lamented, "The (royal) residence is overturned in a minute....The towns are destroyed. Upper Egypt has become waste....All is ruin." These are sentiments with which the people of India's Gujarat region suddenly became all too familiar over the past week.
|
Radical_Manuvr Chieftain Maryland, USA Dec 2000
|
 |
posted February 01, 2001 23:13
|
 |
 |  |
I'm waiting to hear from Locutus. I sent him the files a while ago. I can't figure out the problem. I will probably try to modify the code so that the earthquakes only hit cities. For my purposes, a quake hitting a city every so many turns will be okay (if I can get that to work, doesn't seem like it will be difficult). I'd like to have it hit non-city areas but I've run out of ideas on how to get it working. |
heardie GGS Co-Webmaster
Aug 1999
|
 |
posted February 02, 2001 03:08
  |
 |
 |  |
And my code is also not working, but I could rewrite it again properly, this time. |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted February 02, 2001 05:46
  |
 |
 |  |
Radical, I didn't reply to your email? Odd, I thought I had... Oh well, will look at it today then. |
wheathin Prince Charming Apr 99
|
 |
posted February 02, 2001 09:42
 |
 |
 |  |
RM - for non-city areas, I assume you want to destroy the tile improvements? How about, for each affected square (3x3 or 5x5 area around epicenter), you terraform the tile into itself, replacing plains with new plains, forest with new forest? Doing this would keep the terrain the same, but would remove all tile improvements. |
Jerk Chieftain Green Bay, WI USA Nov 2000
|
 |
posted February 02, 2001 14:22
|
 |
 |  |
Wheathin,When testing for the infamous event:cuttileimprovements bug I tried a number of workarounds to avoid using the event. One was using Terraform as you mentioned. Unfortunately I did not have the effect of removing the tileimprovements. I tried to terraform to a dead tile and then back to the right terrain. Again, no effect. I even used the event to turn a tile dead, then tried to terraform it back. This didn't seem to work at all either. It would kill the tile, but it would not terraform it back in the same turn. In order to get it to work I had to check for the cell owner, then use the cuttileimprovements event. Problem is that there are sometimes tile improvements on the map that are not owned by anyone anymore. A city gets destroyed but the tile improvements all stick behind. I haven't givin it much thought lately (I took a little break after the fustrating activision announcement). |
Jerk Chieftain Green Bay, WI USA Nov 2000
|
 |
posted February 02, 2001 21:01
|
 |
 |  |
I've done some more playing with the quake stuff today. I found that just using CellOwner > 0 did not always prevent crashes in the game. I decided to abandon the cellowner portion of the script and add a function for checking if there are any improvements on the terrain. If the land did have improvements then I went ahead and did Event:CutImprovements. I have yet to crash running it like this. I could just be lucky though. I still need to test it more. To check for TileImprovements I used this:code:
int_f TileImpCheck(location_t tmpLoc) { location_t tmpLoc2; tmpLoc2 = tmpLoc; if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_ADVANCED_FARMS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_ADVANCED_MINES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_ADVANCED_UNDERSEA_MINES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_AIR_BASES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_AUTOMATED_FISHERIES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_DRILLING_PLATFORM))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_FARMS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_FISHERIES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_FORTIFICATIONS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_HYDROPONIC_FARMS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_LISTENING_POSTS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_MAGLEV))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_MEGA_MINES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_MEGA_UNDERSEA_MINES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_MINES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_NATURE_PRESERVE))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_NETS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_OUTLET_MALL))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_PORT))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_PROCESSING_TOWER))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_RADAR_STATIONS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_RAILROAD))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_ROAD))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_SONAR_BUOYS))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_TRADING_POST))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_UNDERSEA_MINES))) { return 1; } if (TileHasImprovement(tmpLoc2, TerrainImprovementDB(TILEIMP_UNDERSEA_TUNNEL))) { return 1; } return 0; }
Even easier would be using this (once I bother to figure out whether or not those Terraforming improvements are in the TileImprovementDB.) code:
int_f TileImpCheck(location_t tmpLoc) { location_t tmpLoc2; int_t i; tmpLoc2 = tmpLoc; for (i = 0; i < howevermanyareinthetileimpDB ; i = i + 1) { if (TileHasImprovement(tmpLoc2, i)) { return 1; } } return 0 }
|
Alpha Wolf Settler Chicago Illinois Feb 2001
|
 |
posted February 02, 2001 23:34
 |
 |
 |  |
Another thing that is possible is that if a natural disaster hits an AI and you send money (disaster relief), you would get a big increase in diplomatic regards.------------------ History is written by the victor. |
Radical_Manuvr Chieftain Maryland, USA Dec 2000
|
 |
posted February 02, 2001 23:35
|
 |
 |  |
Locutus, I don't remember getting anything from you about this since I sent the files.Jerk, the terraform stuff in the improvement db one of the reasons I stayed away from using it. The second was figuring out what number corresponds to what improvement. At least I thought I needed the numbers but it looks like I didn't after reviewing the long version of your code. |
Radical_Manuvr Chieftain Maryland, USA Dec 2000
|
 |
posted February 02, 2001 23:38
|
 |
 |  |
Great idea Alpha. |
Harlan ctpmaps.apolyton/harlan Berkeley, CA, USA b.02-15-99
|
 |
posted February 03, 2001 18:43
 |
 |
 |  |
I'm glad I made those posts a few days ago, it looks like I kick started this thread back to life.I just came across an interesting statistic: On any given year, there is an average of 2 quakes greater that 7.7 on the Richter scale, seventeen between 7.7 and 7.0, one hundred between 6.0 and 7.0, and 50 thousand between 3.0 and 6.0. Of course most of these are in the oceans (sometimes leading to deadly tidal waves, most times not) or places far from significant human habitation. Some areas have tons more than others. I keep up on news about Indonesia pretty closely since I used to live there, and it seems like every other week there's a big earthquake there, usually in a remote place and thus not causing much damage. For the purposes of this game, I'd say we should stick with quakes 7.7 and over. Even those rarely kill 100,000 people, the effect is more loss of buildings. Perhaps someone mathematically inclined can extrapolate from the above numbers how often a "super quake" (say, mid 8-ish or higher), comes along.
|
Alpha Wolf Settler Chicago Illinois Feb 2001
|
 |
posted February 04, 2001 00:08
 |
 |
 |  |
it would be cool if we could somehow create fault lines and have the quakes concentrate there. I cant think of any large quake areas that arent near mountains or shorelines. Anyone know any different?------------------ History is written by the victor. |
Harlan ctpmaps.apolyton/harlan Berkeley, CA, USA b.02-15-99
|
 |
posted February 04, 2001 15:43
 |
 |
 |  |
Alpha, I agree fault lines would be great. But pretty hard to do. That's gotten me thinking more about how to implement all this stuff. Howabout this, my ideal disaster setup.Let's break disasters down into all their possible types: Earthquake: these are more likely to appear on or near Hills (arguable, but let's say!). Mostly a loss of buildings in a city. Underwater earthquake: these occur on or near Ocean Trench. Living underwater is pretty precarious- I'd say these could destroy whole cities by causing water to flood in in a major way. Causes a Tsunami for cities within a certain radius, on the coast. Some within that radius would be damaged, some not (since the local geography quirks - protected harbors and whatnot- might favor some). Effect of tsunami would be a loss of life and buildings, but neither too serious. Volcano: occurs on or near Mountains. Much more damaging than earthquake, more loss of life. Underwater volcano: occurs near underwater volcanoes. Causes a Tsunami for coastal cities within a certain radius. Flood: same as tsunami, but only hits cities on river squares. Drought: can hit anywhere, lasts several turns. Loss of life the longer it goes on, but no loss of buildings. Effects modified if you have Granaries or Food Silos, hopefully. Variable radius that can effect one city or a whole area. Epidemic: can hit anywhere, great loss of life. Hopefully modified if city has Aquaduct, Sewer System and/or Hospital. Perhaps caused by barbarian Infector unit, so it can spread along trade routes? Cataclysm: planet hit by large comet or meteor. A major catastrophe causing tremendous damage locally, triggering earthquakes, and a drought globally. Loss of life and buildings in affected cities. Still far, far short of what wiped out the dinosaurs though. Evidence shows this happens pretty frequently, we've just been lucky for a while. Ocean cataclysm: the large comet or meteor lands on water. This causes Tsunami effect for nearby coastal cities. Earthquakes are triggered, hitting nearby underwater cities. A lot of water vapor is thrown into the atmosphere, greatly increasing the danger of flooding for a number of turns. Catacylsms would come along about once every 500 years. The epicenter could be any square. If it was a water square, you get an ocean cataclysm instead. Did I miss anything? Maybe fires? The effects of coastal and river terrain would have to be slightly boosted, or else people might not want to build cities there. Here's one way I can imagine implementing these. Use the random function to determine the odds of any given disaster happening globally, each turn. So lets say, just for an example, an earthquake can happen once every twenty years, somehwere in the world. A tile is chosen randomly, then you see what kind of tile it is. If its a land type, determine distance to nearest Hill terrain. If ocean, distance to nearest Trench. If within the required distance, and there's a city near enough to be affected, have the earthquake. If within the required distance and no city, then the earthquake passes unnoticed (only give a message that a disaster occurs if it actually causes a damage, otherwise there'd be too many meaningless messages). If not within the required distance, roll the dice and see if the earthquake occurs outside its usual habitat. Odds are low that this will happen, though. If this fails, then pick another spot, and try again, until an earthquake happens, either noticed or unnoticed. Repeat process, more or less, for each type. Note that I use years and not turns, because the frequency of disasters should be based on years. So as an example, early in the game you may have 1 turn for every 10 years, and there'd be a disaster every year on average. Later you have 1 turn for every year, you only get that disaster once every ten turns on average. I can't really read SLIC well, so how close does this jibe with what's been written so far? Also, have people figured out a way to factor in buildings that would lessen the damage? If that idea works, maybe other disasters could have modifiers. For instance, cities with Research Labs have the science to give early warning to coming earthquakes and volcanoes. Cities can thus be temporarily evacuated, meaning only building damage occurs. Just an idea. And if nearest building to impending cataclysm had an ABM, maybe the comet could be deflected? I like the above system, cos some places are more dangerous than others to start a city, but you can't really avoid the disasters. It would be silly to not build near Mountains or Hills, and thus have little mining ability. It also would be silly to not build near rivers and coastline, cos of good numbers there, plus (in Wes' mod) the Harbor building. Other disasters can't be avoided. So you just have to take your lumps. It probably would be smart to avoid building near Trenches and Ocean Volcanoes, though those could be extremely productive in compensation. I also really like how some disasters cause loss of life, and others loss of buildings, instead of all having the same effect. Extra bonus: have disasters able to destroy wonders? Cos most ancient wonders were destroyed by natural disaster before they fell into disuse. There could be a problem of distinguishing between physical building wonders and abstract wonders though. Also, what would happen if you get hit by a disaster, don't like it, and decide to go back one turn to just before the disaster hit? Would the disaster happen the exact same way after you've reloaded the game? I hope it would, so people wouldn't want to do that. One last random thought: one could have absolute and relative effects, depending on what you want. For instance, a Tsunami could knock out two pop and two buildings. So if its a new city, it would get destroyed. An older and much bigger city, however, would be able to shrug off a Tsunami pretty easily, since most of the city would be more than a few blocks inland. An epidemic however, would naturally take a percentage of the population of a city. |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted February 04, 2001 16:12
  |
 |
 |  |
Well Radical, I had a look at your files but you sent me an obsolete version so I had to go with the stuff in this thread and fill in the blanks here and there. But my conclusion is unfortunately the same as yours: for some weird reason the local variable tmpCity seems to be behaving like a global variable. Before a value is assigned to it, it contains the value it had the turn before and (even weirder) if an invalid city is assigned to it, it will still contain this previous city. This is a very weird bug and I haven't got a clue as to what's causing it or how to solve it.Harlan, saw your post but don't have time to read or answer it, I'll look at it tomorrow. |
Alpha Wolf Settler Chicago Illinois Feb 2001
|
 |
posted February 05, 2001 00:42
 |
 |
 |  |
You pretty much described in much greater detail what I originally had envisioned. I just didnt distinquish between land based and water centered events. I would think things like "IMPROVE_BUILDING_CODE" would limit the damage from quakes and hospitals would limit plagues. I personally prefer all the events be totally random that can hit any civ or empty area. A drought alone wont kill people but should affect the food supply. If it lasts long ehough, it can cause starvation. Especially if you lower the # of turns that food buildings protect against famine. So many of the tile improvements wouldnt really be affected. Farms and nets would survive pretty intact and so would strip mines. By the time the most advanced (tile or city) improvements come about, those improvements by default would be quake resistant. ------------------ History is written by the victor. |
Harlan ctpmaps.apolyton/harlan Berkeley, CA, USA b.02-15-99
|
 |
posted February 05, 2001 01:43
 |
 |
 |  |
Alpha, I'm a bit confused- you say "I personally prefer all the events be totally random that can hit any civ or empty area", but in your previous post you say: "it would be cool if we could somehow create fault lines and have the quakes concentrate there." Are these contradictory statements or am I missing something?Also, the way you describe famine happening would be preferrable, but can SLIC do that? I was under the impression that SLIC has virtually no control over food numbers. I hope that's wrong though. |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted February 05, 2001 14:51
  |
 |
 |  |
Harlan, pretty much all you describe is possible, though it doesn't even come close to what has beeen coded so far. The code in this thread could well be used as a basis for writing the final version but as it is, it's all a bit too simplistic and mainly intended to see if principles work. Making buildings lessen the damage is actually fairly simple, the CityHasBuilding function can be used for it. Yes, disaster can destroy Wonders too if you want too, the type of wonder shouldn't be much of a problem (just means more code). The going-back-a-turn thing is a good point, someone will have to test for that, but if it turns out to be a problem I don't think there's much that can be done about it. As I explained earlier in this thread (page 1 and/or 2), SLIC has indeed no control over food numbers, but it *does* have control over buildings, so in case of drought, a building Drought can be put into the city (that can't be sold of course) and that takes away food. This is the only solution that I know of for manipulating food/production numbers, but since you can only have 64 buildings in Improve.txt it has to be used sparsely. Examples of this can also be found earlier in this thread. |
Jerk Chieftain Green Bay, WI USA Nov 2000
|
 |
posted February 05, 2001 15:56
|
 |
 |  |
Harlan, While it CAN be done, I am not sure it will be very efficient to script. I am speaking of the part of your idea where it 'finds' a hill or trench. There is no built in function i am aware of that can do that. One would have to search through the nearby tiles one by one in search of a hill or trench. If you have a search area of 10 by 10 thats 100 tiles to check through. If it doesn't find a hill you have to pick a new random spot and do it all over again. Late in a game this might slow down the game quite a bit. My idea would be to just pick a random tile and stick with it. Check what kind of tile it is, then base the disaster on the terrain type. If its plains and no hills (just check the surrounding 8 tiles) then make the disaster a 'Tornado' instead of an earthquake. If its mountain, then its a volcano... If its forrest then the disaster could be a forrest fire. As for the go-back-a-turn cheat I don't know of any workaround to prevent that. If Random() is truely random then I would assume you could go back a turn to avoid the disaster. The only way around it would be to pick random spots in advance by so many turns. That way you would have to save manually every turn and go back a ways to get around getting hit. |
Jerk Chieftain Green Bay, WI USA Nov 2000
|
 |
posted February 05, 2001 15:58
|
 |
 |  |
whoops, posted 3 times. Sorry  [This message has been edited by Jerk (edited February 05, 2001).] |
Jerk Chieftain Green Bay, WI USA Nov 2000
|
 |
posted February 05, 2001 16:01
|
 |
 |  |
whoops, posted 3 times. Sorry  [This message has been edited by Jerk (edited February 05, 2001).] |
Alpha Wolf Settler Chicago Illinois Feb 2001
|
 |
posted February 05, 2001 19:48
 |
 |
 |  |
Didnt mean to confuss you Harlan. What I was trying to say and the words werent coming to me, is that I wanted to make sure that these disasters did not only impact the human but also impact the other civs too. I like the idea of making tornados being that I've spent my entire life listening to tornado alarms. Never seen the actual spiral except in mini dust devil form, but have seen the starts of some and they aint pretty. I was thinking about the fault line concept. What if at the beginning of the game, we save off 3 or 4 or more quakes areas based on geography, then 3 or 4 turns in advance, randomly pick one of these "faults" to experience the quake. By determining the fault lines only once at the beginning, it minimizes the the effect on game speed. By picking the location(s) 3 or 4 turns in advance, the player cant just reload the last turn. loc_t FaultLine[6]; 6 fault lines (mountains/hills clusters) loc_t TornadoAlley[4]; 4 tornado alleys (plains/grassland clusters) loc_t HurricaneZone[4]; 4 hurricane/typhoon zones (coastal) randomly pick a future turn and disaster type randomly pick from the appropriate disaster array randomly pick the epicater/eye say x # tiles from array location HandleEvent(BeginTurn) pre if year == disaster year trigger disaster Not great psuedocode here but hopefully you understand what I'm getting at. Could even save a strength factor for each array telling how often and severe that specific disaster is. ------------------ History is written by the victor. |
Locutus Prince Apolyton Borg Hengelo/Enschede, The Netherlands Nov 1999
|
 |
posted February 06, 2001 07:31
  |
 |
 |  |
Jerk, I agree on the finding a hill thing, it's too slow to be useful but if you keep the search limited to a 2x2 or 3x3 area, it could still be done. But I like your option of giving every terrain type it's own disaster type(s) as well.Here's an email discussion Harlan, AW and I had the past few hours (AW couln'd log in at Apolyton so he had to resort to email). '>>' is AW, '>' is Harlan and the rest is yours truly... AW, you can change your email address in your profile, that should solve the problems you're having. Odd how the script even accepts mail adresses with spaces in them, those are by definition invalid... > > > Didnt mean to confuss you Harlan. What I was trying > > to say and the words werent coming to me, is that I > > wanted to make sure that these disasters did not > > only impact the human but also impact the other civs > > too. I like the idea of making tornados being that > > I've spent my entire life listening to tornado > > alarms. Never seen the actual spiral except in mini > > dust devil form, but have seen the starts of some > > and they aint pretty. > > I also agree the disasters should hit the AI. Is > there anyone who doesn't want that? > > > I was thinking about the fault line concept. What > > if at the beginning of the game, we save off 3 or 4 > > or more quakes areas based on geography, then 3 or 4 > > turns in advance, randomly pick one of these > > "faults" to experience the quake. By determining > > the fault lines only once at the beginning, it > > minimizes the the effect on game speed. By picking > > the location(s) 3 or 4 turns in advance, the player > > cant just reload the last turn. The turns in advance thing occured to me as well, but I first wanted to check if it was needed: when I restart a game I get exactly the same stuff from goody-huts, which are supposed to be random as well (and I presume restart and reload work the same), so random may not be all that random after all. Activision may have thought of this already and took it into account so it might not even be necessary to do this (although giving a warning in advance is a nice idea...). > > loc_t FaultLine[6]; 6 fault lines > > (mountains/hills clusters) > > loc_t TornadoAlley[4]; 4 tornado alleys > > (plains/grassland clusters) > > loc_t HurricaneZone[4]; 4 hurricane/typhoon zones > > (coastal) > > > > randomly pick a future turn and disaster type > > randomly pick from the appropriate disaster array > > randomly pick the epicater/eye say x # tiles from > > array location > > > > HandleEvent(BeginTurn) pre > > if year == disaster year > > trigger disaster > > > > Not great psuedocode here but hopefully you > > understand what I'm getting at. Could even save > > a strength factor for each array telling how often > > and severe that specific disaster is. Yeah, nice but you'll have to analyse the entire map at the beginning of the game, which is a very resource intensive process and will take quite some time (esp. on gigantic maps or larger and on slow computers). Not sure if that's worth it (though we'd have to try to see how slow exactly it is). > I really like the idea of determining the disaster > will strike a few turns in advance to prevent people > from reloading the turn. It could lead to a really > cool feature: with some tech, you'd be actually told a > few turns that a disaster would strike, giving you > time to build buildings that would reduce the effects. > > As for the faultine concept, it has merit. I guess > its up to whomever actually writes the code to decide > best how to do it. > > I'm not big on tornadoes and hurricanes though. While > I'm sure they're very terrifying to be in, their > damage isn't that great in the greater scheme of > things. You don't ever get something like half of > Miami or St. Louis competely destroyed, or half the > population killed off. Hurricanes might cause a bit > more damage, I dunno, correct me if I'm wrong on > either of these. I am a bit more intruiged with the > possibility of hurricanes/storms that destroy ships. > Certainly countless ships have gone down over the > years due to storms. > > Harlan > > | |