Make the AI settle on its starting position

Akbarthegreat

Angel of Junil
Joined
Sep 23, 2010
Messages
1,846
Location
Erebus
Either make the AI always settle where it spawns, or at least greatly reduce its tendency to move away from the spot. Would this be easy to change (in XML or python)?
 
Python or dll but not xml.

In Python, I guess that on the first turn you could check for Settlers and issue a pushMission for the MISSION_FOUND.

If it's for a FfH2 Mod, I think that you have excellent modders/coders in that part of the forum that can help you. I'm assuming this because you mentioned in the Quick Modding Questions thread that the problem was that Settlers had an increased visibility which made the AI postpone their decision to settle. In plain BtS, I think that the AI almost always settle on the initial spot. In a sense, it would be best to just give back to Settlers their normal BtS visibility!
 
I was under the impression that the AI will always found on its starting spot no matter what.
 
Probably yes, I didn't check the code. In a sense, it's logical since Settlers spawn on selected best starting plots. But the FfH2 world is so heavily modded...
 
Python or dll but not xml.

In Python, I guess that on the first turn you could check for Settlers and issue a pushMission for the MISSION_FOUND.

If it's for a FfH2 Mod, I think that you have excellent modders/coders in that part of the forum that can help you. I'm assuming this because you mentioned in the Quick Modding Questions thread that the problem was that Settlers had an increased visibility which made the AI postpone their decision to settle. In plain BtS, I think that the AI almost always settle on the initial spot. In a sense, it would be best to just give back to Settlers their normal BtS visibility!

Infact I tried editing this a bit. On turn 0 I removed the additional visibility and movement and erased the extra tiles they had seen. A lot of AI's still chose to move.

I was under the impression that the AI will always found on its starting spot no matter what.
Probably yes, I didn't check the code. In a sense, it's logical since Settlers spawn on selected best starting plots. But the FfH2 world is so heavily modded...

Oh. I didn't know that the AI didn't move at all on unmodded. Never seen it I guess. So I'll take this to the FFH2 forums. Thanks anyway :D
 
Yeah, maybe you should find out if FFH changed this, and how. I think the base game lets the AI settle right away because the initial tile is usually optimal and it would waste too much time walking around otherwise.
 
Unmodded, this DLL code appears to be what makes the AI settle in place:
Spoiler :
Code:
void CvUnitAI::AI_settleMove()
{
	PROFILE_FUNC();

	if (GET_PLAYER(getOwnerINLINE()).getNumCities() == 0)
	{
		if (canFound(plot()))
		{
			getGroup()->pushMission(MISSION_FOUND);
			return;
		}
	}
 
Back
Top Bottom