December 16, 2000, 03:21
|
#1
|
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/
|
|
|
|
December 16, 2000, 16:16
|
#2
|
Emperor
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?
|
|
|
|
December 17, 2000, 23:33
|
#3
|
Prince
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.
|
|
|
|
December 17, 2000, 23:52
|
#4
|
Prince
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.
|
|
|
|
December 18, 2000, 02:25
|
#5
|
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!
|
|
|
|
December 18, 2000, 22:38
|
#6
|
Prince
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.
|
|
|
|
May 27, 2003, 21:02
|
#7
|
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.
|
|
|
|
May 27, 2003, 21:27
|
#8
|
King
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
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 02:08.
|
|