 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
quote:
I'm having problem with the messages. The lines {theNearestCity.name} and {PlaguedCityCounter} doesnt seems to be working.
|
Good to see someone else getting interested in SLIC!
1) In your messages, replace {player[0].name} with {player[0].civ_name_singular}. You can find other options in the documentation on BuiltIn variables.
2) In ND_func.slc, cut out the declaration "int_t PlaguedCityCounter;" and paste it to a line just above the function declaration "void_f Plague (int_t thePlayer){". To use it to send data to the screen, it needs to be a global variable.
3) I haven't been able to pin down the problem with the quake messages yet but will get back to you as soon as I can.
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
Hello!
Firstly, thanks everyone for the comments.
Pedrun, you are correct in assuming that the file was a test, and that was the reason for the messages every turn. One thing I want to sort out is how often these events should occur, bearing in mind the size of the world, and time-scaling.
quote:
(by the way shouldnt i loose the city if it was working?)
|
For earthquakes, the loss of population is done as a percentage of the city's total population, so a city will never be destroyed. I have adjusted the plague event so it now only hits cities sized 3 or more.
I am puzzled about the earthquakes effect. There is no code in the earthquake function as yet to make terraforming happen. I reasoned that quakes either cause rifts, mountain ranges or flooding. The easiest way would be to make it dead, but I don't think that would happen, and to do it too realistically ould be rather difficult. Maybe in later versions.
The volcanoes should create dead tiles, even in the water. I think this is quite a good effect, and I have endeavoured to code it so that the tiles regenerate over time, and turn into grassland. As Jani suggested, it is very difficult! Also, dead tiles will stay dead if you have conservation, as the corporations backlash or something...
Clarifyer: Plagues and epidemics are the same, they just change name after you discover medicine. Its that simple I just thought that nowedays, we never get plagues as such, because antibiotics in most places with "modern medicine" can stop them, but we do get epidemics, like AIDS in South Africa and 'flu in South-East Asia. Just a minor thing really.
Wes did express some interest in putting Natural Disasters into the MedPack, but I think only once they have been properly completed, debugged and double debugged, and rigorously tested to calculate its affect on the human's gameplay and more importantly, that of the AIs'.
Thanks Peter for sorting out those messages, I get the feeling I'm still learning this...
Next update soon.
Ben
|
|
|  |
 |
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
quote:
'The gods are angry with the lack of devotion from your people - your empire has been smitten with an evil pestilence. Grovel and plead for mercy and they may yet relent.'
|
LOL Loving it. Shall I make a special "thunder-bolt" disaster that only affects theocracies which are too happy? 
quote:
Welcome back IW. We all missed you.
|

quote:
My thoyghts to all kinds of maps:
Volcano: every 120-180 turns
EarthQuakes: every 20-50 turns
Plagues: every 10-30 turns
|
Sounds ok, I assume you mean every x Human-turns, because technically there is 8 turns for each human turn...
quote:
Can you make a list of the exacly consequences of every disater?
|
Yes I can...
So far, I have:
- Earthquake
- Only affects mountain tiles, subject to change.
- Comes in Richter 1 - Richter 8
- 3% chance of R8, 5% of R7, 10% of R6 10% of R5, 12% of R4, 15% of R3, 15% of R2, 30% of R1.
- If there are 2 beaches nearby, the Richter is 3/2 the force it was originally determined as. (signifying destructive plate boundary)
- If there is a city:
- Damages units more or less depending on Richter
- Kills a percentage of population (50% for R7+, 33% for R5+, 25% for R2+)
- Makes unhappiness, again amount and duration dependant of Richter strength.
- Destroys buildings. If the city has arcologies, the chance of destroying each building is much smaller. Then the force of the quake determines how likely it is for each building to be destroyed. (arcologies are never killed by quakes)
- Then, if no city, on the square it is on, cut improvements.
- Then... Searches the 8 surrounding tiles, and the for tile improvements, and for R7 and R8 the 16 surrounding them, and in a pattern that Peter did, pillages the tile improvements there.I'm not sure of the exact pattern, but the greater the strength, the more is destroyed.
- Plague
- Currently only affects humans.
- Will occur every 20 turns

- For each city owned, there is at the start, a 50/50 chance of infection
- The chances of infection drops 10% each with any aqueduct, drug store, hospital and aqua-filter you have in the city.
- The plague then kills 1/3 the cities population.
- and causes -2 happiness for 3 turns.
- Volcano
- Can occur on mountain tiles
- Searches for nearby beaches again. If yes, then the force is up to 8. In no, then up to 4.
- Or can occur at sea, in rifts and volcanos, where the force can be up to 6.
- On the volcano, cut improvements, and damage units
- If it is a city, kill 'force' pop points.
- and destroy buildings using the same chance as quakes, only arcologies provide less protection.
- Then find a 'force' number of random neighbouring tiles:
- Cut improvements there
- Make the tile dead, and, then if the tile owner does not have conservation, make it slowly regenerate to plains.
- If there is a city there, then kill 1/3 of its population.
Last edited by Immortal Wombat on 19-08-2001 at 17:01
|
|
|  |
 |
|
ragingrabbit
|
|
south florida
Aug 2001 time: 00:14
|
|
I think the idea for earthquakes and other natural disasters is a good idea. Why hasn't anyone constructed volcanoes on the surface. A volcanic eruption on the surface can cause earthquakes and temporarily destroy the tiles a certain distance from the eruption. I Know i am getting far ahead of myself and you have been doing a lot of work but just another ideas to put in the pot. By the way hurricanes is a pretty good idea been wondering why there are no weather features in these games.
|
|
|  |
 |
|
Bluevoss
|
|
Orlando, Florida
Dec 2000 time: 05:14
|
|
Yeah, or, in CTP2 terms, its like those middle sized cities producing -46 gold. Thats what screwing up exams are like.
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
I don't think you guys understand. His exams were finished months ago; those are his results. IIRC, A is like Grade Point 4 and A* is 'with distinction'. Congratulations, Ben.
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
Sorry I haven't been much help lately. At the beginning of the month I downloaded the Activision WW2 scenario and I've been spending almost all my spare time trying to re-SLIC it. I'm determined to get something finished for a change. I think it's almost finished now so I took a day off from it today.
Have you had any luck with that prototype error? I thought it might have something to do with:
quote:
Important note! As this documenation is being prepared, the first patch for CTP2 is about to be released. Unfortunately a bug with functions was discovered too late to fix. Specifically, in some cases, using members of unit, army, city, and location variables that are function parameters may not always work as expected. There is, however, a workaround. Copy the function parameter to a local variable and use that variable instead.
code:
Example: // This version may fail sometimes!
int_f DoesAHumanOwnThisUnit(unit_t theUnit) {
if(IsHumanPlayer(theUnit.owner)) {
return 1; }
return 0; }
// This version should always work
int_f DoesAHumanOwnThisUnit(unit_t theUnit) {
unit_t copiedUnit;
copiedUnit = theUnit;
if(IsHumanPlayer(copiedUnit.owner)) {
return 1; }
return 0; }
The author apologizes for this and promises that if there is another patch it will be fixed. But the above workaround should always work.
|
But when I tried the suggested workaround I got a crash to desktop and it resized my screen. That sort of thing makes me nervous.
Last edited by Peter Triggs on 31-08-2001 at 04:56
|
|
|  |
 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
The crash seems to be being caused by the line:
code:
if(!CityIsValid(tmpCity) && MessageCount < 1){
// if it is NOT there, and we've not messaged before
I have no idea why, but after playing around for a bit and outcommenting sections of code, that's the one it narrowed down to.
BTW, I've got an idea for a new project, but it needs to be done quickly. I'll write something up and e-mail you later tonight.
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
Right, I'll get this finished ASAP now... 
Here are the files, final beta, there should be no problems, but I have yet to write up the readme etc...
To include the files, open scenario.slc, add the line
#include "ND_main.slc"
open strings.txt, add the line
#import "ND_str.txt"
Then play!
Feel free to change the messages in ND_str, they are probably subject to changes, but I have just gone back to school, and am pressed for time. I know whatever I put, Dave will change, so why bother? Customize yourselves people! 
Attachment: nd_06_09.zip
This has been downloaded 15 time(s).
|
|
|  |
 |
|  |
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
|
|
|
|
|
|