Thread Tools
Old August 10, 2001, 02:29   #1
The Rusty Gamer
Prince
 
The Rusty Gamer's Avatar
 
Local Time: 00:16
Local Date: November 1, 2010
Join Date: Apr 1999
Location: Christchurch, New Zealand
Posts: 952
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.
The Rusty Gamer is offline  
Old August 10, 2001, 02:31   #2
janilxx
Warlord
 
janilxx's Avatar
 
Local Time: 14:16
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Finland
Posts: 150
I think this is tried to be simulated a little by elite units in MedPack.
__________________
Jani
janilxx is offline  
Old August 10, 2001, 09:24   #3
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:16
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
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?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; August 10, 2001 at 09:29.
Pedrunn is offline  
Old August 10, 2001, 21:35   #4
The Rusty Gamer
Prince
 
The Rusty Gamer's Avatar
 
Local Time: 00:16
Local Date: November 1, 2010
Join Date: Apr 1999
Location: Christchurch, New Zealand
Posts: 952
Quote:
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.

Quote:
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.
The Rusty Gamer is offline  
Old August 11, 2001, 00:11   #5
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:16
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
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?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; August 11, 2001 at 00:27.
Pedrunn is offline  
Old August 11, 2001, 05:09   #6
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 14:16
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
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
Locutus is offline  
Old August 11, 2001, 09:56   #7
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:16
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
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.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; August 11, 2001 at 10:17.
Pedrunn is offline  
Old August 11, 2001, 10:24   #8
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:16
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
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
Pedrunn is offline  
Old August 13, 2001, 15:51   #9
opaque
Warlord
 
Local Time: 12:16
Local Date: October 31, 2010
Join Date: Aug 2001
Location: England
Posts: 122
Here is my Advance.txt, unmodded
Attached Files:
File Type: txt advance.txt (20.4 KB, 2 views)
opaque is offline  
Old August 19, 2001, 16:21   #10
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:16
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
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
Pedrunn is offline  
Old August 19, 2001, 16:22   #11
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:16
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
dp
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; August 19, 2001 at 16:27.
Pedrunn is offline  
Old August 19, 2001, 17:00   #12
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 13:16
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
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.
Immortal Wombat is offline  
Old August 19, 2001, 19:12   #13
VisionV
Settler
 
Local Time: 12:16
Local Date: October 31, 2010
Join Date: May 2001
Posts: 29
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!
VisionV is offline  
Old August 19, 2001, 23:03   #14
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:16
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
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
Pedrunn is offline  
Old August 20, 2001, 07:15   #15
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 13:16
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
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.
Immortal Wombat is offline  
Old August 20, 2001, 09:36   #16
VisionV
Settler
 
Local Time: 12:16
Local Date: October 31, 2010
Join Date: May 2001
Posts: 29
Thanks Immortal!

I'll take a look.
VisionV is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:16.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team