Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Happy Buildings for AIs
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 13-10-2001 17:06 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Happy Buildings for AIs Increase Your PM Length

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

Attachment: mg_happybuilding.zip
This has been downloaded 16 time(s).

Foro is offline Foro
Settler
Germany
Aug 2001
time: 06:15
  Old Post 13-10-2001 21:05
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Browse Apolyton AD-FREE

I simply renamed GM1_strategies to strategies.txt ..does this work ?

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
  Old Post 13-10-2001 22:25 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Inflate your Upload Space

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

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 14-10-2001 00:03
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Increase Your PM Length

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).

Cube is offline Cube
Warlord
El Paso, Tx
Nov 2000
time: 22:15
  Old Post 14-10-2001 02:48
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Put an end to popups!

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.

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 14-10-2001 03:33
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Lose 30 kilos (of popups)

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 player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 14-10-2001 03:34
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Help yourself to an AD-FREE life

Remember only combination of LOW percent & HIGHEST priority will
make it GOOD setting.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 14-10-2001 04:04 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

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

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 14-10-2001 11:57
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Enter the AD-FREE zone

Yes, it is other solutuon.
Still I'll use them both in my MOD I am making.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 14-10-2001 16:07 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Avatar Enlargement: We've got the solution

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

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 14-10-2001 16:35
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton

Something similar to CD-mod for CTP1
or Apolyton Pack for CTP2.

Foro is offline Foro
Settler
Germany
Aug 2001
time: 06:15
  Old Post 15-10-2001 16:43
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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 ?

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 15-10-2001 21:52 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Inflate your Upload Space

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

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 15-10-2001 22:08
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

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.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 15-10-2001 22:09 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Sorry I forgot the file splitter.

-Martin

Attachment: splitt31.zip
This has been downloaded 7 time(s).

Foro is offline Foro
Settler
Germany
Aug 2001
time: 06:15
  Old Post 16-10-2001 03:51
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Suffering from ads?

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 ?

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 16-10-2001 18:29 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Lose 30 kilos (of popups)

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

Foro is offline Foro
Settler
Germany
Aug 2001
time: 06:15
  Old Post 16-10-2001 20:55
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Suffering from ads?

will try what you told me but right now i am busy workling wont be able to do anything untill monday

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 17-10-2001 00:18
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Avatar Enlargement: We've got the solution

What about changing strategy to stratgey with settlerunitscount 0?

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 17-10-2001 17:26 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Support Apolyton

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

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 17-10-2001 17:48
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Avatar Enlargement: We've got the solution

I ment makeing new strategy with that setting,
and execute it when AIs is in tyranny and have 10+ cities.

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:15
  Old Post 17-10-2001 19:02 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Support Apolyton buy from Amazon

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.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 17-10-2001 22:09 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Help yourself to an AD-FREE life

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

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 18-10-2001 03:24
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

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.

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:15
  Old Post 18-10-2001 22:55 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Got spare money?

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.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:15
  Old Post 19-10-2001 03:14
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Increase Your PM Length

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.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:15
Post  Old Post 20-10-2001 02:25 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

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

Cube is offline Cube
Warlord
El Paso, Tx
Nov 2000
time: 22:15
  Old Post 20-10-2001 04:50
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 20-10-2001 15:08
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Browse Apolyton AD-FREE

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:

Attachment: strategies.txt
This has been downloaded 5 time(s).

player1 is offline player1
King
Belgrade, YU
Sep 2001
time: 06:15
  Old Post 20-10-2001 15:10
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Support Apolyton or Terrorists Win

And here is my BuildListSequences.txt:

Attachment: buildlistsequences.txt
This has been downloaded 6 time(s).

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:15.
Apolyton Time is 00:15.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0892 seconds (93.17% PHP - 6.83% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net