Announcement

Collapse
No announcement yet.

Natural Disasters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    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.

    Comment


    • #32
      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.
      (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
      Concrete, Abstract, or Squoingy?
      "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

      Comment


      • #33
        Welcome back Ben,

        My citizens still need some more death and destruction in Cradle - after all, the ancient world is a cruel and hard place.

        Can't wait to customize the messages too.

        '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.'

        Something along those lines...
        Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
        ...aisdhieort...dticcok...

        Comment


        • #34
          Welcome back IW. We all missed you.

          Originally posted by Immortal Wombat
          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.
          My thoyghts to all kinds of maps:
          Volcano: every 120-180 turns
          EarthQuakes: every 20-50 turns
          Plagues: every 10-30 turns

          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. 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.
          I guess you are right. I just think quakes should not create dead tiles in water since they are a too common disaster (too many dead tiles islands ).

          The volcanoes should create dead tiles, even in the water. I think this is quite a good effect.
          Yes it is a great effect. But it should rarelly occur in the frequency i told you up this post.

          Can you make a list of the exacly consequences of every disater?
          "Kill a man and you are a murder.
          Kill thousands and you are a conquer.
          Kill all and you are a God!"
          -Jean Rostand

          Comment


          • #35
            '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?

            Welcome back IW. We all missed you.


            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...

            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.

            Concrete, Abstract, or Squoingy?
            "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

            Comment


            • #36
              As far as i tested the plage event is working great decreasing pop, causing unheppines and spreading to near by cities.
              The earthquake is killing people, making them unhappy and only happening in mountains but i havent seen it killing units yet :hmm:. I did not test the volcano.
              "Kill a man and you are a murder.
              Kill thousands and you are a conquer.
              Kill all and you are a God!"
              -Jean Rostand

              Comment


              • #37
                dp
                "Kill a man and you are a murder.
                Kill thousands and you are a conquer.
                Kill all and you are a God!"
                -Jean Rostand

                Comment


                • #38
                  Good to see it working okay. The units will probably only be damaged, and perhaps only slightly at that. If they are in cities, chances are that they will heal too quickly for the effect tto be noticed, and I don't think that effect will have much impact on the game.
                  Concrete, Abstract, or Squoingy?
                  "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                  Comment


                  • #39
                    Originally posted by Immortal Wombat
                    Good to see it working okay. The units will probably only be damaged, and perhaps only slightly at that. If they are in cities, chances are that they will heal too quickly for the effect tto be noticed, and I don't think that effect will have much impact on the game.
                    This code kind of became forgotten this week. But IW could you attach it here ready for use and not as a test like the last one?

                    I want to start a new game now with the natural disasters in.
                    "Kill a man and you are a murder.
                    Kill thousands and you are a conquer.
                    Kill all and you are a God!"
                    -Jean Rostand

                    Comment


                    • #40
                      Sorry, I've been a little busy lately, exam results coming through, and all the related drunkeness that goes along with that I should post a "final" test tommorrow, and then it will just need playtesting to completion.
                      Concrete, Abstract, or Squoingy?
                      "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                      Comment


                      • #41
                        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.
                        i dont die i multiply

                        Comment


                        • #42
                          ah, but exam results (3A*, 6A, 1B) + drunkeness = happy Ben

                          Sorry, but more drunkeness tonight, so disasters shall have to wait again
                          Concrete, Abstract, or Squoingy?
                          "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                          Comment


                          • #43
                            Originally posted by Immortal Wombat
                            Sorry, I've been a little busy lately, exam results coming through, and all the related drunkeness that goes along with that I should post a "final" test tommorrow, and then it will just need playtesting to completion.
                            Drool, drool!!!

                            Hey Ben, drunkeness + exams = cook at McDonalds
                            Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
                            ...aisdhieort...dticcok...

                            Comment


                            • #44
                              Yeah, or, in CTP2 terms, its like those middle sized cities producing -46 gold. Thats what screwing up exams are like.
                              Bluevoss-

                              Comment


                              • #45
                                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.

                                Comment

                                Working...
                                X