Announcement

Collapse
No announcement yet.

Babarian Encampments SLIC idea

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

  • Babarian Encampments SLIC idea

    I was just wondering weather or not it would be possible for the barbarians to have encampments as in civ3 (as much as i hate that game, it does have some *few* good points)

    These encampments would only appear outside a civilizations boarders (to the best of my knowledge babarians only appear outside the boarders anyway unless from hut) and would at a pretty slow rate create fairly crap babarian units with one unit always in it defending and the others built sent out to explore or whatever.

    if u attacked the encampment and succeseded then there would be a small reward as in gold or whatever and it would simply disappear off the map (as in a destroyed city) and another one would randomly appear somewhere else.

    If this randomly appearing wouldnt work, would it be possible to do the same only have the encampments randomly layed at the start (or a settler like unit that built these encampments at the start but was invisible) OR settler units that randomly appear through the game that build them ?



    I would like to think it would somehow be possible


    SMIFFGIG
    Oxygen should be considered a drug
    Tiberian Sun Retro
    My Mod for Tiberian Sun Webmaster of
    http://www.tiberiumsun.com

  • #2
    not a bad idea im for it

    Comment


    • #3
      Here it is a code i have just made. For a better graphic i suggest a new city style has to be created for barbarians. Any grphic suggestion?

      This code creates a camp (city) in the unit location with the same size of the stack when the barabrians ends its turn.
      When the unit moves the the citys is killed.
      So far no bonus for the player who kills the camp.

      Code:
      HandleEvent(EndTurn) 'CreateBarbarianCamp' pre {			// When the player turn ends
      int_t i;
      	if(player[0] == 0) {						//if player is barbarian
      		for(i=o; i <= player[0].armies; i = i + 1) {		
      			GetArmyByIndex(player[0], i, army[0]);		// In all its armies
      			CreateCity(0,army[0].location, 0, city[0]);	// create a city in its location
      			if(CityIsValid(city[0])) {			// if city was created 
      				value[0] = GetUnitsAtLocation (army[0].location); 
      				value[1] = value[0] - 1;		// The number of units
      				AddPops(city[0], value[1]);		// becomes the size of the city
      			}
      		}
      	}
      }
      
      HandleEvent(MoveUnits) 'KillBarbarianCamp' pre {			// When a army moves
      int_t i;
      player[0] = army[0].owner;						// check army player owner 
      	if(player[0] == 0) {						// if player is barbarian
      		location[0] = army[0].location;				// Get its location
      		GetCityByLocation(location[0], city[0]);		// and check if there is a city
      		if(CityIsValid(city[0])) {				// If there is 
      			for (i = 0; i <= city[0].population; i=i+1){	// 
      				Event: KillPop(city[0]);		// Kill City
      			}
      		}
      	}
      }
      PS: not tested so it may contain bugs. I am waiting your word if it worked or not .
      Last edited by Pedrunn; August 10, 2002, 06:00.
      "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


      • #4
        There's a small typo in line 4. It should say i=0 instead of i=o.

        I tried the code in a saved game where there were lots of barbarians about, but the code had no effect. It's still a great idea though!

        Comment


        • #5
          Originally posted by Pedrunn
          Here it is a code i have just made. For a better graphic i suggest a new city style has to be created for barbarians. Any grphic suggestion?
          Of course Civ3 even if the graphics of this game don't have the high quality of CTP2 graphics (8bit Civ3 in comparision 16bit CTP2)

          Originally posted by Pedrunn
          This code creates a camp (city) in the unit location with the same size of the stack when the barabrians ends its turn.
          When the unit moves the the citys is killed.
          So far no bonus for the player who kills the camp.
          Actual I would prefer a tile improvement. One of the fort like it would have a different border radius, you could use some slic code create at this loacation randomly units. And finally no city name would be displayed.

          -Martin
          Civ2 military advisor: "No complaints, Sir!"

          Comment


          • #6
            Originally posted by Martin Gühmann
            Actual I would prefer a tile improvement. One of the fort like it would have a different border radius, you could use some slic code create at this loacation randomly units. And finally no city name would be displayed.
            Tile imps were my first thougth but i did not want the units to appear over the hut. But there is also the problem of conserving the borders of the civ what makes the city idea only workable in unclaimed terrain.
            I also thaught in addind a city-like unit to the army. but i dont know how to make it be the unit of the army to appear in the map

            I guess we may have to stick to the Tile Imp idea.
            "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


            • #7
              Does anyone have any idea why this code would not have an effect in the game? When I included it in the script.txt, it informed me about the typo, so I know that the game "read" the code, but it did not "excute" it.

              Comment


              • #8
                Try adding this line under the line int_t i; of the EndTurn event.

                Code:
                player[0] = g.player;
                "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


                • #9
                  Try using "beginturn" instead of "endturn" - maybe CreateCity handlers can only fire on the turn of the player whose city it is?
                  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


                  • #10
                    ahenobarb,

                    You should have got some 'wrong type of argument' errors because you can't use functions like GetArmyByIndex(int, int, armyVar) and GetCityByLocation(location, cityVar) with BuiltIn army or city variables: they must be user defined variables like 'tmpArmy' and 'tmpCity'. Make sure you've got DebugSlic=yes.

                    Comment


                    • #11
                      It looks like I am birthing Pedrunn's calf, but here is the revised code generated from the comments everyone included here. BTW, Immortal Wombat, I used your suggestion and changed EndTurn to BeginTurn and back again, but it still didn't do anything.

                      HandleEvent(EndTurn) 'CreateBarbarianCamp' pre { // When the player turn ends
                      int_t i;
                      army_t tmpArmy;
                      city_t tmpCity;

                      player[0] = g.player;
                      if(player[0] == 0) { //if player is barbarian
                      for(i=0; i <= player[0].armies; i = i + 1) {
                      GetArmyByIndex(player[0], i, tmpArmy); // In all its armies
                      CreateCity(0,tmpArmy.location, 0, tmpCity); // create a city in its location
                      if(CityIsValid(tmpCity)) { // if city was created
                      value[0] = GetUnitsAtLocation (tmpArmy.location);
                      value[1] = value[0] - 1; // The number of units
                      AddPops(city[0], value[1]); // becomes the size of the city
                      }
                      }
                      }
                      }

                      HandleEvent(MoveUnits) 'KillBarbarianCamp' pre { // When a army moves
                      int_t i;
                      army_t tmpArmy;
                      city_t tmpCity;

                      player[0] = g.player; // check army player owner
                      if(player[0] == 0) { // if player is barbarian
                      location[0] = tmpArmy.location; // Get its location
                      GetCityByLocation(location[0], tmpCity); // and check if there is a city
                      if(CityIsValid(tmpCity)) { // If there is
                      for (i = 0; i <= tmpCity.population; i=i+1){ //
                      Event: KillPop(tmpCity); // Kill City
                      }
                      }
                      }
                      }


                      I was looking over Pedrunn's other code regarding religion that he is working on with mapfi and others (you know the thread ) and he said he has concerns about the CreateCity function, which is also used here. perhaps it's the culprit?

                      Comment


                      • #12
                        Hey, nice lot of replies here hope it can be implemented


                        for the graphics i was thinking of the village one thats used in the samuari scenario, i think that looks perfect from what i can remember
                        Oxygen should be considered a drug
                        Tiberian Sun Retro
                        My Mod for Tiberian Sun Webmaster of
                        http://www.tiberiumsun.com

                        Comment


                        • #13
                          Try this one. I think it will work now.
                          Note: The part with // is to prevent the barbs to. mess up borders by creating city over them. If works with them. try without them.
                          Note2: I changed the MoveUnit event for BeginTurn. This mean that all barbarian cities are going to be destroyed every turn. This makes more sense since barbarians are supposed to be nomads.

                          Code:
                          
                          HandleEvent(EndTurn) 'CreateBarbarianCamp' pre {			// When the player turn ends
                          int_t i;
                          int_t tmpPlayer;
                          int_t ArmyCount;
                          int_t CitySize;
                          army_t	tmpArmy;
                          city_t	tmpCity;
                          location_t tmpLoc;
                          
                          player[0] = g.player;
                          	if(player[0] == 0) {
                          		ArmyCount = player[0].armies; 
                          		for(i=0; i <= ArmyCount; i = i + 1) {		
                          			tmpPlayer = player[0];
                          			GetArmyByIndex(tmpPlayer, i, tmpArmy);		// In all its armies
                          			tmpLoc = tmpArmy.location;
                          //			if(CellOwner(tmpLoc) == -1) {			// if unit is in unclaimed land
                          				CreateCity(0, tmpLoc, 0, tmpCity);	// create a city in its location
                          				if(CityIsValid(tmpCity)) {			// if city was created 
                          					CitySize = GetUnitsAtLocation (tmpLoc) - 1;  // The number of units
                          					AddPops(tmpCity, CitySize);		// becomes the size of the city
                          				}
                          //			}
                          		}
                          	}
                          }
                          
                          HandleEvent(BeginTurn) 'KillBarbarianCamp' pre {			
                          int_t i;
                          int_t tmpPlayer;
                          int_t CityCount;
                          int_t CitySize;
                          city_t	tmpCity;
                          
                          tmpPlayer = g.player;
                          	if(tmpPlayer == 0) {
                          		CityCount = PlayerCityCount(tmpPlayer); 
                          		for(i=0; i <= CityCount; i = i + 1) {		
                          			GetCityByIndex(tmpPlayer, i, tmpCity);		
                          			city[0] = tmpCity;
                          			if(CityIsValid(city[0])) {				
                          				for (i = 0; i <= city[0].population; i=i+1) {	
                          					if(CityIsValid(city[0])) {
                          						Event: KillPop(city[0]);		
                          					}
                          				}
                          			}
                          		}
                          	}
                          }
                          EDIT: Found a typo.
                          Last edited by Pedrunn; August 13, 2002, 22:59.
                          "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


                          • #14
                            Hey great, i hope this does work, i havent actually tested it as i dont know how

                            the thing is, im not sure if it is a good idea to have the barb encampments destroyed every turn,

                            1. Cause the only way ull be able to kill the encampment if u manage to find one by luck, otherwise ull probably never get to kill one as it would have disappeared by the time u get there

                            2. This would mean they would not be able to build units out of the encampment as it would disappear

                            3. Gets rid of the need to try and kill them as they will never be any threat


                            I understand what ur saying about them being nomads but i would say that if u do want them to disappear it should definitly be way more turns than 1 at least as much for them to be able to build one unit out of them, also i was thinking how about using the militia code so there is always one unit in the encampment (as in Civ3)

                            Personly i dont think that they should dissapear and reappear at all
                            Oxygen should be considered a drug
                            Tiberian Sun Retro
                            My Mod for Tiberian Sun Webmaster of
                            http://www.tiberiumsun.com

                            Comment


                            • #15
                              Correction

                              I do want them to reappear just not dissappear
                              Oxygen should be considered a drug
                              Tiberian Sun Retro
                              My Mod for Tiberian Sun Webmaster of
                              http://www.tiberiumsun.com

                              Comment

                              Working...
                              X