Announcement

Collapse
No announcement yet.

Giving different mods to different civs?

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

  • Giving different mods to different civs?

    Since I don't know much about doing modpacks, here's a question. Is it possible for each civilization to have its own tech tree and units or is there some way this can be simulated?

    I'm thinking in terms of trying to make the game more interesting and perhaps more realisitic. Since in real life, different cultures think completely differently is it possible to (say) give one civ the med mod, another the cradle mod, another the Apoyton pack. Imagine a game with civilizations encountering each other in this way, different units etc. I know you might cry about game balance but I think it would be good to have a go at if it's possible.

    Is it?
    Avoid COLONY RUSH on Galactic Civlizations II (both DL & DA) with my Slow Start Mod.
    Finding Civ 4: Colonization too easy? Try my Ten Colonies challenge.

  • #2
    I think this is tried to be simulated a little by elite units in MedPack.
    Jani

    Comment


    • #3
      Still the opponets were going to have the same units and you the different ones.
      I think the best option is to right a code with civ specific units. I think this is a great idea and i could do that if someone wrote this code for me and that it could be easily edited. And according to the number of units(around 150) i have in my own mod (not public yet still testing) i could make that with a game of 3 or 4 civs. Someone wants to make this code for me?
      Last edited by Pedrunn; August 10, 2001, 09:29.
      "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
        Originally posted by Pedrunn
        Still the opponets were going to have the same units and you the different ones.
        Not true. The MedMod game I'm playing at the moment had at least one of the AI players getting an elite unit instead of me even though I'm ahead in technology.

        I think the best option is to right a code with civ specific units.
        Is is possible to do this? Is it then also possible to have different tech trees for different civs?
        Avoid COLONY RUSH on Galactic Civlizations II (both DL & DA) with my Slow Start Mod.
        Finding Civ 4: Colonization too easy? Try my Ten Colonies challenge.

        Comment


        • #5
          1)Russel i wasnt talking about the Elite Units. Elite units works fine.
          I was talking about the idea of a civ mod(actually will be a scenario). I was telling that it is not enough to make a only civ mod but we should make the opponents with their own especifics too.

          2) I think it is possible with a variation of the elite unit code. But i cant slic. So we need someone who can to make it. Anyone available to make a code where the units are NOCIV except for one only Civ?
          Last edited by Pedrunn; August 11, 2001, 00:27.
          "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


          • #6
            Actually, it won't have to be nearly that complex. I don't have much time but this topic has been discussed before so you may want to use the search feature to find more info/tips/whatever.

            The code could look something like this:

            Code:
            mod_CanCityBuildUnit(int_t theCity, int_t theUnit) {
            int_t tmpCity;
            int_t tmpUnit;
            tmpCity = theCity;
            tmpUnit = theUnit;
            
               if (tmpUnit == UnitDB(UNIT_MARINE)) {
                  if (PlayerCivilization(tmpCity.owner) == CivilizationIndex(“AMERICANS”)) {
                     return 1;   // only Americans can build Marine
                  } else {
                     return 0;
                  }
               } elseif (tmpUnit == UnitDB(UNIT_SAMURAI)) {
                  if (PlayerCivilization(tmpCity.owner) == CivilizationIndex(“JAPANESE”)) {
                     return 1;   // only Japanese can build Samurai
                  } else {
                     return 0;
                  }
               } else {
                  return 1;   // all other units can be built by anyone
               }
            }
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #7
              Thanks Locutus i am going to test it.

              I am choosing the civs probably will be four:

              1) Romans
              2) Egyptians
              3) Zulu
              4) Either Babylonians or Japaneses (still thinking)

              I will first make to the original game. Then i will change it.
              Last edited by Pedrunn; August 11, 2001, 10:17.
              "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


              • #8
                This will look stupid but i had a problem with my Advance.txt of the oiginal game and it got deleted. Because it will make months since my last play with it i did not bothered much. Anyway could someone attach your original gane Advance.txt.
                "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
                  Here is my Advance.txt, unmodded
                  Attached Files

                  Comment


                  • #10
                    Code:
                    mod_CanCityBuildUnit(int_t theCity, int_t theUnit) {
                    int_t tmpCity;
                    int_t tmpUnit;
                    tmpCity = theCity;
                    tmpUnit = theUnit;
                    
                       if (tmpUnit == UnitDB(UNIT_MARINE)) {
                          if (PlayerCivilization(tmpCity.owner) == CivilizationIndex(“AMERICANS”)) {
                             return 1;   // only Americans can build Marine
                          } else {
                             return 0;
                          }
                       } elseif (tmpUnit == UnitDB(UNIT_SAMURAI)) {
                          if (PlayerCivilization(tmpCity.owner) == CivilizationIndex(“JAPANESE”)) {
                             return 1;   // only Japanese can build Samurai
                          } else {
                             return 0;
                          }
                       } else {
                          return 1;   // all other units can be built by anyone
                       }
                    }

                    Locutus, thanks to write this code but could you do a small change?
                    I decided to change the idea instead of giving specific units to specifics civs i decide to group the civs. Eg Group 1 (Far Eastern): Japaneses, chineses, koreans .... Could you make this little change for me in such a way that i can easily edit the 4 groups and give the units to its respective group?

                    PS2: Thanx opaque.
                    "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


                    • #11
                      dp
                      Last edited by Pedrunn; August 19, 2001, 16:27.
                      "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


                      • #12
                        Code:
                        mod_CanCityBuildUnit(int_t theCity, int_t theUnit) {
                        int_t tmpCity;
                        int_t tmpUnit;
                        tmpCity = theCity;
                        tmpUnit = theUnit;
                        
                           if (tmpUnit == UnitDB(UNIT_MARINE)) {
                              if (PlayerCivilization(tmpCity.owner) == CivilizationIndex(“AMERICANS”)
                                || PlayerCivilization(tmpCity.owner) == CivilizationIndex(“ENGLISH”)
                               || PlayerCivilization(tmpCity.owner) == CivilizationIndex(“FRENCH”)) {
                                 return 1;   // only western countriescan build Marine
                              } else {
                                 return 0;
                              }
                           } elseif (tmpUnit == UnitDB(UNIT_SAMURAI)) {
                              if (PlayerCivilization(tmpCity.owner) == CivilizationIndex(“JAPANESE”)
                              || PlayerCivilization(tmpCity.owner) == CivilizationIndex(“KOREANS”)
                             || PlayerCivilization(tmpCity.owner) == CivilizationIndex(“CHINESE”))  {
                                 return 1;   // only east can build Samurai
                              } else {
                                 return 0;
                              }
                           } else {
                              return 1;   // all other units can be built by anyone
                           }
                        }
                        The || is an "or", so you can use multiple civs.

                        BTW, did you need the code for allowing certain civs certain advances? That is very similar coding.
                        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


                        • #13
                          I am new to this, but where do I put that code? And above that, how would I have figured out how to do that myself?

                          Thanks!

                          Comment


                          • #14
                            Originally posted by Immortal Wombat

                            BTW, did you need the code for allowing certain civs certain advances? That is very similar coding.
                            I will first make the specific units then i will think about the specific advances.
                            Thanks for the code.
                            "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


                            • #15
                              VisionV, that code would go in any SLIC file that you are including in the mod/scenario.

                              If you are making a scenario, then in the scenario gamedata structure, you should put it in default/gamedata/scenario.slc Simply make a new text file, type that in, and then rename it to .slc to make it work.

                              If you are making a mod (using Modswapper) , then your files will most likely have a prefix like VIS_gamefile.txt or something. Then you will have to have a VIS_script.slc, which will be almost identical to script.slc. At the bottom of it though, will be a line
                              #include 'scenario.slc'. Change this to
                              #include 'VIS_scenario.slc' and make a file called that, put the code in it, and put it in the ctp2_data/default/gamedata directory.

                              How you would have figured it out is a very good question. I possibly found it easier to learn, because I started early, when lots of SLIC was being knocked around here.
                              Firstly, I recommend going to the ctp2 modification page here, and printing out everything on SLIC that Activision provided. This gives a few examples, but is in effect little more than a reference text.
                              Step 2 would be to look at all the slic in the Activision scenarios, and try to figure out what they do, and how they do it.
                              Thirdly, start simple, attempt something easy, then gradually work up until you can figure out the harder stuff.

                              No including the mod_ functions (see above) SLIC is based around handlers, which are basically making things happen when something else happens.
                              eg.
                              Code:
                              HandleEvent(BeginTurn) 'example' pre {
                                      AddGold(player[0], 500)
                              }
                              This handles the beginturn "event" and whenever a turn is begun, it adds 500 gold to the player's treasury. The AddGold is a function that operates something, and the list is in the Activision documentation.
                              Anywya, I'm not going to explain everything, because it would take too long, but try to read as much SLIC as you can from everywhere, and try to figure out what is does, and how it does it.
                              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

                              Working...
                              X