Jump to content

TFTD Craft Weapons location?


endersblade

Recommended Posts

I decided to get back into this game, mostly for modding purposes. I have the CE, btw.

 

I've successfully modified the Armor stats to my liking, but I can't find any list or anything of where the craft weapons are located. If anyone could tell me the file, and possibly the location within the file (I'm using MS Edit for the .exe) I would be extremely grateful :-)

 

EDIT: Also, is there a way to make other weapons have the waypoint system that the Blaster Launcher type weapons have?

Link to comment
Share on other sites

I decided to get back into this game, mostly for modding purposes. I have the CE, btw.

 

I've successfully modified the Armor stats to my liking, but I can't find any list or anything of where the craft weapons are located. If anyone could tell me the file, and possibly the location within the file (I'm using MS Edit for the .exe) I would be extremely grateful :-)

Great, if you are running the CE version and using MS-Edit for editing, then we are both on the same page. Check out this thread here in the modding forum. ;)

 

EDIT: Also, is there a way to make other weapons have the waypoint system that the Blaster Launcher type weapons have?

Sure, you need to go into OBDATA.DAT and change offset 48 to flag that the weapon is a waypoint weapon and also edit offset 54 so that it flags as a Blaster Launcher. Please note that if you create a waypoint weapon that the damage type is hard-coded to high explosive, so you can't create a guided incendiary bomb for example. :laugh:

 

- Zombie

Link to comment
Share on other sites

Heh...yeah, I remember that thread :laugh: I posted there a long time ago. Now I don't remember what I did >.> Anyway, the only issue I'm having now is finding the location of the craft and craft weapons. I used the spreadsheet posted there to get the location of the craft, but when I went to that byte, it was all just jibberish, and nothing at all matched up. Similarly, I can't find anywhere that the TFTD weapon offsets are posted; pretty much none of the UFO offsets have lined up with TFTD so far, so I'm assuming the offset posted there for UFO won't match up in TFTD.

 

And thanks for th OBDATA.DAT info, looking into making the Heavy Gauss have a waypoint system, but still shoot gauss ;)

Link to comment
Share on other sites

Anyway, the only issue I'm having now is finding the location of the craft and craft weapons. I used the spreadsheet posted there to get the location of the craft, but when I went to that byte, it was all just jibberish, and nothing at all matched up. Similarly, I can't find anywhere that the TFTD weapon offsets are posted; pretty much none of the UFO offsets have lined up with TFTD so far, so I'm assuming the offset posted there for UFO won't match up in TFTD.

Right, you can't use UFO offsets for TFTD: the executables are not ordered in the same manner and TFTD is bigger too. Did you download my TFTD all craft data spreadsheet from the first post in the topic I mentioned above? That lists the offsets for TFTD. Once you have that, are you opening the executable in 100 column widths? The offests I normally use are for MS-Edit with that specific column width.

 

Those jibberish characters represent values. Look at the lower right in MS-Edit and it will show you the value of the character the cursor is on.

 

If you still can't find it, you can search for 58, 2 for the start of the craft data or 64, 2 for the craft weapons data. I took a screenie of MS-Edit with the first record in the craft weapons data highlighted so you can match it up to what you see.

 

Craft_location.png

 

Just look for the soldier names as a good reference, then move down a little bit past the geodata stuff and the few long lines of "lucky charms" (hearts and diamonds). The craft start right after the 6_7_8_9 bit (where the underscore is a sad smiley face ;) ). :laugh:

 

- Zombie

Link to comment
Share on other sites

Lol, by jibberish, I meant it wasn't the values I was looking for ;) I know what the symbols mean, you pointed that out to me already :)

 

Thanks for the SS, I'll check it out.

 

I'm apparently doing my searches wrong; I have your spreadsheet. I also just realized that the weapons were on a separate tab :laugh: Anyway, I went to what I assumed was the start of the triton, which should be Line 4999, column 65, correct? I followed all along that line, combining bits where I figured I needed to as well, and couldn't find a single number that matched what was on your spreadsheet. I did, however, eventually run across the Survey ship's stats lol.

 

Whatever. Thanks for your help, seriously. You've been extremely patient with my noobishness on this issue on several occasions ;) Now that I have the SS as a reference, I can make SURE I'm looking at the right thing!

 

EDIT: Ok, I have the weapons to my liking. The craft, however, are confusing me.

 

Eseentially, I'm trying to make the Barracuda the be-all-end-all interceptor. Trying to give it most of the stats from the leviathan, however I'm not sure how to get the Hitpoints and max speed to what I want. I can obviously mod anything that's only one byte (to to 255, I'm assuming) but anything that's using two bytes just has me confused. Example:

 

Leviathan's max speed is 5800. In the editor, the two bytes for the speed are (168)(22). Unless my math is wrong, that doesn't 'add' up to 5800 lol.

 

Along a similar line...and I know it would probably just be painful to even do...but could you possibly break down the entire line for one ship? As in, there are what, 28 bytes per ship? Show me which bytes go together, and hopefully answer my above question and explain how the double-bytes add up? I'll give you the numbers for the leviathan:

 

60  2  112  254  2  0  168  22  9  0  50  0  226  4  4  0  0  0  0  0  0  0  0  0  26  0  4  0

Link to comment
Share on other sites

I'm apparently doing my searches wrong; I have your spreadsheet. I also just realized that the weapons were on a separate tab ;) Anyway, I went to what I assumed was the start of the triton, which should be Line 4999, column 65, correct? I followed all along that line, combining bits where I figured I needed to as well, and couldn't find a single number that matched what was on your spreadsheet. I did, however, eventually run across the Survey ship's stats lol.

Yeah, 499965 in MS-Edit with 100 column widths is where the Triton's record starts. I probably should have taken a screenie of the the craft starting position too but didn't have the time yesterday. Here's one with the Triton's record highlighted:

 

Triton_location.png

 

As you may see, it's just above the craft weapon records. (Compare screenies if you have to). :laugh:

 

Thanks for your help, seriously. You've been extremely patient with my noobishness on this issue on several occasions.

We were all noobies at one time. The one thing I always hated when I first started out was the secrecy behind editing the stats in the executable. My hope was to make it a little easier for people to do it themselves without the use of a third-party utility. ;)

 

- Zombie

Link to comment
Share on other sites

EDIT: Ok, I have the weapons to my liking. The craft, however, are confusing me.

 

Eseentially, I'm trying to make the Barracuda the be-all-end-all interceptor. Trying to give it most of the stats from the leviathan, however I'm not sure how to get the Hitpoints and max speed to what I want. I can obviously mod anything that's only one byte (to to 255, I'm assuming) but anything that's using two bytes just has me confused. Example:

 

Leviathan's max speed is 5800. In the editor, the two bytes for the speed are (168)(22). Unless my math is wrong, that doesn't 'add' up to 5800 lol.

 

Along a similar line...and I know it would probably just be painful to even do...but could you possibly break down the entire line for one ship? As in, there are what, 28 bytes per ship? Show me which bytes go together, and hopefully answer my above question and explain how the double-bytes add up? I'll give you the numbers for the leviathan:

 

60  2  112  254  2  0  168  22  9  0  50  0  226  4  4  0  0  0  0  0  0  0  0  0  26  0  4  0

I just looked at my all craft data spreadsheet and realized it is very crude. There's a newer version of it along with a bunch of extra stuff (it's what I had of the TFTD executable about a year ago or so) which which broke everything down to separate values (I have comments in there too). Here it is:

 

TFTD_Executable.zip

 

That may be a little more helpful for a newbie. At least it's a little more polished. ;)

 

Ok, the double bytes are in little endian format which means you can't just add the two numbers together. In the case of the Leviathan, the numbers are 168 (low bit) and 22 (high bit). To convert this to a real number, take 22 and multiply that by 256 (22*256=5632). Now you can add the 168 (5632+168=5800). This is a forwards example.

 

To do it backwards it's a little different. Let's assume you want to crank the Leviathans speed to 8000. First, look at the number and see if it's 256 or higher (it is). Now divide it by 256 (8000/256=31.25). Take the whole number of that and you have 31. That's the high bit (remember it or write it down). Now take the remainder (0.25) and multiply that by 256 (256*0.25=64). There's your low bit. So what it would look like in the executable is (64)(31). Not that easy to figure out, but once you've done it a few times it becomes second nature. :laugh:

 

- Zombie

Link to comment
Share on other sites

Actually, that's fairly straight forward, thanks for the insight :laugh: Everything is making a whole lot more sense now!

 

And I'm guessing that if it's less than 256, if it's two bytes, it would be (number)(0)?

 

Wow, this spreadsheet is CRAZY! So much info ;) Now I can edit damned near anything I want! Thanks soooo much man!

 

Hmm...I wonder, is there a way to flag your subs as USOs, so they don't use fuel? Or would this bug the game out?

 

Lots of edits today ;) On the Unkown 2 for USOs...just taking a stab in the dark here, but I'm betting that's how much damage the ship has to take to be destroyed in the interceptor screen. The Disruptor does 200 damage, and the survey ship's Unknown 2 is 200...I know for a fact that, almost every time I've paid attention, one direct hit from this weapon will destroy a survey ship. If I get bored enough, I might test this theory by setting a survey's UNK2 to, say, 1 and hit it with something :)

Link to comment
Share on other sites

Actually, that's fairly straight forward, thanks for the insight :laugh: Everything is making a whole lot more sense now!

 

And I'm guessing that if it's less than 256, if it's two bytes, it would be (number)(0)?

 

Wow, this spreadsheet is CRAZY! So much info ;) Now I can edit damned near anything I want! Thanks soooo much man!

 

Hmm...I wonder, is there a way to flag your subs as USOs, so they don't use fuel? Or would this bug the game out?

  • Glad to hear you are figuring it out.
  • Yup, a value less than 256 would be the low bit and 0 would be the high. (Special case of 256 would be (0)(1) when shown).
  • If you think the TFTD spreadsheet is crazy, you should see the one for UFO. ;)
  • Don't think flagging subs to use no fuel is possible yet. Editing them to 0 wouldn't crash the game but they would probably be in an infinite refueling loop back at base. Haven't checked it though.

 

Lots of edits today :) On the Unkown 2 for USOs...just taking a stab in the dark here, but I'm betting that's how much damage the ship has to take to be destroyed in the interceptor screen. The Disruptor does 200 damage, and the survey ship's Unknown 2 is 200...I know for a fact that, almost every time I've paid attention, one direct hit from this weapon will destroy a survey ship. If I get bored enough, I might test this theory by setting a survey's UNK2 to, say, 1 and hit it with something :)

It's possible that's what the unknown 2 is for. At least, that was one of my initial theories. :(

 

- Zombie

Link to comment
Share on other sites

Hmm...I wonder, is there a way to flag your subs as USOs, so they don't use fuel? Or would this bug the game out?

Just did a little bit of editing on this (on EU, but TFTD should be the same). Changed the amount of fuel for the Skyranger to 0 like a UFO then started a new game with the modified exe. The game crashed to the desktop if you try and send any of your craft out. Obviously, not a good idea. ;)

 

Unsurprisingly, if you edit UFOs to take fuel, nothing happens. (The game is pretty biased to the aliens I guess). ;)

 

Edit: Hmm, this is interesting. Just for giggles, I edited Skyranger fuel really high to see if the variable was signed or not (the hope was that if it was signed, the number would wrap into the negatives and might allow a ship to remain airborne forever). Short answer: no, the variable isn't signed. However, if you edit fuel to like 65536, the Skyranger can stay up for 3 months straight and not use anything: the fuel gauge still says 100%. When you force it to return back to base with the gauge reading 100%, the craft doesn't refuel at all. So this is sort of an exploit. Not sure how long a craft can remain airborne before it hits the 99% fuel "point of no return", but it's at least 4 months with a Skyranger patrolling. That's basically 0 fuel usage. :laugh:

 

- Zombie

Link to comment
Share on other sites

So what you're saying is, if you set the fuel to 65536, it technically NEVER refuels? As in, unless it has to stop to rearm, it could return to base, then immediately be used? That's quite a find :laugh: Although I wonder, if at some point it DOES need to be refueled...that would probably take MONTHS.

 

Couple of other questions. I set my barracuda's acceleration to 10 (like the manta), and max speed to 5800 (like the leviathan) But didn't change the fuel cap...Deployed my first one after this edit, and his range is cut almost in HALF! Normally, they can reach one of my other bases before it runs out of fuel and has to return (have most of my bases spaced out like this for great global coverage) but now it makes it almost half way before returning. Did I accidentally modify something else, or is there some internal math going on that's making it do this?

 

Second question: Is it possible to unflag the manta, hammerhead (if it takes it) and leviathan as Zrbite users? I wouldn't mind having this "infinite fuel" exploit you found, and not having to refuel all of that on zrbite would be great ;)

 

Thirdly, I certainly wouldn't mind your UFO one ;) Plan on starting that game back up as well. Do you know if the vista fix still messes UFO up so you can't do intercepts? I've read posts about it doing so, and read that the fix got updated at some point, but nothing about whether or not it still does this.

 

I'm downloading VMware right now, so hopefully I'll be able to run these on Win95/98 and won't need a patch.

 

Also: 65536 = (1)(255)? I did your math, and unless I messed it up, 65536 / 256 = 256...

Link to comment
Share on other sites

Sorry, not 65536. I meant 65535 which equals (255)(255). Of course, increase fuel capacity this high and the craft will eventually need to refuel if it remains out long enough. And yes, even if your craft is at 99% fuel, it could take a very long time to refuel. If you double the speed of your craft, that basically doubles the fuel consumption rate, effectively cutting the range in half. So you'll need to double the fuel capacity to keep up. ;)

 

I don't know where the craft are flagged for Elerium usage yet, so it isn't possible to convert them over at this stage. Sorry.

 

Don't know anything about Vista compatibility with Enemy Unknown as I'm thankfully still using an XP machine. Gimli or BladeFirelight would be the guys to ask on that. :laugh:

 

- Zombie

Link to comment
Share on other sites

Awesome, about to test it out now.

 

Also, and I know I've seen it before on here, just can't find it...where's the chart that shows how to input the characters in MS edit? I know how to do the big numbers, but I know 1-25 require doing something special...something about the letters of the alphabet. I've seen a .jpg or something someone did that had them all listed out. I'm still looking for it myself, but would you happen to know either where it is, or what I need to do for smaller numbers?

Link to comment
Share on other sites

You can find a hacking primer with MS-Edit over at the X-COM Wiki here. This is the pic you were looking for:

 

https://www.ufopaedia.org/images/8/89/DOS_Chars_In_MsEdit.gif

 

For the lower numbers you need to do a CTRL-P + letter to get the proper number associated with it. Ctrl-P+A=1, Ctrl-P+E=5, Ctrl-P+J=10 etc. 0 is the special case: you need to do a Ctrl-P+2 to get it. :laugh:

 

- Zombie

Link to comment
Share on other sites

I swear we're the only ones alive on this forum...and you seem to respond extremely quick!

Modders come and go around here all the time, but they must have other commitments in real life lately. I'm here though, that keeps activity up in this sometimes overlooked area. As for replies, I subscribed to this topic so I know when there is a new post... just in case you need some help. I'm usually only able to post in the mornings and evenings though. ;)

 

BTW, I'm going to nab all of the armor and alien/civilian info I can and input it into your spreadsheet...I'm sure you don't need it, but once I'm done, I can post it so you can use it ;)

Not really necessary, as I have that information in different spreadsheets. All I need to do is import it into the current one. The UFO spreadsheet has a ton of stuff in it like I mentioned, and I can just use that to get the locations for TFTD. It just takes time. Lately, most of my waking hours dedicated to X-COM have been going to my game collection rather than updating spreadsheets which nobody but myself find interesting. At least you seem to be having a good time with the TFTD stuff. :laugh:

 

- Zombie

Link to comment
Share on other sites

I seriously wish there was some way I could repay you for all of your help lol. You've done so much to further my knowledge of editing this awesome game ;) I have everything edited just perfectly now...all of my ships work like a charm, civilians don't die, and tentaculats can't zombifiy me now >.> (Set their time units to 10 lol.)

 

I do have just a couple more questions...would you happen to know where 'weights' are located? I find it kind of bizarre that gauss weapons weigh more than base weapons...to me, they're made with aqua plastics (I know they 'technically' aren't, but it just seems logical to me) meaning they'd be lighter than the base weapons. Same goes for Mag Ion armor; the armor is technically powered, so it shouldn't have much weight to it.

 

Secondly. I've read about this before...I actually think you were the one that answered the question. I've noticed that after a period of time, or a number of aliens I should say, you stop bringing home live aliens, even if your containment is empty. I've always suspected that your savegames could only hold so much info on these...limited, I guess. You mentioned to start a new game, and copy a certain file from there to your current one...in essence, making it so you've never brought home a live alien. What file is it specifically, and does that actually work?

 

Other than that, I'm on a roll now :laugh: I've made my own starting base, as well as starting stores, and I'm ready to take on Superhuman for the first time!

 

On a side note...I'm really put out with the way research is now. Within the first month of game time, I had already researched Mag Ion Armor. Granted, I only had the materials to equip one squad with it, but that's END GAME stuff right there, I never even bothered making Plastic Aqua Armor.

Link to comment
Share on other sites

I do have just a couple more questions...would you happen to know where 'weights' are located? I find it kind of bizarre that gauss weapons weigh more than base weapons...to me, they're made with aqua plastics (I know they 'technically' aren't, but it just seems logical to me) meaning they'd be lighter than the base weapons. Same goes for Mag Ion armor; the armor is technically powered, so it shouldn't have much weight to it.

Item weights are located in OBDATA.DAT. Specifically, offset [043]. :laugh:

 

Secondly. I've read about this before...I actually think you were the one that answered the question. I've noticed that after a period of time, or a number of aliens I should say, you stop bringing home live aliens, even if your containment is empty. I've always suspected that your savegames could only hold so much info on these...limited, I guess. You mentioned to start a new game, and copy a certain file from there to your current one...in essence, making it so you've never brought home a live alien. What file is it specifically, and does that actually work?

That would be ASTORE.DAT. It has a max capacity of 50 aliens normally. In the v1.2 patch for TFTD, the file size was intentionally ballooned to 300 aliens to hopefully prevent aliens from not showing up. I should mention that a clogged ASTORE.DAT file is fairly hard to do and requires many missions with little to no research on live aliens. I'd open up the file and check to see if it really is clogged. If it is, then start a new game, save it, then copy ASTORE.DAT to your current game. This effectively wipes the slate clean. Be aware that just because it's clean it doesn't mean that you will be able to collect the necessary aliens for research in TFTD. Some missions and aliens are hard to come by and become rare as the game moves on. ;)

 

- Zombie

Link to comment
Share on other sites

Well, back in the old days, I used to come loaded to the teeth with shok cannons...if I couldn't shoot the alien to death, I'd hit it with the AoE attack and stun the bastard ;) This resulted in me bringing back a TON of live aliens...one time I brought back every alien from a terror attack alive! I eventually got stuck, as I couldn't research the alien I needed to get the leviathan (what, lobster commander or something?) as I had capped my capacity for that game with just aquatoids and gillmen.

 

Blah, one more thing. If a weapon has Freeze, Incendiary, Phosphorous, or Explosive as the damage type, then the damage number is how big the explosion is, right? As in, all of those damage types already have a fixed damage (I'd assume in some other file) and changing the damage field will make a bigger or smaller explosion?

 

Now, I can bring them back with reckless abandon...research what I need, and replace the rest with a clean file :laugh:

 

Also, thanks for the weights...I was just looking at that file on the wiki when you posted. Everything's good to go now...time to get my game started.

Link to comment
Share on other sites

Blah, one more thing. If a weapon has Freeze, Incendiary, Phosphorous, or Explosive as the damage type, then the damage number is how big the explosion is, right? As in, all of those damage types already have a fixed damage (I'd assume in some other file) and changing the damage field will make a bigger or smaller explosion?

Right, increasing the damage number (OBDATA.DAT [022]) increases the blast size. For true explosions it also increases damage dealt to units or terrain. The damage number for fire or phosphorous only determines how big of an area will be blanketed in flames, it doesn't change the amount of damage dealt to units or terrain. The weapon power is an average damage, so with normal weapons the range is 0-2xAverage. For explosives, the range is 0.5-1.5xAverage. :laugh:

 

- Zombie

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...