Announcement

Collapse
No announcement yet.

I have a ?

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

  • I have a ?

    I have recently attempted to create colonies in my game. The actual cities and the unit to settle them were easy enough, but now I want to make it so that some buildings can't be built in a Colony. The question is, how do I add a new string like the "cantbuildinsea" that keeps things like airports from being built underwater? Is there any way? Any help would be greatly appreciated.

  • #2
    The best was going to make a slic operation. But i neither know if it is possible nor if someone wants to make it.
    How does you colonies work? Are you using the idea i post some weeks a go?
    "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


    • #3
      Not exactly. I wanted to create a city that would grow (although slowly) and build most buildings and units. However, I wanted to disable certain buildings like a capitol (most empires don't build a capitol in a colony). I'm rather rusty on my programing so the slic files might as well be in greek to me.

      Comment


      • #4
        I don't know if this will work, but its the only thing I can think of for now...
        Code:
        int_f mod_CanCityBuildBuilding(city_t theCity, int_t theBuilding)
        {
        if(theCity == UnitDB(UNIT_COLONY)){
              if(theBuilding == BuildingDB(IMPROVE_AIRPORT)
                || theBuilding == BuildingDB(IMPROVE_GRANARY)){
                           return 0;  // you cant build
             }
             else {         //otherwise
                   return 1;     // you can
             }
        }
        else {   // if its not a colony
               return 1;   //  it can build anything
        } 
        }
        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


        • #5
          Thanks for the help. Ummm.... by the way, which slc file does this go into, not to sound like a ****** or anything.

          Comment


          • #6
            If you aren't running the MedPack, put it in script.slc or scenario.slc.

            If you add it to the MedPack, it may give some errors but that can be solved if you need (and if it works, I'm still not convinced...)
            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

            Working...
            X