How to stop AI to move units

Nefliqus

Prince
Joined
Sep 16, 2010
Messages
400
Location
Poland
In file CIV5MultiplayerOptions.xml is option MPOPTION_TAKEOVER_AI but this option (as all MP options) is not active. You can change it in xml file but it doesn't change game rules. It the game MPOPTION_TAKEOVER_AI is always true. I want to deactivate AI unit movements in MP. Pls don't ask why I want to do it. At the moment I'm able to set unit moment points to zero but it is not very clever solution and has some negative consequences. :)
Do you know any method to switch off MPOPTION_TAKEOVER_AI or deactivate AI unit movements system?

Is there any method to set unit TACTICALMoves to TACTICAL_UNASSIGNED or TACTICAL_HEAL?

Dose TACTICAL_UNASSIGNED mean don't move?
 
In file CIV5MultiplayerOptions.xml is option MPOPTION_TAKEOVER_AI but this option (as all MP options) is not active. You can change it in xml file but it doesn't change game rules.

That's because it doesn't change the game rules (at least not in the way you want), but it means that 'Players can "hot-join" into an AI civilization's slot at any time', that is, a new player can join the game by taking over an existing AI player, and not that setting it to false will somehow stop the AI from moving it's units, constructing new buildings/units etc, whatever.

If you want the AI to just sit and act passively in MP games, you're going to have to change the AI code in the DLL
 
Change all the units UNITAI to UNITAI_UNKNOWN. The AI will not move units with that unitai.
 
Change all the units UNITAI to UNITAI_UNKNOWN. The AI will not move units with that unitai.

Thx. Could I do it by lua function or only in XML file?

EDIT:
There is only GET function :(

if (pUnit:GetUnitAIType() == GameInfo.UnitAIInfos.UNITAI_EXPLORE_SEA.ID) then

but I could init unit with UnitAIType that I want.
 
side note: I don't know if you've looked at the source code yet Nefliqus, but there are some isMPOption(MPOPTION_SIMULTANEOUS_TURNS) in a few place there that should be interesting to investigate.

(there are also some PitBoss reference BTW)
 
Back
Top Bottom