RHQ Artificially Intelligent AI Mod

RHQ Artificially Intelligent AI Mod RHQ AI Mod 2.10

What you're doing is really cool. It's a shame that the approach to difficulty levels in civ just boils down player/cpu buffs/nerfs.

It would be great if the AI actually scaled with difficulty. Not sure how achievable that is though.

Eg. what if there was a criterion based on Difficulty that you could put in your modinfo to push different levels of AI skill mods accordingly.

Unfortunately it doesn't seem possible: https://forums.civfanatics.com/threads/actioncriteria-for-conditional-database-updates.695263/
The AI can be configured to scale with difficulty. We have to have a good AI to do that.

It has it's own system for that.
 
A bug that is driving me crazy is that if an AI Civ's Army is planning to attack, or on the way to attack, or attacking an Independent Nation, and any nation becomes suzerain of the Independent Nation, the Army gets stuck forever doing nothing.

These can be quite large armys stuck the entire game, taking zero actions.

This is due to the check for if you can attack an Independent Nation is if they are Hostile to you.

And Independent Nations are still Hostile to you as a check in the DLL, even when a nation you are not at war with is Suzerain of them.

I hate it so much. I think the only thing I can come up with is making it so that the AI never tries to attack a Independent Nation, and instead just defends against them.

But I'm open to ideas.
 
There are additional variables I can try for checking status.

But there's still the problem that there's this operation that exists, that cannot be used. You have an Army assigned to this operation setup.

I don't know how to release them from the contract, and just end the operation. Operations run every turn.

I can have other operations steal them if they need someone, but it's hard just force a left. It doesn't seem to work for me.

I need to come up with some way to disperse the operation, or drop it to zero to start again asking if it needs one. And then hopefully not concluding it needs one against an Independent with a Suzerain
 
A bug that is driving me crazy is that if an AI Civ's Army is planning to attack, or on the way to attack, or attacking an Independent Nation, and any nation becomes suzerain of the Independent Nation, the Army gets stuck forever doing nothing.

These can be quite large armys stuck the entire game, taking zero actions.

This is due to the check for if you can attack an Independent Nation is if they are Hostile to you.

And Independent Nations are still Hostile to you as a check in the DLL, even when a nation you are not at war with is Suzerain of them.

I hate it so much. I think the only thing I can come up with is making it so that the AI never tries to attack a Independent Nation, and instead just defends against them.

But I'm open to ideas.
Does this happens also in base game?

I've never seen units "completely immobile", I guess there's a way the base game handle this in the code?
 
A bug that is driving me crazy is that if an AI Civ's Army is planning to attack, or on the way to attack, or attacking an Independent Nation, and any nation becomes suzerain of the Independent Nation, the Army gets stuck forever doing nothing.

These can be quite large armys stuck the entire game, taking zero actions.

This is due to the check for if you can attack an Independent Nation is if they are Hostile to you.

And Independent Nations are still Hostile to you as a check in the DLL, even when a nation you are not at war with is Suzerain of them.

I hate it so much. I think the only thing I can come up with is making it so that the AI never tries to attack a Independent Nation, and instead just defends against them.

But I'm open to ideas.
That reminds me of a bug back in Civ 6 when AI units would get stuck and they said the “strategic AI” and “tactical AI” were conflicting with each other. One would tell it to attack but the other said to hold because they are at peace with the party (or cease fire or something like that). But the issue was one arm wasn’t talking to the other so the unit would be stuck doing nothing. Maybe similar - just an idea. I can’t remember how the devs or Firaxis solved it.
 
Example of weird independent behavior - they stepped out of their village leaving it undefended, easy for me to walk in and disberse the next turn.

(reminds me of the bug back in Civ 6 when barbs would leave camps undefended )

Figured out the reason - they're attacking the city to the west. AFter I dispersed it, next turn they just ignore me and all move west


20250217095610_1.jpg
 
Last edited:
Ah-ha, that probably explains the two idle armies I've found this game so far. Personally, I think an update to make them stop attacking independents is better than having a whole army stuck until a better solution can be found.
Is there a priority system for operations, where you could flag them to urgently defend their nearest city to break the op?

There is a priority system for operations, but it doesn't work that way. I can have defense steal units to the minimum. But then I need more units than possible to attack, and I still haven't seen it actually steal and clear them appropriately, because they can steal from any operation or recruit units
 
Not that this is necessary, but I just wanted to report back that I've not experienced a single issue with loading a saved game, either during gameplay or after restarting the game client, since after I moved to 1.07.


Presumably this is what I experienced in my game, earlier tonight...


The story in that image is that I purchased a few units for Sundapura, with influence, since they were getting attacked, and afterward, noticed those freshly purchased units were just stacking up in the city and not moving out, which I thought was odd. Then, when I finally moved into range of Tarsus, there was a second death stack of units, which did end up dispersing upon me as I got closer. Finally, when I was about to take the city itself, I had to fight three stacked units on the same turn (Immortal / Archer / Archer) before I was able to occupy it.

In a previous game I played, it sure felt like the AI had an endless amount of troops as I was fighting them in a fairly small area, and it makes me think that the same death stacks accumulated in the fog of war, and then dispersed upon me when I finally got close enough to grab their attention.

Assuming that what I've described above is the result of AI armies getting stuck when trying to fight independents, then I'll agree with JumpShark, in that it seems that the simplest solution, right now, is to keep the AI players from attempting to attack them, and either befriend or just defend, until something else can possibly be figured out.

------

The last thing I'll mention is that, as I learn the mechanics of the game I've only been using your mod while playing on Viceroy difficulty, and in the early game, hostile independents will quickly overwhelm me if I don't have 3-5 military units and a commander ready to defend my starting cities. In an attempt to move to Sovereign difficulty, I was being overrun by independents if too many were hostile and I couldn't befriend them fast enough. Now, I know that I'm still bad at this game, but is it your AI mod that is making the early game independents this difficult or is also a vanilla thing? I have no vanilla AI experience to compare to, but the independents seem to be capable of producing 4+ military units of their own, fairly quickly, and be on my doorstep without much of a warning. I might've considered that an AI player spent influence with the hostile independents and had them target me with a raid, but I have no way of verifying if that's what actually happened, or if the AI even considers spending influence on that option as a valid operation when interacting with an independent nation.

Base game, I have made zero changes to independents. I watch them almost kill or kill nations all the time in autoplays. It's basically random chance that 2 hostile ones spawn near a civ, and it's a very very very difficult game for them.
 
You have way more experience with the trees than I do at this point but I see this node type:
<Row NodeType="Limit Turns" NodeId="48" ShapeId="3">
<Description>Limits child to N turns before returning failure</Description>
</Row>
Can this be used for a time limit on the operation ?

No, if you return failure, then you just run no other commands that require that passing. Which is the same thing that is happening, they can't attack the independent so it returns failure, and just tries again next turn.
 
Example of weird independent behavior - they stepped out of their village leaving it undefended, easy for me to walk in and disberse the next turn.

(reminds me of the bug back in Civ 6 when barbs would leave camps undefended )

Figured out the reason - they're attacking the city to the west. AFter I dispersed it, next turn they just ignore me and all move west


View attachment 720346
I don't know if I can call that a bug though. Because Independents are new, and their attacking is so aggressive, if I make changes to them, I'm changing the base difficulty, and not the AI.

I really would prefer not to change independents.
 
Streaming on Twitch my repeated attempts to fix the stuck AI issue. andynemmity
 
Looks like shutting it off is the best solution. No more stuck units. Just a lot more defending needed
 
Nope, now I can see it happens with city attack too.

It happens whenever the target of the attack is no longer valid
 
This version in autoplays right now seems the most reasonable. There are obviously still challenges, but it’s pretty damn good all things considered from the base game
 
There are still base game stuck armies. Usually an army that is not packed up, near mountains or water.

The units can’t seem to get around the commander and they are indefinitely stuck
 
Back
Top Bottom