Savegame Hacking  
INTRO | NOTES | OBJECT XTZ COORDS | ASTEROID YEILD

 

INTRO :

This document provides the necessary information to alter certain elements of the X-BTF game. The procedures described require a Hex Editor and basic knowledge of hexidecimal numbers.

Hexidecimal numbers are used in many computing applications as they can be processed very quickly. Humans tend to count and think in batches of ten. We have ten fingers and ten toes so it makes sense. It's also very easy for us to divide and multiply by 10. Our numerical notation uses 10 digits (0-9) and is called decimal notation. Computers however, due to a quirk of their electronic anatomy, work faster with batches of 16. This is called base 16 arithmatic and it's numerical notation has 16 digits. The extra five digits for the numbers 10-15 are represented by the letters A to F. This is known as hexidecimal notation.

Decimal1234 56789 1011121314 15161718
Hexidecimal123456789ABCDEF101112

You can see the correlation between decimal and hexidecimal numbers in the following examples.

Decimal Arithmatic Hexidecimal Arithmatic
42 4x10+2 2A 2x16+10
162 16x10+2 A2 10x16+2
79 7x10+9 4F 4x16+15

And so on .. other useful numbers are..

Decimal0324864128255
Hexidecimal020304080FF

The calculator that comes with Windoze 95/98/00* or your favourite Unix desktop calculator will convert decimal to hexidecimal for you. You will need a Hex Editor.. there are plenty of free programs on the Internet that let you edit hexidecimal data files. (search www.zdnet.com downloads for 'hex editor') and grab one for free.

* Click Start Menu > Programs > Accessories > Calculator > View > Scientific in Windows for the calculator.

wraith

NOTES :

This information is current as of 27 May 2000, it is valid at least for XBTF patch levels 1.9b and 1.96

The information below is credited to Jeff A. Bordeaux (aka JeffB). The author assumes NO RESPONSIBILITY for any consequences of using this information in any way whatsoever. You're on your own out there people.


  1. In-sector XYZ coordinates, and hacking object XYZ coordinates.

    1. This section describes the XYZ coordinate system in XBTF, how to find the XYZ coordinates of FIXED objects (stations and asteroids ) in your save file, and how to change them.

    2. Some basic background:

      In - Sector XYZ coordinate units are equivalent to APPROXIMATELY 1/222 of a meter. A meter is 222 coordinate units. A kilometer is 222000 coordinate units. The X coordinate represents west / east, with the negative X axis pointing toward the west. The Y coordinate represents north / south, with the negative Y axis pointing towards the south. The Z coordinate represents up / down, with the negative Z axis pointing down.

      The most extreme coordinate set of a significant object in XBTF is the Pirate base in Ore Belt, at the following XYZ coords:
      -0822600 +16188000 +1169400
      This places it at the extreme north off of the TacNav display.

      The most extreme coordinate set of a significant object that is still on the TacNav display is a Wheat Farm in Herron's Nebula, with a Y coordinate of +7681800.

      Jumpgates are at Z=0, with X and Y of plus or minus 7200000.

    3. Method for changing the in - sector location of a FIXED object:

      BACK UP YOUR SAVEGAMES until you get practiced at this!

      This works for any FIXED object; a player factory, any of the default XBTF stations, or asteroids. It can also be convenient to relocate Argon One after the main story has been completed, to move it away from the 'parked' position by the south gate in Argon prime.

      Some cautions:

      NOTE: For some reason if you attempt to hack the savegame for an object that is in your CURRENT sector, the XYZ coordinates often appear more than once (usually 3 times for asteroids). Each occurance IS somewhat different however; only ONE occurance will have something like what I am calling the 'Object ID' (unless the object SHARES the same coordinates with another object in another sector). You MIGHT find it easier to just fly away by at least 2-3 sectors after writing down the coordinates, THEN save the game and attempt hacking it.

      It IS possible for two or more objects from DIFFERENT sectors to share the same XYZ coordinates. In this case it is recommended that you back up your savegame, change one object at a time, and then restore the savegame if necessary and try changing the next object until you have verified that you have relocated the DESIRED object.

      Also some duplications 'come and go' I suspect that freighters also store the XYZ coords of thier destinations. In this case you can try flying around a while, and try again later.

      OR you can throw caution to the wind and change EACH occurance of a particular XYZ coordinate. You will need to do this anyway of you are, say, changing an asteroid coordinate for your CURRENT sector in the savegame. If you JUST changed one of three occurances of an asteroid for your CURRENT sector, the one with the 'object ID' described below, but NOT the other two occurances, then when you undock the asteroid will NOT appear to be relocated until you leave the sector and return.

      First target the object that you want to move. Activate the camera with the F3 key. From the left side of the camera display, write down the XYZ coordinates - to make things easier later on write them down in the order of X Z Y.

      Convert the X Z Y coordinates to hex, 4 byte SIGNED integers. When dealing with NEGATIVE coordinates and converting them, then you MIGHT find it easier to reverse the sign (make the X Z or Y positive), SUBTRACT from 4294967296 and then convert the RESULT to hex. OR just convert the negative coordinate to hex, but ONLY keep the least significant (rightmost) 4 bytes.

      Decide WHERE you want the object. Convert your NEW coordinates to hex and write them down.

      Look for the old coordinates in the save file. There should be ONE occurance with an 'Object ID'. The format is as follows:

      ID ID ID ID 00 00 00 03 XX XX XX XX ZZ ZZ ZZ ZZ YY YY YY YY

      The meaning of '00 00 00 03' is unknown, but you don't need it. The Object ID resembles something like 39 B4 6A 1F, and the first byte seems to ALWAYS be '39'.

      Change the coordinate. In the case of an asteroid, WRITE DOWN the 4 byte 'Object ID', you will need it later if you want to change the mineral yield.

      NOTE: Each time you start a NEW game, the 'Object ID' for all objects (or at least most of them) are DIFFERENT! You need to derive the object ID for asteroids for EACH NEW game that you start.

      "Real World" example:
      Lets move the Pirate Base in Ore Belt so that it shows up on the TacNav display when we press the 'n' key.

      The Pirate Base is at X -0822600, Y +16188000 and Z +1169400 Writing this down in the order XZY and converting to hex: FF F3 72 B8 00 11 D7 F8 00 F7 02 60

      Then searching in the save file :

      39 A3 23 45 00 00 00 03 FF F3 72 B8 00 11 D7 F8 00 F7 02 60
      ID ID ID ID 00 00 00 03 X_________ Z_________ Y_________

      Again, each time you start a new game, the ID changes - it WON'T necessarily be 39 A3 23 45.

      Lets move it to the northeast corner of Ore Belt, just off of the 'grid' of the 'Ecliptic Projector' (X and Y +5550000), and 5 KM up (Z +1110000); converting the DESIRED coordinates:

      00 54 AF B0 00 10 EF F0 00 54 AF B0
      X_________ Z_________ Y_________

      So in the savefile replace
      FF F3 72 B8 00 11 D7 F8 00 F7 02 60
      with
      00 54 AF B0 00 10 EF F0 00 54 AF B0

      Remember that if you changed the object when you are CURRENTLY located in the same sector, if you ONLY changed the occurance with the 'Object ID', that it will NOT appear to be moved until you leave the sector and re - enter. Generally it is better to LEAVE the sector, travel away by at least 2-3 sectors, save the game, and THEN change the coordinates.

      Suggested uses : Arrange your factories in 'neat EXACT rows and columns'. Move asteroids AWAY from Xenon prone gates so that the mines that you build on them will be safer. Re-arrange sectors so that they are optimized for freighter traffic.


  2. Changing the asteroid yield.

    1. This section describes how to change the mineral yield of asteroids.

      The yield determines how FAST the factory runs - it DOES NOT change how much resources (energy cells) are needed to produce the product (Ore or Silicon Wafers). If you maximize the yield of an asteroid to 255 (one byte - it COULD be a 4 byte value but I never tried values greater than 255), then in general you make more money because you have more product more often, and if the mine also serves as a resource for your Chip Plants and Missile Factories, you are in a better financial position, your factories generally need to go out - of - sector for Ore or Silicon less often.

      You need to change the yield BEFORE you build a mine.

      Example rates for an Ore Mine:
      Ore yield 1; after mining produces approximately 0.3 Ore / minute
      Ore yield 64; after mining produces approximately 7.2 Ore / minute
      Ore yield 255; after mining produces approximately 26 Ore / minute

    2. Method : First aquire the XYZ coordinates of the asteroid using the camera (F3 Key), WRITE DOWN the coordinates and the yield (using the mineral scanner / "i" key), convert to the coordinates and yield to hex, and find the asteroid coordinates in the save file. WRITE DOWN the object ID. At this time relocate the asteroid to another XYZ coordinate if desired.

      From the TOP of the save file search for the OBJECT ID. There should be TWO occurances; one you have already found (associated with the XYZ coordinates), and the other one which is associated with, among other things, the mineral yield. The occurance associated with the coordinates appears to ALWAYS be the second occurance (so far).

      In the first occurance of the Object ID, counting the FIRST byte of the Object ID as 'offset 0', count over to offset 31. That value is the yield. DOUBLE CHECK just to make sure! If you are changing a Silicon 26 asteroid, then the yield at offset 31 should be 1A in hex.

      Change this value at offset 31 to FF to make it a yield 255 asteroid. The mineral scanner should now reflect the change, and any mine built on this asteroid will have a superior rate of production.

JeffB

 

  Home. Chart of All Systems. Details of All Races. Items Available. Survival Guide. Chart and Report Help