[MOD] More Naval AI

Tholal, my friends are reporting that the Revolutions/Puppet State and the Advanced Diplomacy are causing OOS issues around turn 30-50. I'll try to replicate it with my own systems to see if it happens again.

I would need an OOS log to begin to figure out what the problem is. Turn on logging in your .ini file and send me an OOS log when you get one.

Also, related to multiplayer, is there any possibility to enable LAN games? Currently, we can only play via Direct IP (and Internet play isn't an option as like in LAN games currently, we can't see the other players at all).

Err...hmmm. I didnt do anything on purpose to disable LAN games. I'm not even sure where to look for that, but I'll add it to the list.

I have a question too, is Govannon supposed to be able to teach level I spells to, for example, champions?

Yep. Anyone who is Alive and isnt a bird or animal.

[*]Herne(kuriotates) does not appear as a hero in the Sevopedia.

Each civ only has one official hero. Eubrates is the one the the Kurios.

[*]Heroes appear in the unique units field too.

OK. I can fix that.

[*]Whenever an enemy unit with a great general attached dies, you get a cryptic message such as "Pyre Zombie has died in combat". That message could be improved to let you know why such loss is important.

OK

[*]You can't attach great generals to Govannon or wizards. I have not tested with other civilizations besides the Amurites but it probably affects all adept units.

I'm thinking of leaving it that way. Disciple units will be enabled for Great Generals with the next patch.

[*]You can get a lot of free promotions using Dispel magic + Mutate.

Not sure what you mean.

[*]The bug that mess up with the current unit list is still happening.

Any idea what's happening to cause the unit list to suddenly become misformatted?

[*]How come that I have "Financial troubles" as a bad national factor for revolutions? I had science at 90%, and I was still getting 75 gold per turn.

Good question.

[*]Arendel Phaedra (my puppet state) adopted Arete and Fellowship of Leaves in the same turn.

Thats strange. Wonder how that happened.

I have been enjoying the new additions (specially Advanced Tactics, Sevopedia and BUG) in my last few games. Advanced Tactics makes the game more interesting :)

Good to hear!

I'm concerned with Revolutions, though. It feels off balance to me, as it punishes certain strategies and civilizations. I like Puppet states though, so I would like to know if you considered my suggestion of splitting the game option for Puppet States and Revolutions. I would like to try to code this if you are willing to include it.

It definitely needs a lot of work. I'm a bit reluctant to detach Puppet States from Revolutions because it was my intention from the beginning to merge the two. The plan was for Puppet States to have more troubles with Revolutions that a normal civ. That would be the tradeoff for getting a free, pliant Vassal.

But if you want to put in the legwork for it, then I could be persuaded to make it into two options.

I've noticed that none of the religion's holy shrines are appearing the the 'pedia.

OK. I'll look into it.

I'd also prefer it if the Minor Leaders would show up in the 'pedia.

I can try to finagle that.

When I tried allowing great generals to be attached to new unitcombats it resulted in those units being able to purchase the promotion with xp, but only when they were level 1. (I wasn't sure how to get around this, and didn't like having both Great Generals and Great Commanders in the game anyway so I merged the two into one. In my version generals now are joined to units with a spell like commanders, but still have that star.)

Not sure. Though if you have the unit set to use LeaderPromotion, that triggers special things in the DLL relating to Great Generals and leading troops.

Revolutions do seem too much at times. I would at least recommend making Unyielding Order, The Tower of Complacency, The Pillar of Chains, and Dungeons reduce the chance of revolutions.

Palaces should probably have a bigger effect too.

OK. Something that should probably be added to the Revolution code is an accounting of buildings that provide unhappyProduction. That should help the local RevIndex by itself without needing to tack on extra values.


[*]We were playing against a Sheaim / Clan of Embers team and somehow they gave Ashen Veil to Acheron's city and other barbarian cities.
[/list]
What is wrong with spreading AV to barbarian cities?

Things get weird when barb cities have religions. I've made some changes to try and stop it from happening, but apparently I missed something.

Are you sure it it better to have duplicate rulers than being in other civilizations?

For Puppet States? No. That would kind of defeat the purpose and meaning of them. Creating a Puppet State is when you take someone's city, then pick a local, call him king of the locals and then make sure he does what you tell him to do while governing the other locals.

[*]Evil civilizations are hit very badly by revolutions. There where 4 Sheaim civilizations at one point in one of my test games. Auric had to kill Braeden the Laconic 5 times.

Edit: I just switched to Sacrifice the Weak for the first time, and noticed all of its instability penalties. Penalties of +4 local instability in each city, +2 national instability, and ++50% city distance instability penalty taken together seems like too much. I'm thinking of halving those in my version.

OK. I'll reduce those penalties.

Also, did you noticed the ++ %? All of the city distance instability modifiers (or at least all of them for civics) have the minor graphical error of double +'s.

I'll fix it.

FFH2 does not work with LAN or Internet Play.

My mod should work if you dont use either of the two new options (apparently not LAN, though I understand it works via Direct IP)
 
I'm concerned with Revolutions, though. It feels off balance to me, as it punishes certain strategies and civilizations. I like Puppet states though, so I would like to know if you considered my suggestion of splitting the game option for Puppet States and Revolutions. I would like to try to code this if you are willing to include it.

I think it would be great to split up these options. It would also be great if "Advanced Tactics" was broken up into several options. For example, Advanced Diplomacy and War Prizes could be separate options from the other things in Advanced Tactics.

Are there plans to add other game options to Naval AI in the future? I like the additions but it seems like they are leading Naval AI away from its original purpose of improving the AI. Please be very careful/selective before adding anything else.

That being said, I do think some of the game options in Jean Elcard's FlavourMod 2 would be worthy additions to Naval AI. Especially the "Flavour Start" option. I know you probably have your hands full for now, but consider it in the future.
 
Good question.
I read in another Thread, that the code for "Financial troubles" uses a function that isn't only meant for AI use. Maybe the Khazad treasury function could be used instead?

And here is the minor leaders for puppet states code update
 

Attachments

Red Key said:
It would also be great if "Advanced Tactics" was broken up into several options. For example, Advanced Diplomacy and War Prizes could be separate options from the other things in Advanced Tactics.

This will not be happening. I purposefully combined them for two reasons. 1) I didn't want to load down an already long options menu with a bunch of new options. Every option should be meaningful, not just turning off and on one small mechanic. And 2) the Advanced Tactics option is being designed to include some features that I think are cool and fun and would probably be part of base FFH if it were my game. I want to try and keep base FFH as true as possible to Kael's version, but I also want to be able to play an expanded version with a single option selection.

Are there plans to add other game options to Naval AI in the future? I like the additions but it seems like they are leading Naval AI away from its original purpose of improving the AI. Please be very careful/selective before adding anything else.

No plans for more options, but there are some other things I've considered adding to the Advanced Tactics such as Better Blizzards and your Super Forts code. But that's not in my immediate plans.

AI and bugfixing is still the focus.

That being said, I do think some of the game options in Jean Elcard's FlavourMod 2 would be worthy additions to Naval AI. Especially the "Flavour Start" option.

I think I'll leave the Flavour Start options to the mapscripts (some mapscripts have this option built in). It can be fun sometimes, but it tends to produce wildly unbalanced starts and also tends to clump civs together, so its not something that I want the base game to include and its not worth a new game option IMO. But his numerous changes to the way maps are generated look useful just in general. I'll have to dig into the source code and see what I can extract and utilize.
 
Thanks for the response Tholal. Your plans are clear to me now and are also :goodjob:. Keep up the great work! Hopefully in April/May (when my semester ends) I will start working on my total conversion idea, and FFH2 + Naval AI will be the base of it.

No plans for more options, but there are some other things I've considered adding to the Advanced Tactics such as Better Blizzards and your Super Forts code. But that's not in my immediate plans.

AI and bugfixing is still the focus.

It would be fun to see Super Forts in here. I am currently debating whether I should make forts trade-able in diplomacy in Super Forts. Besides that and some small AI adjustments it is done.

I think I'll leave the Flavour Start options to the mapscripts (some mapscripts have this option built in). It can be fun sometimes, but it tends to produce wildly unbalanced starts and also tends to clump civs together, so its not something that I want the base game to include and its not worth a new game option IMO. But his numerous changes to the way maps are generated look useful just in general. I'll have to dig into the source code and see what I can extract and utilize.

Makes sense to leave Flavour Start out then. I haven't really tested it myself.
 
If the religion is flagged as the favorite religion of the civ you're playing and you found that religion, the holy city is placed in your capitol. Otherwise, the regular religion founding rules are used (whatever they might be).
Err, no. That must have something to do with the more naval AI. When I play base FfH with BUG the capitol is spared with a holy city as long as I have at least one other city. That holds true for the favorite religion as well. So usually (when having two cities) FoL is founded in Hyll. I've tried it quite some times and never had it gone to Evermore. Could you change that flag? Or, if everyone else is fine with the religion going to the capitol, point me to where and what I have to change?

Thanks for all your wonderful work, btw.
 
flavour starts does NOT make civs too clumped, that's a mapscript issue.

the one issue it has is that it undervalues plains when adding food bonuses to bad starts, so you'll get uber plains starts with clumped resources. can be fixed, I know Sephi did it a while ago ;)
 
Couple issues I noted from the game I was just playing:

Barbarians are exploring dungeons. If memory serves, the Clan CAN'T explore dungeons because they are at peace with Barbarians, therefore Barbarians should not have the ability to do so.

Certain Barbarian units (Skeletons are the most egregious violators) will enter my lands, arrive one tile away from my city, stop for a turn and then attack. This could make sense if the first unit wanted to wait for reinforcements (as there usually is at least one more Skeleton on the way), but the following units do the same.
Turn one: Skeleton A arrives tile off from city. Skeleton B two tiles away.
Turn two: Skeleton A skips turn. Skeleton B joins Skeleton B.
Turn three: Skeleton A attacks, dies. Skeleton B skips turn.
Turn four: Skeleton B attacks, dies.

As of turn 70ish, Sheelba was at war with the Barbarians. The Clan is nowhere near a score where peace would be lost with the Barbarians (19 civ start, one of each Empire).

Balseraphs (Perpentach) got killed by Barbarians around turn 67 or so. I know Perpentach's insane, buuut...

Kuriotates had a revolt and Sidar (Shekinah) rebels are in. This is good, except the Kuriotates have more happiness resources built in (Tailors, Jewelers, etc) than other civs; the AI isn't handling Cardith very well.

This is a multiplayer game on two of my boxes; I'm playing as Lanun (Hannah) and Elohim (Ethne). So far, around turn 88 (Quick speed, Planet Generator 0.68, Final Five), no OOS issues to report.
 
Turn 100: OOS. As I can't seem to find an OOS logging field in the .ini I found, I suspect the cause might be the game eliminating Shekinah from the game, as Turn 100 in Final Five is the first instance of a player/AI getting removed by the game on Quick speed.

Shekinah, as far as I can tell by the End of Game screens, did not have any cities as she was harrying Cardith's lands trying to capture something, and had the lowest score on the charts.

Edit: Reloading from Turn 96 bypassed the OOS.
 
Err, no. That must have something to do with the more naval AI. When I play base FfH with BUG the capitol is spared with a holy city as long as I have at least one other city. That holds true for the favorite religion as well. So usually (when having two cities) FoL is founded in Hyll. I've tried it quite some times and never had it gone to Evermore. Could you change that flag? Or, if everyone else is fine with the religion going to the capitol, point me to where and what I have to change?

The code is found in python under the onTechAcquired function and is exactly the same as in FFH Patch O.

Code:
if iReligion != -1:
	if (iReligion==pPlayer.getFavoriteReligion()):
	pPlayer.getCapitalCity().setHasReligion(iReligion,True,True,True)

The only difference would be that I assigned Favorite Religions to some leaders that didn't have one before, including Basium, all the major Ljos leaders, the major Khazad leaders, the major Lanun leaders, Faeryl, Tebryn, Os-Gabella and Hyborem. So if you set it so that those leaders have NONE as their favorite religion in the XML, then you'll see the standard BTS holy city placement with those leaders again.

Turn 100: OOS. As I can't seem to find an OOS logging field in the .ini I found

In the civilizationIV.ini file:

; Enable the logging system
LoggingEnabled = 1

; Enable synchronization logging
SynchLog = 1


Edit: Reloading from Turn 96 bypassed the OOS.

After reloading did that same civ get eliminated again?
 
Awesome! Looks good!

Would it be an easy thing to do to make it so cities that are unhappyProduction() have a reduction in RevIndexes?

Should be easy. I suggest halving the penalty from unhappiness. Have you a better idea?

Are you sure it it better to have duplicate rulers than being in other civilizations? Personally I would much prefer that the <DerivativeCiv> be tried first. If Tholal has one preference and I have another, how would go about changing this in my version?

In python/entrypoints/CvRevInterface.py change
Code:
iSplitType = RevCivUtils.SPLIT_PUPPET
to
Code:
iSplitType = RevCivUtils.SPLIT_FORCED

Then puppet states are chosen like a splinter civ. If no leaders available, it will choose the second best available civ.
Deeper changes are made in RevCivUtils.
 
The code is found in python under the onTechAcquired function and is exactly the same as in FFH Patch O.

Code:
if iReligion != -1:
	if (iReligion==pPlayer.getFavoriteReligion()):
	pPlayer.getCapitalCity().setHasReligion(iReligion,True,True,True)

The only difference would be that I assigned Favorite Religions to some leaders that didn't have one before, including Basium, all the major Ljos leaders, the major Khazad leaders, the major Lanun leaders, Faeryl, Tebryn, Os-Gabella and Hyborem. So if you set it so that those leaders have NONE as their favorite religion in the XML, then you'll see the standard BTS holy city placement with those leaders again.



In the civilizationIV.ini file:

; Enable the logging system
LoggingEnabled = 1

; Enable synchronization logging
SynchLog = 1




After reloading did that same civ get eliminated again?

Yes -- though I don't know off hand who it was, as I've seen the Grigori get knocked out twice in my news ticker, without the accompanying portrait pop-up.
 
Definite bug: When dealing with waves of Barbarians, I usually counterattack rather than waiting for them to do so. When this leaves a unit (stack) exposed, I expect the barbarians to attack. Instead, the next turn, I'll find the barbarians on the same tile as my units!
This led to the loss of one of my cities and two great people I'd been saving because almost all my forces moved out to attack and dispatched with no losses most of the barbarians. I had a single hunter that was able to return to the city to defend.
My turn ends, the barbarians skirt by my units by way of the tile my units were on (there was no other way around) and killed the hunter and took the city.
Spoiler :
Barbarians.JPG

what.JPG
 
Definite bug: When dealing with waves of Barbarians, I usually counterattack rather than waiting for them to do so. When this leaves a unit (stack) exposed, I expect the barbarians to attack. Instead, the next turn, I'll find the barbarians on the same tile as my units!
This led to the loss of one of my cities and two great people I'd been saving because almost all my forces moved out to attack and dispatched with no losses most of the barbarians. I had a single hunter that was able to return to the city to defend.
My turn ends, the barbarians skirt by my units by way of the tile my units were on (there was no other way around) and killed the hunter and took the city.
Spoiler :
Barbarians.JPG

what.JPG

Definitely not a bug. You own the Nox Noctis (the Council of Esus religious shrine) and your units were invisible, meaning the chariots couldn't attack them.
 
Here is the unhappy production change.
The cpp and h files are the exposition of the function, the XML file is just a change to the TXT_KEY_BUILDING_UNHAPPY_PRODUCTION text tag to display the rev changes, include it if you like.
 

Attachments

Definitely not a bug. You own the Nox Noctis (the Council of Esus religious shrine) and your units were invisible, meaning the chariots couldn't attack them.

Reminds me of the first time I built the Nox Noctis. For the life of me I could not figure out why barbs were hanging out in a strategically located fort with some of my archers. My first thought was they must be sharing some pretty good ale. :blush:
 
The code is found in python under the onTechAcquired function and is exactly the same as in FFH Patch O.
Spoiler :
Code:
if iReligion != -1:
	if (iReligion==pPlayer.getFavoriteReligion()):
	pPlayer.getCapitalCity().setHasReligion(iReligion,True,True,True)

The only difference would be that I assigned Favorite Religions to some leaders that didn't have one before, including Basium, all the major Ljos leaders, the major Khazad leaders, the major Lanun leaders, Faeryl, Tebryn, Os-Gabella and Hyborem. So if you set it so that those leaders have NONE as their favorite religion in the XML, then you'll see the standard BTS holy city placement with those leaders again.

I'm ashamed to have to ask a beginners question but ... In which file would I find that? :blush:
 
Back
Top Bottom