Difference between revisions of "Talk:Tank/Cannon"

From UFOpaedia
Jump to navigation Jump to search
(→‎Tank Ammo Number: new section)
Line 1: Line 1:
 
Does anyone know where the ammo number is held for the Tanks? I've been told its in Geoscape.exe, but it's hard to find. [[User:KingMob4313|KingMob4313]] 10:37, 25 April 2010 (EDT)
 
Does anyone know where the ammo number is held for the Tanks? I've been told its in Geoscape.exe, but it's hard to find. [[User:KingMob4313|KingMob4313]] 10:37, 25 April 2010 (EDT)
  
== Tank Ammo Number ==
+
== Tank Ammo Change ==
  
It is not a single field that you change to alter a tank's ammo number but a variety of fields would have to be altered throughout Geoscape.exe and Tactical.exe in order to implement such a change without causing problems to your stocks of ammunitionMost of these changes deal with how much ammunition is checked to ensure you can load the tank on a plane and then how much to remove or add to the base's stores when the tank is loaded/unloaded from a plane (such as at the end of each combat.) I found some of them but haven't yet found them in TACTICAL. :(
+
There are 5 places in GEOSCAPE that must be changed to alter the ammo amount of a tank without causing problems with base inventory.  Three are simply changing a bit to reflect the new ammo amount you want and having that amount passed to TACTICAL.  The real problem is the two sections of code that handle equipping your craft after a battle. In each of these sections, there is a field that checks if you have enough ammo for all the tanks of the same type and two others that deal with subtracting enough ammo from the total to equip a tank and passing the remainder to your base stores along with the number of tanks that couldn't be fully equippedThese areas are a somewhat obfuscated so a casual glance with a hex editor will not help you.  They also require you to rewrite the code to implement the changes.  (There are two similar segments: I don't know when one of the segments is actually referenced by the program. Base Defense?...But since it is exactly the same as the other...CYA).  
  
[[User:Morgan525|Morgan525]] 08:07, 29 December 2011 (EST)
+
[[User:Morgan525|Morgan525]] 13:55, 4 January 2012 (EST)

Revision as of 18:55, 4 January 2012

Does anyone know where the ammo number is held for the Tanks? I've been told its in Geoscape.exe, but it's hard to find. KingMob4313 10:37, 25 April 2010 (EDT)

Tank Ammo Change

There are 5 places in GEOSCAPE that must be changed to alter the ammo amount of a tank without causing problems with base inventory. Three are simply changing a bit to reflect the new ammo amount you want and having that amount passed to TACTICAL. The real problem is the two sections of code that handle equipping your craft after a battle. In each of these sections, there is a field that checks if you have enough ammo for all the tanks of the same type and two others that deal with subtracting enough ammo from the total to equip a tank and passing the remainder to your base stores along with the number of tanks that couldn't be fully equipped. These areas are a somewhat obfuscated so a casual glance with a hex editor will not help you. They also require you to rewrite the code to implement the changes. (There are two similar segments: I don't know when one of the segments is actually referenced by the program. Base Defense?...But since it is exactly the same as the other...CYA).

Morgan525 13:55, 4 January 2012 (EST)