Thread Tools
Old January 21, 2002, 04:24   #1
Lou Wigman
Warlord
 
Lou Wigman's Avatar
 
Local Time: 05:37
Local Date: November 1, 2010
Join Date: Jun 2001
Location: Newcastle,Australia
Posts: 137
Creating AI superpowers
This thread is a continuation of one in the general forum. The idea is to breathe new life into a game where the human player is clearly winning. To achieve this we try to combine a number of the weaker civs to make new bigger ones. Here are some suggested ways in which this might be done.

Firstly a trigger is needed. I suggest that a suitable trigger is when the human player achieves certain milestones. For example, when 'Gunpowder' is researched the the event is triggered. The next check might be when 'Industrialisation' has been achieved.

So, if the human player isn't winning then nothing need be done. If there are fewer than 4 AI civs then nothing useful can be done either. We will try to boost AI civs with rankings 2,3,4. (Rank 1 is the human of course.)

What happens next depends on whether it is possible to determine which civs are next to each other.

If it is...
See if there are any civs other than 3,4 next to 2. Next check to see what government is being run and how many more cities are allowed. Lets suppose that the government limit is 50 and civ 2 has 30 cities. Lets suppose civ 6 next door has 10 cities. Fine, civ 6 gets 'united'. This still leaves us 10 cities short. We don't, however, want to give civ 2 its full alotment of cities since this will probably cause it to stop expanding. Lets suppose civ 7 next door has 10 cities also. So we may 'steal' the nearest five cities and add them to civ 2. Repeat this process for civs 3 and 4.

If it is not...
Do something similar but instead eliminate the weakest civs.

Does this make sense?
Lou Wigman is offline  
Old January 26, 2002, 15:27   #2
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Hello!
I've written some code.
Due to the playability and likely situations for civs needing or wanting to merge or whatever, I have come up with two ways of it happening:

1 - The human is on an all-out killing spree. Every time he takes a city, a function fires to see whether or not the conditions are right for a merge. It checks the top 3 non-human civs. If any pair of them (1,2 1,3 2,3) are both at war with the human (likely), at peace with each other (likely) and have less cities in total than the maximum needed under the more powerful of the pair's government, they then have a chance of merging. This chance is presently defined as (the game year divided by 50)%, though this may change.

2 - The human is going for a science victory, or diplo victory, and hasn't taken a city for a while. It is, quite frankly, coasting. If it does not take a city for 35 turns, there is a (year/200)% chance of a merge between a random two adjacent civs. If the human does not take a city for 75 turns, there is a (year/100)% chance of a merger. (all this providing the two random civs are at peace and have few enough cities)

Because of the nature of this code, the SLIC is very hard to playtest, so if anyone is about to begin a game, I would be very happy if they unzipped this SLIC into the ctp2_data folder beforehand . It does not give any errors on startup, but who knows what the future may hold

File attatched.

Ben
Attached Files:
File Type: zip iw_mergecivs_26-01-02.zip (15.4 KB, 27 views)
Immortal Wombat is offline  
Old January 28, 2002, 06:27   #3
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Count with me. I would love test a code can that boosts the weaker AIs.
I will start it today.
PS: Yet i am also testing a lot of other stuff i changed. So another person is going to be more indicated than me.

Keep you informed
__________________
"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; January 28, 2002 at 06:33.
Pedrunn is offline  
Old January 28, 2002, 07:31   #4
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Re: Hello!
Quote:
Originally posted by Immortal Wombat
Every time he takes a city, a function fires to see whether or not the conditions are right for a merge. It checks the top 3 non-human civs. may change.
Shouldnt we have a code for the 3 worst civs instead of the 3 top.
Those are the ones that really could use help.
__________________
"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; January 28, 2002 at 07:51.
Pedrunn is offline  
Old January 28, 2002, 09:16   #5
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
The top 3 are the only ones with a chance to beat the human.
Immortal Wombat is offline  
Old January 29, 2002, 05:51   #6
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 19:37
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
Hi how about making the production on this supper power go throw the roof for a few turns as well as science and technicians can swap stories and ideas etc. . Blame it on the scientist

What about modernising the other civs some may be in the ancient age and the rest in the middle.
There cities would be rubbish
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline  
Old January 30, 2002, 17:50   #7
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Good point.
The stronger civ should have all the advances already, but I'll run a check if I can.

(tries to post for the fourth time...)
__________________
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
Immortal Wombat is offline  
Old January 30, 2002, 20:21   #8
Lou Wigman
Warlord
 
Lou Wigman's Avatar
 
Local Time: 05:37
Local Date: November 1, 2010
Join Date: Jun 2001
Location: Newcastle,Australia
Posts: 137
I have had a slight rethink here. The government maximum cities can vary a lot depending on which version of the setup files are being run. Additionally it also depends critically and the land/water ratio and the number of civs being played. Rather than targetting the government maximum instead perhaps the number of cities that the human player has is more appropriate. The AI gets an eneormous research advantage anyway. If it has anywhere near the human number of cities it should rock along nicely anyway.

In the last game I played the AI was keeping up until about 1300 AD before falling away badly. At this point I had 30 cities but the largest AI had only 10 !!! It is at a time such as this that intervention is required.

I also don't think that these amalgamations should occur more than once or twice during a game. If it's a regular event then the game will lose all continuity. That's why I suggested checking only when certain 'milestones' have been reached.
Lou Wigman is offline  
Old January 31, 2002, 06:34   #9
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 19:37
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
Hi I remember I will ago now I was trying to make my first slic coding the barbarian terrorists.
I remember messing the AI some were and it sent it on a right one it was building new cities like a good one. It was in a scenario I tweak it the civ already had about two cities after the tweak in no less then a bout then turns they had five they had all the advances and were building cities in very small spaces I will dig out my old file and send it to you.

Ps wombat love the new avatar
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline  
Old January 31, 2002, 12:09   #10
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by Lou Wigman
I have had a slight rethink here. The government maximum cities can vary a lot depending on which version of the setup files are being run. Additionally it also depends critically and the land/water ratio and the number of civs being played. Rather than targetting the government maximum instead perhaps the number of cities that the human player has is more appropriate. The AI gets an eneormous research advantage anyway. If it has anywhere near the human number of cities it should rock along nicely anyway.
I don't think this is a problem. I have not used the maximum number of cities as a determining factor of how much merging is to go on, I have just set it as an upper limit as to whether the civs should merge at all. (Thats if I can find a workaround to a small government problem...)
Quote:
I also don't think that these amalgamations should occur more than once or twice during a game. If it's a regular event then the game will lose all continuity. That's why I suggested checking only when certain 'milestones' have been reached.
Given the small chances of any merge happening at all, I don't think this wil ccur too often, and it is easily changed to personal preference anyway. However the chance of merging gets larger througout the game. I can put in a routine to disable it after two or three merges if it is desired...

Quote:
Ps wombat love the new avatar
ta
__________________
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
Immortal Wombat is offline  
Old January 31, 2002, 12:56   #11
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
If anything, what would help the AI is to prompt it to peacefully expand more during the course of the game. I believe that the AI has an almost unhealthy respect for borders in regards to settling, so as the map is filled up with cities/borders, the AI settlers end up wandering around, or worse yet, sitting in a military stack taking up valuable combat slots. (not that settlers sitting in a stack is a bad thing - as long as they end up settling somewhere.)

Still, I think if this piece of SLIC could be pulled off, it will add an exciting dynamic to the game (almost an EU2 feel) and would also reflect aspects of actual history - something that I think cannot be duplicated in civ2 or civ3, though correct me if I am wrong (the rise of new civs).

This type of effect should be limited to a late game occurance when the AI starts to lag.

It seems to me that the AI is doing alright in science and is usually in the same type of government that the human player is in for the bulk of the game in 'Cradle' - the problem, as Lou says, is in empire size based on number of cities which means that the human player can eventually outproduce the AI.

I see the max city setting for governments as the only potential problem - but the main reason the AI civs do fall behind is that they are not anywhere near the max city setting in the later game, so the numbers can be adjusted up slighly for the later governments to compensate - and a unification should greatly help the AI - even a unification between the 2nd place civ and the weakest civ will most likely benefit the AI.

Is it possible to overwrite the max city setting code via SLIC that will kick in when the unification process starts?

And Lou's point regarding the need to limit this event in the game is a very valid one, as there is the possibility that the game could eventually boil down to a 2-civ game without those limits. It could be triggered by researching a certain advance (and the advance would have to be one that is not a dead-end advance either) or something along those lines like turns - but I agree that it may be better to tie it into the number of cities - (possibly if the game is on turn 500 and the human civ has 150% more cities, then the SLIC file triggers a peaceful unification between 2 other civs.)

Using this type of SLIC in conjunction with an altered NumPlayers and MaxPlayer setting in userprfile.txt will ensure that the game will have a constant influx of new and changing civs. (I can see the message that civA and civB have united due to a royal marriage - and this type of thing adds immensely to in-game atmosphere)

The bottom line is to get a game that continually challenges a player during the course of the game - if this accomplishes this goal, then I'm all for it, and this will be a part of Cradle.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old January 31, 2002, 13:46   #12
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by hexagonian
This type of effect should be limited to a late game occurance when the AI starts to lag.
Its current setting means it could has a 1% chance of happening if you take a city after 100 turns, or if you have had 35 turns of peace after turn 500. However, this is very, very unlikely. The chance increases through the game. How many turns are there? 1000 in the whole game? That would give a 10% chance of a merge every time you take a city after then. I will add a line to limit it to 2 merges I think. Or possibly to 1/4 of the number of players.
Quote:
I see the max city setting for governments as the only potential problem - but the main reason the AI civs do fall behind is that they are not anywhere near the max city setting in the later game, so the numbers can be adjusted up slighly for the later governments to compensate - and a unification should greatly help the AI - even a unification between the 2nd place civ and the weakest civ will most likely benefit the AI.
Peter has informed me that the function I was using to get the number of cities available under the player's government will not work. Unless I can find a workaround, the city limits are a problem. There is a way to use SLIC to compensate for the unhappiness for the AI, but I think perhaps a better way to do it would be to set city limits really high in the text files, and then simply use SLIC to punish the human for any extra cities over the limit.
Quote:
Is it possible to overwrite the max city setting code via SLIC that will kick in when the unification process starts?
Yes.
Quote:
And Lou's point regarding the need to limit this event in the game is a very valid one, as there is the possibility that the game could eventually boil down to a 2-civ game without those limits. It could be triggered by researching a certain advance (and the advance would have to be one that is not a dead-end advance either) or something along those lines like turns - but I agree that it may be better to tie it into the number of cities - (possibly if the game is on turn 500 and the human civ has 150% more cities, then the SLIC file triggers a peaceful unification between 2 other civs.)
I'll start a poll...
Quote:
The bottom line is to get a game that continually challenges a player during the course of the game - if this accomplishes this goal, then I'm all for it, and this will be a part of Cradle.
Lets hope it will
Immortal Wombat is offline  
Old February 8, 2002, 22:12   #13
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Update:

Conditions:
Human Cities = (AI1 Cities + AI2 Cities) * 1.5
Game Turn > 400 (500 for peacetime merges)

Triggers:
BeginTurn: Fires after lengthy peace
CaptureCity: Fires when the human takes a city
Advances: (lazy me)
Code:
if(AdvanceID == AdvanceDB(ADVANCE_GUNPOWDER)
	|| AdvanceID == AdvanceDB(ADVANCE_INDUSTRIALIZATION)
	|| AdvanceID == AdvanceDB(ADVANCE_TANK_WARFARE)
	|| AdvanceID == AdvanceDB(ADVANCE_ADVANCED_INFANTRY_TACTICS)
	|| AdvanceID == AdvanceDB(ADVANCE_FLIGHT)){
Fires on those... I'm open to suggestions of more, but I'm not in the mood at 2am to go searching the tech tree.

Think thats it...
Attached Files:
File Type: zip iw_mergecivs_09-02-02.zip (16.1 KB, 20 views)
__________________
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
Immortal Wombat is offline  
Old February 12, 2002, 13:00   #14
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
I'm still getting the 'this is not a valid zip file' window. (The setup you had last time with the 'Hurricane' file seemed to work, where you had uploaded it to another website)
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old February 12, 2002, 15:06   #15
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Damn. Ok, try here:

http://www.weaver1.btinternet.co.uk/...s_09-02-02.ZIP
__________________
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
Immortal Wombat is offline  
Old February 12, 2002, 16:38   #16
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
OK, got the file without any problem.

Got some questions regarding the following lines within the SLIC code...
=================================================
int_f GetCityLimit(int_t testCiv)
{
int_t CityLimit;
player[0] = testCiv;
if(player[0].govttype == GovernmentDB(GOVERNMENT_ANARCHY)){
CityLimit = 1000;
} elseif(player[0].govttype == GovernmentDB(GOVERNMENT_TYRANNY)){
CityLimit = 10;
} elseif(player[0].govttype == GovernmentDB(GOVERNMENT_THEOCRACY)
|| player[0].govttype == GovernmentDB(GOVERNMENT_MONARCHY)
|| player[0].govttype == GovernmentDB(GOVERNMENT_REPUBLIC)) {
CityLimit = 20;
} elseif(player[0].govttype == GovernmentDB(GOVERNMENT_COMMUNISM)
|| player[0].govttype == GovernmentDB(GOVERNMENT_DEMOCRACY)
|| player[0].govttype == GovernmentDB(GOVERNMENT_FASCISM)) {
CityLimit = 35;
} elseif(player[0].govttype == GovernmentDB(GOVERNMENT_TECHNOCRACY)
|| player[0].govttype == GovernmentDB(GOVERNMENT_CORPORATE_REPUBLIC)) {
CityLimit = 45;
} elseif(player[0].govttype == GovernmentDB(GOVERNMENT_VIRTUAL_DEMOCRACY)
|| player[0].govttype == GovernmentDB(GOVERNMENT_ECOTOPIA)) {
CityLimit = 60;
}
return CityLimit;
}

// return what generation (age) of governemts is currently available for 'thePlayer'
// this is a stand-in until the player's government can be found somehow.
// Based on part of Wouter's MM2 Partisan code.
int_f GetAge(int_t thePlayer) {
int_t tmpPlayer;
tmpPlayer = thePlayer;

if (HasAdvance(tmpPlayer, ID_ADVANCE_VIRTUAL_DEMOCRACY) && HasAdvance(tmpPlayer, ID_ADVANCE_ECOTOPIA)) { // if player has both diamond govs possible,
CityLimit = 60; // they will be using one of them
} elseif (HasAdvance(tmpPlayer, ID_ADVANCE_TECHNOCRACY) && HasAdvance(tmpPlayer, ID_ADVANCE_CORPORATE_REPUBLIC)) { // etc.
CityLimit = 45;
} elseif (HasAdvance(tmpPlayer, ID_ADVANCE_DEMOCRACY)){
if(HasAdvance(tmpPlayer, ID_ADVANCE_COMMUNISM) || HasAdvance(tmpPlayer, ID_ADVANCE_FASCISM)) {
CityLimit = 35;
}
} elseif (HasAdvance(tmpPlayer, ID_ADVANCE_MONARCHY)){
if(HasAdvance(tmpPlayer, ID_ADVANCE_THEOCRACY) || HasAdvance(tmpPlayer, ID_ADVANCE_BUREAUCRACY)) {
CityLimit = 20;
}
} else {
CityLimit = 10;
}
return CityLimit;
}
=================================================
Since Cradle has a bunch of new governments, what do I need to do with the above code to accurately reflect Cradle's government - especially if there are a lot of max. city variance within the governments that belong to the same age?




And the following question about the code posted below...
=================================================

int_f IsDecentAdvance(int_t AdvanceID)
{
if(AdvanceID == AdvanceDB(ADVANCE_GUNPOWDER)
|| AdvanceID == AdvanceDB(ADVANCE_INDUSTRIALIZATION)
|| AdvanceID == AdvanceDB(ADVANCE_TANK_WARFARE)
|| AdvanceID == AdvanceDB(ADVANCE_ADVANCED_INFANTRY_TACTICS)
|| AdvanceID == AdvanceDB(ADVANCE_FLIGHT)){
return 1;
}
else {
return 0;
}
}
=================================================
Are these the advances that can potentially enable the code to kick in?
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old February 12, 2002, 19:33   #17
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Right.

The int_f GetCityLimit function doesn't work. I was trying to make a string ("text") equal a number. Not possible unfortunately.

So that code is in there in case I find a workaround.

the int_f GetAge function is the one that is being used. If you could post, or email me a list of Cradle governments and their respective city limits, I will try to get some code to work it out, based on the personality, strategy being used and governments available to guess (as accurately as possible) what government the AI is using.

Quote:
Are these the advances that can potentially enable the code to kick in?
Yes. I didn't know what to put, and I figured everyone would want to customise anyway. So, to add extra ones, add a copy of the line:
Code:
|| AdvanceID == AdvanceDB(ADVANCE_TANK_WARFARE)
In between the first and last ones, with the ADVANCE_TANK_WARFARE changed to the Advance.txt name for the advance you want.

Similarly taking them out, just delete them, but note deleting the first and last ones is slightly harder, though I think even you could figure out the logic of the code to work out how to take them out.
__________________
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
Immortal Wombat is offline  
Old February 13, 2002, 12:17   #18
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Quote:
Originally posted by Immortal Wombat
If you could post, or email me a list of Cradle governments and their respective city limits, I will try to get some code to work it out, based on the personality, strategy being used and governments available to guess (as accurately as possible) what government the AI is using.
I guess I should of read further up in the post to see the note about that part of the code not working...

Anyhow, here are the Cradle lists.

(Below are the Cradle Governments max cities settings)

Ancient
GOVERNMENT_ANARCHY - 75 max cities
GOVERNMENT_TYRANNY - 10 max cities
GOVERNMENT_DYNASTY - 10 max cities
GOVERNMENT_CITY_STATE - 15 max cities

Bronze/Iron
GOVERNMENT_OLIGARCHY - 20 max cities
GOVERNMENT_REPUBLIC - 20 max cities
GOVERNMENT_DICTATORSHIP - 25 max cities
GOVERNMENT_TRIBUNAL_EMPIRE - 30 max cities

Medieval
GOVERNMENT_MONARCHY - 35 max cities
GOVERNMENT_THEOCRACY - 40 max cities
GOVERNMENT_CALIPHATE - 40 max cities

Modern
GOVERNMENT_DEMOCRACY - 50 max cities
GOVERNMENT_COMMUNISM - 50 max cities
GOVERNMENT_FASCISM - 50 max cities

Future
GOVERNMENT_CORPORATE_REPUBLIC - 55 max cities
GOVERNMENT_TECHNOCRACY - 60 max cities
GOVERNMENT_VIRTUAL_DEMOCRACY - 65 max cities
GOVERNMENT_ECOTOPIA - 70 max cities



(Below are the Cradle Strategies Government lists)

DEFAULT
// GOVERNMENT SETTING
//
Government GOVERNMENT_CORPORATE_REPUBLIC
Government GOVERNMENT_FASCISM
Government GOVERNMENT_CALIPHATE
Government GOVERNMENT_TRIBUNAL_EMPIRE
Government GOVERNMENT_DICTATORSHIP
Government GOVERNMENT_REPUBLIC
Government GOVERNMENT_DYNASTY
Government GOVERNMENT_TYRANNY

// other governments
// Government GOVERNMENT_TECHNOCRACY
// Government GOVERNMENT_ECOTOPIA
// Government GOVERNMENT_VIRTUAL_DEMOCRACY
// Government GOVERNMENT_DEMOCRACY
// Government GOVERNMENT_COMMUNISM
// Government GOVERNMENT_MONARCHY
// Government GOVERNMENT_THEOCRACY
// Government GOVERNMENT_OLIGARCHY
// Government GOVERNMENT_CITY_STATE


BARBARIAN
// GOVERNMENT SETTING
//
// good for war
Government GOVERNMENT_TECHNOCRACY
Government GOVERNMENT_CORPORATE_REPUBLIC
Government GOVERNMENT_FASCISM
Government GOVERNMENT_COMMUNISM
Government GOVERNMENT_MONARCHY
Government GOVERNMENT_TRIBUNAL_EMPIRE
Government GOVERNMENT_DICTATORSHIP
Government GOVERNMENT_OLIGARCHY
Government GOVERNMENT_DYNASTY
Government GOVERNMENT_TYRANNY

// other governments
// Government GOVERNMENT_ECOTOPIA
// Government GOVERNMENT_VIRTUAL_DEMOCRACY
// Government GOVERNMENT_DEMOCRACY
// Government GOVERNMENT_CALIPHATE
// Government GOVERNMENT_THEOCRACY
// Government GOVERNMENT_REPUBLIC
// Government GOVERNMENT_CITY_STATE


SCIENTIST_DEFAULT
// GOVERNMENT SETTING
//
Government GOVERNMENT_VIRTUAL_DEMOCRACY
Government GOVERNMENT_TECHNOCRACY
Government GOVERNMENT_DEMOCRACY
Government GOVERNMENT_CALIPHATE
Government GOVERNMENT_TRIBUNAL_EMPIRE
Government GOVERNMENT_REPUBLIC
Government GOVERNMENT_CITY_STATE
Government GOVERNMENT_DYNASTY
Government GOVERNMENT_TYRANNY

// other governments
// Government GOVERNMENT_ECOTOPIA
// Government GOVERNMENT_CORPORATE_REPUBLIC
// Government GOVERNMENT_COMMUNISM
// Government GOVERNMENT_FASCISM
// Government GOVERNMENT_THEOCRACY
// Government GOVERNMENT_MONARCHY
// Government GOVERNMENT_DICTATORSHIP
// Government GOVERNMENT_OLIGARCHY


MILITARISTIC_DEFAULT
// GOVERNMENT SETTING
//
// good for war
Government GOVERNMENT_TECHNOCRACY
Government GOVERNMENT_CORPORATE_REPUBLIC
Government GOVERNMENT_FASCISM
Government GOVERNMENT_COMMUNISM
Government GOVERNMENT_MONARCHY
Government GOVERNMENT_TRIBUNAL_EMPIRE
Government GOVERNMENT_DICTATORSHIP
Government GOVERNMENT_OLIGARCHY
Government GOVERNMENT_DYNASTY
Government GOVERNMENT_TYRANNY

// other governments
// Government GOVERNMENT_ECOTOPIA
// Government GOVERNMENT_VIRTUAL_DEMOCRACY
// Government GOVERNMENT_DEMOCRACY
// Government GOVERNMENT_CALIPHATE
// Government GOVERNMENT_THEOCRACY
// Government GOVERNMENT_REPUBLIC
// Government GOVERNMENT_CITY_STATE


ECONOMIC_DEFAULT
// GOVERNMENT SETTING
//
// good for war
Government GOVERNMENT_VIRTUAL_DEMOCRACY
Government GOVERNMENT_CORPORATE_REPUBLIC
Government GOVERNMENT_DEMOCRACY
Government GOVERNMENT_THEOCRACY
Government GOVERNMENT_TRIBUNAL_EMPIRE
Government GOVERNMENT_OLIGARCHY
Government GOVERNMENT_DYNASTY
Government GOVERNMENT_TYRANNY

// other governments
// Government GOVERNMENT_ECOTOPIA
// Government GOVERNMENT_TECHNOCRACY
// Government GOVERNMENT_FASCISM
// Government GOVERNMENT_COMMUNISM
// Government GOVERNMENT_CALIPHATE
// Government GOVERNMENT_MONARCHY
// Government GOVERNMENT_DICTATORSHIP
// Government GOVERNMENT_REPUBLIC
// Government GOVERNMENT_CITY_STATE


ECOTOPIAN_DEFAULT
// GOVERNMENT SETTING
//
Government GOVERNMENT_ECOTOPIA
Government GOVERNMENT_DEMOCRACY
Government GOVERNMENT_THEOCRACY
Government GOVERNMENT_TRIBUNAL_EMPIRE
Government GOVERNMENT_DICTATORSHIP
Government GOVERNMENT_REPUBLIC
Government GOVERNMENT_CITY_STATE
Government GOVERNMENT_DYNASTY
Government GOVERNMENT_TYRANNY

// other governments
// Government GOVERNMENT_VIRTUAL_DEMOCRACY
// Government GOVERNMENT_TECHNOCRACY
// Government GOVERNMENT_CORPORATE_REPUBLIC
// Government GOVERNMENT_COMMUNISM
// Government GOVERNMENT_FASCISM
// Government GOVERNMENT_CALIPHATE
// Government GOVERNMENT_MONARCHY
// Government GOVERNMENT_OLIGARCHY


DIPLOMATIC_DEFAULT
// GOVERNMENT SETTING
//
Government GOVERNMENT_VIRTUAL_DEMOCRACY
Government GOVERNMENT_CORPORATE_REPUBLIC
Government GOVERNMENT_COMMUNISM
Government GOVERNMENT_CALIPHATE
Government GOVERNMENT_TRIBUNAL_EMPIRE
Government GOVERNMENT_REPUBLIC
Government GOVERNMENT_CITY_STATE
Government GOVERNMENT_DYNASTY
Government GOVERNMENT_TYRANNY

// Government GOVERNMENT_ECOTOPIA
// Government GOVERNMENT_TECHNOCRACY
// Government GOVERNMENT_FASCISM
// Government GOVERNMENT_THEOCRACY
// Government GOVERNMENT_MONARCHY
// Government GOVERNMENT_DICTATORSHIP
// Government GOVERNMENT_OLIGARCHY


Hope this helps
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old February 13, 2002, 13:28   #19
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Thanks Dave, that's great

Oh, does Cradle modify personalities.txt?
__________________
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
Immortal Wombat is offline  
Old February 13, 2002, 13:59   #20
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Quote:
Originally posted by Immortal Wombat
Oh, does Cradle modify personalities.txt?
Some small changes to the settings (I do not remember exactly what I had changed - but I am sure that I changed all expansion settings to 'Maximum'), but I did not add any new personalities.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old February 13, 2002, 15:19   #21
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Good. In which case, this code should do the trick.
I've put it in a separate file to avoid cluttering, as it takes up a lot of lines for what it actually does.
Its here

The updated MergeCivs file which you will need also, is here
__________________
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
Immortal Wombat is offline  
Old February 14, 2002, 14:00   #22
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
If anyone downloaded the file yesterday, it had a typo in it, which is now fixed. But you'll need to get it again.
__________________
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
Immortal Wombat is offline  
Old February 14, 2002, 14:56   #23
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Which file should I redownload???

I downloaded the 'Cradle' version about 3 hours ago and made some alts to it (enable advances), so if you can point out where the error is, I can fix it at my end. I want to make sure that I can launch the game on my setup before posting the final 'Cradle' version.

BTW, this next 'Cradle' update will also include the Hurricane code - though it does not seem to be working on my end. I have not seen a Hurricane actually attack anything yet in playtesting. Still, if this can be fixed, the file can be easily updated - as it stands now, the file does not cause any crashes.

I get the hurricanes forming on one turn and then crashing and burning the following turn without attacking anything.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old February 14, 2002, 15:11   #24
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by hexagonian
Which file should I redownload???
The Cradle version IW_citylimits.slc linked to in the post previously.

It had if(IsMilitaristic(tmpPlayer)){
where is should have been if(IsScientist(tmpPlayer)){
It wouldn't cause a crash, just fail to accuratly deal with scientist AIs.

Quote:
BTW, this next 'Cradle' update will also include the Hurricane code - though it does not seem to be working on my end. I have not seen a Hurricane actually attack anything yet in playtesting. Still, if this can be fixed, the file can be easily updated - as it stands now, the file does not cause any crashes.

I get the hurricanes forming on one turn and then crashing and burning the following turn without attacking anything.
This is bugging me... What size map, and what barbarian settings are you using? It seems the hurricanes only go places they can get to within their movement points.


also, if Cradle is running Dale's Air Unit script, find (in the AirMove handler) the line:
Code:
if(!(IsHumanPlayer(player[3]))) {
and replace it with
Code:
if(!IsHumanPlayer(player[3]) && player[3] != 0) {
That way the barbarian storms won't turn around at critical moments.
__________________
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
Immortal Wombat is offline  
Old February 14, 2002, 16:05   #25
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
OK, fixed the citylimits file...

Regarding the Hurricanes:

I was running the test in the cheat mode on a small map with 3 civs. I ran the test both with barbarians and without barbarians. (originally I ran the test without and noticed the crash/burn, then I thought that I needed to have the barbarians in the game - same results though) I had also tried to increase the movement to 12, vision to 20 and fuel to 48 without success.

I am using Dale's code. Is this change to be made in his code (no lines in his code resemble the suggested change) or to your code? (the closest line in your code is the following

int_T i;
ND_H_NumPlayers = preference("NumPlayers"); // find human...
for(i = 1; i < ND_H_NumPlayers; i = i + 1){
if(IsHumanPlayer(i)){
ND_H_HUMAN = i;
}
}

}
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...

Last edited by hexagonian; February 14, 2002 at 16:15.
hexagonian is offline  
Old February 14, 2002, 19:27   #26
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by hexagonian
I am using Dale's code. Is this change to be made in his code (no lines in his code resemble the suggested change) or to your code? (the closest line in your code is the following
In his code. The player definition may be different, that is the line from the MedMod version I had handy.

If you can't find it, don't worry. I just realised, it won't affect the Hurricanes, they are not defined in the code as "Air Units".

Sorry.
__________________
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
Immortal Wombat is offline  
Old February 15, 2002, 10:13   #27
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
I tried to run a test last night with the mergeciv SLIC and got a slew of SLIC error messages.

mergeciv.slc 16 Symbol NUMPLAYERS
(I forgot to copy down the rest of the message)

mergeciv.slc 48 No Function named IS/W_MC_HumanPlayer

mergeciv.slc 163 Syntax error
.
.
.
mergeciv.slc 171 Synax error

mergeciv.slc 320 Variable 'CityLimit' used in assignment has unknown type.

...and so forth.

Several things I did to the file though I do not think these changes would cause the crashes (these are standard SLIC changes)...
- change the enable Advances to reflect Cradle advances
- Change the prefix name of both SLIC files to CRA_ since these files have changes to them that reflect the Cradle Mod
- Change the names in script.slc to reflect the name changes
- Change the
#include "IW_citylimits.slc"
in the mergeciv.slc file to
#include "CRA_citylimits.slc"

Hope this will help. Do you still have Cradle setup at your end? This might help in the testing.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old February 15, 2002, 10:18   #28
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Oops, probably should have debugged it. I'll post a corrected file in a few hours.
__________________
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
Immortal Wombat is offline  
Old February 22, 2002, 11:00   #29
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Ben,

Any luck on this...

BTW, my computer is down at home (the monitor fried out - its on warranty, so I have to wait a couple of weeks to get a replacement) so I cannot check to see if any code you provide will be compatible.

Man, I'm going through withdrawl

Still, if you have something to post, go ahead.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old February 22, 2002, 11:30   #30
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:37
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Oh dammit, yeah, I ran against some wierd stuff. Then I decided to download Cradle and test it against the most recent setup, and some of Martin's code was giving me some trouble.
__________________
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
Immortal Wombat 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 15:37.


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