[MOD] More Naval AI

I look at it this way. Many attributes offer benefits that extend forward into the future - i.e. I can build certain buildings faster, or get bonuses on unit creation, or whatever, and benefit from that when the attribute changes. However, Charismatic is the only attribute where you get the benefit applied to past actions (i.e. past XP gain). It doesn't seem quite right to me.
well i like your point of view, but go farther... when you shifted /lost charismatic you lose all benefits... well the units have a bigger level, but when you shift trait, they have again a huge xp gap to cross before changing level. it was only an "haste spell" that is followed by a "exhausted"... :D
other still keep the empire wide boni, without boomerang effect : the quicker buildings, the earned commerce don't become harder to get than normal. while going from lvl10 (earned with charismatic : 76xp) to lvl 11 (117) without.. is much harder than going from lvl10 to lvl11... 101 to 117... :D
and while leaving organised you keep those command posts.., not only the xp provided but the actual buildings !!
 
The Amurite worldspell prevents the functionality of Guild of the Nine. Since you're spending gold to buy mercenaries, this isn't a spell and shouldn't be blocked during the Amurite worldspell.
 
I think you misunderstood me about bRivalTerritory. I know that that lets a unit move in rival territory regardless of whether you have Open Borders or a Right of Passage agreement. What I would like is a way to allow units to move through rival territory with a Right of Passage Agreement without allowing them to do so when you have no agreement.

It would require a new XML tag in UnitInfos, which is a bit of a pain. This seems kind of a cornercase situation where you would want to have a combat unit that isn't Invisible or HN that can also bypass the Rights of Passage limitation. Can you tell me a little more about what you're trying to do?

Included are the two games at the OOS points; unfortunately, I'm not finding an OOS log to include.

I still haven't had a chance to look at your saves (I'm not really set up to run multiple instances of civ at the same time at the moment), but I did find some info about the OOS logs from the Dune Wars mod

To use OOSLogger, simply follow these steps:

1.) Run your mod in a multiplayer setting. When the game goes out of sync, a log file will be created in the main civ4 directory (normally "C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword") called "OOSLog.txt".
2.) Have each player or tester in the game rename their log file to some unique name (or, better yet, modify the script to make each log name for each player unique to your liking) and have all the logs sent to one player, tester or developer.
2 - Alternative) Post all of the Log Text Files to the Dune Wars forum
3.) Use a diff tool between the files to see exactly what lines have changed, which will hopefully give you a clue as to where the OOS error is happening.

So maybe you can check your main BTS game directory to see if there is a log hiding there?

There is a problem with the Adaptive trait. If you choose to be Charismatic when you already have many leveled units, all of your units will move to use the "Charismatic" level scale, earning many free promotions.

Interesting find. I think I'll leave it as-is though. It doesn't seem especially overpowered to me. At least not any more than any of the other powerful abilities and tactics available in FFH.

My friends and I have noticed that Paramanders now obsolete soldiers of kilmorph. We were wondering if this is an intentional change, since it negates hurrying strategies using the soldiers unless you do not build a temple of kilmorph in a citiy so you can keep building soldiers.

As A Moon said, this behavior is from base FFH. I'll consider making SoKs never obsolete as this issue seems like an oversight/bug.

The Amurite worldspell prevents the functionality of Guild of the Nine. Since you're spending gold to buy mercenaries, this isn't a spell and shouldn't be blocked during the Amurite worldspell.

Will be fixed in the next release.


Thanks for all the feedback and bug reports!
 
Empire stability issue: In my current game, I'm running a decent sized empire (around 30 or so cities), and I'm dealing with various cities threatening revolt (conquered cities dealing with war weariness I'd wager). The city stability issues are simple enough to deal with: Build happiness buildings.

The empire stability problems, however, shouldn't be worsening when the screen reads thus:
Good factors: Golden Age [if applicable], Republic, etc
Bad factors: [blank]

If the bad factors is blank, by default, empire stability can't be worsening. I can't change Civics to make things better; the only possible thing to do is sue for peace, but that's not going to happen when I capture a city, and the conditions for peace is giving back the city plus tech or gold.

No, I just captured your city. You should be recognizing the fact that I'm embarrassing your military (even if it's much, much larger than mine) and you should be making concessions to me. (Bannor need not apply... lol)
 
I still haven't had a chance to look at your saves (I'm not really set up to run multiple instances of civ at the same time at the moment), but I did find some info about the OOS logs from the Dune Wars mod
To use OOSLogger, simply follow these steps:

1.) Run your mod in a multiplayer setting. When the game goes out of sync, a log file will be created in the main civ4 directory (normally "C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword") called "OOSLog.txt".
2.) Have each player or tester in the game rename their log file to some unique name (or, better yet, modify the script to make each log name for each player unique to your liking) and have all the logs sent to one player, tester or developer.
2 - Alternative) Post all of the Log Text Files to the Dune Wars forum
3.) Use a diff tool between the files to see exactly what lines have changed, which will hopefully give you a clue as to where the OOS error is happening.


So maybe you can check your main BTS game directory to see if there is a log hiding there?
There is an OOSLog.txt in that directory, but it's for a different game under an older version of the patch. I'll delete this, which should fix this, and if my understanding is sound, the reason I don't have a good log file for the relevant OOS is because there is already an OOS log that can't be overwritten.
 
As A Moon said, this behavior is from base FFH. I'll consider making SoKs never obsolete as this issue seems like an oversight/bug.

Or you could still allow them to obsolete but give Paramanders the ability to hurry production.
 
Talking about obsolete, there is/was an issue where city can't build diseased corpses if it can build eidolons. Don't know if it was fixed but I thought I'd mention it.
 
Thanks for the responses, its been so long since I played vanillia FFH that I guess my memory got fuzzy.
 
It would require a new XML tag in UnitInfos, which is a bit of a pain. This seems kind of a cornercase situation where you would want to have a combat unit that isn't Invisible or HN that can also bypass the Rights of Passage limitation. Can you tell me a little more about what you're trying to do?

Mostly I was wanting to allow scouts to explore with right of passage agreements without having to keep them defensive only (in part because it apparently causes some issues when a defensive only unit gets enraged through exploring lairs, although I already added a python check to prevent such units from getting such promotions), and I was also considering allow the lowest level disciples to try to spread religions with said agreement. I guess it is not that important though.


I have one much easier DLL request now. Could you please make it so that units with limited duration unload any cargo they might be carrying just before their duration expires and kills them?

(Current I have Summon Rift use an ICBM-like unit to target where to open a Portal between two tiles, but I've had some complaints about it being too powerful and far way beyond the ability of the AI to understand. I might want to move back to having the Rift summon simply carry cargo. Also, I currently allow Water Elementals to carry ships, so that you can take them from one body of water to another.)

You can use transport summons just fine without any DLL changes, but if you are not careful to remember to unload all of the cargo before the transport's duration expires then all of the cargo is killed with it. I recall from when I had Grey Fox fix this in Broader Alignments that it only requires adding a single line of code and would have no effect on mods that do not have transport summons.


It would also be quite nice if you could teach the AI to use summoned transport units.
 
Mostly I was wanting to allow scouts to explore with right of passage agreements without having to keep them defensive only (in part because it apparently causes some issues when a defensive only unit gets enraged through exploring lairs, although I already added a python check to prevent such units from getting such promotions), and I was also considering allow the lowest level disciples to try to spread religions with said agreement. I guess it is not that important though.

Some interesting points. It seems the real issue is that Rights of Passage really dont provide much at the moment. It only allows border access for Workers and Great People. After giving it some thought, I think I might change it to also allow access to units that can spread religion and Tier 1 recon units.

I have one much easier DLL request now. Could you please make it so that units with limited duration unload any cargo they might be carrying just before their duration expires and kills them?

That should be relatively simple.

It would also be quite nice if you could teach the AI to use summoned transport units.

The AI will use summoned units based upon the default AI. So it you make the default AI UNITAI_ASSAULT_SEA or UNITAI_SETTLER_SEA, it will use the unit as an transport. However, if the duration is short, I cant guarantee that the AI will make use of it before it vanishes.
 
Just played a couple of games with your latest revision (2.1). Lots of fun but a little weirdness as well.

Playing as the Elohim I saw that I could upgrade their assassin replacement, the Devout, to a Confessor. That seems reasonable, however once I'd researched Deception I saw that I could also upgrade the Nightwatch that I got to a Confessor as well. That seemed really weird since the Nightwatch starts with the Essus religion.

Playing as the Grigori, I finished the Eyes and Ears Network and received the religious founding techs. No real effect on gameplay since I couldn't build the temples but I could now join one of the councils! I remember back in teh olden days that the Agnostic leaders could research Honour and Deception because those techs provided access to the councils but that it was later changed. Overcouncil and Undercouncil are quite useful diplomatic options however, so would it be possible to say create duplicate technologies to Honour and Deception that are only researched by the Agnostic leaders (or just the Grigori and Illians like the Lanums unique tech) which opens up the councils without founding the religions?. Well that's if you think they should have access to those civics of course.

Also as the Grigori, Essus spread to a couple of my cities so I decided to build Shadows in them. I noticed that the Shadows didn't have access to the mask ability (probably because they didn't follow Essus). It seemed weird, but thematically since the Grigori are agnostic I think it makes sense.

What's the probability of a tile being changed by the Deepening? The Illians were in one game and survived long enough to complete the ritual and I swear it felt that 90% or more of my empire turned to tundra!

I've noticed in a couple of cases where I'm the worst enemy of the AI so that while they won't trade with me, but they still want the Rights of Passage agreement. If they dislike me that much (probably for a good reason, not all of those city ruins were there at the start of the game) then allowing units in to scout/evangelise probably isn't in their best interests, especially if you make the changes that you mentioned above for what units are allowed access with the Right of passage.

I tend to play using the Erebus Continent map script with the city ruins option enabled so that there is a means to manage the Armageddon counter if some of the AIs get carried away. Looks like the AIs are taking advantage of it as well, which is good.

Edit: I also just saw the Barbarian state create a puppet state in a city it had just captured!
 
I have some contributions :)

The first one is taken from Erebus in the Balance. It gives the Sanctuary Word Spell the same length scaling with game speed than Stasis and Arcane Lacuna already have.

The second one takes care of something that always annoyed me: whenever an unknown leader completes a project, his/her name is shown in the message. Now it displays the usual "Project has been completed in a far away land" message.

EDIT: Attachments removed.
 
Some interesting points. It seems the real issue is that Rights of Passage really dont provide much at the moment. It only allows border access for Workers and Great People. After giving it some thought, I think I might change it to also allow access to units that can spread religion and Tier 1 recon units.



That should be relatively simple.
Thanks. Any idea of how soon this update will be posted, to help me know if I should include them in my next release or the one after that?


(Thinking about how the unload before expiring code can be found in Broader Alignments got me thinking that it would be quite nice if you decided to include Broader Alignments as another game option in this mod. A couple more extra game options for modmoders like myself to use would be nice too. These changes are not essential though.)

The AI will use summoned units based upon the default AI. So it you make the default AI UNITAI_ASSAULT_SEA or UNITAI_SETTLER_SEA, it will use the unit as an transport. However, if the duration is short, I cant guarantee that the AI will make use of it before it vanishes.

Just to be clear, the transport summons in question are not DOMAIN_SEA units that carry DOMAIN_LAND units like ordinary naval units. Rifts work like ICBMs that can carry DOMAIN_LAND units as cargo directly to almost any tile on the map, while Water Elementals are DOMAIN_LAND units with PROMOTION_WATER_WALKING that can carry DOMAIN_SEA units as cargo across stretches of land.

I have also reintroduced the Trojan Horse, an invisible DOMAIN_LAND unit that can carry other DOMAIN_LAND units through rival territory without any need for a Right of Passage or Open Border Agreement.

Would UNITAI_ASSAULT_SEA and UNITAI_SETTLER_SEA let the AI understand how to use those units properly?
 
Playing as the Elohim I saw that I could upgrade their assassin replacement, the Devout, to a Confessor. That seems reasonable, however once I'd researched Deception I saw that I could also upgrade the Nightwatch that I got to a Confessor as well. That seemed really weird since the Nightwatch starts with the Essus religion.

Seems to be a special-case issue with Tolerant leaders. I'll add a check to prevent religious units from upgrading to religious units for other religions.

Playing as the Grigori, I finished the Eyes and Ears Network and received the religious founding techs. No real effect on gameplay since I couldn't build the temples but I could now join one of the councils!

Interesting. I think I'll simply add a check in for Agnostic civs so they dont get those techs. The code is already omitting Seafaring and the Religious civic techs.

What's the probability of a tile being changed by the Deepening?

75%

I've noticed in a couple of cases where I'm the worst enemy of the AI so that while they won't trade with me, but they still want the Rights of Passage agreement.

OK. I'll take a look at the AI for accepting/requesting Rights of Passage agreements.

Edit: I also just saw the Barbarian state create a puppet state in a city it had just captured!

Ha! OK. I'll fix that. Barbs shouldn't be using that ability.

I have some contributions :)

Awesome! Thanks!

Since I was mucking about with the World Spells anyway, I decided to make the scaling dynamic based on gamespeed. That way they will still scale properly even if someone mods the gamespeedinfos or adds new game speeds.


Thanks. Any idea of how soon this update will be posted, to help me know if I should include them in my next release or the one after that?

I'm working on it, but I haven't been able to devote the time I need to get things in a release state. I'm hoping to release something next week, but I cant make any guarantees.

Just to be clear, the transport summons in question are not DOMAIN_SEA units that carry DOMAIN_LAND units like ordinary naval units. Rifts work like ICBMs that can carry DOMAIN_LAND units as cargo directly to almost any tile on the map, while Water Elementals are DOMAIN_LAND units with PROMOTION_WATER_WALKING that can carry DOMAIN_SEA units as cargo across stretches of land.

I have also reintroduced the Trojan Horse, an invisible DOMAIN_LAND unit that can carry other DOMAIN_LAND units through rival territory without any need for a Right of Passage or Open Border Agreement.

Would UNITAI_ASSAULT_SEA and UNITAI_SETTLER_SEA let the AI understand how to use those units properly?

No idea. It might. Or it might not. I suspect that it probably needs its own AI code to really work effectively. But give it a try and let me know what happens!
 
Just a couple of random thoughts while I procrastinate...

Edit: I also just saw the Barbarian state create a puppet state in a city it had just captured!

Ha! OK. I'll fix that. Barbs shouldn't be using that ability.

It did seem strange to see a barbarian aligned Svaltfar and Calabin civs appear (Mahon the Butcher did seem appropriately named however) that were at war with everybody but it did get me thinking that it would be interesting if over time there was probability of the clan emerging from some of the more developed barbarian cities. Although I imagine that would be a bit of work to implement as I don't think the puppet state mechanism would work well for that.

The other thought had to do with heros. With religious heros if you change religions then they disband, but can be rebuilt if you change back. Would some mechanism like that be possible for civ specific hero's, so that if a civ is eliminated but its hero is not killed, that future incarnations of that civ can rebuild hir? I eliminated the Baseralphs early in one game because Loki was stealing all my gold. I never killed him though and later on the Carnies reappeared a couple of times. it would have been interesting if he'd reappeared as well.
 
Shadows: They're supposed to attack the weakest unit in the stack like Assassins, per the blurb on the icon hover.

If this is the case, I shouldn't be losing Archmages when I've got Mages and Adepts and stacks of Skeletons in the same stack -- and my weakest Archmage (from combat) still has a higher strength (4.3) than my Mages (4).
 
What unit is targeted is not based solely on the units base combat strength.

Each of the Channeling promotions makes a unit less likely to defend against a normal unit, or more likely against a unit with the Marksman promotion. The Hero promotion has the same effect.

This is all normal FfH2 behavior which Tholal has not changed.
 
Shadows: They're supposed to attack the weakest unit in the stack like Assassins, per the blurb on the icon hover.

I believe that the Channeling promotions play a role as well. Aside from allowing the units to cast spells they also reduce the likelihood of the unit being chosen to defend the stack. I think that the target selection for shadows and assassins involves choosing not just the weakest but also the least likely to defend. Somebody more knowledgeable will probably correct me...

I think that the best way to defend against shadows and assassins is to have a few units with the guardsmen promotion in the stack.
 
Seems that way. Wound up not losing the archmage after all because the computer froze, forcing a reload the turn before...
 
I believe that the Channeling promotions play a role as well. Aside from allowing the units to cast spells they also reduce the likelihood of the unit being chosen to defend the stack. I think that the target selection for shadows and assassins involves choosing not just the weakest but also the least likely to defend. Somebody more knowledgeable will probably correct me...

I think that the best way to defend against shadows and assassins is to have a few units with the guardsmen promotion in the stack.

...or iron skin spell - earth2
 
Top Bottom