Talk:TFTDextender

From UFOpaedia
Revision as of 13:38, 5 October 2012 by Spike (talk | contribs) (→‎Stunned Carried Aquanauts MIA on Abort: MIA bugs are original game engine bugs)
Jump to navigation Jump to search

Questions or Comments

A place to provide feedback or ask questions

Bug Reports

Crash 0xFFE00B30

"XCOM crashed at 0x7C82A5CD with error 0xC0000005 trying to access 0xFFE00B30."
The error occurred at the first attempt to start the Battlescape. No previous missions had been run. This was the very beginning of the first mission. The Battlescape never appeared. Spike 21:02, 8 September 2012 (EDT)

Interesting. I had someone report a similar thing when they were starting their first instance of the battlescape on a new install of the game. I looked into it and the game generated some bad data. When he let the UFO take off and land again, the battle started with no problems..

I tried this suggested technique and it seems to work. In fact, I think I now understand the bug. It's a bug I've reported before (before TFTD Extender even existed), so it's not specific to TFTDExtender / UFOExtender. Which must be good news for you. :) What is happening is the Alien Sub is landing on land, and the Triton is also attempting to land on land. Probably the game crashes when it fails to generate the appropriate terrain type? So the GEOSCAPE map/terrain data must be corrupted. I've seen three examples of this. In a couple of cases the landing site is clearly inland, by hundreds of kilometres. In some cases it's right on the sea/land boundary and hard to tell. I have two save games that reproduce the bug now. From memory, the previous cases all happened around North Africa, like these present cases. Spike 08:31, 9 September 2012 (EDT)

OBDATA / Dye Grenade mod not working?

I can't seem to get this to work. Regardless of what I do, the Dye Grenade radius is the same as in the unpatched game. It starts on one square, slowly spreads out to about a 4 by 4 diamond, then contracts and fades out. Am I doing something wrong? Is it using the right OBDATA.DAT file? Spike 09:41, 7 September 2012 (EDT)

I'm not sure this feature is working for me at all. I tried changing the stats of a Dart Gun like this, also with no apparent effect.
[OBDATA.DAT]
Apply=01
;Dye grenade will have similar initial effect as smoke grenade in EU.
Dye Grenade Damage=60
;Mega Dart Gun
Dart Pistol Auto TUs=50
Dart Pistol Auto accuracy=20
Dart Pistol Snap accuracy=50
Dart Pistol Aimed accuracy=100
;Mega Dart Pistol ammo
Dart Pod Damage=250
Dart Pod Size=100
;Turn HJC-AP into mega-phosphorous shell
AP-Shell Damage Type=1
AP-Shell Damage=250
;Turn HJC-P into mega-phosphorous shell
Phosphorous-Shell Damage=250
;mega-pack
Magna-Pack Damage=250
;mini-pack
;Magna-Pack Damage=20

Spike 16:39, 8 September 2012 (EDT) I've checked that OBDATA modding works ok in UFOExtender. I can't get it to work in TFDExtender though. I have tried modding one-word items like Magna-pack. I have tried using the exact literal names from OBDATA.DAT (TFTD). I have tried using the literal names from UFO. All no good. The record structure looks to be the same in TFTD as in UFO. I am a bit stumped. Spike 22:32, 8 September 2012 (EDT)

OK. I'll look into it. My work has restarted so I am a little busy right now. Once I get readjusted to the work schedule, I'll be able to investigate more.Tycho 04:23, 9 September 2012 (EDT)

I completely understand. Thank you so much for this amazing contribution. Spike 09:47, 9 September 2012 (EDT)

update - I think I located the problem, the LoadFile command had been referencing the wrong LoadFile subroutine.

Excellent. I will be happy test as soon as you have time to upload an update. Spike 09:45, 20 September 2012 (EDT)

check this with the latest patch. Tycho

With 1.05p1.1, the Dye Grenade fix is working regardless of whether I do Apply=1 in the OBDATA.DAT section. I can't get anything else to work still. Spike 10:05, 2 October 2012 (EDT)

Hang on, looks like it only works with a New Game? I got some things working but it's still not working 100% for me, but I will continue to investigate, I could be using the wrong names or settings etc. See updates to config file above. Spike 11:17, 2 October 2012 (EDT)

It could be that I'll need to add multiple hooks into the executable to ensure that the mod is loaded at all times. - Tycho 22:35, 2 October 2012 (EDT)

OK it does seem to work on loaded saved games as well as in new games. The OBDATA.DAT changes are reflected in the in-game UFOPedia. But, the names of the objects to modify must be the exact literal strings that I posted in Talk:OBDATA.DAT_(TFTD)#Exact literal item name strings. The strings on the main page of the OBDATA.DAT article have been "corrected" and don't always exactly match what's in OBDATA.DAT. And I'm still not convinced all attributes are being copied over correctly into TACTICAL, even when they appear correctly in the in-game UFOPedia. I can change the damage of ammo types and see updates in the in game UFOPedia, but no change in damage or area of effect on the battlefield. Spike 10:34, 3 October 2012 (EDT)

maybe the best test would be to zero damage on items and shoot an unarmed aquanaut?

I went back and checked UFO Extender. In UFO Extender I am able to make a full set of changes to a Pistol using basically the same config settings as above. In TFTD Extender, I am only able to affect what is reported in the in game UFOPedia, and the actual clip size. I even went so far as to double check the structure of OBDATA.DAT in both games, by inspection, but it does appear to be the same, at least for Damage which is the thing I'm unable to change in TFTD. Could this possibly be that LoadFile issue again? Spike 18:24, 3 October 2012 (EDT)

Minor Bugs

Weightless Ammo Bug

Do you think you could fix this bug? Known_Bugs#Equip_Phase_Ammo_Load_Error. Seb76 had a look at it, and diagnosed the cause, but he did not get around to fixing it. It's only mildly annoying and, some probably consider it to be useful as a very minor exploit. For me, it just really bugs me! (No pun intended). Spike 22:55, 6 September 2012 (EDT)

From what I understand right now, I am pretty sure I can arrange it so that weapons are not automatically loaded and soldiers would be given an extra clip. Feedback?

By an extra clip, you mean the clip/ammo that would have been loaded into the weapon is instead carried by the soldier? And for carried clips, the encumbrance effects are correct. For me anyway, in order of most benefit, the options would be
  1. Fix the root cause of the bug (ensure all relevant object locations and "contains/contained in" pointers are set during automatic clip loading) so that automatically loaded clips correctly affect encumbrance
  2. As a workaround, don't load ammo for multi-ammotype weapons (Heavy Cannon/Gas Cannon, Auto-Cannon/Hydrojet Cannon, Rocket Launcher / Torpedo Launcher). These are the weapons for which the bug has the greatest impact, since it imposes a 'cost' of switching away from the automatically-loaded ammo (usually AP or Small Rocket/Torp). With single-ammotype weapons, there's never any need to change the clips before combat.
  3. As a workaround, don't load ammo for any weapons. This avoids the 'switching cost' issue but does impose a fairly significant logistics overhead on each combat, to go through and manually load all clips. Plus the risk that you forget to load a weapon and only find out at a critical moment. :) This is for the "purist" who wants to make the game harder.
If it's tricky to fix the root cause, any of the other two options would be helpful. Suggested text:
  • [Multi Ammo Weapons Start Unloaded] - Workaround for the Weightless Ammo Bug. Weapons using multiple ammo types (Heavy Cannon, Auto-Cannon, Rocket Launcher / Gas Cannon, Hydrojet Cannon, Torpedo Launcher) will not be pre-loaded before combat. You will need to load these weapons manually during the pre-combat Equip phase. This will significantly affect the heavy weapons ammunition load your squad can carry into combat without suffering encumbrance penalties, thus making the early game harder.
  • [All Weapons Start Unloaded] - Workaround for the Weightless Ammo Bug. This option overrides the previous option. No weapons will be pre-loaded before combat. You will need to load all ammo manually during the pre-combat Equip phase. This will significantly affect the ammunition load your squad can carry into combat without suffering encumbrance penalties, making the early game harder.
Spike 05:10, 21 September 2012 (EDT)

Grenade Resistance in INI file

I think this is a holdover from UFOExtender, because 'Grenade' is not a TFTD object, and in TFTD I think all forms of grenades already have high damage resistance, and so are already "stackable". Spike 09:14, 7 September 2012 (EDT)

Stunned MC'd Aquanauts MIA on Abort

This is a subset of MC'd Aquanauts go MIA Known_Bugs#Mind_Controlled_Soldiers_go_MIA. In this case Aquanauts are MC'd by the aliens, then stunned (by friendlies), then the mission is Aborted with the stunned X-Com Aquanauts aboard the transport. The Aquanauts then disappear from the roster forever. I'm not sure if it's due to Abort rather than Victory, or due to them being stunned first.

This is one of those exceptional cases where my End of Battle (Abort?) routine doesn't cover. If the aquanaut is MCed or unconscious the EOB routine will correct these states and end the battle but it doesn't check for both on the same unit, so an aquanaut who was MCed and then made unconscious, may fall through the hole that was originally in the game. Tycho

This may also apply to UFO Extender. Spike 22:06, 21 September 2012 (EDT)

I haven't inserted the new EOB script into UFO Extender yet, so it still has the original problems.

Stunned Carried Aquanauts MIA on Abort

While you are looking the EOB script, I noticed one more anomaly. I'm not sure if this is an original bug or an Extender bug. If you are carrying a stunned Aquanaut in the transport at the time of Abort, the stunned Aquanaut is lost (MIA). You have to drop the stunned Aquanaut on the floor. Probably this is because the position of the Aquanaut has not been updated and is still pointing to where they were stunned, not to the location of the carrying Aquanaut. Probably this is an original bug. Spike 04:49, 27 September 2012 (EDT)

You're correct. An carried objects's coordinates are not updated until it is dropped or thrown. When you say 'original bug' o you mean original to the Extender or to the game itself? - Tycho
I meant a bug in the original game. It's almost certainly a bug in the original game. In which case we can add it to Known Bugs. Spike 09:27, 3 October 2012 (EDT)
You're right. This was covered up by the general problem of stunned aquanauts being MIA anyway.

I've added both of the above bugs as original game engine bugs (TFTD and EU) at Known_Bugs#MIA_Bugs. So they could be moved from bugs to feature requests as far as the Extenders are concerned. Spike 09:38, 5 October 2012 (EDT)

Cannot build Leviathan

Hi Tycho. I've just researched Leviathan in my TFDExtender game but cannot manufacture it! I have enough resources (Plastics, IBA, ManNav), 3 workshops, more than 100 technicans and one empty sub pen. But when starting the Leviathan manufacture task I cannot assign any technicans to it. I press the "up" button, and there are no reaction to this. I can build Manta, but not Leviathan. Don't you know what is it? PavelB 06:55, 2 October 2012 (EDT)

Double check that you have sufficient cash to start the project, iirc $600K or so. That matches this symptom. Also that you have enough workshop space available (Leviathan needs a lot of space). Failing that, cancel all existing manufacturing projects, then retry. Failing that you could try reducing Technicians below 100 but that's taking us into Bug territory. Spike 07:17, 2 October 2012 (EDT)
Resources are 100% enough. I've launched "Terror from the Deep.exe", loaded this saved game and started manufacturing Lev without any problems. I've saved this variant with Lev being manufactured and then loaded it from "TFTDextender.exe". As a result the process was okey, but I could only decrease the number of technicans working on it, not increase (even after decreasing!). That is: with 64 technicans had been assigned, I've pressed the "down" button, and the number changed to 63. But then I was unable to revert it to 64 by pressing "up" button: it didn't work! PavelB 07:57, 2 October 2012 (EDT)
I'll check into it. Although, I can't understand how changes to the research tree would affect production. Unless it has something to do with the autoproduce feature?

Negative Aqua Plastics

My second base has -20 Aqua Plastics. Might be XComUtil's fault rather than TFTD Extender. Spike 22:06, 21 September 2012 (EDT)

This has to be caused by something else. Extender doesn't alter the code responsible for base stats except on the initial base when Missiles for Cannons mod is selected and that is only in the new game initialization routine.

I don't use any mods/editor except TFDExtender, bus still have -98 Zrbite, -4 Lobster Man Corpses, -5 I-B Accs, -3 MagNavs and -358 Aqua Plastics on my second base! (and nothing extraordinary at other bases) There is a nuance about there lobster corpses. I have "Start with Alternate Tech Tree" set to 3, so that Ion Armor and Magnetic ion armour require 2 lobster corpses to be manufactured. On my FIRST base I've performed MI armour production twice, and strangely was able to produce 1 armour more than it was possible (10 armours when there were only 18 lobster corpses avaible and then 4 armours with 6 corpses). And after all I've noticed these -4 corpses at the second base. Could it be, that during armour production these 4 corpses were somehow obtained from the second base, when there had been none of them on the first? PavelB 10:12, 2 October 2012 (EDT)

Interesting. In the game where I found - 20 Aqua Plastics at my second base, I was manufacturing Plastic Aqua Armour at the first base. So it could be that a change to the manufacturing routine in TFTDextender is deducting manufacturing resources from the wrong base. It might also explain PavelB's Leviathan problem. Spike 09:32, 3 October 2012 (EDT)
If that's the case, then the error must be in the Autoproduce code. - Tycho 01:03, 4 October 2012 (EDT)

Extra Artefacts Reported

I quite often recover 1 or 2 alien artefacts according to the Results screen, even though I am Aborting the mission and have definitely not brought anything back to the transport. I don't think I'm actually bringing back any artefacts - I think the Results screen is reporting incorrectly for some reason. Spike 22:06, 21 September 2012 (EDT)

I've seen this too. You are correct that no artifacts are actually found and it's a minor problem with the EOB calculations. Since it only gives players a minor boost (a few points at most) to their score, it's low on my to-do list at the moment.
Hmm I just came back from a mission (first mission of a new game) and I had two alien sonic clips available as new Research topics (Pistol and Blasta), even though I aborted the mission with no loot. I did use XComHack to edit other equipment on the Triton so it may be related to that. I'll let you know if it recurs. Spike 08:47, 2 October 2012 (EDT)
We need to check and see if this happens with the "save equipment" mod disabled. Maybe it is assigning clips to soldiers by mistake?-Tycho

Manufacturing Projects Minimum Production

In the unmodified game, if you have a manufacturing project underway, you can't reduce the quantity below the level that have been built or are in production now (the number that have been built, plus 1). With the autosell and autobuild features turned on, you need to be able to cursor down below zero, so the quantity cursor no longer stops when you reduce to this minimum. This may have some unintended effects, like changing a manufacturing project to produce less units than it has already reduced. On the other hand there may be no impact at all other than losing the built-in stop on the quantity cursor that reminds you how many units of that type you have already built or started to build. Spike 22:06, 21 September 2012 (EDT)

It would be interesting to experiment to see what the effects of doing this are, if any: What happens if you reduce the number desired for an item below what has already been produced? What happens if you create an order for a set number of items and later change it to auto-produce? Tycho
OK I will take a look at this and report back. Unless some bugs/glitches are being introduced, the only loss of existing functionality is that you can currently use the down arrow keys in the unmodified version to in effect say "stop production after completion of the next unit", which avoids the wasted cost and effort of hitting the Stop Production button. Spike 04:45, 25 September 2012 (EDT)

Tested - If I reduce the production quantity of a current production run to less than what as already been produced, the display completion time changes (incorrectly) to 'Indefinite', but production ends after completion of the next unit. So if I start by producing 10 units, wait until I have produced 2, then reduce the quantity to 2 (or probably 1), production stops after 3 units. Thies basically replicates the pre-existing behaviour when using the down arrow on the Quantity, so there has been no loss of functionality with your Mod. Also, Autosell and Autoproduce work normally when applied as changes to an existing production run. The only thing is I can't distinguish them on the Manufacturing display - both say 'unlimited' quantity and 'indefinite' period - is that intended? I suppose it makes sense, but it would be good to be able to tell which kind of production it is, *** Autoproduce or $$$ Autosell. Spike 08:57, 2 October 2012 (EDT)

Autosell should report 'unlimited $' like the pic on the information page. I could change this to '$unlimited$' - Tycho

Weight Display in Inventory not Localised

At least when I run the game in German, it comes up as "Weight" and not something like "Gewicht". Reactions comes up ok as "Zeitwerte". Spike 09:47, 9 September 2012 (EDT)

There is no entry in the text DAT files for "weight". Seb had to add the text string for it into his subroutine. Thanks for pointing it out. Tycho

Executable directive

It looks to me that the Executable directive is being ignored and the loader always loads Terror from the Deep.exe. Is that correct? Spike 15:35, 24 September 2012 (EDT)

I found the problem: In the program file for the loader, the INI file name that is was expecting was TFTDloader.INI. A simple name change, recompile, and it works as it should.-Tycho 10:24, 4 October 2012 (EDT)

Useful alien species research

Tycho, I really like this idea you proposed in the StrategyCore forum:

I'm thinking about giving a hp bonus to all aliens until Xcom performs an autopsy on the species to learn the location of their vital organs (like in the movie "Battle of LA"). This would give more importance to performing autopsies rather than just as a stepping stone to new tech.

Definite +1. It would be equally valid to add to UFO Extender. I suppose it could also be implemented using Vulnerabilities (no Vulnerabilities are in effect until the Autopsy is completed), or Resistances (across-the-board increased Resistances until Autopsy is completed). If that's easier.

The bonus to hp was an initial thought. Later, I decided against it since it would make aliens more resistant to HE and stun, which don't rely on hitting the right locations. Increasing resistances would be the most appropriate but the damage routine code is very tight and adding anything new that won't break the existing variable stack pointers is tough. Tycho
A new idea for this that I recently have been toying with, would be on the damage generation routine: Most direct fire damage is 0-200%, with anything over 100% considered a "critical hit". If autopsy hasn't been preformed, then the base damage would be 0-100% and a small chance (maybe 25%) of another 0-100% for that lucky shot. With autopsy done, the game reverts back to the usual 0-200% on any hit.
That works. And it makes doing Alien Autopsies a no-brainer, as it should be. It is pretty much inconceivable that XCom wouldn't prioritise the autopsy of any newly encountered alien. And any player playing the game for the first time would do autopsies too. This mod will help experienced players to stop playing as if they've "seen it all before". Spike 10:35, 15 September 2012 (EDT)

Would it also be worth adding some kind of bonus for Live Alien research? Maybe the negation of some kind of Morale penalty and/or Psi penalty? Fear of the unknown, know your enemy, that kind of thing?

I thought about that but the game doesn't record live aliens that have been researched. When you finish research on a live alien, it only follows the routine to unlock the appropriate UFOpaedia articles and then checks to see if the finished research can unlock other topics. Tycho

Displacer/Sonic damage fix

If I understand this fix correctly, the Displacer/Sonic weapon damage has been increased to 150 from the previous in-code value of 110, and vs the previous UFOPedia entry of 130? SWS Sonic weapon damage has been increased to 150 because this matches the craft-mounted Sonic Oscillator?

I don't think this is the right idea. Increasing damage to 150 gives Displacer/Sonic a higher damage level than Displacer/PWT. That removes some of the distinctiveness of Displacer/PWT, and more importantly it is inconsistent with the general principle in the game that PWT weapons (of a given class) do more damage than Sonic (which in turn do more than Gauss). That is true for infantry weapons, SWS weapons (unless you create this exception), and Craft weapons.

Also, there is no reason why SWS weapon damage should be equated to Craft weapon damage. I'm pretty sure that Battlescape damage values and Craft combat (Geoscape Interception) damage values are completely different, they are not meant to be compared to each other in any way. There is only one SWS weapon that has the same damage as its equivalent Craft weapon, and that is the Coelacanth/Gauss = Gauss Cannon. I think this is a coincidence, as the other equivalent weapons are all different between the SWS version and the Craft version (this applies to Gas Cannon, PWT, Sonic, and also Aqua Jet vs torpedos).

Clearly there is an inconsistency between the code and the UFOPedia, and that should be fixed. It's hard to say if the "right" value is 110 or 130. Is the code wrong or is the UFOPedia wrong? It could be either way. But I would correct this inconsistency either to 110 or to 130, not increase it to 150.

Spike 08:02, 7 September 2012 (EDT)

Or make it an option: Displacer Sonic Fix={0|110|130|150} Spike 09:50, 9 September 2012 (EDT)

A few questions

Hi Morgan / Tycho

First a really really dumb question. Where can I download TFTD Extender from? I only see links to UFO Extender. Is it the same download, different config file? Or??

Clicking on the title heading for TFTD Extender will take you to its page in the wiki Tycho

Thank you. Follow up really dumb question - the zip archive does not seem to include an .ini file. Where do I get the .ini file from? Spike 12:37, 6 September 2012 (EDT)
Oh hang on. It looks like the latest version of the zip file does not include the .ini file. When I go back to the previous version of the zip file, I can see the .ini file. Spike 17:45, 6 September 2012 (EDT)
The latest release is a patch, which means there are no new additions to the INI. I don't include it in patches usually so that those who already have the prior release don't have to reconfigure their current INI. It may not seem like a big deal now but earlier, I was releasing fixes almost on a weekly basis and so I still continue with that idea.Tycho
Ah I guessed that might be the reason. Makes a lot of sense. It really sucks to have a customised INI file overwritten. Spike 07:25, 7 September 2012 (EDT)


Feature Requests

All Units Can "Fly" In Water

It's very illogical that most units are stuck on the seabed in underwater missions. Please provide the option to set all units (X-Com and alien) to have "flying" (i.e. swimming) ability when underwater. This is unlikely to cause an outbreak of 3D combat, since there is no cover except at seabed level, so anyone swimming excessively or incautiously is going to get shot. It might disadvantage the aliens if their tactical map waypoints are all set on the surface. But as some of them can "fly", there is hopefully a mechanism to deal with that in the code already. For me it will just solve the frustration of being unable to swim over small obstacles or swim up a level, and being stuck or tactically limited for no sensible reason. Mag-Ion Armour remains useful as an important step in Sub Research and (if using the Everything Works on Land mod) for land use. Spike 11:36, 9 September 2012 (EDT)

Aliens Pick Up Weapons

Related to Improved Alien AI. This makes the game tougher as stunned / panicked bipedal-type aliens are no longer permanently disarmed. This now seems to be possible due to research by Volutar. See Talk:OBDATA.DAT#Field_0x2D. A fix for this would be a very helpful rebalancing of both games that eliminates one of the aliens' weak spots. The existing (but unused) routine looks pretty smart and not immediately exploitable to ambush aliens using weapons as traps.

General Tank Modding

I see you are interested in modding tanks (HWPs/SWPs) and that's partly what got you into updating UFO Extender. I made some suggestions for Tank Modding myself, including some of the mechanics required to make it work via a config file such as the UFO / TFD Extender config file. For example you could have cargo carrier / ambulance / casevac tanks, you could have demolition tanks, mine thrower tanks, and of course tanks with custom weapons including dual weapons. Could you have a look here: User:Spike#Tank_mods and see if any of that makes you feel like getting creative?

Thanks, Spike 10:46, 3 September 2012 (EDT)