Announcement

Collapse
No announcement yet.

How can I create a city with a granary ?

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

  • #16
    Locutus,

    GREAT idea to use the TerrainType function as a workaround to check whether a city is actually a space city.

    I haven't tried it (too less time these days), but I know that as soon as a city is built (which you can trigger via city.built) the city's location is saved in city.location.

    So the trigger for space cities would most likely look like:

    trigger 'Slamp_TP_SupportSpaceCities' when (city.built && TerrainType(city.location) == 20) {
    AddPops(city.1,2);
    CreateUnit(player, UnitType("UNIT_MACHINE_GUNNER"), city.1.location, 0);
    CreateUnit(player, UnitType("UNIT_MACHINE_GUNNER"), city.1.location, 0);
    }

    Hope this works (I am especially not sure whether space is linked to the number 20, but it is the 20th entry in terrain.txt, so I suppose it is correct.

    Can someone test please ?


    TP

    Comment


    • #17
      Sorry guys,


      3 issues after my testing (I just had to do it, at least until now past midnight:

      1. Not so bad:
      The terrain number lies between 10 and 17 based on my testing, you have to find the final right number. Please use the following code:
      trigger 'Slamp_TP_SupportSpaceCities' when (city.built) {
      if (TerrainType(city.location) == XX) {
      AddPops(city.1,2);
      CreateUnit(player, UnitType("UNIT_MACHINE_GUNNER"), city.location, 0);
      CreateUnit(player, UnitType("UNIT_MACHINE_GUNNER"), city.location, 0);
      }
      }

      2. Slightly bad:
      After building the "star ladder", the first space city you automatically get with this wonder, will NOT be affected by the SLIC code, i.e. it will stay a city with 1 pop and no gunmen.

      3. Severly bad:
      The gunmen which get created, are not created in space but on Earth just down the space tile where the new space city is. I do not see a way to find a solution for that currently.


      TP

      Comment


      • #18
        Keep plugging away, TP!
        Btw, see the Awesome Aips thread for TheBirdMan's comments about Ectopia.

        Comment


        • #19
          Glad I could help (for what it's worth anyway, if you can't even get your units actually in the city).
          I'll try and do some testing tonight and see if I can get this thing to work properly. (I doubt it, because I've only been experimenting with SLIC for a few days, but maybe I'm lucky )

          I also tried to get SLIC to create buildings in a city, but without results so far (not that I expected them). That really s*cks, I hadn't anticipated that would ever be a problem. Has anyone ever complained about this with Activision? Maybe they'll put it in a future patch.

          Locutus
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #20
            Hi all,
            I've encountered some problems which prefented me from testing, but I had a few idea's that I thought I'd let you all know:

            Firstly, I don't think it's necessary to know the number for the space-terrain (if someone messes with the terrain.txt file, this number may even change). It should be possible to replace the XX in the 'Slamp_TP_SupportSpaceCities'-trigger with TerrainType("TERRAIN_SPACE"). Correct me if I'm wrong, though.

            Secondly, if you have your Machine Gunners underneath your city instead of into them, can't you use the SetOrder and AddOrder functions (with ORDER_LAUNCH from order.txt) to launch them into space? Or can this only be ordered to units who can normally be launched into space?

            Well, that's it for now

            Locutus
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment

            Working...
            X