Announcement

Collapse
No announcement yet.

Please Post SLIC commands/functions,triggers and such that all may draw from the use

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

  • Please Post SLIC commands/functions,triggers and such that all may draw from the use

    I will start with a few I use..please anyone post what they are and what they accomplish!

    Thanks

    Grandpa Troll

    Here is my first:

    This allows in this case 16 pw per citizen built per turn...once you have built a granary in a city:

    Code:
                          trigger 'AddSILOPW' when(g.player) {
      SetPlayer(1, g.player);
      i=0;
    
      while (i < player.1.cities) {
        SetCityByIndex(1, player.1, i);
        if (CityHasBuilding(city, "IMPROVE_SILO")) {
          SetPW(player.1, player.1.publicworkslevel + 16 * city.population);
        }
        i = i + 1;
      }
    }
    Attached Files
    Last edited by Grandpa Troll; April 12, 2004, 18:45.
    Hi, I'm RAH and I'm a Benaholic.-rah

  • #2
    This allows 51 settlers to start a game with..I have additionally excluded settlers from units.txt and usually start with maybe 10+ civilizations on an extra gigantic size map...


    Code:
    trigger 'MakeCities' when (city.built) {
    AddPops(city.1,1);
    }
    trigger 'LOQ_MoreSettlers' when (g.player > 0) {
    	if (g.year == 0) {
    		i = 0;
    		SetUnitByIndex(1, g.player, 0);
    		while (i < 50) {
    			CreateUnit(g.player, UnitType("UNIT_SETTLER"), unit.1.location, 1);
    			i = i + 1;
    		}
    	} else {
    		DisableTrigger('LOQ_MoreSettlers');
    	}
    }
    Last edited by Grandpa Troll; April 12, 2004, 18:45.
    Hi, I'm RAH and I'm a Benaholic.-rah

    Comment


    • #3
      This allows each city built 4 tanks once you discover tank advance

      Code:
      trigger 'SpawnTank' when (player.1 && discovery.type == 55) { 	// 55 = tank warfare
      	i = 0;
      	while (i < player.1.cities) {	// loop through all cities
      		SetCityByIndex(1, player.1, i);
      		CreateUnit(player.1, UnitType("UNIT_TANK"), city.location, 0);	// create a tank
      		i = i + 1;
      		CreateUnit(player.1, UnitType("UNIT_TANK"), city.location, 0);	// create a tank
      		CreateUnit(player.1, UnitType("UNIT_TANK"), city.location, 0);	// create a tank
      		CreateUnit(player.1, UnitType("UNIT_TANK"), city.location, 0);	// create a tank
      		
      	}
      }
      Last edited by Grandpa Troll; April 12, 2004, 18:46.
      Hi, I'm RAH and I'm a Benaholic.-rah

      Comment


      • #4
        This allows 4 Marines in each city built once you discover Mass Production

        Code:
        trigger 'SpawnMarines' when (player.1 && discovery.type == 59) { 	// 59 = Mass Production
        	i = 0;
        	while (i < player.1.cities) {	// loop through all cities
        		SetCityByIndex(1, player.1, i);
        		CreateUnit(player.1, UnitType("UNIT_MARINES"), city.location, 0);	// create a marine
        		i = i + 1;
        		CreateUnit(player.1, UnitType("UNIT_MARINES"), city.location, 0);	// create a marine
        		CreateUnit(player.1, UnitType("UNIT_MARINES"), city.location, 0);	// create a marine
        		CreateUnit(player.1, UnitType("UNIT_MARINES"), city.location, 0);	// create a marine
        	}
        }
        Last edited by Grandpa Troll; April 12, 2004, 18:46.
        Hi, I'm RAH and I'm a Benaholic.-rah

        Comment


        • #5
          If anyone has any additional to add, please do, as it helps those of us whom need to learn, see an application and allow this hodgepodge of information to permeate our thick skulls!!

          (or at least mine!! )


          This is all I currently have, would be grateful for more!!

          Peace

          Grandpa "Da-Grateful" Troll

          I want to thank JBYTHEWAY & LOCUTUS for all their help!!

          W/O I couldnt have any of these!!

          Peace

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

          Comment


          • #6
            You might want to put those in [code]...[/code] tags so that you get the indentation - it makes them much easier to read .

            Comment


            • #7
              Originally posted by J Bytheway
              You might want to put those in [code]...[/code] tags so that you get the indentation - it makes them much easier to read .
              Ok..help me oh great Sifu!!

              You mean [ the slic..then at end another ]


              I am a rock..and will do what is necessary!!

              Peace

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

              Comment


              • #8
                Originally posted by Grandpa Troll
                You mean [ the slic..then at end another ]
                No, I mean [code] ... Some SLIC here ... [/code].

                Comment


                • #9
                  OK..I just edited my posts, is this correct?


                  Ok..everyone..tell Grandpa Troll..on 3


                  ONE........TWO......THREE!!!!
                  Attached Files
                  Hi, I'm RAH and I'm a Benaholic.-rah

                  Comment


                  • #10
                    Not quite... You need the square brakets and slash...

                    Code:
                    Then it should look like this

                    Comment


                    • #11
                      ...and to think...I was once lost and now am found..was blind..but now can "C"

                      I am a Good Boy!!


                      (Pant)


                      I have now leanred a little more..by using practical application....




                      Peace

                      Grandpa "Good-boy" Troll

                      a.k.a. not the only dawg who can learn new tricks!!
                      Attached Files
                      Hi, I'm RAH and I'm a Benaholic.-rah

                      Comment


                      • #12
                        hi evreyone !

                        i'm looking for change one thing in the ctp files but i'm a bit lost ...

                        i'd like make the ability to give, demand and exchange a city i find this option interesting for a multiplayer game ... i saw few lines into some txt and flc files but it's inacive in the game ... can someone tell me how to proceed or better which files i have to rewrite please ?
                        it would be really great !!!

                        thanx


                        Last edited by blackgryffin; July 13, 2004, 08:38.
                        • slytherin forever •
                        http://www.wizardworkingonweb.net/

                        Comment


                        • #13
                          Originally posted by blackgryffin
                          i'd like make the ability to give, demand and exchange a city i find this option interesting for a multiplayer game ... i saw few lines into some txt and flc files but it's inacive in the game ... can someone tell me how to proceed or better which files i have to rewrite please ?
                          it would be really great !!!
                          This thread is not really the right place to ask this question, but I can tell you that this feature would be difficult or impossible to implement - it might just be possib;e to do with a lot of complex SLIC, but it would be very messy...

                          Comment


                          • #14
                            and Chad..the last one I could find..tweak as you like..near top of thread has several available
                            Hi, I'm RAH and I'm a Benaholic.-rah

                            Comment

                            Working...
                            X