Jump to content

TFTD extender (alpha)


kyrub

Recommended Posts

This is a conversion of Seb76's UFO extender to the TFTD game, currently in an alpha stage.

It requires the Collector's edition (CE) version of the game.

 

 

TFTD extender.

 

The program tries to fix the bugs that

- either remained in the game from UFO Enemy Unknown

- were introduced in the sequel

 

 

On top of classic extender functions, TFTD version fixes:

- non existant range attack of Hallucinoids

- Biodrone's melee attack

- underwater weapons reaction firing on land

- and it allows to side-step the unavailability of live Deep One

 

It gives options to avoid the most annoying TFTD features, like

- low underwater terrain variety

- message "Cannot intercept over land"

- corrupt land mission sound

- and it allows to setup only 1-stage "Liner ship" mission

- and reduce its general appearance.

There is an option to automatically spot the hidden aliens after turn 60 as well.

 

Finally, TFTD extender adopts a few modding options, scenarios and game rules, (the number was reduced from the original UFO extender), plus an extra option to play a quicker game, with Alien races appearing earlier in the game.

 

TFTD_extender_alpha.zip

 

 

The work is almost fully dependent on wink.pngSeb76 and Xusilak wink.png

Link to comment
Share on other sites

  • Replies 78
  • Created
  • Last Reply

Top Posters In This Topic

Gah! People keep releasing things. Hardly have time to give any of them more then a glance as a result. :blush:

 

Anyway! Got an error on launch: "Trying to patch the same place twice (0x00467392, 0x00467392)."

 

Played around with the ini a bit, and it seems to be caused by having the "Corrupted Background Land Sound" option enabled (which it is by default).

 

Just a note on this, if it IS the sound I'm thinking of, then 1) I suspect this bug is you messing with me, specifically :) 2) the sound is actually played as intended in the vanilla game, it's just really bloody annoying (to me, specifically :( ).

Link to comment
Share on other sites

Good work. I'm not that into mods for general play (well, the excuse is partly due to the fact I can't run the CE versions on my current laptop), but I dare say a lot of folks have been waiting for a TFTD Extender.

 

- NKF

Link to comment
Share on other sites

Good work.

Thanks, NKF.

 

1) I suspect this bug is you messing with me, specifically :blush:

Hehe. You suspect yourself... and you're right. Seb76 inserted a prevention/an alarm reacting against overwriting overwritten code, so that is it. Since you used exe modified at precisely that place, it went off.

 

2) the sound is actually played as intended in the vanilla game, it's just really bloody annoying (to me, specifically :) ).

Now, this is something I stopped to believe, I am more or less persuaded it is corrupted, either the sound is missing, or the adress is bad. Please, anybody who is familiar with TFTD: the ugly strong "hairdryer" sound in TFTD land terror missions - does it appear in the DOS version as well?

 

(I should probably put this as an option and not a default. But thanks to you, BBloke, I've seen the light, the sound is really horrible.)

Link to comment
Share on other sites

As far as I'm aware, the executable I tested with has no prior patches applied to it (if the time stamp is to be believed it was last modified back in '99 - gah! I keep seeing things that make me feel old!). Will try restoring a backup though.

 

Indeed it does make that sound in DOS, but the volume doesn't seem to be anywhere near as loud. If you're still not convinced it's intentional, have a listen to

.
Link to comment
Share on other sites

Gah! People keep releasing things. Hardly have time to give any of them more then a glance as a result. :blush:

 

I'd wish there would be a way to combine all the important fixes, mods, etc. in a single package for either game. Everyone making their own thing is OK but I'd be easier to have some things available on a single download (and making sure that they are compatible) rather than 10 different files to download and install.

Link to comment
Share on other sites

Hi, I'd be very interested in this too. I have the steam version though, and the loader is giving me a few error messages when I try and run it. I believe the steam version is the CE game though, but maybe it's different in some way?

 

Where did you get all the offsets for the patching process. I'm pretty desperate to fix a few bugs manually if I cant run this with my version of TFTD.

 

I managed to find the bio-drone melee accuracy, but an still looking for hallucinoid ranged-attack under water fix.. The bio drone melee is is in 0008b6e5 I think, and i suspect the hallucinoid ranged attack (under water) is a 0001 type entry a few bytes earlier (around 0008b62cin the .exe), but could you tell me where some of the other major offsets are (like the hallucinoid bug)?? I have searched around for an offset guide to the exe for TFTD but haven't found one...

 

Zombies stats page for them which was on this site is also missing now...

 

 

EDIT: OK got it working, good, some things you might change in next version.

 

aircraft ready message - change to submarine ready

stats on equip screen - change psi to M.C Skill etc.

Initial Base setup did not work for me... not sure why... have any facilities names changed between xcom1 and 2

Link to comment
Share on other sites

I pulled a completely clean install of TFTD CE and tried the extender again. Same bug as before, it's not complaining about a pre-patched EXE - I think the extender really is trying to patch the same location twice.

 

I chopped up the ini until it contained only two lines:

 

[Annoying]

Corrupted Background Land Sound=1

Still complains at me.

 

Would recommend turning on the pitch fix by default, by the way. I've yet to find a computer that doesn't require that fix "out of the box".

 

I'd wish there would be a way to combine all the important fixes, mods, etc. in a single package for either game. Everyone making their own thing is OK but I'd be easier to have some things available on a single download (and making sure that they are compatible) rather than 10 different files to download and install.

Not that TFTD has ten different mods worth installing, but I get what you mean. Some of the problems are that certain people want certain mods, and trying to combine them would make updating a nightmare. Heck, I decided to combine all of my stuff into one single pack ages ago, and even with just my stuff I have trouble keeping track of which files are the most recent! (Though part of this may be due to my tendency to create a new copy of a game on my drive whenever I start a new project for it).

 

Another big problem is that modding activity comes in bursts; it's uncommon for two authors to be doing any major work at the same time. Blade set up a modding interface into XcomUtil, but AFAIK I'm the only one who's tried to integrate with it (and last I was told the interface got changed, breaking the compatibility - but that could just as easily be my own fault, I haven't actually looked into the matter yet).

 

Zombies stats page for them which was on this site is also missing now...

Not sure what happened to that. It is indeed completely missing. Given that it was never finished, I'd assume he pulled it in favour of the corresponding UFOpedia.org page.

Link to comment
Share on other sites

EDIT: OK got it working, good,

Hi, Jace, welcome to this nice X-COM forum.

If you have some Steam version specific problem that you have succesfully solved, it would be nice, if you could describe how (for others).

some things you might change in next version.

 

aircraft ready message - change to submarine ready

stats on equip screen - change psi to M.C Skill etc.

Initial Base setup did not work for me... not sure why... have any facilities names changed between xcom1 and 2

All good suggestions, the last one you probably got right, so if you change to TFTD facilities' names, it could work.

 

[corrupted sound] Still complains at me.

 

Would recommend turning on the pitch fix by default, by the way. I've yet to find a computer that doesn't require that fix "out of the box".

That is very strange, there must be some bad mistake in the code. I am without any tools now, so next week I will cook a new version. If you have any other suggestions, keep giving them!

- I intend to externalize a few AI things as well, for those who wish put them in the game.

Link to comment
Share on other sites

Hi, Jace, welcome to this nice X-COM forum.

If you have some Steam version specific problem that you have succesfully solved, it would be nice, if you could describe how (for others).

 

All good suggestions, the last one you probably got right, so if you change to TFTD facilities' names, it could work.

 

 

Yes that was my first post, thanks for reply... Got TFTD recently and EU, looking at fixing some annoying bugs, checked this forum a few times over last week but noticed your new post only today.

 

To get TFTDEXT working, I deleted the line in the tftdextender.ini file that was causing the error message about the sound fix bomb bloke mentioned: Corrupted Background Land Sound=1.

 

Maybe one problem is, if you can't start extender properly and it encounters an error, it doesnt seem to quit. IT's still running as a process in Win7 for me despite eroor then close program, so maybe when you run it again you have two copies of the program running. So I check my Task manager and end any other active processes from the TFTD extender to avoid two copies trying to patch same bytes (which may have cause some of the other errors I was getting earlier).

 

The steam version also uses dosbox to run the game (a problem for the extender), if you run the loader it wont really adjust video, you get sound though but with a black screen (probably a screen res thing). But I can run it from the loader without dosbox if I instead set D3D=1 D3D Windowed=1 in the ini, but I find it crashes now and again (intercepts?), but I can initiate battles on landed subs. Its definately working though as the "all your base are belong to us" is on the menu and many features are visibly active... (craft ready message etc) but to test all functions of extender is a big job...

 

Good luck...

 

Still searching for Hallucinoid ranged attack fix been testing a few bytes in the exe but found nothing, can you tell me how you did that fix?

Link to comment
Share on other sites

So I check my Task manager and end any other active processes from the TFTD extender to avoid two copies trying to patch same bytes (which may have cause some of the other errors I was getting earlier).

While a problem in its own right, it's more a symptom then a cause.

 

The steam version also uses dosbox to run the game (a problem for the extender)

Steam contains both the DOS and CE releases of the game. The extender is CE-only, whereas Steam tries to run the DOS version by default - hence, don't let Steam launch the game for you, just run the extender directly. As mentioned above, just about all computers need to have one of the graphical patches enabled for CE to work properly - this is a bug in the game, and the extender just happens to contain some fixes for it (like the ones you found and enabled), which I'm assuming kyrub will have on by default for the next release. :blush:

 

That is to say, all CE users will have that problem, not just Steam ones.

 

Btw, NKF, dunno what laptop you have, but unless it runs Windows 3.11 (or worse, it's a Macbook), it shouldn't have much problem running CE. Sure you need to tweak things a little to get it to work under later releases of Windows, but this extender should contain all the patches required anyways, so...

Link to comment
Share on other sites

Still searching for Hallucinoid ranged attack fix been testing a few bytes in the exe but found nothing, can you tell me how you did that fix?

Does the hallucinoid ranged attack work (I put the question at the first place)?

If I am correct (and it workd), the mistake was in the alien AI, because it was wrongly adjudged to not use range attack (with calcinite and zombie), while it has the inbuilt turret. During reaction fire, the check was not run, so it fired. Hallucinoid has stats equal to Sectopod, so I found strange that they would want it without shooting... when ufopaedia says the contrary... who knows?

Link to comment
Share on other sites

Does the hallucinoid ranged attack work (I put the question at the first place)?

If I am correct (and it workd), the mistake was in the alien AI, because it was wrongly adjudged to not use range attack (with calcinite and zombie), while it has the inbuilt turret. During reaction fire, the check was not run, so it fired. Hallucinoid has stats equal to Sectopod, so I found strange that they would want it without shooting... when ufopaedia says the contrary... who knows?

 

I have read that some people have witnessed it work, but they don't say whether its underwater or not, but its also widely reported that the Hallucinoid never appears on land, so maybe you are right. It works, but is rarely used. There are comments somewhere that the ranged attack is "disabled" underwater but enabled on land. That statement might have been made because it is rarely seen or it might be zombie or someone else found a flag for it that was set incorrectly. eg https://www.ufopaedia.org/index.php?title=Known_Bugs_(TFTD).

 

Are there not flags somewhere for weapons that determine whether they are used on land or not. Some xcom weapons ARE disabled so these flags must exist.

 

The Bio-drone melee problem is a simple error in its melee accuracy right? So that's an easy fix...

 

Sorry, I'm new to these files and havent played the games for over 10 years so there is alot of info to catch up on.

 

Bomb bloke, yeah, the errors are from elsewhere, not multiple extenders running, I just found that after a quick re-test.

Link to comment
Share on other sites

Tried the Hallucinoid thing with the extender.

 

1) Now that I actually try to start a mission, I find I get memory access errors as soon as I leave the equip screen. Not sure what's triggering these. For now I've worked around it by wiping the ini of everything except the Hallucinoid and pitch fixes, will try to get some more testing in later to narrow it down to a specific feature.

 

2) Having the Hallucinoid fix enabled not only doesn't make them fire, it also immobilises them.

 

3) Not really related to this, but here's one for Tycho - while trying to provoke some jellyfish I left my squad unattended, and half of them ended up as zombies. Sure enough, explosion sounds accompanied their every move!

 

By the way, any chance of removing the underwater weapon limitations (so all guns work on land), and also allowing mag nav suits to fly on land?

Link to comment
Share on other sites

Btw, NKF, dunno what laptop you have, but unless it runs Windows 3.11 (or worse, it's a Macbook), it shouldn't have much problem running CE. Sure you need to tweak things a little to get it to work under later releases of Windows, but this extender should contain all the patches required anyways, so...

 

My current laptop's graphic card is all kind of messed up whenever it comes to any lower resolution full screen views. It locks up on a black screen and nothing responds so I have to force a reboot. Or if I do manage to break out and kill the program from the task manager, the resolution will be stuck at 640x480 until I reboot. This is not a happy lappy. Not fussed though, I'll be replacing this in due course.

 

- NKF

Link to comment
Share on other sites

If you enabled the D3D and D3D Windowed options in the extender, that should deal with it. Still, sounds like quite a mess you've got there. :O

 

Another option is the HQ4x scaler, which bumps the resolution up while keeping fullscreen mode. Actually kinda handy, since I've got similar problems (my main monitor can't handle the aspect ratio of the standard game, so the top/bottom of the game screen gets pushed out and is invisible to me; can't see health bars etc when playing. Doesn't stop me playing it that way though).

 

But I don't like HQ4x that much (or anything that looks "different", really), and for some reason it extends the bounds the mouse can move to beyond that of the visible screen area. Oy Kyrub, adding to the wish list, any chance of a standard 2x scaler, doubling the resolution without affecting the visible image?

Link to comment
Share on other sites

3) Not really related to this, but here's one for Tycho - while trying to provoke some jellyfish I left my squad unattended, and half of them ended up as zombies. Sure enough, explosion sounds accompanied their every move!

 

Try setting 0x428569 to 00 and see if that fixes the bomber-zombie issue.

update

Link to comment
Share on other sites

Indeed it does. :blush:

 

Got some more info on that other crash I encountered:

 

"XCOM crashed at 0x432448 with error 0xC0000005 trying to access 0xFFFFFFFF"

 

This seems to occur whenever I try to go into battle with "More Smoke" enabled (which it is by default).

Link to comment
Share on other sites

Indeed it does. :blush:

 

Glad to help!

 

Got some more info on that other crash I encountered:

 

"XCOM crashed at 0x432448 with error 0xC0000005 trying to access 0xFFFFFFFF"

 

This seems to occur whenever I try to go into battle with "More Smoke" enabled (which it is by default).

 

I don't know why but at the address 432448 it tries to read from the memory location 4DFB22. It seems that area hasn't been set. (which is exactly what the error messages is trying to tell us..) There are actually four instances in the program that try to read from that location. I ran the program and checked the area with a memory watcher. Those areas have data but how and where in the program they are set, is unknown to me. If I understand the code, I think that seb's loader has debug features enable. I think it is what is generating the error message. :) Which also could explain I've gotten more errors since I started using the loader... Anyone know if this is true and how to disable that feature?

 

UPDATE: I managed to disable the debug portion of the code. While the error message is generated by the debug script, it is not the source of the the error. The only thing I accomplished was to get the generic "The program has encountered an error and will be shutdown." message from Windows instead. :(

Edited by Tycho
Link to comment
Share on other sites

I gave it a go, but patching either of those values to that address still produces the same crash. I was modifying the EXE directly though, dunno if the loader actually uses the value there or overrides it with one of its own.

 

I can readily believe the game ignores most memory addressing errors. While playing about with the data files (map definitions and so on), I've noticed that when you ask it to read/write a memory address outside the expected bounds of an array it either just keeps on going to the next memory space (eg), or loops around and starts reading from the start again (eg, deleting half the tile definitions doesn't cause a crash when loading maps that use them, even if it ends up looking really weird).

Link to comment
Share on other sites

As far as I'm aware, the executable I tested with has no prior patches applied to it (if the time stamp is to be believed it was last modified back in '99 - gah! I keep seeing things that make me feel old!). Will try restoring a backup though.

 

Indeed it does make that sound in DOS, but the volume doesn't seem to be anywhere near as loud. If you're still not convinced it's intentional, have a listen to

.

 

For me too. I just downloaded TFTD from Gamersgate and added the loader. Got the same error about the land so I disabled that but still get the same error as BB when I enable more smoke.

Link to comment
Share on other sites

Indeed it does. :blush:

 

Actually the best solution to the zombie-bomber issue would be to nop out the entire line:0x428562~6A

.text:00428562 mov word_4775D4, 18h

 

and change 0x4775D4 to 00.

 

This would stop the initialization subroutine from setting the value and then set the value to what it should be so the zombie's data now conforms with the rest.

Link to comment
Share on other sites

Tomorrow night at the very best, I have a got a Maelstrom of a work now.

 

Got some more info on that other crash I encountered:

 

"XCOM crashed at 0x432448 with error 0xC0000005 trying to access 0xFFFFFFFF"

 

This seems to occur whenever I try to go into battle with "More Smoke" enabled (which it is by default).

Invaluable. Thanks, BB.

The error message is in a generic type error for data overflow, basically it means that something has gone horribly wrong, we are writing at a bad address, or in a bad datacanister etc. Since I now know which type of ini features causes this, I can probably fix it.

 

 

Actually the best solution to the zombie-bomber issue would be to nop out the entire line:0x428562~6A

.text:00428562 mov word_4775D4, 18h

 

and change 0x4775D4 to 00.

 

This would stop the initialization subroutine from setting the value and then you set the value to what it should have been and it now conforms with the rest of that data.

Wow, can I use it? All wrapped up, just put it in etc.? Nice work, Tycho.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...