- 1 Questions&Feedback
Any questions or feedback one may have.... (please be sure to leave a signature: "~" three times in a row, four to time-and-date stamp it.)
FYI: I've created a new UFO Extender page. If you are having a problem on this, please use the discussion page located there. If your message is about UFO Extender, you can leave it here but I may start copying it to the UFO page and leaving my reply there.
Hi Morgan. This is just a comment about your recent edit of the Alien Missions (TFTD) page. Terrorise is actually the proper British spelling of the American terrorize. There are quite a few regular contributors here who write British English so there will be a lot of these "misspellings". Us American English contributors will just have to learn to recognize and accept these cultural differences to prevent edit wars. The policy here is to just leave cultural spellings the way they are, unless you are absolutely sure. --Zombie (talk) 20:36, 27 May 2015 (EDT)
- Zombie, some differences between US and UK English I am aware of and don't care how a word is spelled as long as it is correct in either method (color vs. colour). I hadn't realize that "terrorise" was spelled differently under UK English. I was just going by what the auto-correct program said was a mispelled word. I didn't mean to offend anyone.
I reverted your edit, as ENGLISH.DAT uses "terrorise" and "fulfil" in that sentence. No biggie—it's positively simple to undo one edit compared to the years of links to "Base Defense"—but it might be worth asking yourself whether something's a direct quote before changing the spelling used. Magic9mushroom (talk) 03:50, 28 May 2015 (EDT)
Decompiled accuracy algorithm?
Is the algorithm you describe above, what you have decompiled from the standard game? Or is it a variant for UFOExtender? Great news if you have decompiled what the game actually uses - I will need to check some of my firepower calculations to make sure they are still in line with the algorithm.
cheers, Spike 09:37, 30 June 2012 (EDT)
It is an extender version of the original formula if one chooses to enable it. The original is the one that has been noted already: [1+(3/UFOsize)]/2 * Weapon Accuracy ... UFO sizes going from 5 for very small to 1 for very large. The calculation starts at offset 0x446DCD of the CE version. The original UFO accuracy algorithm is a flat 60% chance to hit despite the difficulty level (and no penalty for the Xcraft being in cautious mode.)
Tycho 19:23, 30 June 2012 (EDT)
Do you make the source code for TFTD Extender and UFO Extender available somewhere? I'm interested in seeing if I can help to hunt down bugs / develop new features. Cheers, Spike 08:23, 4 October 2012 (EDT)
- I just uploaded a new version of the UFOExtender source files to Seb's list.- -Tycho 06:04, 6 October 2012 (EDT)
- Source code for TFTDExtender is now available from my user page. -Tycho
How to start modifying the game code
I like some of the changes made in the UFO extender but dislike others. I'm also running X-Com through DOSbox so it's a moot point anyway. Essentially I'd like to be able to make modifications to the game - like fixing the dismantled structure bug - myself. Where should I start? I have some experience with object oriented programming through languages like C# (most familiar) and Java.
Juke 21:04, 16 October 2012 (EDT)
- Your first step is going to be to become very familiar with Disassembly and Disassemblers. Most people use IDA. Then your going to have to be able to understand the language itself. Take a look at the few examples on my page and see what it looks like. That code comes from the CE version, the DOS version doesn't disassemble as well (at least with any free dissassembler that I've found). Tycho 23:24, 16 October 2012 (EDT)
I am running the game on steam with the DOSBox. Will I still be able to make changes to the source code? Thanks for the info btw. Juke 22:03, 28 October 2012 (EDT)
- I started using the DOS version under DOSbox and making simple changes to the data points via a hex editor. However, it is really hard to do more than that.
- The problem is knowing where to make changes since no free program is able to disassemble the DOS version well. For that reason, I switched to the Windows version.
Shifting 5 shot laser mod to other weapons
Is there any easy way to shift the 5 shot mod that's currently on the heavy laser on to other weapons? I plan on getting the source code and working on it a bit (it's been years since I've touched assembly, I mostly code in C# now), but it'd be helpful to have a clue of where to start looking. I'd love to contribute to the project as well. KingMob4313 09:27, 17 October 2012 (EDT)
- I'm sure it can be done. I focus on providing content that will enhance the challenge of the game from a somewhat logical viewpoint without making changes just to make the game harder. The source code for Extender is available and mostly written in C++ so you shouldn't have much trouble understanding it. You will need a disassembler, such as IDA, for the actual game executable and be familiar with how to decipher the tangled mess of assembly code that IDA provides. For some features, I can write the code in C++ but, for a lot of fixes, I find writing in assembly much easier to insert into the proper subroutines. - Tycho 09:54, 17 October 2012 (EDT)
- I should have just read some of the above responses, I am sorry. I will take your advice and pick up the disassembler and try to familiarize myself with the code a bit. Seems that everything works via a hook-system, where it waits for the calls to the subroutines and replaces it, correct? In any case, I appreciate the quick answer. KingMob4313 12:30, 17 October 2012 (EDT)
- The hardest part of familiarizing youself with the code is that the subroutines and variables are just offsets with no identifiers. If you take the time to match offsets to labels given in the xcom.h file (in the Extender source) you can manually transfer the labels yourself. This will make analyzing the code much easier. - Tycho 20:07, 17 October 2012 (EDT)
We're all... feeling... so... sleepy
Well, I was not expecting that! Your TSL-firing Hallucinoids just kicked my *ss on a Superhuman Colony Assault. They kept firing their TSL-like built in weapons - in fact it looks like it's an auto burst TSL? - right into the transport door. And I kept popping another guy out of the door to grab the bodies outside and take out the Tasoth with a TSL I presumed was out there. I could never see the Tasoth, just some stupid Hallucinoid floating around - and they're never a threat, right? Wrong!
Brilliant, in one stroke you have breathed new life into a previously-ignored enemy, making it as frightening as it always should have been. I hope you don't mind me adding a slight spoiler to the Bug Fixes section - if you do, feel free to revert it so you can surprise others like you surprised me. :) Cheers, Spike 18:46, 21 October 2012 (EDT):
- Hehehe. >;) No, its not autofiring but the Hallucinoid has a high reaction score and the cost to fire their weapon is 33%. However, they don't often move so they always have most of their TUs. Now that they have a valid range weapon, they are extemely deadly in outdoor settings. Indoors, they tend to stun themselves too often. I'm thinking they might need to have their immunity to stun increased or build in an exception into the alien spawn routine that turns off their TSL attack indoors.-Tycho 19:53, 21 October 2012 (EDT)
- Ah, good explanation, thanks. Yes I think it would be a good idea to increase their Freeze resistance considerably. After all they are (now) the definitive freeze-using monster from the deep. As a four square unit they will take extra damage from their own attack, approaching 3-4x at point blank, so think it would be fine to give them a very high immunity, maybe take only 20% damage from Freeze. Or even 10% / completely immune. In fact it's probably simpler just to say they are immune (0%). Spike 20:50, 21 October 2012 (EDT)
TFTD Mod Question
The site's article on the TFTD OBDATA.DAT explains exactly what needs to be changed in order to give a weapon infinite ammo (like lasers). To that end, is it possible to change a weapon's ammo type indexes (AKA offsets -) with the loader INI's OBDATA section? Because I don't see that option anywhere (maybe it was left out intentionally because you wouldn't know the indexes anyway without looking into OBDATA?). Additionally, the OBDATA page says grenades always default to HE damage type; is there a way for the loader to override that in order to, for example, have a sonic pulser that explodes normally but inflicts sonic damage instead of HE?--amitakartok 10:29, 20 March 2013 (EDT)
The loader doesn't reference the ammo type indexes. As you pointed out, that is an advanced level of modding and anyone interested in that should be able to do it directly in the OBDATA file since they would need to view it anyway to get the correct references. The subroutine for explosions only handles five types of damage ( HE, IN, smoke, STUN/THERMAL, and light.) It would require a large amount of rewriting and troubleshooting to the explosion code to use other types of explosion damage. I don't have that much time anymore to devote to this as I used to, so I won't be able to do such myself. - Tycho 02:00, 1 May 2013 (EDT)
EU and TFTD destination code
Here is the code that the game uses to determine the intermediate destination of a craft.
mov ax, [ebp+10h] <------------------Destination/target's LOC.DAT reference number mov ecx, pLoc_Dat_49AAB0 mov [esp+50h+destinationID], eax movsx eax, ax lea eax, [eax+eax*4] mov di, [ecx+eax*4+2] <------------- Destination/target's current Horzontal Coordinate mov dx, [ecx+eax*4+4] <------------- current Vertical Coordinate lea eax, [ecx+eax*4] xor ecx, ecx mov word ptr [esp+50h+DestVerticalCoord], dx mov [esp+50h+DestHorzonCoord], edi mov cl, [eax+1] <------------- Target's CRAFT.DAT reference number mov eax, ecx mov ecx, pCraftDat_49AB18 lea edx, [eax+eax*2] lea eax, [eax+edx*4] mov ax, [ecx+eax*8+0Ch] <---------- altitude of target test ax, ax mov [ebp+0Ch], ax jnz short loc_4577AA
Zrbite spawn locations
Do you have any proof that Zrbite was intended to always spawn within Ion Beam Accelerators? Not always spawning in IBAs is only a bug if it was intended to always spawn in IBAs. Magic9mushroom (talk) 06:52, 3 April 2015 (EDT)
- zrbite=elerium(EU), Ion Beam Accelerators=Power Supply (EU).
- In EU, elerium always spawns in the location of a PS. That way if the PS explodes in a UFO crash the elerium is destroyed. That is by design. Why should is be any different in TFTD? To be easier? No, since the developers were attempting to make a harder game.
- If the designers were putting zbrite in other locations besides the IBA, it should still be somewhere inside the ship. On several USO, some zbrite spawns outside the ship.
- When looking at the spawn database, many of the locations would have been almost correct, had the two middle bytes (x-pos and Y-pos) been switched. Either the designers got their coordinates mixed when populating this table, and/or the USO designs where changed and this table was never updated.
- All this, in conjunction with all the other similar issues that are in the game, have led me to classify this as a development bug.Tycho (talk) 09:11, 5 April 2015 (EDT)
- There are several parts of TFTD that are in fact easier than EU. There is less psi; Tasoths do not have all ranks psi-active like Ethereals do, and those aliens that are psi-active aren't nearly as good at it (even on Superhuman with TFTD's increased difficulty scaling). Tentaculats do not appear in Terror Missions, and cannot kill tanks the way Chryssalids can. And while there are more near-indestructible enemies, both kinds do have a "kryptonite" weakness that will instantly destroy them when applied (drills usually one-shot Lobster Men, and GC-HE rounds and Sonic Pulsers do the same to Triscenes), while EU's Sectopods have no such weakness (the Heavy Laser still has a 50%+ chance of doing 0 damage against a Sectopod's front and side armour, and they hold up better against Blasters than anything besides Mutons).
- Is the spawn database you reference on this site somewhere? I'd like to look at it myself.
- In any case, I would suggest you at least correct your spelling of "Zrbite". Magic9mushroom (talk) 18:56, 5 April 2015 (EDT)
Interception crash bug