For those investigating the changes calvitix made, I attach diffs for each of calvitix's submitted alterations (at least, that's what they should be, assuming the version control worked out properly ). There is one file here for each complete submission, in the relatively readable diff format.
Announcement
Collapse
No announcement yet.
AI : Army Movement
Collapse
X
-
Originally posted by Martin Gühmann
What about this:
[...]
By the way I didn't understand for what this nb_transport variable is and why Calvitix checks whether m_transport > 0 and transport_nb > 0, the first check should be included in the second one.
Comment
-
Originally posted by Fromafar
And also difficult to understand.
Originally posted by Fromafar
From what I understand of it, the m_transport value is the number of free transport slots, and the extra guard (both values > 0) is used to prevent using this condition when comparing a transport army against a non-transport army.
Originally posted by Fromafar
But I think that mixing 4 different concepts (remaining transport capacity, battle strength, shield cost, #of agents) in a single operator does not work well. It is probably better to define a specific operator for each concept.
J just don't see the shield cost part, maybe the m_value but for that I have to take a closer look. And if it is this then we should reconsider it.
- MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Originally posted by Martin Gühmann
Another thing I noticed is the settling behaviour, but actual I already noticed this in a game without your modifications calvitix, the AIs don't settle aggressivly enough. I was able to fix this in GoodMod for ApolytonPack with some text file modifications and I thought by adding those modifications to the startegies.txt I would fix it here as well, but in fact I see here in that game a settler that is obviously waiting for doomsday or whatever. Actual I think the Germans will release a settler from that ship and fill the gap, that should have been filled by the Incians ages ago. And I don't see that the too many cities strategies should be in effect here either as the Incians never hit the city limit. Another thing is that the Incans in the 2 res game have 6 settlers even if the strategies.txt tells them to have only at most 4 settlers.
Martin,
I know I'm digging this up from the past but a consistent problem I've seen in a few games I tested are the "frozen" settlers. they either fortified or if i remove the entrench flag the just just freeze at a position.
I dont know if they aretrying to cross the sea (then tend to be on the cost) or if its because I made mountains unsettleable or they are treating settlers with regular unit strategies.
Where would a good start be. Basically I'd like to add something like if settle = false it moves or if it doesnt move for 5 turns then it just settles there.
Comment
-
I always felt two aspects of AI settling to be extremely annoying:
- that I have to expel their settlers from my territory each and every year for centuries
- and that they just stop settling at some point of the game.
Once I had a funny situation in a game, where the AI for some reason built lots of settlers, sent them wandering through my territory, I expelled them as usual. Once, surveying my borders, I spotted a huge "army" of refugees who got no employment by their government and stranded at the edge of my empire.
So I tried several things to improve their human rights situation .
To a certain extent modifcations in the textfiles may help, like:
- settling priority (also in relation to exploration priority: IIRC the AI, if peaceful, uses settlers for exploration, and if they are finished with that they just hang around).
- settling score (the AI won't settle on tiles with a score below this value -- I think it's the sum of terrain values, but I don't remember exactly).
- city limit, as mentioned by Martin G.
If you restrict the AI's settling opportunities, It may very well happen that their settlers get somewhat lost (settling score, but also movement and settling attributes of the units).
However, I got as far as making the AI settle a bit more "aggressively" in my attempts, but not necessarily more intelligently. So I decided to SLIC them. If you want to try Better Settling 1.0 beta you might need to take out the player.government-stuff (the "MOD_MAXCITIES[]"-array), since I don't know for sure if it would break the current playtest version. In this case you obviously need an alternative method for figuring out the AI's city limit. Or just take a look at the code for inspiration .The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.
Comment
-
Thanks Bureaubert,
(Nice website by the way )
i see how we can "break" the AI's will to settle by values but should we look into adding the code a way for the AI not to form refugees?
Seeing them as refuggees adds a degree of realism but a disadvantage to the AI which should be continuing to look for places to settle or disband or add the settler to an existing city.
Another option is that afterno mvmt for 5 turns have the settler automatically disband and become a fort or something but that is a slic thing.
Comment
-
Well I can just tell what "Better Settling 1.0 beta" does to fit my taste:
- First it's based upon textfile settings, most importantly on a set of corresponding strategies
- The SLIC itself determines an AI's "settling condition (SETCON)" considering it's government specific city limit, the "avarage" HUMAN player's number of cities, the current "era" (in my own Mod I like to see the AI expanding by settling in the early game, later a bigger portion of their "city ration" is reserved for conquest), selects an according settling strategy from strategies.txt and uses SETCON in it's own logic.
- Settling strategies mostly determine how many settlers the AI will build. The SLIC always takes complete control over the first three settlers , directs them to good settling locations and forces them to settle there. The remaining settlers are just semi-controlled (forced to move to better tiles before we take over complete control). The evaluation and selection of settling locations is in the SLIC.
- "Geographical awareness": First of all I have introduced an event handler to stop the AI from settling on foreign territory (which is also disabled for the HUMAN player, of course). Basically the entire SLIC-logic is designed for compact settling, but there is a "settling frustration"-factor: Whenever the AI tries to settle on foreign territory (which it unevitably does by default if sorrounded by other civs), settling frustration rises. The AI "learns by failure", after a while they "know" they are surrounded by concurring civs and need an alternative strategy for expansion. This strategy could be worked out better -- currently the script just allows settling far away beyond a certain "settling frustration" (some skilled SLICer could think of settlers boarding ships and colonizing other continents ...).
More details can be found in the comments ...
Different ideas like settlers building forts or colonies, and settlers "migrating" to other cities maybe interesting in the context of particular Mods. Therefore I like the idea of SLICing the whole stuff instead of implementing a particular concept into the "hard code". For my need & taste getting supplied with functions and variables like player.government or access to the database values is a lot more interesting. But on the other hand I am not against an improvement of the default behaviour in the hard code if it can be easily overridden by SLICThe modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.
Comment
-
Originally posted by BureauBert
you might need to take out the player.government-stuff (the "MOD_MAXCITIES[]"-array), since I don't know for sure if it would break the current playtest version. In this case you obviously need an alternative method for figuring out the AI's city limit. Or just take a look at the code for inspiration .
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
There is no need for an alternative way to figure out the player's government we have it in the playtest.
city limit depending strategy change is inThe modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.
Comment
-
Originally posted by BureauBert
Sounds promising, but what does it mean ???
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
stankarp
The AI declare war event is tied to the following.
1) It only triggers once the human reaches a number 1 ranking in something after turn 200.
2) The chances of the ai declaring war vary based on your frenzy level, whether you have a peace treaty with the ai and it's personality.
It was designed to stop a situation where the human gets on top and just picks and chooses where and when he might attack and the ai sit there. Some declarations don't mean much, but if you have a powerfull ai on your border and are being aggressive to others, there is a chance it might join in, adds uncertainty to the game.
It also prevents the situation that happened in my last 2 civ 4 games where I just steam rolled the map in one direction and the other ai just st there and watched.
Is there something in strategy we can use, probably as a difficulty option, where we identify if the human gets to rank #1 and have the AI get really hostile for world war? I think something where it could trigger or switch the AI to all out attack. I guess it could be a maxed out integer that gets added to the strategy attack value but is only 0 if the human is not #1.
We could probably add a second difficulty option that is linked to it that triggers the AI to "mobilize" giving it the noUnit Shield cost flags and gold bonuses to make the AI gte really strong. Basically give the AI heaps of advantages until the human is no longer #1.
any thoughts on this?
Comment
-
Many good ponits!
In a post a while back for 619 playtest I had the same thoughts. First off the game was a toe to toe battle, Was the most enjoyment I have gotten of out playing Civ.
Around the 400 to 500 mark I was getting the upper hand and could back down the AI even when some went over 40 cities.
I feel its because the AI has threats all aournd and this might bog it down so it might not want to use its army to capture your cities.Just play defense. Even when I declared war with more than one AI faction.This is only true in the end game.Do this aound the 200 turn mark and the AI will drive at you with 10 and 12 stacks using build 619.
You could make ajustments using the DiffDb file .In the modern age where AI is a little behind the humand player and where AI is a little ahead tweak the numbers up.
I dont feel its to much of a cheat as you can make ajustments to milatary readiness and the AI cannot.
Lets face it the AI needs more than one way to win than high score. A trigger event at some ponit in the game where the AI could build a wonder to gain a very high score. A merging of AI civs as a way to make them a unbeatable force might work but AI.s would have to share the same border.
Comment
Comment