How do I fix this: disembarking problem

Craig_Sutter

Deity
Joined
Aug 13, 2002
Messages
2,773
Location
Calgary, Canada
I have made two changes to naval movement in my mod... as follows:

In GlobalDefines:

Code:
<Update>
			<Where Name="EMBARKED_UNIT_MOVEMENT"/>
			<Set Value="24"/>
</Update>

In Terrain:

Code:
<Terrains>
		<Update>
			<Set Movement="3"/>
			<Where Type="TERRAIN_COAST"/>
		</Update>
</Terrains>

There is no problem actually loading this... it is doing what it is supposed to do.

However, I'm having an unintended side effect which I am wondering how to correct. Units seem unable to disembark. I've tried workers, settlers and scouts so far. None can disembark onto land. Land always has a 2 on it as far as turns it would take to land there. Is there some file that sets disembarkation movement? Is there something that I am missing? Should I consider changing all terrain to 3 (except Ocean, which was my intent in the first place)? Would this fix the problem?

Any advice would be appreciated.
 
and they are embarking without problems ?
 
They appear to embark normally... they use their movement up in the first embark move, then the next turn, they can move the full 24 points.

I should note, I gave the civ. the Polynesian ability to embark units from the beginning of the game.

The disembarking problem happens in all terrains that I've tried, and even when entering a friendly city. The land hex always says 2 turns when highlighted for movement. Ordinary mouse over movement and using the icon command, diembark, both do not work.

I'm going to try changing the movement for some other terrains to 3 to see if that changes things.
 
Well, I made plains to be 3 movement points and gave scout a move of 6, tripling it. Same result... I tested the scout unit on home cities, grass and plains (which I had changed). There was no difference.

Something in the code requires the hex the unit is disembarking from to be 1 movement point.

By the way, I tried berserkers as well, with no effect.
 
I don't think you need any minimum number of movement points to move into hex. As long as it's any number above 0, you should be able to make a move.

What you describe sounds weird, maybe something in the game engine. I don't think there are any checks of disembarking conditions in lua code at least.
 
Finally tracked down the bug... and it must be a bug.

The problem had nothing to do with increasing the movement cost for coast hexes. It had to so with the embarked movement.

Movement points values of 5 or less, there was no bug. At 6 and higher, units were unable to disembark.

I don't know why this is the case. If you wish to test this yourself, here is the code. It would be nice if someone else could confirm:

Code:
<Defines>
	<Update>
		<Where Name="EMBARKED_UNIT_MOVEMENT"/>
		<Set Value="6"/>
	</Update>
</Defines>

At a value of 5, there is no bug.

Next, I am going to determine if movement point modifiers affect this or not. I'll test the lighthouse wonder, and promotions and techs that add naval movement.
 
Tested: The bug kicks in when a tech is used to increase embarkation movement to above "5".
Tested: The Great Lighthouse... did not add movement to embarked units. Only affects "military" naval units.
Tested: Trait "Ocean Movement".... bug kicked in when Elizabeth's trait was added.
Tested: Ocean Movement promotion - bugged.
 
so I have come to the conclusion that anything that increases embarked movement beyond 5 will introduce the disembark bug... Which leads to the question... Elizabeth + astronomy + Great lighthouse = 6 move including the simple value of 2. Why has this not shown up before?

I intend to test Elizabeth next in simple mod to see if the bug occurs.
 
Back
Top Bottom