Thread Tools
Old October 13, 2001, 08:06   #1
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Happy Buildings for AIs
In CTP2 the AI doesn't build happiness building very well, therefore it will get some serious problems, in empire efficiency, growth and power.

Unfortunatly the CTP2 AI doesn't use entertainers to cure unhappiness, either. Instead of using entertainers it will max out the global sliders according happiness on the cost of an efficient empire. In the default game the AI tries to keep the happiness level at 73 and in ApolytonPack at 75. To achieve this goal via the sliders is very inefficient. Another problem is if a city is rioting the AI doesn't clear the build queue and add a happiness building on this list. The default behaviour is to finish the current building and maybe later to add this happiness building to the build queue. This script file adds clears the build queue and adds the happiness building on top of the build queue and tries to rush buy it. In this strategies.txt the priority for happiness is also increased but not the top priority, so AI cities will now build the happiness buildings when they are needed.

To install this script just unzip the *zip file into your default CTP2 folder and open the file script.slc in your ..\ctp2_data\default\gamedata\ folder and add to the end of this file the line #include "MG_HappyBuilding.slc". If you want to use this file with ApolytonPack search for the according file APOL_script.slc. If you like to use this script with GoodMod you have to look for a file called GM1_script.slc if you are playing for CityMod2 or for a file called GM1_APOL_script.slc if you are playing GoodMod for ApolytonPack. Unfortunatly the settings in the original strategies.txt or APOL_strategies.txt don't allow the AI to let drop the happiness level under 73 (or 75 in Apolyton Pack) therefore you have to replace the default strategies.txt's. If you are playing GoodMod you don't need to do that, because the GM1_strategies.txt is allready a part of GoodMod. To do that just move the GM1_strategies.txt to the ..\ctp2_data\default\aidata\ directory. If you unzip this *.zip file into the above directory you should find the GM1_strategies.txt there. Now you have to make CTP2 use the GM1_strategies.txt. To do that open the gamefile.txt (If you are playing an unmodded CTP2, if use one of the mods here are the prefixes: CM2_ for CityMod2, APOL_ for ApolytonPack and APOLUL_ for the Ultra Gigantic Map version of ApolytonPack.) Look in that file for a line strategies.txt and replace it by GM1_strategies.txt. If the entry allready has a prefix replace it by GM1_.

Unfortunatly this script file is not compartible with Craddle or MedPack2.

-Martin
Attached Files:
File Type: zip mg_happybuilding.zip (11.3 KB, 18 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 13, 2001, 12:05   #2
Foro
Settler
 
Local Time: 15:37
Local Date: October 31, 2010
Join Date: Aug 2001
Location: Germany
Posts: 27
I simply renamed GM1_strategies to strategies.txt ..does this work ?
Foro is offline  
Old October 13, 2001, 13:25   #3
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
I know you read the thread about the new slic file. There I allready posted the installation notes about the GM1_strategies.txt it is the same file, therefore if you allready installed it you don't need to install the strategies.txt again.

Quote:
Originally posted by Foro
I simply renamed GM1_strategies to strategies.txt ..does this work ?
Of course this will work as well if you play the the default game or CityMod2. But it doesn't work if you play Apolyton Pack, because it has its own file called APOL_strategies.txt.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 13, 2001, 15:03   #4
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
I think that yours startegy.txt isn't that good
I was thinking about HAPPY seq. Priority 7500 & 0.5 Unhappiest

You should look at Commerce for Ai thread.
There I gave an interetigns way to mak AI build more "happy" improvments.

Basicily you shuould make it a VERY high priority like 11500 or 12000,
exept in starting strategies in which it should be like 1000.
Then A percent should be a 0.1 Unhappiest.
Then in Buildlistseqences.txt you should top GarrisonUnitBuildList
in front of BuildingBuildList BUILDING_BUILD_LIST_HAPPINESS
so computer will use a Martial Law & won't make cities undefended.

In yours settings big commercal & scientific cities & several others would
not build "happy" building at all (since their priorities are bigger than for
happines).
player1 is offline  
Old October 13, 2001, 17:48   #5
Cube
Warlord
 
Cube's Avatar
 
Local Time: 07:37
Local Date: October 31, 2010
Join Date: Nov 2000
Location: El Paso, Tx
Posts: 120
I agree with player1, 0.5 is too big. I edited medmod's strategies. txt and saw lots of priorities had 0.4 or higher and I lowered it.

In yours settings big commercal & scientific cities & several others would not build "happy" building at all (since their priorities are bigger than for happines).

actually you're wrong they will build them, but nearly at the end, Since each buildlist has to build all kinds off buildings.

I've had some success by adding entertainers in strategies.txt. I've made it so a city has one Entertainer for very 10 citizens.
Cube is offline  
Old October 13, 2001, 18:33   #6
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
You are right Cube.
But the point is that ALL serously UNHAPPY cities should Build HAPPINES
BUILDINGS FIRTS(after defense), and gold, science & production later.
That's what it's done in my settings.
0.1% unhappiest & 115000 priority (1000 at strat strategies).
player1 is offline  
Old October 13, 2001, 18:34   #7
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
Remember only combination of LOW percent & HIGHEST priority will
make it GOOD setting.
player1 is offline  
Old October 13, 2001, 19:04   #8
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by player1
But the point is that ALL serously UNHAPPY cities should Build HAPPINES
BUILDINGS FIRTS(after defense), and gold, science & production later.
That's what it's done in my settings.
That's right and therefore I wrote the MG_HappyBuilding.slc. If the happiness level of a city drops under 73 it will clear the build queue and put there a happiness building and tries to rush buy. I would do the same thing in combination with entertainers and let young cities undefended. In a testgame I played a turn with another civ by accident and as I awithed back I saw that the AI started to move units from my old cities to my young undefended cities. Therefore my conclusion no need to think about defense.

By the way the slic file is anouther sollution for the same problem.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 14, 2001, 02:57   #9
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
Yes, it is other solutuon.
Still I'll use them both in my MOD I am making.
player1 is offline  
Old October 14, 2001, 07:07   #10
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by player1
Still I'll use them both in my MOD I am making.
I guess I should do it, too. By the way what kind of mod are you making?

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 14, 2001, 07:35   #11
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
Something similar to CD-mod for CTP1
or Apolyton Pack for CTP2.
player1 is offline  
Old October 15, 2001, 07:43   #12
Foro
Settler
 
Local Time: 15:37
Local Date: October 31, 2010
Join Date: Aug 2001
Location: Germany
Posts: 27
I am using the new strategies file and most of the other slics you both (Martin and player 1 ) made available.
How can i still improve the Happieness of the AI ?
You said something of using both things but i cant really figure out what the second one is or how to do it ( programming isnt really something i like ;p)
Another thing i saw is that the AI is building a LOT of cities now and it seems to me that they have more cities then their goverment system would allow.
So there empire must have an increase in unhappieness.
I also saw on the map a lot of babarien cities ( i guess created from unhappieness) maybe this has something to do with it ?
Foro is offline  
Old October 15, 2001, 12:52   #13
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Foro
Another thing i saw is that the AI is building a LOT of cities now
heavy settling AI

Quote:
Originally posted by Foro
and it seems to me that they have more cities then their goverment system would allow.
That's not so but expansion is the key in this game. To prove your idea Foro you could use the cheat editor and take a look on AI happiness. Save before opening the cheat editor and afterwards you saw enough reload your previous saved game and you can keep your score. I like to know which mod are you exactly using I think it is hard to reach the city limit in the ultra gigantic map version of Apolyton Pack. You could attach your save game as a *.zip file so that I can take a look into it, if the *.zip file is greater than 200 KB you could use this file splitter here. It is freeware therefore no problems with copyright and other legal stuff if I attach it here.

Quote:
Originally posted by Foro
You said something of using both things but i cant really figure out what the second one is or how to do it ( programming isnt really something i like ;p)
The combination would be to add player1 priorities about happiness to my GM1_strategies.txt which increases AI settler activity and AI transport capacity.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 15, 2001, 13:08   #14
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
Quote:
Originally posted by Foro
How can i still improve the Happieness of the AI ?
You said something of using both things but i cant really figure out what the second one is or how to do it ( programming isnt really something i like ;p)
Foro, you shoudl look Martin's Commerce for AI thread>
There I explained in deltails how to do it.
player1 is offline  
Old October 15, 2001, 13:09   #15
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Sorry I forgot the file splitter.

-Martin
Attached Files:
File Type: zip splitt31.zip (35.9 KB, 8 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 15, 2001, 18:51   #16
Foro
Settler
 
Local Time: 15:37
Local Date: October 31, 2010
Join Date: Aug 2001
Location: Germany
Posts: 27
It only happens in the early stage of the game where the computer player builts cities untill no space is left.
I dont think they have monarchy at the beginning and still they built city after city (15plus i think)

Well i downloaded the splitter but i have absolutly no clue how to make it available hehe.
Maybe you give me your e mail and i just send it to you ?
Foro is offline  
Old October 16, 2001, 09:29   #17
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Foro
Another thing i saw is that the AI is building a LOT of cities now and it seems to me that they have more cities then their goverment system would allow.
I tried this code to prevent the AI from gaining new cities by settling, but unfortunatly it doesn't work:

Code:
HandleEvent(SettleOrder)'MG_SettleDenied' pre {
//	if(!(IsHumanPlayer(player[0]))){
		if((player[0].cities)>=(GovernmentDB(player[0].govttype).TooManyCitiesThreshold)){
			return STOP;
//		}	
	}
}
I replaced the to many cities threshold by a number, but if I reach this number of cities the settling goes on. If we don't find the problem you should set MaxPlayers higher than NumPlayers in your userprofile.txt to get new civs instead of Barbarian cities.

To use splitter you should first put the savegame into a *.zip to attach it here. Afterwards you have it open splitter, there you see two buttons on the top, klick on the left one with the sheet of paper on it. Now you can search for your *.zip file. When you have it in the splitter you you have to select the size of the single parts of the file. Default setting is 1.44 MB Disk change it to Bytes and enter into the box beside 200000. So the file will be splitt into blocks of 200000 bytes. The size limit for this forum.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 16, 2001, 11:55   #18
Foro
Settler
 
Local Time: 15:37
Local Date: October 31, 2010
Join Date: Aug 2001
Location: Germany
Posts: 27
will try what you told me but right now i am busy workling wont be able to do anything untill monday
Foro is offline  
Old October 16, 2001, 15:18   #19
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
What about changing strategy to stratgey with settlerunitscount 0?
player1 is offline  
Old October 17, 2001, 08:26   #20
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Actual I increased this SettlerUnitsCount for most of the strategies, to get more settlers. I also started a new game on a 70X140 map of Aplyton ultra gigantic map version. Two civs are wiped out by the Barbarians and if you find a place that is not occupied by someone you get trouble with the Barbarians and the Barbarian level is just bvoring hordes and I have now a level above raging hordes you could call it: Raging Boring Cities. Unfortunatly that weaks the AI, maybe your settings concerning happiness will help, you know the thing with martial law, that is also a city difence. But this sollution could be too slow another probability would be something like militias. I don't consider adding new units to the game, but a free unit for each city, when it is created would be OK. Of course that would be the most advanced defence unit is available for the player. So far I allready gave the AI enough advatages, therefore it should be for both human and AI.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 17, 2001, 08:48   #21
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
I ment makeing new strategy with that setting,
and execute it when AIs is in tyranny and have 10+ cities.
player1 is offline  
Old October 17, 2001, 10:02   #22
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 09:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Quote:
Originally posted by Martin Gühmann
Actual I increased this SettlerUnitsCount for most of the strategies, to get more settlers. I also started a new game on a 70X140 map of Aplyton ultra gigantic map version. Two civs are wiped out by the Barbarians and if you find a place that is not occupied by someone you get trouble with the Barbarians and the Barbarian level is just bvoring hordes and I have now a level above raging hordes you could call it: Raging Boring Cities. Unfortunatly that weaks the AI,
Try changing your maxplayer setting in userprofile.txt to something above what your Number of Players setting is in that file. I'm not sure if this will work with cities conquered by Barbarians, but I know that cities that have revolted that normally revert to Barbarian status will revert to a new civ, and they then work rather well in the game. Normally, at least from what I can tell, Barbarians are spawned mainly against the human player, and generally go after them first, but they will also attack the AI cities/units too.

Quote:
Originally posted by Martin Gühmann
...another probability would be something like militias. I don't consider adding new units to the game, but a free unit for each city, when it is created would be OK. Of course that would be the most advanced defence unit is available for the player. So far I allready gave the AI enough advatages, therefore it should be for both human and AI.
I am convinced that a militia unit is almost a required addition to any setup, especially if you use a higer barbarian setting. The reason why is that it does prevent the occasional AI city from falling to barbarians. I'm not sure that merely creating a unit when a city is built willl help though, because I'm not sure that the AI will leave that unit in the city as a garrison unit in the early going. But I think that the militia SLIC code that is in MedMod/Cradle will overwrite a created militia unit's ability to move, so adapting that code to your setup, and using existing units as the militia units should work.

However, the tga files that are used to indicate the unit on your unit and army screens will be the same as the normal unit, so there will be a little guesswork every time you want to move units out of a city. Creating a series of militia units might be a little more work, but it allows you to create a tga file that will be different from the normal unit tga and will make gameplay smoother.
__________________
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 October 17, 2001, 13:09   #23
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by hexagonian
Try changing your maxplayer setting in userprofile.txt to something above what your Number of Players setting isin that file. I'm not sure if this will work with cities conquered by Barbarians, but I know that cities that have revolted that normally revert to Barbarian status will revert to a new civ, and they then work rather well in the game.
Unfortunatly this deosn't work, I allready have MaxPlayers higher than NumPlayers. And Barbarians doesn' manage happiness so badly that they will lost a city. And also if a Babarian city reverts to a new civ some troops will send from the neighbour Barbarian city or from nearby to conquer it back. I tried to established a new city on a island with two Barbarian cities at first they send some troops to me to get/destroy my city. I had to sent a big garrison to this place first to hold this city. And I also AI cities on the radar map that was conquered by the Barbarians that were just founded. These cities were destroyed or conquered and work than for the Barbarian's. They are now unit production bases and can build advanced units. They wiped out two civs and these civs didn't rached the city limit.

Quote:
Originally posted by hexagonian
Normally, at least from what I can tell, Barbarians are spawned mainly against the human player, and generally go after them first, but they will also attack the AI cities/units too.
The Barbarians are a real pain in my game, because of these many Barbarian cities and Barbarian level is just one above ruins only. I saw a Barbarian stack of three unit in front of one of my cities defended by only one unit, I thought the Barbarians will take it and next turn this stack was gone and my city still belonged to me.

Quote:
Originally posted by hexagonian
I am convinced that a militia unit is almost a required addition to any setup, especially if you use a higer barbarian setting. The reason why is that it does prevent the occasional AI city from falling to barbarians.
I have the feeling that it doesn't happen occassinally in my game now but regulary, maybe one third or the half of AI cities is conquered or destroyed by the Barbarians.

Quote:
Originally posted by hexagonian
I'm not sure that merely creating a unit when a city is built willl help though, because I'm not sure that the AI will leave that unit in the city as a garrison unit in the early going. But I think that the militia SLIC code that is in MedMod/Cradle will overwrite a created militia unit's ability to move, so adapting that code to your setup, and using existing units as the militia units should work.
Wes already make shure that all strategies use this line:

DefensiveGarrisonCount 1

If I understand it correctly this line should cause the AI to leave one defence unit in its city. So I hope that this unit will be in the city until the city is established. Or it use it to kill a lonly Barbarian unit. I hope.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 17, 2001, 18:24   #24
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
It look that defensive strategies in strategy.txt override evry other
garrison count strategy.
So you should have something like this:

STRATEGY_DEFENSE_NONE {

// minimum number of units to keep in cities as a garrison
OffensiveGarrisonCount 0
DefensiveGarrisonCount 1
RangedGarrisonCount 1
}

Since I think taht AI doesn't see barbarins as threat so if these lines stay at original 0,0,0 his cities won't be defended.

And in BuildListSequences.txt
put garrison units at top of evry list.
It works, exept if barbarians have a realy THE BEST UNITS.
So you should change Anarchy to something like this
(& force barbs. to use it):

FoodCoef 0.5

That way barbarian cities will slowly die out (by strarvation),
so it won't happen that barbarians overrun entire continent.
Of cousre to make them BUILD more modern units, you should give them
War Advances through SLIC.
player1 is offline  
Old October 18, 2001, 13:55   #25
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 09:37
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Quote:
Originally posted by Martin Gühmann
I have the feeling that it doesn't happen occassinally in my game now but regulary, maybe one third or the half of AI cities is conquered or destroyed by the Barbarians.
Try this then - go into strategies.txt and you will see that the barbarians use a limited number of GoalElements in the total GoalElements section - most of the other priorities are set at 0. (I have cut and pasted part of the GoalEelements up from an old Cradle setup as an example).

GoalElement { Goal GOAL_ATTACK Priority 805000 MaxEval 50 MaxExec 25 }
GoalElement { Goal GOAL_ENSLAVE_SETTLER Priority 390000 MaxEval 5 MaxExec 3 }
GoalElement { Goal GOAL_SLAVE_RAID Priority 390000 MaxEval 5 MaxExec 3 }
GoalElement { Goal GOAL_HARASS_CITY Priority 500000 MaxEval 25 MaxExec 25 }
GoalElement { Goal GOAL_HARASS Priority 560000 MaxEval 25 MaxExec 25 }
GoalElement { Goal GOAL_PILLAGE Priority 600000 MaxEval 10 MaxExec 5 }
GoalElement { Goal GOAL_PIRATE Priority 553000 MaxEval 10 MaxExec 5 }
GoalElement { Goal GOAL_WANDER Priority 0 MaxEval 0 MaxExec 0 }
GoalElement { Goal GOAL_DEFEND Priority 0 MaxEval 0 MaxExec 0 }
GoalElement { Goal GOAL_SEIGE Priority 355000 MaxEval 25 MaxExec 4 }

The AI uses 2 goals to take a city
GOAL_ATTACK
GOAL_SEIGE

Now this is just a suspiscion of mine, but I 'think' GOAL_SEIGE is the main one the AI uses to determine if it will attempt to take a city. Because I knew early on that I wanted Barbarians to be more of a factor in my game, I dropped the SEIGE priority to a lower number, and pushed the ATTACK priority much higher. Using this in conjunction with a milita unit drastically cut down on Barbarians taking AI cities. (there I go again pushing the Militia SLIC) There was a tradeoff in that Barbarians now launch less attacks on my cities, but they will do so from time to time, and woe to any small force that runs into a barbarian stack outside of a city.

I also copied the entire MILITARISTIC settings and used it to overwrite all the other entries in the STRATEGY_BARBARIAN section, except for the GoalElement section. And make sure you take ANARCHY out of the Barbarian government choices (and give them a government sequence similar to what is in the other sections), because if any barbarian cities to rise up, they can work through the tech tree and create better units.

And to handle any cities lost to a revolt change your userprofile setting for MaxPlayer to a number greater that the NumPlayers setting, because then those revolting cities become civs. I like this final element the best.
__________________
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 October 18, 2001, 18:14   #26
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 14:37
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Quote:
Originally posted by Martin Gühmann


GovernmentDB(player[0].govttype).TooManyCitiesThreshold

-Martin
I think ".govttype" is a leftover from CTP1 that doesn't work anymore. I have a vague recollection of trying to use it and getting an error message about it not being a member of the player structure.
Peter Triggs is offline  
Old October 19, 2001, 17:25   #27
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by hexagonian
The AI uses 2 goals to take a city
GOAL_ATTACK
GOAL_SEIGE

Now this is just a suspiscion of mine, but I 'think' GOAL_SEIGE is the main one the AI uses to determine if it will attempt to take a city.
Here are the according lines for these two goals from the goals.txt:

Quote:
Goals.txt
GOAL_SEIGE {
RallyFirst

SquadClass:CanAttack
SquadClass:CanDefend
SquadClass:HasZoc
SquadClass:CanCaptureCity

TargetType:City
TargetOwner:HotEnemy

Execute ORDER_ATTACK

ThreatBonus 500
EnemyValueBonus -250
AlliedValueBonus 1000
PowerBonus 500
DistanceToHomeBonus 0
DistanceToEnemyBonus 0
ChokePointBonus 500
UnexploredBonus -999999
ObsoleteArmyBonus 100
TreaspassingArmyBonus 0

ThreatenType:DestroyCity
ThreatenBonus 5000

ForceMatch:Offensive

TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY
}

GOAL_ATTACK {
RallyFirst

SquadClass:CanAttack

TargetType:AttackUnit
TargetType:SpecialUnit
TargetOwner:HotEnemy

Execute ORDER_ATTACK

ThreatBonus 100
EnemyValueBonus -250
AlliedValueBonus 1500
PowerBonus 500
DistanceToHomeBonus 0
DistanceToEnemyBonus 0
ChokePointBonus 50
UnexploredBonus -999999
ObsoleteArmyBonus 100
TreaspassingArmyBonus 0

ThreatenType:DestroyCity
ThreatenBonus 5000

ForceMatch:Offensive

TargetProtectionWonder WONDER_THE_FORBIDDEN_CITY
}
Both goals are executed by the ORDER_ATTACK, but the targets are different. The target of the GOAL_SEIGE is a city and the target of the GOAL_ATTACK is a unit. To have more city captures you should modify the GOAL_SEIGE.

From your above example the GOAL_ATTACK is considered 50 times per turn but the maximum number of executed attack goals is 25. That is OK for attack goals, but the MaxExec number for the seige goal is to low if you want to see much city captures. I raise the MaxExec number in my strategies.txt. Now the AI is settling like nuts as wanted but in combination with my slic these new cities are undefended and the Barbarians have an easy job. Therefore the next version will give all players a free defence unit for each city, and the slic file will only force the city to build a happiness building if the city contains a unit. You could try to increase the MaxExec number for the seige goal to get more city captures.

Also the GOAL_HARASS_CITY is a attack goal on a city. From a look into the documentation about the goals it should be possible to define new better and more appropriate goals.

Quote:
Originally posted by player1
I think that yours startegy.txt isn't that good I was thinking about HAPPY seq. Priority 7500 & 0.5 Unhappiest

You should look at Commerce for Ai thread.
There I gave an interetigns way to mak AI build more "happy" improvments.
Basicily you shuould make it a VERY high priority like 11500 or 12000, exept in starting strategies in which it should be like 1000. Then A percent should be a 0.1 Unhappiest. Then in Buildlistseqences.txt you should top GarrisonUnitBuildList in front of BuildingBuildList BUILDING_BUILD_LIST_HAPPINESS so computer will use a Martial Law & won't make cities undefended.

In yours settings big commercal & scientific cities & several others would not build "happy" building at all (since their priorities are bigger than for happines).
Understanding your settings player1, why 0.4 for most productive cities if you say it is not very effective to have 0.5 of unhappiest cities. And there is another problem I avoid it to build buildings like factories and oil refinary until pollution reducing buildings are available, because more production cause more pollution and more pollution causes more unhappiness and more unhappiness does hurt the AI more than the human.

And another thing I didn't find this very low priority of 1000 for happiness sequence. I found the lower priority for the settling strategies but actual this isn't so much lower than the priority for the defence sequence.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old October 19, 2001, 19:50   #28
Cube
Warlord
 
Cube's Avatar
 
Local Time: 07:37
Local Date: October 31, 2010
Join Date: Nov 2000
Location: El Paso, Tx
Posts: 120
Understanding your settings player1, why 0.4 for most productive cities if you say it is not very effective to have 0.5 of unhappiest cities.

The reason for this is that production is more important than unhappiness, and most all cities need production.

And there is another problem I avoid it to build buildings like factories and oil refinary until pollution reducing buildings are available, because more production cause more pollution and more pollution causes more unhappiness and more unhappiness does hurt the AI more than the human.

You shouldn't do that seriously unhappiness can be fought with happiness like movie theaters and entertainers, most of the time the production is worth the unhappiness.

If you put happiness buildings in the production list, like after the oil refinery it should help the AI with happiness.

And another thing I didn't find this very low priority of 1000 for happiness sequence. I found the lower priority for the settling strategies but actual this isn't so much lower than the priority for the defence sequence.

I didn't find it either, so I created a new one
Cube is offline  
Old October 20, 2001, 06:08   #29
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
Quote:
Originally posted by Martin Gühmann
Understanding your settings player1, why 0.4 for most productive cities if you say it is not very effective to have 0.5 of unhappiest cities. And there is another problem I avoid it to build buildings like factories and oil refinary until pollution reducing buildings are available, because more production cause more pollution and more pollution causes more unhappiness and more unhappiness does hurt the AI more than the human.

And another thing I didn't find this very low priority of 1000 for happiness sequence. I found the lower priority for the settling strategies but actual this isn't so much lower than the priority for the defence sequence.
-Martin
First, my stratgeies.txt is optimized for my mod I am making, where pollution levels (and pollution unhappuines for governments) are lower but global warming comes quicker.

Second,
my settings work like this:
you have 8 cities with:
1) 72 unh.
2) 74
3) 74
4) 74
5) 75
6) 78
7) 72
8) 73
Now since pririties for unhappiness is very high, but % are low,
just cities 1) & 2) will start building happines buildings (Bassilica for instance).
After it finished Bassilicas we have:
1) 75 !!!!!!!
2) 74
3) 74
4) 74
5) 75
6) 78
7) 75 !!!!!
8) 73

Now cities 1) & 7) will stop building unhappines buildings, and
citiy 8) will build one, etc.

So, after some time almost all cities would build needed buldings.

Of course happines sequence should have garrison units at top so
cities will be defended before it starts building happines buildings,
and also if city stays too long in happines seq.

In fact I put a happiness seq. in strating strategies with 8100 pririty but
I' am not shure about will it be compatibile with your strategies.txt, so
I said to use 1000 priority.

This is my strategies.txt:
Attached Files:
File Type: txt strategies.txt (105.5 KB, 6 views)
player1 is offline  
Old October 20, 2001, 06:10   #30
player1
Emperor
 
player1's Avatar
 
Local Time: 16:37
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
And here is my BuildListSequences.txt:
Attached Files:
File Type: txt buildlistsequences.txt (25.5 KB, 7 views)
player1 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 10: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