Announcement

Collapse
No announcement yet.

creating natural disasters via SLIC????

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

  • #16
    quote:

    Originally posted by Locutus on 01-01-2001 01:55 PM
    Well, randomness isn't a problem since SLIC has a Random function. If a quake happened in or near a city you could specify the chance a building is destroyed (even make this specific for certain types or buildings or whatever) and cycle through all buildings and wonders in the city and use the Random function to test if it would be destroyed or not. This is just as unpredicable as the bombardment function, but much more tweakable (e.g. you could make a Bank much more likely to survive than a Factory or whatever).



    Ah, now I understand. Yes, that would be more preferrable to bombardment. i had thought you meant that if there was a quake and the city has a bank then to destroy it. I didnt realize that you could cycle thru the buildings in a city and give it a percentage that it would be destroyed. We could have a building called IMPROVEMENT_BUILDING_CODE that would minimize the damage.

    ------------------
    History is written by the victor.

    Comment


    • #17
      Well, problem is that I'm already working almost full-time on Harlan's scenario and the code for the MedMod, so I don't have much time right now (it will get much worse when college starts again). And even if I had more time, I'm still working on some decent SLIC documentation as well, which has precedence over this, so I won't be able to do much about this for at least the next two-three weeks (probably longer). I was kind of hoping someone else would pick this up. (If you'd dig into the archives you'd find so many SLIC ideas it would take one guy several years to turn it all into code, even if he's working 8 hours a day, so we definately need more people going into SLIC.)
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #18
        Locutus,
        When you say there are a max of 64 buildings and wonders, is that something you know for sure or are you assuming that's how it was in CTP1 and its probably the same in CTP2? Also, do you know of any limits to the number of advances?

        Comment


        • #19
          Would I be safe in assuming that any file whose first line is the number of entries probably has a limit? Any cases where this isnt true?

          ------------------
          History is written by the victor.

          Comment


          • #20
            Harlan,

            Unless Mr Ogre is a pathelogical lie-er(sp?) I'm fairly sure of that 64 limit on buildings and wonders AFAIK there's no limit on advances or units though (and IIRC Mr Ogre confirmed that).

            Alpha,

            I don't know, that might actually be the case, it never occured to me that there might actually be a system
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #21

              Guys, this is great. But I hope the idea is to restrict all disasters to the human. We don't want to overload the AI's already weak brain do we?

              Comment


              • #22
                my AI's brain aint weak anymore. Disasters affect anyone. Whole cities have been wiped out by disasters, so if a civ is by chance hurt, it'll have to bounce back.

                ------------------
                History is written by the victor.

                Comment


                • #23
                  Great idea AW and additions from others. If I decide to "borrow" it for a scenario I'm working on, I'll be happy to post working code. I'm in the very early stages though, so hopefully someone will beat me to it.

                  Comment


                  • #24
                    Thanks. i figured its doable but i've been spending so much time improving the AI that I havent had a chance to practise SLIC. I'm also hoping someone will have the time to try this.

                    ------------------
                    History is written by the victor.

                    Comment


                    • #25
                      Have you had a chance to try any of the disaster coding? If you can get it started, I probably can test asd debug it. Its the initial how to set it up in SLIC that I'm not very good at.

                      ------------------
                      History is written by the victor.

                      Comment


                      • #26
                        I'm back now, and ready to code. I hope you dont mind me asking 1 million questions though, eventually. That sucks if you cant change the cities food production, now I need to learn how to make a building. I thought I was so smart too:

                        Code:
                        for(m = 0; m <= player.cities; m = m + 1) 
                        		{
                        			CityFoodDelta(city[m]) = .75 * CityFoodDelta(city[m])
                        		}
                        Oh Well!

                        Comment


                        • #27
                          Heardie,
                          Well, at least it's original Most people would try to use variables to change in-game values (something like city[0].netcitygold = 2 * city[0].netcitygold), never saw anyone using functions for it before

                          One other thing to be aware of is that SLIC only works with whole numbers, everything after the dot will simply be cut off, so even if your example trigger would have worked, it would have made the CityFoodDelta 0. If you want to say x = .75 * x, you'll have to say x = (x * 3) / 4, or something like that.
                          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                          Comment


                          • #28
                            Now I know why I'm leaving the SLIC coding to you guys. ZOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOMMMMMMMMMMMMMMMMM MM

                            ------------------
                            History is written by the victor.

                            Comment


                            • #29


                              On Slic mathematics, my observation is that if something in a command is not an integer, Slic may simply ignore that command (it won't complain)! I don't know if that's a fact, but that was the effect I seemed to be getting.

                              Comment


                              • #30
                                Alpha,
                                If its like CTP1, any file that starts with a number can be changed, but you have to change that number too. So if it was the Units.txt, add three new units and then add three to that start number.

                                Luckily, many files now no longer use that number, which is great, cos it was a real pain to keep that straight.

                                Comment

                                Working...
                                X