User:Morgan525: Difference between revisions
| Line 8: | Line 8: | ||
By default most bug fixes and video pitch are enabled; For the rest, you need to activate them in the ini file. To use, just unpack the zip file in your XCOM directory, edit the ini file with any simple text editor, like Window's notepad, and start the TFTDextender.exe file. It looks for a file named "UFO Defense.exe" (you can arrange that in the ini file). Of course, if your computer fries while you're using it, I don't take any responsability... | By default most bug fixes and video pitch are enabled; For the rest, you need to activate them in the ini file. To use, just unpack the zip file in your XCOM directory, edit the ini file with any simple text editor, like Window's notepad, and start the TFTDextender.exe file. It looks for a file named "UFO Defense.exe" (you can arrange that in the ini file). Of course, if your computer fries while you're using it, I don't take any responsability... | ||
Do not hesitate to report any problem you encounter with it, I'll try to help you fix it. | Do not hesitate to report any problem you encounter with it, I'll try to help you fix it. | ||
==Comparison of Damage routines== | ==Comparison of Damage routines== | ||
Revision as of 01:36, 14 July 2012
I'm also known as "Tycho" on Strategycore forums. I've been learning about disassembly and C++ coding since December of 2011 because I wanted to mod the tank/cannon into a chaingun. I started playing with DOSbox but switched to the CE version and began focusing on its sound problems. I have tinkered with Seb76's UFOloader, added those fixes of my own, and rearranged Seb's INI file to make it less overwhelming to new users. I started helping Kyrub in his quest to convert UFOextender into one for Terror From the Deep but I guess I am now the main person doing it. You can find it here: File:TFTDextender.zip, as well as the original File:UFOLoader.zip.
TFTDextender
This section is about the loader I've been working on that is a conversion of the UFOloader which adds functionalities/fixes to the TFTD Collector's Edition (MS Windows version). The extender patches the program in memory, it does not modify the executable. The advantage is that it won't change the file on disk so there is little risk of destroying your game installation (still, it is wise to do a backup of your game folder before using this).
- You need the VC2008 runtime to run this program. If you don't already have it installed, you can get it here. Also if you want to use the mp3 patch, you need to have Windows Media Player installed.
- Some changes will be recorded to a game's save files so be aware of this fact when you change options and wonder why some changes don't work on games already in progress. Some changes will require you to restart the loader to have them take full effect.
By default most bug fixes and video pitch are enabled; For the rest, you need to activate them in the ini file. To use, just unpack the zip file in your XCOM directory, edit the ini file with any simple text editor, like Window's notepad, and start the TFTDextender.exe file. It looks for a file named "UFO Defense.exe" (you can arrange that in the ini file). Of course, if your computer fries while you're using it, I don't take any responsability... Do not hesitate to report any problem you encounter with it, I'll try to help you fix it.
Comparison of Damage routines
To explain, first the memory address of the Xcraft weapon is loaded to eax. Then the damage value is read from (eax+6) and loaded into bx. This value is sent to the random function where the value generated is returned through eax. Thereafter, the base value (ebx) is added to the random value (eax) for a range of 100-200%. The value of eax has edx subtracted from it (after extensive testing of several encounters and having edx displayed for each attack, edx always seems to be 0). eax is bit-shifted 1 space to the right {divided by two} and the final amount added to the amount of damage the craft has sustained (edi+0Ah). The result is that Xcraft weapons do 50-100% damage.
In the UFO case: the memory location for the UFO stats are set in ecx. Then the UFO weapon power is read (ecx+16h) and put into dx. Then this value is sent to the random funtion and again returned through eax (or ax as is the case here). ecx is set to zero and the random value is checked to see if zero was generated [cmp(compare) ax, cx]. If this is true, the program jumps past the section to assign damage to the Xcraft.
- The main routine for interdiction in DOS1.4 version is from 330B0~336A8.