Should we speed up the early game?

Should the early game be faster or even slower?

  • I like it the way it is right now.

    Votes: 2 20.0%
  • Make the game even slower, we need some more tribal warfare.

    Votes: 0 0.0%
  • Speed it up, but just a little bit.

    Votes: 5 50.0%
  • Make it a lot faster, the early game is way too slow.

    Votes: 3 30.0%
  • Doesn´t matter to me, I´ll stick with the majority.

    Votes: 0 0.0%

  • Total voters
    10
Gerikes said:
This is in the SDK, in function CvPlayerAI::AI_getAttitudeVal. This gets the value of the attitude towards the player (all those + and -'s in diplomacy).

Code:
	if (GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI))
	{
		if (GET_PLAYER(ePlayer).isHuman())
		{
			iAttitude -= 2;
		}
	}

I would think just changing the number 2 to something higher would do in making them more aggressive against humans . If you want I can make that two a define that you can set in XML and you can play with it. Also, perhaps I can take away the human restriction so that they're more aggressive all around, or add just another one, like...

Code:
	if (GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI))
	{
		if (GET_PLAYER(ePlayer).isHuman())
		{
			iAttitude -= [b]GC.getDefineINT("AI_AGGRESSIVE_DIPLO_PENALTY_VS_HUMANS")[/b]
		}
		else
		{
			iAttitude -= [b]GC.getDefineINT("AI_AGGRESSIVE_DIPLO_PENALTY_VS_AI");[/b]
		}

	}

	}
Ah I see aggressive isn't aggressive in general. I think there already is a tag like that in Leaderinfos. That would just make the AI have a bad attidude towards the player but indeed not declare wars intelligently (-better than nothing still). But would you be interested to have a look at the AI if you can discover how we can make it declare wars more strategically-mainly not to declare war to the weakest at all but the weakest adjacted to his own territory?
I believe Rhye heavyly based his code on using his worldmap so I don't think his code can be used directly but may be an inspiration for those who can read it. We would need something more flexible since we don't use the same map at all times. What would also already help is more detail how the xml tags in the Leaderinfos really work. There is currently no reliable info available just a couple of tags were analyzed by seve05.
 
Ploeperpengel said:
Ah I see aggressive isn't aggressive in general. I think there already is a tag like that in Leaderinfos. That would just make the AI have a bad attidude towards the player but indeed not declare wars intelligently (-better than nothing still). But would you be interested to have a look at the AI if you can discover how we can make it declare wars more strategically-mainly not to declare war to the weakest at all but the weakest adjacted to his own territory?
I believe Rhye heavyly based his code on using his worldmap so I don't think his code can be used directly but may be an inspiration for those who can read it. We would need something more flexible since we don't use the same map at all times. What would also already help is more detail how the xml tags in the Leaderinfos really work. There is currently no reliable info available just a couple of tags were analyzed by seve05.

Fair enough. I've downloaded Ryhe's and gonna' see what he's done with that. I'll see if I can search too what the leaderhead tags do.

In other news, I love how the early game is turning out. With archers, battles are becoming more like skirmishes, where you can send out a stack of 2 archers plus maybe a warrior and realize that
 
Yeah the link to the wiki there is pretty. I had another wiki enty but that wasn't near as good.
I will also have a look at Rhyes(just xml) maybe he just found way to set this up nicly but I still think I read something about AI choosing to start wars based on tiles (of his map). Would still be worth looking at that imo. Thx Gerikes good find I will have a close read.
 
A question Gerikes:
Can you try to define Rand and probabilities a bit clearer looking at the code. Some Rands seem to work differently than others. The wonderbuilders have a high Randvalue but the warmongerers a low one. Confusing. I wouldn't need every detail but a rough idea how strong changes to those settings would affect the AI behavior. Just takes so much to find that out by playtesting.:(

oh damnit I need some sleep. See you soon.
 
Ploeperpengel said:
A question Gerikes:
Can you try to define Rand and probabilities a bit clearer looking at the code. Some Rands seem to work differently than others. The wonderbuilders have a high Randvalue but the warmongerers a low one. Confusing. I wouldn't need every detail but a rough idea how strong changes to those settings would affect the AI behavior. Just takes so much to find that out by playtesting.:(

oh damnit I need some sleep. See you soon.

Sure. There's a ton of values, and each one is normally in the middle of some really long calculations, so I'll take a quick look at each one and see what it does. If there are any that sound interesting I can go further in depth after.
 
Ok, played my first game of WHFB :) as the empire and are still in the ancient era, i like how the game plays, perhaps cause i play with raging barbarians, i didnt see much (i mean any action) frorm the other civs, but i play on noble as requested... I have to say the following, spicing up this era could be the best way, cause i like it somehow, fighting those barbs, using archers and warriors until you can build spearman and axeman (BTW: axeman doesnt have a first strike!!!) But we definitely need a camera that zooms into the action even when you defend! and i didnt play with supportfire yet... Perhaps we can make the Spearman or axeman available earlier? and i had some problems creating hapiness in my cities (but that could be due to military researches...)

but what i can say is, that even this small look into the mod was big fun :)
 
Here's what I was able to dig up. Some of it is pretty general, because the code is sometimes tough to read. So, I've given what I think is the best idea of what they do. If you want any more specific detail on anything just ask. I took the ones I thought would be most useful for war and peace.

iBaseAttitude:
Base diplomacy attitude (+/- value) toward another civ at any time.

iBasePeaceWeight:
Base weight that this civ values peace. Only affects the civ's attitude towards other AI's.

iPeaceWeightRand:
A random number from 0 to this number is added to their peace weight at the beginning of the game.

iWarmongerRespect:
The smaller of two AI civ's iWarmongerRespect value is added to each of the civ's attitude. So, a civ of -1 and a civ of 5 means that each civ will have a -1 towards each other.

iRefuseToTalkWarThreshold:
If the number of turns the AI is at war is less than this value, the AI will refuse to talk to another civ.
This value is doubled if the AI team was the one who declared war.

iMaxWarRand:
The chance that a civ might try to begin planning a war this turn. Every turn, the civ has a 1 in X chance of considering planning. The lower the number, the more likely they will consider to begin planning. If it does consider it, it will find the target it hates the most and start planning war on them. There is a chance that the AI will consider to begin planning but not find a valid target they actually want to attack. In this case, they will not start planning against anyone.

Once a civ does begins planning, I think it will declare war once it's planning is done. Five turns elapse after planning begins before the civ will declare a limited war (small skirmishes, etc.). Ten turns elapse after planning begins before the civ will declare a total war (much larger force used, puts more resources into the war).


iMaxWarNearbyPowerRatio:
The percentage of their total power a civ will use when determining if it's stronger than another country that is "nearby" (which I believe means they share the same continent). This only is used when determining if the AI will start a total war. Thus, a value of 200 means the AI will consider itself twice as strong than it really is when determine it's strength vs. another civ. An AI civ only declares war with another civ if it thinks it's stronger.

iMaxWarDistantPowerRatio:
Same as iMaxWarNearbyPowerRatio, but this applies to civ's that are not nearby (are not on the same continent).

iMaxWarMinAdjacentLandPercent:
Of the three "passes" used in checking if a total war will start to be planned, this is the first (after this comes checking if it's a nearby civ using the iMaxWarNearbyPowerRatio calculations, then if it's a far civ using the iMaxWarDistantPowerRatio calculations). This is a percent value. If the percent of an AI civ's total plots that are adjacent with another civ is greater than this value, then the AI civ will consider the other civ for a total war.

iLimitedWarRand:
This is like iMaxWarRand, but is for limited wars. Limited wars, being less risky, have a better shot of being started, so this number will for Civ4 be smaller than iMaxWarRand (since a smaller number means a better chance.

iLimitedWarPowerRatio:
Like iMaxWar____PowerRatio, this will give a percentage bonus to what the AI thinks of it's power when it's trying to determine if it's stronger than another. It doesn't seem as if an AI will declare a limited war against an enemy that isn't considered "nearby", so there only is one value for this.

iDogpileWarRand:
There's limited war, total war, and dogpile war. This works just like iLimitedWarRand and iTotalWarRand, except it will make the civ consider starting to plan a dogpile war. This means that the AI will attempt to start a war with a team whose power is low compared the AI civ's power AND to the power of teams that are currently at war with the possible target.

iMakePeaceRand:
The chances a civ will consider making peace with one of it's enemies. Every turn, the civ has a 1 in X random shot of deciding to try to make peace, where X is iMakePeaceRand. It will go through each team it's at war with and decide whether they want to try to declare peace. If they decide that they do, they go through the steps of declaring peace.

How they determine if they want peace.

1.) They have to be able to contact the enemy civ.
2.) AI_isChosenWar is true. This is true only if the AI's war plan against the team is not WARPLAN_ATTACKED or WARPLAN_RECENTLY_ATTACK. These are what a war plan against an enemy civ start as if the enemy civ was the one who declared war. After awhile, a war that a civ is in that is of the war plan WARPLAN_ATTACKED will eventually (after some turns) become one of the other war plans, which will allow this criterion to be met.
3.) The war counter is past 20. One point is added to the war counter every turn. I'm assuming that other factors add to the war counter as well.

If any one of the following is true, than they will try to make peace:
4a.) The war counter is over 50.
4b.) The war counter is over 30 (40 for a total war) and
The end war value for this team is between half of the end war value for the other team and double the end war value for the other team.
4c.) The war is a dogpile war and this civ is the only civ left at war with the enemy (the enemy is no longer being "dogpiled."

The end war value is a value that takes multiple factors in to come up with a number that represents how good of an idea it is to end a war against a specific team. The higher the number, the better the proposal of peace is. So, for 4b, if a team's end war value is too low, it doesn't gain as much as the other team from peace. However, I'm not sure why they would want to declare peace if their value is more than twice the others. My only thought is that if the other civ's end war value is really low, then in the process of making peace they can ask for some good stuff.


iDeclareWarTradeRand:
This seems to only have an affect on how an AI negotiates with other AI civs. It is the chance that an AI will try to make a trade with another AI to declare war on one of it's enemies. Every turn, for each AI player that the AI civ can talk with, it has a one in X chance of trying to make a trade for war with that player against one of the teams the ai civ is at war with.

iDemandRebukedSneakProb:
Every time an AI civ has one of it's demands rejected, there is a percentage chance that the AI will start planning a limited war against the rejecter. This is a percentage chance, so 100 means that the civ will always start planning after not reciving a demand.

iDemandRebukedWarProb:
This is the probability that a Civ will immediately declare war immediately after one of their demands are rejected. That would be unlike the last tag, but instead of being sneaky and start planning, then launch a war later, the civ instead declares war immediately.

iRazeCityProb:
The probability (percent) that the AI civ will raze a city upon conquering it, if they don't deam it keepable by many other factors.

iBuildUnitProb:
The probability (percent) that the AI will build a unit at a city.

The actual total probability is this number plus twice the amount of production experience a unit recieves at that city.

This total is then halfed if the Civ is considered to be having financial troubles.

This whole process is one in a few for determining if a city will make a unit. Here is the full list of criteria (if one of these is true, then the city will be set to build a unit):

1.) The civ is in a land war.
2.) The civ has less than 4 cities and the game has not progressed 60 turns yet.
3.) The unit probability test above passes.
3.) The civ is human and it is the first turn (I'm not sure why that code is there).


iBaseAttackOddsChange:
iAttackOddsChangeRand:


Every turn, the AI will set a variable that is their "attack odds change". This varaible is used to add or subtract from attack odds of a battle. I don't think this changes the actual odds of the battle per se, but instead will change what the AI THINK that the battle odds are, so that they are more or less willing to do attacks every turn.

The attack odds changed is calculated by adding the iBaesAttackOddsChange to the sum of TWO random numbers from 0 to the iAttackOddsChangeRand. I doubt you can make iAttackOddsChangeRand negative.
 
Thx Gerikes that certainly added some clarity.:)
I will collect all the info about this subject and put it in a new thread where I will also ask further questions about it later. Now only one question. Is it possible to set a negative ipeaceweight?-vanilla has 0 at the lowest.

Btw I now understand why the AI is that stupid in declaring war if nearby is just the same continent, think it would be possible to tweak the code so that nearby actually means there aren't any civs between attacker and defender that don't have open borders to the attacking civ?
 
Right now Mysticism and Chronicles do absolutely nothing except for making the early game longer.We need to find some things for those techs.

I would suggest to move the Standing Stones back to Mysticism and Stoneworks. Right now they become available by Raw- and HighMagic. The main benefit of the Standing Stones is that they give free Watchstones in every city. Watchstones become available with Stoneworks and if I don´t play with a civ that gets +2 culture in every city via traits they are mostly the first things that I build in new towns. By the time ýou are able to build the Standing Stones you already got Watchstones in all of your cities.

Conclusion: Standing Stones need to be available a lot earlier and Mysticism needs to do something - So I say let´s move the Standing Stones back to Mysticism.

Chronicles are perfect for an early Science building, like an elder-council for example (+25% Science - that´s standard). Chronicles also would perfectls fit for any kind of early civic IMO, but we should have a rough idea about civics first.

Trade would also be the perfect place to put in an early Economics civic like "barter" (maybe a plus to trade route yield or an extra trade route per city, or for the 3 biggest cities, or cities with some resources in the city radius).
 
Those suggestions sound good to me Duke. Anything to make the earlier techs meaningful. :thumbsup:
 
Duke van Frost said:
Right now Mysticism and Chronicles do absolutely nothing except for making the early game longer.We need to find some things for those techs.

I would suggest to move the Standing Stones back to Mysticism and Stoneworks. Right now they become available by Raw- and HighMagic. The main benefit of the Standing Stones is that they give free Watchstones in every city. Watchstones become available with Stoneworks and if I don´t play with a civ that gets +2 culture in every city via traits they are mostly the first things that I build in new towns. By the time ýou are able to build the Standing Stones you already got Watchstones in all of your cities.

Conclusion: Standing Stones need to be available a lot earlier and Mysticism needs to do something - So I say let´s move the Standing Stones back to Mysticism.

Chronicles are perfect for an early Science building, like an elder-council for example (+25% Science - that´s standard). Chronicles also would perfectls fit for any kind of early civic IMO, but we should have a rough idea about civics first.

Trade would also be the perfect place to put in an early Economics civic like "barter" (maybe a plus to trade route yield or an extra trade route per city, or for the 3 biggest cities, or cities with some resources in the city radius).
Duke please leave the Standing stones where they are! Rest is ok with me.
I already wrote my reasoning about that a couple of times-they are the magical vortex build as a barrier for raw magic after the collapse of the warpgate! Let's just have another wonder for earlier building.
 
It´s ok with me if we leave the standing stones where they are, but they should have another effect then. As I said, it´s stupid to have a wonder that gives Watchstones in every city that late.

We then would need another wonder that will give the Watchstones and that should have Mysticism and Stoneworks as prereq IMO.

I just wanted to put a wonder with the Watchstones to Mysticism, if we will have to come up with a new name and give the Standing Stones another effect, that would be fine for me.
 
Do we need WH buildings for the ancient era or simple generic ones? Right now we something to build...
 
Instead of spamming buildings, why don't we create another excess buildable option (like the research/culture/wealth options) that gives minimal boni but is avaliable early on. Maybe create 1 Happy, 1 Sci, 1 Gold and 1 Culture, but regardless of size, this never increases. Making it useless in the late game. This also could fight against cities the maintance.
 
That's fine E_L_M, but we really need a market or town hall or something to add some income (for the armies) and to reduce maintenance/corruption. The number of cities penalty is a killer way too soon, but I do like starting with 3 cities so I think we need another option than simply not giving 3 starting settlers. Somewhere in the GlobalDefines is a value for maintenance fees we could change I think. That would help the player from hemorraging cash after settling 3 cities.

Sorry that rambled a bit...
 
woodelf said:
That's fine E_L_M, but we really need a market or town hall or something to add some income (for the armies) and to reduce maintenance/corruption. The number of cities penalty is a killer way too soon, but I do like starting with 3 cities so I think we need another option than simply not giving 3 starting settlers. Somewhere in the GlobalDefines is a value for maintenance fees we could change I think. That would help the player from hemorraging cash after settling 3 cities.

Sorry that rambled a bit...

If corruption costs are the major problem, why not kill two birds with one stone (no pun intended) and make Watchstones decrease maintenance in the same way a Courthouse does?
 
neener said:
If corruption costs are the major problem, why not kill two birds with one stone (no pun intended) and make Watchstones decrease maintenance in the same way a Courthouse does?

That would be a good start. I'm still a bit bored simply building warriors to be honest while watching my cashflow drop like a stone.
 
Back
Top Bottom