Shortstop4313 Posted March 31, 2010 Share Posted March 31, 2010 Hello Everyone, Using the handy-dandy executable worksheet, and modifying it for the Windows version with the broke out 'Tactical.exe' I've been doing a lot of work to make HWP a lot more scary for both the Human and the Alien side. I felt this needed to be done, especially with the Reapers, since they are so laughable to fight. They are all but worthless, even on the higher levels of difficulty. However, I've run into a small issue: Ammo for the cannon tank. Does anyone know where the damage and number of shots is stored? I've edited the turret in the Ufo Defense.Exe to change the values, but I'm having problems changing the damage and the number of shots. 1) I can't find the number of shots for ammo reliably. It's not in Obdata.dat and I can't seem to find it (searching for just '1e' is like trying to sort hay) in the two EXEs.2) Changing the damage in the UFO Defense.EXE does not change the damage in the game, seemingly. Testing with Tactical.exe now. Can anyone HBO? Link to comment Share on other sites More sharing options...
Bomb Bloke Posted March 31, 2010 Share Posted March 31, 2010 1) I can't find the number of shots for ammo reliably. It's not in Obdata.dat and I can't seem to find it (searching for just '1e' is like trying to sort hay) in the two EXEs.It's in the GeoScape EXE segment. Afraid I can't be more specific then that. 2) Changing the damage in the UFO Defense.EXE does not change the damage in the game, seemingly. Testing with Tactical.exe now.It's in the Tactical EXE segment. The original DOS game used two EXEs, one for the GeoScape display, one for the Tactical display. The Windows version (CE) used one single EXE, which handled both the GeoScape and the Tactical systems. This can be "split" into two EXEs like the DOS version. When using the split executables (eg via XcomUtil), you're not using the "combined" EXE at all. Likewise, when using the combined EXE (which is usually called something like "UFO Defense.exe"), you're not using the split executables. Link to comment Share on other sites More sharing options...
Shortstop4313 Posted April 1, 2010 Author Share Posted April 1, 2010 It's in the GeoScape EXE segment. Afraid I can't be more specific then that. That's good enough, Mr. Bloke. At least I know where to look now. It's in the Tactical EXE segment. The original DOS game used two EXEs, one for the GeoScape display, one for the Tactical display. The Windows version (CE) used one single EXE, which handled both the GeoScape and the Tactical systems. This can be "split" into two EXEs like the DOS version. When using the split executables (eg via XcomUtil), you're not using the "combined" EXE at all. Likewise, when using the combined EXE (which is usually called something like "UFO Defense.exe"), you're not using the split executables. I've used X-com util in the past, so that makes perfect sense. I appreciate pointing me in the right direction. If I happen to find the offset, I'll pass along info about what I changed and what the bits around it looked like. Link to comment Share on other sites More sharing options...
Tycho Posted February 8, 2012 Share Posted February 8, 2012 That's good enough, Mr. Bloke. At least I know where to look now. I've used X-com util in the past, so that makes perfect sense. I appreciate pointing me in the right direction. If I happen to find the offset, I'll pass along info about what I changed and what the bits around it looked like. The main problem with modifying tank ammo is there are several areas that need to be adjusted in order to avoid inventory problems. There is one field in GEOSCAPE that sets the amount of ammo for the turrent in UNITREF.DAT. Another set of fields check to ensure you have enough ammo to load it onto a plane and then deduct the correct amount from base stores or add that amount to base stores when the tank is unloaded. Yet another field handles the post-battle craft reload which returns all unused ammo to the base and then attempts to re-equip the tank back to the plane. Finally, there is a duplicate set of fields in the same area of code (possibly for a base defense post-battle, but I am not sure on that). As part of this post-battle algorithm, there is a bit-shift that must be adjusted if you exceed 31 for the amout of ammo and adjusted again if you were to go over 63. If you use the DOS version, the code is pretty clear. In the CE version, they obfuscated a lot of the values. You can't adjust the rocket tank without also adjusting the FBL tank at the same time. (Not without adding new code to handle them seperately.) Link to comment Share on other sites More sharing options...
ForsakenXI Posted February 25, 2012 Share Posted February 25, 2012 https://www.ufopaedia.org/index.php?title=TACTICAL.EXE Link to comment Share on other sites More sharing options...
Tycho Posted February 26, 2012 Share Posted February 26, 2012 https://www.ufopaedia.org/index.php?title=TACTICAL.EXE TACTICAL stores the details about the amount of damage, the type of damage, and the TU cost and Accuracy on each attack type for the turrents. It is GEOSCAPE which sets the amount of ammo for each tank in UNITREF.DAT.In DOS1.4 the addresses are 4ED2A (AP), 4ED30 (rocket and FBL), and 4ED36 (beams). In my version of CE, the address for the cannon ammo is at 44ED27. Changes the areas will change the amount in battlescape but altering ONLY these areas will cause a host of inventory problems as one has to alter the code for adding a subtracting the appropriate amounts from base inventory when adding or removing tanks from crafts and post-combat. Link to comment Share on other sites More sharing options...
Tycho Posted April 13, 2012 Share Posted April 13, 2012 https://www.ufopaedia.org/index.php?title=User:Morgan525#Modding_the_Tank.2FCannon_into_a_Tank.2FChaingun Link to comment Share on other sites More sharing options...
Ros Posted December 25, 2015 Share Posted December 25, 2015 Feeling like an archeologist digging out almost 4 year old topic but anyway... TACTICAL stores the details about the amount of damage, the type of damage, and the TU cost and Accuracy on each attack type for the turrets.I want to make some changes to SWS stats mentioned above in my TFTD Windows CE version. I've found the right offsets, made the changes but some of them don't seem to appear in game.For example "amount of damage" for Displacer P.W.T which I set to 200 (same as Disruptor Pulse Launcher) in Ufopedia is still 140.It's the same problem as author of the topic found editing UFO Defense:2) Changing the damage in the UFO Defense.EXE does not change the damage in the game, seemingly. Testing with Tactical.exe now. I've done other changes in TFTD .exe (X-COM subs and USO's stats) and game accepted them without problem. Anyone got an idea why this time it's otherwise?? Link to comment Share on other sites More sharing options...
Tycho Posted December 25, 2015 Share Posted December 25, 2015 Feeling like an archeologist digging out almost 4 year old topic but anyway... I want to make some changes to SWS stats mentioned above in my TFTD Windows CE version. I've found the right offsets, made the changes but some of them don't seem to appear in game.For example "amount of damage" for Displacer P.W.T which I set to 200 (same as Disruptor Pulse Launcher) in Ufopedia is still 140.It's the same problem as author of the topic found editing UFO Defense: I've done other changes in TFTD .exe (X-COM subs and USO's stats) and game accepted them without problem. Anyone got an idea why this time it's otherwise?? This is because there is another set of data just used for the in-game UFOpaedia, since the game was originally two separate programs. Link to comment Share on other sites More sharing options...
Ros Posted December 25, 2015 Share Posted December 25, 2015 This is because there is another set of data just used for the in-game UFOpaedia, since the game was originally two separate programs.So it's somewhere in TFTD main .exe? Do You know in which offsets? Link to comment Share on other sites More sharing options...
Tycho Posted December 26, 2015 Share Posted December 26, 2015 So it's somewhere in TFTD main .exe? Do You know in which offsets? the table starts at offset 0x48B564 Link to comment Share on other sites More sharing options...
Ros Posted December 26, 2015 Share Posted December 26, 2015 Thanks Tycho! You're the man :-) One more thing. You wrote that when changing the amount of tank turret ammo there are couple of fields in Geoscape.exe / Main .exe (for CE version) that'll need to be changed as well.These are just specific offsets? Is there any list of them? Link to comment Share on other sites More sharing options...
Tycho Posted December 26, 2015 Share Posted December 26, 2015 Thanks Tycho! You're the man :-) One more thing. You wrote that when changing the amount of tank turret ammo there are couple of fields in Geoscape.exe / Main .exe (for CE version) that'll need to be changed as well.These are just specific offsets? Is there any list of them? it's not just a few offsets, you would have to change the checks and then the calculations. The entire routine that handles checking ammo and swapping it between the tank and base is hard coded to the existing values of each turrent. Changing this for just one tank was the biggest problem I had, and that was in EU. I've never looked at that code in TFTD. Link to comment Share on other sites More sharing options...
Ros Posted December 26, 2015 Share Posted December 26, 2015 Sounds very complicated to me and my nonexistent coding skills.it's not just a few offsets, you would have to change the checks and then the calculations. The entire routine that handles checking ammo and swapping it between the tank and base is hard coded to the existing values of each turrent. Changing this for just one tank was the biggest problem I had, and that was in EU. I've never looked at that code in TFTD.But You've managed overrode that code modding the Gauss Tank in TFTDextender?BTW, sorry for all those questions but I'm just curious as I admire very much both Your modding skills and amount of work in EU and TFTD. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now