Thread Tools
Old April 20, 2002, 02:14   #1
Bluevoss
Prince
 
Local Time: 23:16
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Orlando, Florida
Posts: 326
So how does Cradle work?
So help me out here...

In Cradle, does difficulty level affect..
1) How fast they build?
2) How agressive they are?

The reason I ask - I'm playing a medium game, and am having a devil of a time playing catch up. Of course, it might be all those wars I'm in. Anyway, is it possible that I could alter the files to dampen (1) down, without changing (2)?

Another question, right now in medium, they are only moderatly agressive. They've fried some of my fields, but have not attacked any cities yet. If I go to a higher level, will this change both (1) and (2)? Can you say "Pushed into the sea"?

Just want to know how this works before I dive into the files.

Bluevoss-
__________________
Bluevoss-
Bluevoss is offline  
Old April 20, 2002, 11:19   #2
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 18:16
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Bluevoss
Welcome to the wonderful world of Modding the text files…

My suggestion is to take some time and open the various CRA_ .txt files. These files are all numbers-driven, so adjustments to the numbers will affect the AI. A lot of it is also trial and error.

The SLIC files are another matter.

DIFFICULTY
You can go into the CRA_DiffDb.txt file to see the settings for the different levels. Below is the partial settings for Medium – the bonuses will vary from age to age

AI_START_UNITS 1
AI_START_GOLD 1000
AI_START_ADVANCES 5
AI_START_PUBLIC_WORKS 1000

# % amount to multiply advance cost by per age for ai
AI_MIN_BEHIND_TECHNOLOGY_COST 1.0 1.0 1.0 1.0 1.0
AI_MAX_BEHIND_TECHNOLOGY_COST 0.4 0.4 0.4 0.4 0.4

# % amount to multiply production cost by per age for ai
AI_MIN_BEHIND_PRODUCTION_COST_ADJUSTMENT 0.9 0.9 0.9 0.8 0.8
AI_MAX_BEHIND_PRODUCTION_COST_ADJUSTMENT 0.5 0.5 0.5 0.5 0.5

# multiplier for gold collected for ai
AI_MIN_BEHIND_GOLD_ADJUSTMENT 1.0 1.0 1.0 1.0 1.0
AI_MAX_BEHIND_GOLD_ADJUSTMENT 1.2 1.2 1.2 1.2 1.3

# % amount to multiply advance cost by per age for ai
AI_MIN_AHEAD_TECHNOLOGY_COST 1.0 1.0 1.0 1.0 1.0
AI_MAX_AHEAD_TECHNOLOGY_COST 1.0 1.0 1.1 1.1 1.1

# % amount to multiply production cost by per age for ai
AI_MIN_AHEAD_PRODUCTION_COST_ADJUSTMENT 0.9 0.9 0.9 0.9 0.8
AI_MAX_AHEAD_PRODUCTION_COST_ADJUSTMENT 1.0 1.0 1.0 1.0 1.0

# multiplier for gold collected fo ai
AI_MIN_AHEAD_GOLD_ADJUSTMENT 1.0 1.0 1.0 1.0 1.0
AI_MAX_AHEAD_GOLD_ADJUSTMENT 1.0 1.0 1.0 0.9 0.9

MAX_HUMAN_ADVANCES 3
MAX_AI_ADVANCES 5

The files
CRAI_ComImpSForAIs2.slc
CRAI_pw_cheat.slc
gives the AI Public Works bonuses based on population. This is standard for all settings of the game

and the file
CRAG_updater.slc
Auto upgrades AI units for free.

These are the main files that will affect the AI in terms of what it starts with and what it gets during the course of the game.

CRA_Const.txt
handles the global settings and the standard rules for all civs.

AGGRESSIVENESS

As for the AI aggressivenes, this is a harder thing to balance out.
The settings are the same for all difficulty levels - and aggessiveness is also determined (in some part) by regard, and your standing on the power graph in relation to other civs.

Part of the problem is that there are 30-40 basic Goals that the AI can take on a turn, and this has to be balanced with the hair trigger effect of Frenzy and Diplo 3.5, as well as the advantages the AI may have via the difficulty level. In playing Cradle, I believe that the AI really could crush a human player if all the numbers were pushed to the limit.

Currently, I have both the SIEGE (attack cities) and ATTACK (attack armies in the field) Goals set rather high, with ATTACK usually set the highest. (these settings are located in CRA_strategies.txt, and there are different settings for civ personality, as well as for the Barbarians and also for basic mindsets that a civ may be in)

A basic Goal will look like this (this is only partial…)
GoalElement { Goal GOAL_DEFEND Priority 657000 MaxEval 1 MaxExec 1 PerCity }
GoalElement { Goal GOAL_SEIGE Priority 705000 MaxEval 25 MaxExec 15 }
GoalElement { Goal GOAL_ATTACK Priority 850000 MaxEval 25 MaxExec 25 }
GoalElement { Goal GOAL_HARASS Priority 405000 MaxEval 25 MaxExec 25 }
GoalElement { Goal GOAL_SETTLE_LAND Priority 900000 MaxEval 25 MaxExec 15 }
GoalElement { Goal GOAL_SETTLE_SEA Priority 900000 MaxEval 25 MaxExec 15 }
GoalElement { Goal GOAL_EXPLORE Priority 7000 MaxEval 15 MaxExec 2 }
GoalElement { Goal GOAL_ENSLAVE_SETTLER Priority 650000 MaxEval 10 MaxExec 3 }

To get more attacks on cities, I believe you can juggle the Priority numbers, giving GOAL_SEIGE a Priority of 900000, as well as reducing some of the other Priority numbers for all of the entries.

Or you can try this – go into CRA_goals.txt and add the line

TargetType:City
to
GOAL_ATTACK {

This last one I had thought about doing, but the problem is that it may (and this is just speculation on my part) affect the Barbarians/AI to the point where stacks of armies would roll through a fledgling civ (…like the human player at the beginning of the game). Currently, I’m happy with the Barbarian action in the current Cradle setup.
__________________
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 April 20, 2002, 12:03   #3
Bluevoss
Prince
 
Local Time: 23:16
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Orlando, Florida
Posts: 326
Hex,

Thanks for the answer. Some of that I knew, but the rest, well, I'll be cut n' pasting this into my growing notes file.

But, in a nutshell, you are saying that as you move to higher difficutly levels, you will see more enemy units (and probably of better class) but not nessasarily more aggressive ones (unless they fill in a lot of other goals).

Not that I'm complaining, mind. I played for a long time last night and had some good (huge) open-field battles. The barbarians (at one step from the maximum level) were a good contrast to me - they kept my civ honest with garisons, and I fell back on the chariot rapid response teams (which I loved so much in Civ1).

And that "instant unit upgrader" - has Wes incorporated that? The reason I ask is that, in the previous MedMod, I would end up bombing hoplites with bombers. I would gladly let the enemy upgrade his units for free. I figure its only ballenceing the fact that he's stupid.

Anyway, so far, I really like Cradle. You really helped me out last night. I've got a midnight software load (yeah, so much for saturday night) and I'll probably be here until 6am Sunday. So the trick is to stay up late friday and shift my sleep schedual. With Cradle, I played until 4am.
__________________
Bluevoss-
Bluevoss is offline  
Old April 20, 2002, 17:55   #4
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 18:16
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Quote:
Originally posted by Bluevoss
Hex,
But, in a nutshell, you are saying that as you move to higher difficulty levels, you will see more enemy units (and probably of better class) but not nessasarily more aggressive ones (unless they fill in a lot of other goals).
Basically yes, but at the same time the AI will have a bigger lead on you and (should, IMO) act a little more aggressively because of that fact.

One thing that I have noticed is that the AI PW bonus has really helped out the AI in terms of infrastructure, and that has made all the level difficulties harder, based on what I have seen as compared to 6 months ago when that code wasn't available. These settings may need to be adjusted, at least if there is a call for it.


Quote:
Originally posted by Bluevoss
Not that I'm complaining, mind. I played for a long time last night and had some good (huge) open-field battles. The barbarians (at one step from the maximum level) were a good contrast to me - they kept my civ honest with garisons, and I fell back on the chariot rapid response teams (which I loved so much in Civ1).
I'm curious to see if changing that priority number for SEIGE/ATTACK will do what I think it will do. At the same time, this effect can be softened a bit by using it only for certain civ personalities. Still, based on the number and size of stacks from different civs polluting my soil, it may end up being a back-breaker (for the human).


Quote:
Originally posted by Bluevoss
And that "instant unit upgrader" - has Wes incorporated that? The reason I ask is that, in the previous MedMod, I would end up bombing hoplites with bombers. I would gladly let the enemy upgrade his units for free. I figure its only ballenceing the fact that he's stupid.
I think he has...

There have been a lot of creative SLICs coming out, but IMO, the Updater one is my favorite because it addresses several crucial issues that needed to be fixed - AI unit obsolecense, and too much Rush Buy gold for the human player.

I spent close to 50,000 gold last night upgrading my Hoplites/Hypaspists to Legions - in fact I ran out of gold. And my army is still middle-of-the pack. But I think I can now send some enemy stacks back to their homes in body bags.

A small trick - when you are getting close to Iron Working, crank out a lot of Hoplites instead of Hypaspists - you'll save production costs, get more units and both will upgrade to Legions for the same cost

Which brings me to a sidenote - Cradle was specifically designed to counter my own playing style. I tend to play peaceful, somewhat isolationistic (paranoid would be a good word), focusing on maintaining my civ until I get a science lead, then cranking out military and unleashing it. I would rather build city improvements than military, which was all too easy in the default CTP1/CTP2 game. All of the tweaks in Cradle are meant to make getting that science/production lead as hard as possible - from the AI bonuses, to the slider settings and the AI SLICS.


Quote:
Originally posted by Bluevoss
Anyway, so far, I really like Cradle. You really helped me out last night. I've got a midnight software load (yeah, so much for saturday night) and I'll probably be here until 6am Sunday. So the trick is to stay up late friday and shift my sleep schedual. With Cradle, I played until 4am.
Sorry I screwed up your life...
__________________
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 April 20, 2002, 18:44   #5
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 01:16
Local Date: November 1, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Quote:
I think he has...
No, he hasn't...yet (I hope).
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old April 20, 2002, 19:20   #6
Bluevoss
Prince
 
Local Time: 23:16
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Orlando, Florida
Posts: 326
I guess I did see that "improvement" in AI building improvments last ngiht.

My usual way of attacking an enemy is to send in light cav to burn all the fields I can. Usually I stay clear of the city, rush in, burn, and rush back out. Generally a small stack of cav can really clear out a citys improvements doing this.

However, last night when I tried it, they would rebuild fields as fast as I could destroy them. They must have been avoiding my cav by sneaking out and replanting by night. In fact, most of their cities have full improvements to them. Its a little much - is there a way to turn this down a bit? I'm just afraid that, unless they are really burning production to do this, I'm wasting my time with a stratagy that was usually effective (and jollygood fun).
__________________
Bluevoss-
Bluevoss is offline  
Old April 21, 2002, 06:36   #7
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: 01:16
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Locutus
No, he hasn't...yet (I hope).
Actual jein I would say in German. A mixture of yes and no. The unit updater file is in the download but disabled, if you want to use it and of course frenzy as well than go to the MM2_script.slc and open it. At the end of that file you find two outcommented lines:

Code:
// #include "MM2_SLC_frenzy.slc"

// #include "MM2_SLC_unit_updater.slc"
just remove the comment signs (//) and than you have frenzy and/or the unit updater.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old April 21, 2002, 12:24   #8
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 18:16
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Here's the code for the PW bonus (CRAI_pw_cheat.slc)

//
// pw_cheat.slc
// by player1
// ver 1.01
//
// gives 5 gold per global pop evry turn,
// gives 0-20 PW per global pop evry turn (depending of PW tax)
// for AI players only
//

HandleEvent(BeginTurn) 'PW_Cheat' pre {
int_t my_tax;
int_t my_pop;
int_t my_pw_level;
int_t my_pw_points;
int_t my_gold;
if(!(IsHumanPlayer(player[0])) && (player[0] != 0)) { // not human
my_tax = player[0].publicworkstax;
my_pop = player[0].totalpopulation;
my_pw_level = player[0].publicworkslevel;
my_pw_points = my_pop * my_tax / 5;
my_pw_level = my_pw_level + my_pw_points;
SetPW(player[0], my_pw_level); //add pw
my_gold = my_pop * 5;
AddGold(player[0], my_gold); //add gold
}
}

Now I think the line of text that will adjust the amount of PW that the AI will get is the following (not sure about this though...)

my_pw_points = my_pop * my_tax / 5;

I'm just not sure whether you need to increase or decrease 5.
__________________
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 April 21, 2002, 12:56   #9
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: 01:16
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
If you want to decrease a value of a fraction than you can do it very effectivly by increasing the number in the denominator. The denominator here is the only non variable here so increase it from five to ten should give you the effect like the code have in the version 1.0. By the way I still use this version in GoodMod, because I came to the conclusion that the original effect on the AI's PW level of just the half of the effect in the version 1.01 is enough, maybe Dave you should consider if you should return to the original settings, too.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old April 21, 2002, 21:01   #10
Bluevoss
Prince
 
Local Time: 23:16
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Orlando, Florida
Posts: 326
Okay, I'm going to need a little help here.

Has anyone experimented with this value, and do the have a better value that 5? Right now, I'm getting PWed into the ground by the AI. It earns em faster than I can burn them.

Also, if I change the slic code, do I need to change anything to make it work that way? Is there any sort of compilation that needs to take place? Or do you just change the value in the code and it works?

Bluevoss-
__________________
Bluevoss-
Bluevoss is offline  
Old April 21, 2002, 22:57   #11
Lou Wigman
Warlord
 
Lou Wigman's Avatar
 
Local Time: 09:16
Local Date: November 1, 2010
Join Date: Jun 2001
Location: Newcastle,Australia
Posts: 137
This is probably not the right thread but I have some comments about the 'upgrade' SLIC. At present it allows you to upgrade units when a new unit is discovered. However if you don't have the money then the old units remain. Next time a new unit is discovered you are not offered the possibility of upgrading these units from a 'generation' in the past. I know allowing this to happen would hugely increase the complexity of the code but has anyone given any thought to this matter.
Lou Wigman is offline  
Old April 22, 2002, 12:00   #12
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: 01:16
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
OK here is the code of version 1.0, it gave the AI less PW than this one, to be exact just the half than version 1.01, all what you have to do is to double the denominator, just replace the 5 by a ten in in the pw points line:

Code:
//
// pw_cheat.slc
// by player1
// ver 1.0
//
// gives 5 gold per global pop evry turn,
// gives 0-10 PW per global pop evry turn (depending of PW tax)
// for AI players only
//

HandleEvent(BeginTurnProduction) 'PW_Cheat' pre {
	int_t my_tax;
	int_t my_pop;
	int_t my_pw_level;
	int_t my_pw_points;
	int_t my_gold;
	if(!(IsHumanPlayer(player[0])) && (player[0] != 0)) { // not human
		my_tax = player[0].publicworkstax;
		my_pop = player[0].totalpopulation;
		my_pw_level = player[0].publicworkslevel;
		my_pw_points = my_pop * my_tax / 10;
		my_pw_level = my_pw_level + my_pw_points;
		SetPW(player[0], my_pw_level);		//add pw
		my_gold = my_pop * 5;
		AddGold(player[0], my_gold);		//add gold
	}
}
Slic is a script language (like Haskell) and CTP2 is the interpreter of the slic scripts, therefore there is no compiler you have just to modify the correct file in the correct folder: ..\ctp2_data\default\gamedata\ just to be precise.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann 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 19:16.


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