Announcement

Collapse
No announcement yet.

Spawning settler possibilities?

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

  • Spawning settler possibilities?

    ...Ok..work with me..

    I was considering making a scenario where say a city at turn "X" or year"XXXX" give a free settler..

    My point would be that you get say 20 cities built and then BAM each city spawns a free settler..either in the city or if possible outside..

    My thinking is that one problem I would be facing would be say I was building a Publishing house...I wouldnt want the settler to override the publishing house but rather appear..

    Is this possible?

    ..Maybe make it spawn after the next item in quere is built

    In addition I would like to see this happen on say 3-4 different occassions.....

    I guess I would have to increase the govt MAX Cities...

    ..I have that covered..seems Trolldoms decree is 1000 cities in any form of Govt??

    Ok.....

    Lets take it one further...


    Would it be possible to say make it so once the last spawn takes place...

    -ZER0 HOUR- no more settlers could be built?

    Just contemplating possible scenarios is all!

    I understand I could make an obsolesence advance...

    Just was hoping I could make it more of a race aand then BAM its over..

    Let me know what possibilites can or cant be produced!

    ugh..perhaps in shorter code than the fella below!!

    Peace

    Grandpa "Behind-da-playing-curve"Troll
    Attached Files
    Hi, I'm RAH and I'm a Benaholic.-rah

  • #2
    Okay, I made an example where Settlers are spawned in all cities in turn 50 (note that this code is untested but based on the Militia code for the MedMod, so it should work).

    Note that although the name of the variable is g.year, this actually represents the turn, not the year.

    Code:
    trigger 'SpawnSettler' when (player.1 && g.year == 50) { 	// in turn 50
    	i = 0;
    	while (i < player.1.cities) {	// loop through all cities
    		SetCityByIndex(1, player.1, i);
    		CreateUnit(player.1, UnitType("UNIT_SETTLER"), city.location, 1);	// create a settler 1 tile away from city
    		i = i + 1;
    	}
    }
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #3
      ...awesome..will follow up tommorrow!!

      'aprreciate it mucho buen!

      GT
      Attached Files
      Hi, I'm RAH and I'm a Benaholic.-rah

      Comment


      • #4
        Originally posted by Locutus
        Okay, I made an example where Settlers are spawned in all cities in turn 50 (note that this code is untested but based on the Militia code for the MedMod, so it should work).

        Note that although the name of the variable is g.year, this actually represents the turn, not the year.

        Code:
        trigger 'SpawnSettler' when (player.1 && g.year == 50) { 	// in turn 50
        	i = 0;
        	while (i < player.1.cities) {	// loop through all cities
        		SetCityByIndex(1, player.1, i);
        		CreateUnit(player.1, UnitType("UNIT_SETTLER"), city.location, 1);	// create a settler 1 tile away from city
        		i = i + 1;
        	}
        }
        I am at turn 52.did not get the spawned settler unfortunately

        Point to remember..I am also using the settlers excluded with start of 40 settlers...

        Would this negate the possibility of having the settlers spawn?

        I will await your response, thanks for all the help!

        Peace

        GT
        Attached Files
        Hi, I'm RAH and I'm a Benaholic.-rah

        Comment


        • #5
          ...Ok..I tried "enabling" settlers where they could be built..

          No good either...

          I went again to turn 52 and nothing happened as far as settlers "spawning"

          IIRC, the year was 3650 BC...again..I have slowed the years per turn down...

          Let me know what else I may try!!

          Peace

          Grandpa Troll
          Attached Files
          Hi, I'm RAH and I'm a Benaholic.-rah

          Comment


          • #6


            Ok..I also tried the following:

            I replaced the default CONST.TXT file..still no settler spawning

            I then tried to replace my altered DIFFDB.TXT with the default and got to turn IIRC, 83..and year 150 AD..no spawning..

            I will be looking forward to any additional feedback!

            Peace

            Grandpa Troll
            Attached Files
            Hi, I'm RAH and I'm a Benaholic.-rah

            Comment


            • #7
              dp
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #8
                Yeah, I noticed it didn't work. It's probably some weird SLIC1 bug. It somehow doesn't seem to like the player.1 and g.year combo as trigger. When I have time I'll see if I can get it work, but I'm a little busy with other stuff right now.

                What I suspect might work (untested):

                Code:
                trigger 'SpawnSettler' when (player.1) {
                	if (g.year == 50) { 	// in turn 50
                		i = 0;
                		while (i < player.1.cities) {	// loop through all cities
                			SetCityByIndex(1, player.1, i);
                			CreateUnit(player.1, UnitType("UNIT_SETTLER"), city.location, 1);	// create a settler 1 tile away from city
                			i = i + 1;
                		}
                	}
                }
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #9
                  Originally posted by Locutus
                  Yeah, I noticed it didn't work. It's probably some weird SLIC1 bug. It somehow doesn't seem to like the player.1 and g.year combo as trigger. When I have time I'll see if I can get it work, but I'm a little busy with other stuff right now.

                  What I suspect might work (untested):

                  Code:
                  trigger 'SpawnSettler' when (player.1) {
                  	if (g.year == 50) { 	// in turn 50
                  		i = 0;
                  		while (i < player.1.cities) {	// loop through all cities
                  			SetCityByIndex(1, player.1, i);
                  			CreateUnit(player.1, UnitType("UNIT_SETTLER"), city.location, 1);	// create a settler 1 tile away from city
                  			i = i + 1;
                  		}
                  	}
                  }
                  Thanks for the efforts Locutus..unfortunately..it didnt work either

                  I was wondering if it had anything to do with the wording????..i.e. "1 tile away from city"


                  I thank you for all your efforts though..currently, you are 2-3...well.1 for 2 and I used the template you created for tanks and made one for Marines..

                  I made it and it had an error..apparently I missed the fact that it is not UNIT_MARINE..but rather UNIT_MARINES..

                  I now have where you get a free marine then a free Tank with each seperate advance..

                  I found it very interesting..the follwing is the two adavnces #'s 55 & 56:

                  ### ADVANCE DONE ###

                  ADVANCE_ROCKETRY
                  {
                  ADVANCE_DEFAULT_ICON ICON_ADVANCE_ROCKETRY
                  ADVANCE_DEFAULT_BRANCH BRANCH_FLIGHT
                  ADVANCE_AERODYNAMICS ADVANCE_EXPLOSIVES
                  ADVANCE_AGE_INDEX 2
                  POWER_POINTS 55
                  ADVANCE_COST 9375
                  }

                  ### ADVANCE DONE ###

                  ADVANCE_TANK_WARFARE
                  {
                  ADVANCE_DEFAULT_ICON ICON_ADVANCE_TANK_WARFARE
                  ADVANCE_DEFAULT_BRANCH BRANCH_AGGRESSIVE_WAR
                  ADVANCE_CAVALRY_TACTICS ADVANCE_MASS_PRODUCTION
                  ADVANCE_AGE_INDEX 2
                  POWER_POINTS 56
                  ADVANCE_COST 9375
                  }

                  I say advances #55 & 56 because of the power points numbered such..

                  BUT in previous post you had ADVANCE_TANK_WARFARE as #55,,but in actuality it is #56 according to the list...

                  Any reason?

                  Trying to learn more each time out!

                  Feed me some more knowledge..dont pay attention to the attached sign!!!

                  Peace

                  Grandpa "Grateful" Troll
                  Attached Files
                  Hi, I'm RAH and I'm a Benaholic.-rah

                  Comment


                  • #10
                    In computing we start counting at zero (Except when we're programming in BASIC...).
                    Last edited by J Bytheway; April 11, 2004, 19:26.

                    Comment


                    • #11
                      Originally posted by J Bytheway
                      In computing we start counting at zero .
                      Ok..thats why..

                      I guess to count adavnce simply take the advance number and take one from it....

                      I came upon this writing every 5th advance down and DUH it dawned on me..see..i was reading all the lines in it..to see what i could pick up!

                      Thanks JBytheway for the response!!!


                      Peace

                      GT
                      Attached Files
                      Hi, I'm RAH and I'm a Benaholic.-rah

                      Comment

                      Working...
                      X