 |
|
Bluevoss
|
|
Orlando, Florida
Dec 2000 time: 05:14
|
|
What would be great is if you could build something like "Fire Brigade" to prevent fires.
Sheeps bladders to prevent Earthquakes, perhaps? Seriously, I'd like to see things that could be adjustable, based on the buildings.
Natural disasters should destroy buildings. Plagues should reduce population by a good perentage.
|
|
|  |
 |
|  |
 |
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
quote:
Ben,
Has your code been tested yet????? (Sounds like it is still in process, judging from the above posts.)
|
Nooooo, nonono. Well, yes, but it has failed the test quite spectacularly...
quote:
If so, you know it will have a place in Cradle - just have to clear out some space for it....
|
Cool.  
quote:
Plagues for pop. reduction and earthquakes for building destruction
|
Yeah, both will also affect happiness, if the CutImprovement event works, I'll be using that too. And earthquakes also damage units in the area.
quote:
Can you set up the messages to specifically tell where the disaster happened? And if the AI is also affected, can you give a message to the human saying that an AI civ has had a disaster?
|
YES. That is one bit of the code I wrote that I think works very well. The human gets a message if the plague hits its city, or if the earthquake hits on or near their city. If it doesn't, but does hit near the AI, it messages the human which was the nearest AI city. I also made it check that the human only receives one message per disaster, so that if it has two cities within the affect quake zone, or a human city and an AI city in the quake zone, it just gets told of the nearest human city.
quote:
After all, I may want to send some 'humanitarian aid' with my armies |
I don't blame you. Defending armies with only 50% hitpoints, and all infrastructure ruined and population halved, could make a city vulnerable. (and that is just Richter 6 )
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
Ben,
I've pretty well got the Quake_Event function working (no more crashes to desktop), it's just a matter of tidying up the details. But:
1) As things stand, only a quake with tmpRichter value of 7 or 8 will affect tiles outside it's epicenter (QuakeLoc). This doesn't seem all that good to me.
2) What about restricting earthquakes to locations that are near mountains? I've never been near an earthquake but it seems to me that's where they happen.
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
quote:
Ben,
I've pretty well got the Quake_Event function working (no more crashes to desktop), it's just a matter of tidying up the details. |
Thanks very much!
quote:
1) As things stand, only a quake with tmpRichter value of 7 or 8 will affect tiles outside it's epicenter (QuakeLoc). This doesn't seem all that good to me.
|
As things stand, if a F7 or F8 earthquake hit where there is no city, they affect the surrounding tiles and the ones surrounding them. F1-F6 quakes affect the epicentre and the surroundings. If there is a city then it only affects the epicentre. I think removing the "else" on (my) line 172 will make the quake search the neighbours anyway. I think that was an error on my part. Thanks for pointing it out 
quote:
2) What about restricting earthquakes to locations that are near mountains? I've never been near an earthquake but it seems to me that's where they happen. |
Okay then, I have no pronlems with that. In my volcano function, I did pretty much the same thing. It only affects mountains, trenches, volcanoes and rifts. (and if there are two beach tiles nearby, it assumes it is a ocean nearby, an therefore the meeting of continental and oceanic plates at a detructive margin, causing stronger [volcanos] than otherwise). That code can be easily chucked into the earthquake function (at least when I last saw the code )
Again, thanks Peter . Can you email me the code please, or post it here? Thanks.
Pedrunn, I think that earthquakes, volcanoes and plagues need perfecting before we start on tsunamis, but they will go in 
I dont know how much of Harlan's notes anyone read in the thread above, or that I left in NaturalDisasters.slc, but he mentions that an underwater earthquake should spark a number of tsunamis based on its strength, and affecting nearby shallow water.
And lastly, though this might be way premature, do we want hurricanes? I think this would be best implemented if it is possible to find the area of the map where they occur (ie. between 5o and 20o, North and South of the equator). This would add some more regional hazards 
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
I thought the code you posted was some discarded stuff from Radical_Manuvr and I've really hacked it around a bit. I hope you don't mind.
1) I moved the Quake_Event function in with the rest of the functions. I don't know how the compiler works but I noticed that when I've tried having 'chains' of SLIC files it REALLY slows the game down in later stages. It also let me localize some of the variables; I just think it's easier to keep track of things that way.
2) I don't think the KillPop event is working, at least I couldn't see it doing anything. I've replaced them with some AddPops functions with a negative argument.
3) You were right about the CutImprovements event. I've got it cycling through the first 24 tile improvement indices. But this will wipe out any of them: it might be an idea to be more specific.
4) I recoded the way a quake affects it's neighbouring tiles. A force 3 quake will take out the adjoining N,S,E,W tiles; a force 4 quake will additionally take out the NE,SE,SW,NW tiles; and so on. The way I did this is not exactly elegent: if we had 2 dimensional arrays it would be easy. But we don't and I couldn't think of any other way of doing it than the way I did.
5) When I started, I cut out your messages and when I went to put them back in I ran into a few problems. I had trouble using Dale's GetNearestCity Function but as it happens I've got my own version of this sort of function, which I'm more familiar with, so I just plugged it in.
code:
//find thePlayer's theNearestCity to theLocation, outside or equal to theDistance boundary
// return the distance from theLocation to theNearestCity
// return -1 if no such city exists
int_f FindTheNearestCity( int_t thePlayer, location_t theLocation, int_t theDistance)
'theNearestCity' is a global city variable and the function will assign a city to it. It also returns the distance from theLocation to theNearestCity, or -1 if theNearestCity doesn't exist.
I also had a problem with the 'human' variable. I'm in the habit of reporting values of variables to the screen to make debugging easier and I've left in the message that reports 'human'. It always seems to be 0; I wonder if this is some background peculiarity of the Mod I'm running. See what you get.
For further debugging, there's also a message that gives some details about the quake.
I also left in some outcommented code that lets you set the location of the quake. You can then go into cheat mode, place down tile improvements or whatever, and see what the quake does to them.
ARGHH: It was the wrong file. This should be the right one.
Attachment: naturaldisaster_test.slc
This has been downloaded 13 time(s).
Last edited by Peter Triggs on 21-07-2001 at 21:02
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
It's the CityHasBuilding function. I think it's a leftover from SLIC1; it doesn't go to the BuildingDB like you'd expect. Instead it takes a quoted string argument as in
code:
if(CityHasBuilding(PlaguedCity, "IMPROVE_AQUEDUCT")){
PPChance = PPChance - 10;
}
Other than that it seems to work fine. This is looking good.
BTW, you should have got an error message. You sure you've got DebugSlic turned on?
|
|
|  |
 |
|  |
 |
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
Okey-dokey, I'm going on holiday, and everyone is clamouring for natural disasters. In the game.
So here is what I have done so far. The tsunami.slc file is included, but not #included, as it causes some problems. I now get no error messages on start-up, but have and had no time to test it thoroughly, and its all still buggy. As I thought the two weeks could be usefully used by someone else, here are the files. Sorry if they crash your pc or anything, what can I say, I'm on holiday 
Included new:
Plagues + Earthquakes still.
Earthquakes now only on mountains.
Volcanoes. Affect mountains only.
Tsunamis - Doesn't work, but no time to fix.
Cya'll in 12 days.
Ben 
|
|
|  |
 |
|
Pedrunn
|
 |
of Natal, Brazil
Jul 2001 time: 02:14
|
|
quote: Originally posted by Immortal Wombat
Okey-dokey, I'm going on holiday, and everyone is clamouring for natural disasters. In the game.
So here is what I have done so far. The tsunami.slc file is included, but not #included, as it causes some problems. I now get no error messages on start-up, but have and had no time to test it thoroughly, and its all still buggy. As I thought the two weeks could be usefully used by someone else, here are the files. Sorry if they crash your pc or anything, what can I say, I'm on holiday 
Included new:
Plagues + Earthquakes still.
Earthquakes now only on mountains.
Volcanoes. Affect mountains only.
Tsunamis - Doesn't work, but no time to fix.
Cya'll in 12 days.
Ben |
Attach the files. Like i alredy said i would love to test them. 
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
I'll try to have a look at them too. But I've been awful tied up for the past few days and I don't know when I'm going to get some spare time. Anyway, have a good holiday!
|
|
|  |
 |
|
Pedrunn
|
 |
of Natal, Brazil
Jul 2001 time: 02:14
|
|
I just start testing it. I know IW is not here to fix but will keep reporting to when he comes back. My messages may not be so accurate since i started a game with my mod. That way i had to delete some lines "already typed".
I wrote the messages in a new document. and imported it through strings.txt.
I started the game it did not had mountains close to me settle a city. I settled anyway. At the next turn appeared a message sayng that my medics averted a plague. What was nice because this meant the files were working. But next turn it appeared again. and again. and again. It became to look annoyng. Surprisely after three more turns a message appeared saying that a plague has struck in one of my cities. It still was size one so i cant tell you if the killpop is working(by the way shouldnt i loose the city if it was working?) but the happiness lowered.
Some turns after that another message appeared saying that a EarthQuake hit the city of Oporto wich belonged to the portuguses. first thing i did was open the cheat mode and see its status. It was a size one city too but i cant tell you if it was one before the EarthQuake or if it lost pop with quake. But it had three units in it so my guess is that it did not loose any unit(we were still in turn 8) .
Overall
It seems to be working, but i wanted to suggest that plagues should only occur in size three cities or more to simulate the high density number of people causing the spreading of the plague. And because it was kind of strange to see those message appearing at the box right in the second turn!
I want to ask help for someone to check the messages i wrote. They were all based in the recomendations of IW in ND_msg.slc But i changed most of it.
Attachment: as_nd_str.txt
This has been downloaded 7 time(s).
Last edited by Pedrunn on 06-08-2001 at 21:08
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|