Thread Tools
Old December 16, 2000, 03:21   #1
St Leo
Scenario League / Civ2-CreationApolytoners Hall of Fame
 
St Leo's Avatar
 
Local Time: 02:08
Local Date: October 31, 2010
Join Date: Jul 2005
Location: In search of pants
Posts: 5,085
Is Movement a Float?
Harquebusiers, no, 0, 1.,0, 1a,1d, 1h,1f, 1,0, 1, no, 000000000000000

As you all know, unit movement ranges have a dot at the end. Now, my question is as to whether something along the lines of 0.1 constitutes a valid movement range. If it does, does the game always allow the unit to move into something with high movement cost as it does with 1 move units and does the game display it as 0.1 or 1/10?

------------------
St. Leo
http://www.sidgames.com/hosted/ziggurat/
http://www.sidgames.com/forums/
St Leo is offline  
Old December 16, 2000, 16:16   #2
DarthVeda
Emperor
 
DarthVeda's Avatar
 
Local Time: 02:08
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Baltimore, MD
Posts: 4,325
Yes, it's a float considering that the game has to make the units interact with things like roads.

Maybe changing it to .3 makes it so the unit can only use roads?
DarthVeda is offline  
Old December 17, 2000, 23:33   #3
William Keenan
Scenario League / Civ2-Creation
Prince
 
William Keenan's Avatar
 
Local Time: 01:08
Local Date: October 31, 2010
Join Date: Sep 1999
Location: New Jersey, USA, Earth, Sol, Milky Way
Posts: 705
No, it's not a float. Its a byte, but it can be manipulated to create fractional movement points.

Some where in the forum I wrote a long discription of how civ uses the value and how it can be manipulated to create fractional movement values. It did not get much interest at the time. I'll see if I can locate the thread.
William Keenan is offline  
Old December 17, 2000, 23:52   #4
William Keenan
Scenario League / Civ2-Creation
Prince
 
William Keenan's Avatar
 
Local Time: 01:08
Local Date: October 31, 2010
Join Date: Sep 1999
Location: New Jersey, USA, Earth, Sol, Milky Way
Posts: 705
OK I found it, An interesting discovery

When civ2 reads the rules.txt it takes the unit's movement value and multiplies it by the Road movement multiplier, then stores the result in a signed byte. The trick is to use an odd Road movement multiplier and a very high movement allowance in the rules.txt to make the byte overflow so that the resulting value no longer is evenly divisable by the Road movement multiplier. Thus, you can achive fractional movement allowances.
William Keenan is offline  
Old December 18, 2000, 02:25   #5
Kull
lifer
King
 
Local Time: 23:08
Local Date: October 30, 2010
Join Date: Mar 1999
Location: El Paso, TX USA
Posts: 1,751
I remembered that too, but couldn't find it. In a related vein, my web page is undergoing a HUGE refurbishment and will now include a "Design Tips" section featuring insights gleaned from the forums. Can I add your "Fractional Movement Allowance" discovery, William?

This is a bit of a thread-jack, but if anyone recalls making a discovery and publishing it here (and nowhere else), point me to it and I'll add it the web site. It would be a shame to lose stuff like this!
Kull is offline  
Old December 18, 2000, 22:38   #6
William Keenan
Scenario League / Civ2-Creation
Prince
 
William Keenan's Avatar
 
Local Time: 01:08
Local Date: October 31, 2010
Join Date: Sep 1999
Location: New Jersey, USA, Earth, Sol, Milky Way
Posts: 705
Any and all are free to use, quote, or document, this or any other discovery I have made.

If you have design guides we could add them to the Cradle of Civ, Kull.
William Keenan is offline  
Old May 27, 2003, 21:02   #7
St Leo
Scenario League / Civ2-CreationApolytoners Hall of Fame
 
St Leo's Avatar
 
Local Time: 02:08
Local Date: October 31, 2010
Join Date: Jul 2005
Location: In search of pants
Posts: 5,085
Could this be tip be better phrased? The referenced thread no longer exists.
__________________
Blog | Civ2 Scenario League | leo.petr at gmail.com
St Leo is offline  
Old May 27, 2003, 21:27   #8
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 01:08
Local Date: October 31, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Can't really help with the paraphrasing. WK's original quote was:
Quote:
You can get some strange, but predictable, results by using very high movement points. This is due to the way computers do math and how it handles numbers larger than the field was designed to hold. - William Keenan, August 19, 2000
Leon Marrick did some clear explaining of it on CivFan.
http://forums.civfanatics.com/showth...threadid=25936

This work was begging to be spreadsheeted, so I made a simple xls to calculate the values for entry into the Rules.txt for a desired mf. Just put in the road bonus. Also calculates the max mf allowed for a given road bonus.



The zipped xls can be found here
Boco is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:08.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team