Announcement

Collapse
No announcement yet.

Is Movement a Float?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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/
    Blog | Civ2 Scenario League | leo.petr at gmail.com

  • #2
    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?

    Comment


    • #3
      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.

      Comment


      • #4
        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.

        Comment


        • #5
          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!
          To La Fayette, as fine a gentleman as ever trod the Halls of Apolyton

          From what I understand of that Civ game of yours, it's all about launching one's own spaceship before the others do. So this is no big news after all: my father just beat you all to the stars once more. - Philippe Baise

          Comment


          • #6
            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.

            Comment


            • #7
              Could this be tip be better phrased? The referenced thread no longer exists.
              Blog | Civ2 Scenario League | leo.petr at gmail.com

              Comment


              • #8
                Can't really help with the paraphrasing. WK's original quote was:
                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.
                Fine Control of Movement and Hitpoints in Civ II: A Mathematical Explanation Although still a fairly obscure technique, fractional movement (units that move 1 and 1/3 squares per turn) is known to several scenario designers. The best claim of first invention probably goes to William...


                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
                El Aurens v2 Beta!

                Comment

                Working...
                X