• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Unit Movement Changes - is it possible?

abqaiq93

Chieftain
Joined
Apr 27, 2002
Messages
42
I just want to get an idea if these are possible to do and if so, what files should I start to change?


CIV 4 BTS

  • Inside cultural border the unit keeps their normal movement rate.
  • Outside cultural border everyone has a movement of one square per turn.
  • The line of sight is reduced to one square ahead of you. In other words you explore tile at a time. (Yes, I know very tedious)
  • When standing on a hill you see one tile further in the direction you are traveling. No more revealing the whole surrounding area.
Thanks for any help.
 
1+2 needs SDK changes.

3) Assets\XML\GlobalDefines.xml, these values:
PHP:
<Define>
		<DefineName>PLOT_VISIBILITY_RANGE</DefineName>
		<iDefineIntVal>1</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>UNIT_VISIBILITY_RANGE</DefineName>
		<iDefineIntVal>1</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>PEAK_SEE_FROM_CHANGE</DefineName>
		<iDefineIntVal>2</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>PEAK_SEE_THROUGH_CHANGE</DefineName>
		<iDefineIntVal>2</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>HILLS_SEE_FROM_CHANGE</DefineName>
		<iDefineIntVal>1</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>HILLS_SEE_THROUGH_CHANGE</DefineName>
		<iDefineIntVal>1</iDefineIntVal>
	</Define>

4) How do you determine, in which direction you are traveling?
 
Thank you very much. I have no idea how to determine which direction the unit would be moving. But with your answer to #3 maybe that will be good enough. I will start looking into the tutorials to make changes to the SDK for #1 and #2.

Thank you for giving me a starting point.
 
As far as #4 is concerned, there is a tag in the XML <bLineOfSight> (it is for UnitInfos), I think that might solve your problem.
 
Are you asking that one single tile be revealed when moving through unrevealed territory--not the eight tiles surrounding the unit? If so, this is a much more restrictive form of line of sight than just changing the XML values.

CvUnit in the SDK does have a facing direction, but AFAIK there is no provision for rotating a unit in-place because facing direction is strictly a graphical issue used when drawing a unit on the map. You could add this behavior, of course, but a lot of code is based on a visibility range.
 
Back
Top Bottom