Announcement

Collapse
No announcement yet.

How can I create a city with a granary ?

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

  • How can I create a city with a granary ?

    Hi,

    I have a trigger which adds 4 pops to a city
    and creates 2 pikemens when the city is create. I want to add a granary to this city.
    How do you do that ?
    The trigger is like below:

    trigger 'MakeCities' when (city.built && (g.year <= 3) && (player.cities <= 10)) {
    AddPops(city.1,4);
    CreateUnit(player, UnitType("UNIT_PIKEMEN"), city.1.location, 0);
    CreateUnit(player, UnitType("UNIT_PIKEMEN"), city.1.location, 0);
    AddBuildingToBuildList(city.1, BuildingType("IMPROVE_SILO"));
    }
    [This message has been edited by slamp (edited December 03, 1999).]
    Apolyton QuickStart for CTP PBEM

  • #2
    Slamp is not the only one who wants to know. Can anyone help?

    And, btw, does AddBuildingToBuildList actually create the building, or just put in the queue? I couldn't tell.

    I am trying to resurrect my "Packages" idea from June - but I need a SLIC function that lets me add buildings to the city.

    Wheathin

    Comment


    • #3
      .... *ahem*

      Still waiting to find out if you can use slic to add a building to city... anyone?

      wheathin

      Comment


      • #4
        Slamp,

        I did not try the trigger you have outlined here as I think that you already have tried it without being lucky. Well, I do not see any way to do that, I am afraid. The "AddBuildingToBuildList" function does actually what it is saying - it adds a building to the build list (=build queue) of a given city. Unfortunately there is no "RushBuy" function in SLIC which would have enabled you to force a rush-buy (together with incremental gold) to build a building within one round as a work-around. Seems like this is a dead-end.

        By the way, I have just visited your homepage. As I can not speak French, I might be wrong, but do you live in Toulouse ? If yes, we might meet next year as I will be in the area of Langeudoc Roussillon for a couple of days. Due to reading about Sierra's "Gabriel Knight 3" (and playing right now), I stumbled over the history of the Cathars, Rhennes-Le-Chateaux and have literally fallen in love with the lovely landscape and that mystery.


        WesW,

        You have asked in a seperate mail whether "I could write triggers so that any sea or space city starts with a pop of 3 and machine gunners.".

        Now I won't go into SLIC coding anymore as PowerSLICs is finished and my vacation ends on Sunday. Also I have to admit ashamingly, I am now into another great game I already mentioned which puts CTP at least for the time being off my desk: "Gabriel Knight 3 - Blood of the Damned, Blood of the Sacred", a supérbe adventure game (GK1 and GK2 both have been 100% crap, but GK3 is simply stunning - mostly because of the detailed and mysterious story taking place in a beautiful area in France).

        Still the below code which is based on Slamp's code should do what you need (Slamp, I assume you are fine that I have modified your above code a bit - if not, please shout):

        trigger 'Slamp_TP_SupportSeaCities' when (city.built && IsUnderseaCity(city)) {
        AddPops(city.1,2);
        CreateUnit(player, UnitType("UNIT_MACHINE_GUNNER"), city.1.location, 0);
        CreateUnit(player, UnitType("UNIT_MACHINE_GUNNER"), city.1.location, 0);
        }

        This code should give you a pop of 3 per sea city and 2 machine gunners in them as soon as the city is founded. I have tested this code and it works.

        That's the good news. Now to the bad news...

        Unfortunately, the corresponding "IsSpaceCity" function (to detect whether a city is located in space) is broken in CTP 1.2 (at least in my setup here) and thus can not be called from within SLIC. This means that no SLIC code can be applied to cities which have just been founded in space (there may be a solution, but I am 99% sure that I have not overlooked something).


        Hope this helps - if not, go and purchase GK3 (http://www.sierrastudios.com/games/gk3) for the search of an ancient well-known item...


        TP
        [This message has been edited by TP (edited December 10, 1999).]

        Comment


        • #5
          TP,

          I lived in Toulouse (6 years), now I'm between Brussels (BE), Paris (FR) and The Hague (NL) for my job.
          But I spend from times to times my holiday in Toulouse, so don't hesitate to e-mail me if you need some informations. I have a lot of good friend in Toulouse; And you where do you come from ?

          Olivier aka Slamp
          PS: when I'll have time, I'll translate my home page
          [This message has been edited by slamp (edited December 11, 1999).]
          Apolyton QuickStart for CTP PBEM

          Comment


          • #6
            I didn't have much time to dive into SLIC yet (although I've been planning to for a long time) but in dutcheeses functions.txt I found a function called 'FinishBuilding'. Can't this be used to complete a building in the build queue? I haven't tried it yet so it might do something completely different.

            Another function I found here is 'TerrainType'. Can't you somehow investigate the type of terrain under a city to find out if it's a space city?

            These might have been stupid suggestions but as I said: I still know very little about SLIC and I'm just trying to help (and learn).
            [This message has been edited by Locutus (edited December 11, 1999).]
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #7
              the "FinishBuilding" function just orders a city to finish building a settler if that is what it is doing (or something like that). It only works for settlers.

              quite useless.

              wheathin

              Comment


              • #8
                Slamp,

                Thanks a lot for talking a bit about you ! I may take your offer and send you a mail in a couple of weeks when I am going to start next year's vacation planning. Merci beaucoup ! My name is Thomas (age 28) and I am originally from the southern part of Germany (Black Forest) but moved to the Frankfurt area about 2.5 years ago due to job reasons. I might relocate to Switzerland though in 2000/2001 within the company where I am working right now.


                Locutus,

                Copied from SLIC readme which you can find at Apolyton too (I think in the modification section of CTP):

                INT TerrainType(location)
                Return the terrain type of the location.


                TP

                Comment


                • #9
                  TP:
                  I know what TerrainType does, but what I meant to say is: Can't it be used as a work-around for the not functioning "IsSpaceCity"?
                  Something like this:

                  trigger 'SpaceCities' when (city.built && TerrainType(city.location)==space) {
                  stuff you want to do when space city is built
                  }

                  I'm not sure though if "space" can be used like that.

                  BTW I'm not sure what readme-file you're talking about. Could you mail that to me?
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #11
                    thanx, don't know how it's possible but somehow I missed two of those. This is actually useful stuff.
                    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                    Comment


                    • #12
                      This I posted a few days ago:

                      ...IMHO the amount and quality of SLIC-documentation could be better...
                      I guess I owe Joe Rumsey (whoever that may be) an apology, his document wasn't so bad after all (I just missed a few hyperlinks). Sorry Joe.
                      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                      Comment


                      • #13
                        Unfortunately this was never updated with the new functions of the 1.2 patch.

                        Comment


                        • #14
                          Are there pages like this for the FLIs, or any of the texts files?

                          I went to the CTP main site, and I couldn't find any links to those slic pages above.

                          Comment


                          • #15
                            WesW:
                            All docs on modifying files (SLIC, FLI or AIP) I know I found on Apolyton's Modification-section.
                            There you will find a link "SLIC documentation" which refers to the main document of the above links. The other links can be accessed from there with hyperlinks.
                            I haven't looked into the FLI or AIP docs yet, so I can't tell you if there any good.
                            [This message has been edited by Locutus (edited December 13, 1999).]
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment

                            Working...
                            X