CarlFriedrichRifle Posted April 20, 2013 Share Posted April 20, 2013 Hello, I would like to mod TFTD, but I can't find any tools to do so that would allow me to mod, as I use a mac, and run DOSbox. Also, I have a few questions as to what is reasonably easy to do via modding. * Can I add auto fire to a weapon that doesn't have it (ie, like the dart gun, so it has a decent chance of downing an aquatoid at point blank before getting reaction fire) * Can I make the Coelacanth gauss not require an ammo supply (like the sonic displacer - it simply starts with X number of rounds, without needing to be resupplied, as seen during base defense) * Can I alter the research required for things (the Coelacanth Gauss should be available without magnetic navigation, simply after Heavy Gauss, or perhaps Gauss+ Aqua plastic armor, and then have a Gauss tank with more armor and HP than the standard Coelacanth) * Can I make Gauss weaponry not require ammo, but still have limited ammo -> I don't want unlimited ammo in a mission, but I do want some space with the 80 item limit. Ideally, each gauss pistol/rifle/heavy would have an "internal" clip, again similar to the sonic Displacer.Example, I load 1 Gauss rifle onto the transport (no Gauss clips would exist in this mod), a soldier equips it and can fire it 30 times, and then its out of ammo and can't be reloaded for the rest of the mission. * I assume its relatively easy to change weapons stats: ie making the craft Gauss cannon have the range of DUP torpedoes (so its actually useful), increasing the accuracy of the gauss rifle and heavy gauss, changing the damages of a weapon (like buffing heavy gauss, so its actually usable). Can anyone help me get the answer to these questions? Link to comment Share on other sites More sharing options...
Bomb Bloke Posted April 21, 2013 Share Posted April 21, 2013 Re ammo, "damage types" are assigned to either weapons or clips. If they're given to a clip, then any item loaded with that clip gets that damage type, and as many rounds as the clip has. If they're given to a gun, then the gun always has that damage type along with unlimited ammo. So there's no easy way do away with clips while still only allowing a certain amount of shots to be made. No one's reported a method for modding the tech tree as yet. I think someone might've once posted something about the tank ammo thing, though that involves modding a few points in the Geoscape.exe executable file. Long story short, to start out you'll want a Mac-based hex editor and a good long read through this document. Link to comment Share on other sites More sharing options...
CarlFriedrichRifle Posted April 28, 2013 Author Share Posted April 28, 2013 Ok, that document is not helpful enough.... So, I open that file with a Hex editor, and get this: Could you give me a simple explanation of how to add auto fire to the dart pistol (which seems to be the first entry) and change its damage? I'm thinking that this hex editing is probably going to be a lot harder than other games. Another thing I wanted to do, was edit a save file from the first day of the game:*Rearrange the starting structures to make a more defensible base*Add a coelacanth G/cannon to the store* Start with 10 "perfect" recruits- https://www.ufopaedia.org/index.php?title=Raw_recruit_statistical_likelihoodaka: 70 energy/stamina, 60 reaction, 60 bravery, 70 accuracy, 40 hp, 40 strength,100 psi strength, etc Link to comment Share on other sites More sharing options...
Bomb Bloke Posted April 28, 2013 Share Posted April 28, 2013 The article counts bytes from 0 to 53, or 54 different values in total (remember that all counting starts from 0 - the first offset is zero, the second is 0x01, and so on). In the hex editor you'll notice that each byte is represented by two hex digits close together, eg, 41 61 72 represents three bytes, and in decimal those values translate to 65, 97 and 114. Personally I set my hex editor to just display things in decimal all the time. The article lists two values in regards to auto-fire: offsets 0x20 (accuracy) and 0x23 (TU usage), which are the 33rd and 36th bytes in the item's record respectively (as the dart pistol is the first record, that translates to the 33rd and 36th bytes counting from the start of the file). In your screenshot, 0x20 is at the start of the third row, and you'll notice that both it and 0x23 are set to values of 0 - the game translates this to "weapon doesn't have auto-fire". So all you need to do is put the values you want in there and save the file. Auto-fire will then show up as an option for that weapon in the game. Say you wanted to do the same thing with the Gas Cannon. That's the fifth weapon in the file, so if each weapon gets a 54 byte record, then the four records before it means it starts from byte 54 x 4 = 216 (or 0xD8). Two rows down from there you've got offset 0xF8 (or 248, which is 248 - 216 = 32, or, the 33rd byte in that record), which is also set to 0: Because the Gas Cannon doesn't have auto-fire. As for the dart pistol's damage, you want to be looking at the second record (its clip), which starts at the 55th byte in the file (0x36), and from there you want to be looking at the 23rd byte (offset 54 + 22 offsets = 76, or 0x4C). That byte shows a value of 0x10, which translates to decimal 16, the power the dart gun clips provide. Alter as desired. If your editor is bright enough to let you drag to select multiple bytes, and more importantly, display how many you've got selected, you'll find things a lot easier: Drag from the start of an item's record until the counter gets to the offset you want, and you've simply skipped all that mathematics. Sometimes it's not so easy to tell where a record begins (it is in THIS file because each one starts with the name of the item written out), so adjusting the window size so that each row length is a factor of the record size helps a lot there. The same record system is used for many of the game's data files. In your saves, troopers and stored in SOLDIER.DAT (best to set up one unit record the way you want it, then copy/paste the whole thing over the other unit records), whereas your base layout and store contents are in BASE.DAT. Just throwin' it out there, but although I'm not aware of any for Mac, there are a lot of Windows-based programs out there built to let you make these sort of changes easily without having to understand the underlying file structures ("game editors" and so on). If you happen to have a spare Windows disc sitting about it might be worth looking into Bootcamp. Link to comment Share on other sites More sharing options...
CarlFriedrichRifle Posted April 29, 2013 Author Share Posted April 29, 2013 Thanks,Rather than doing boot camp, for a number of reasons, I've been looking into getting a PC again (cost,and this lap top is from 2009). Problem is that I'm in Geneva, and I can't stand the keyboards that the computers they sell here come equipped with (and I'd want a laptop, complicating the keyboard thing further). The craft weapons are in another file, I presume? I think I can make due with this method for now. I've already made a spreadsheet with the old values, and then a spreadsheet with what i want the new weapon values to be. Its a shame I can't change the research required for Coelacanth Gauss...I'm guessing I can't buff the chassis stats for Coelacanth Gauss, without also buffing the Gas Cannon/Aqua jet torpedo variants.'tis a shame, it makes no sense to have it require the research needed to make Displacers. Link to comment Share on other sites More sharing options...
Bomb Bloke Posted April 29, 2013 Share Posted April 29, 2013 Craft weapons will be in Geoscape.exe somewhere, along with the default stats for most everything else that isn't suitable for ObData.dat. Best bet is to search for the weapon powers you know, and look for matches that're close together. Ditto for finding the armour values for the tanks. It may help to know that may of the values are stored as two-byte integers (regardless as to whether they NEED to be stored that way), so expect related values to often be separated by single-byte values of 0x00. Unfortunately the data structures in the executables aren't documented so well, partly because it's more of a nuisance to find things in there, partly because the structure varies a bit depending on the exact version of the game you have. Link to comment Share on other sites More sharing options...
CarlFriedrichRifle Posted May 1, 2013 Author Share Posted May 1, 2013 Ok, the stat modding is coming along nicely... but I'm a bit confused with the SWS weapons, I don't seem to find them listed in OBDATA.dat Where are manufacturing costs set? I'd like to reduce the cost of gauss rounds for the Coelacanth gauss... Link to comment Share on other sites More sharing options...
NKF Posted May 1, 2013 Share Posted May 1, 2013 These are all in the executables Im afraid. SWS weapons are in Tactical.exe and the prices in Geoscape.exe. The wiki does have the hex offsets for these that can point you in the right direction though some of it is mixed in with the discussions. -NKF Link to comment Share on other sites More sharing options...
CarlFriedrichRifle Posted May 1, 2013 Author Share Posted May 1, 2013 Its a shame one can't easily mod the craft and SWS weapons, the entire gauss tree is a let down after the rifle (not that the rifle is all that great, but it suffices against aquatoids and gillmen) - heavy gauss is just crap, and so is the gauss cannon and coelacanth gauss. I've buffed the heavy gauss to the point where heavy gauss should be adequate (but not optimal) for use against Lobstermen - and the gauss rifle is now better than a Gas cannon firing HE rounds (while the gauss pistol's power has been lowered, but its accuracy increased, ammo capacity for all gauss weapons doubled).I also tweatked many of the weapon stats- generally,"cannons" have the highest aimed shot accuracy*, TU cost, and damage from a single shot for their tech level"rifles" have the highest snapshot accuracy for their tech level (and can get off 3 snapshots) and can do the most damage(before armor) per turn*,"pistols" have the lowest TU costs, and lowest accuracy,going pistol->rifle->cannon means the ability to deal more damage before reloading* Hydrojets have lower aimed accuracy than harpoons, which are lower than gas cannon,Hydrojets do more raw damage per turn than harpoons, which do more raw cumulative damage per turn than gas cannons (due to autofire).Hydrojet damage per shot is now much closer to the Gas cannonThe Heavy Gauss gains autofire, making it somewhat resemble a higher tech hydrojet cannon, but the TU cost is such that it can only do 1 auto fire per turn, with very poor accuracy. Starting weapons: inferior damage and accuracy.Gauss: most damage per turn, before resists and armor, thanks to autofireSonic: most damage per shot, highest accuracy Result is: Sonic cannon snapshot accuracy nerfed (tu cost reduced a bit), Sonic Rifle snap TU cost reduced, Sonic pistol accuracy and damage nerfed, TU costs reduced, all sonic weapons have had their magazines increased to varying amounts. I just wish I could buff the SWS's so that the gas cannon on the coelacanth isn't worse than the Gas cannon/hydrojet (likewise for other SWSs), and the Gauss cannon isn't inferior to DUP torpedos Link to comment Share on other sites More sharing options...
NKF Posted May 2, 2013 Share Posted May 2, 2013 The sonic pistol was always one of the most dangerous weapons to go up against in this game until the alien phased it out and you got Ion Armor for everyone. Mainly for its reaction fire + high damage that could easily catch you off guard. Conversely, the sonic cannon, while dangerous, was one you rarely had to worry about attracting reaction fire from if you know the alien had moved the previous turn. By lowering its accuracy and increasing its snapshot firing speed, it'll likely be a much deadlier weapon. What did you set the snapshot accuracy and cost to? - NKF Link to comment Share on other sites More sharing options...
CarlFriedrichRifle Posted May 2, 2013 Author Share Posted May 2, 2013 I reduced the sonic cannon snapshot cost from 50% to 45% (I considered 48-49% TUs, but then decided I wanted to stick with multiples of 5), so 2 snaps leave 10% TU's to spare, which is 8-9 TUs at the cap. Its not much, but it means one can always kneel and turn to face a target before firing twice, or even move two tiles forward before firing twice (which is very useful in close quarters) I lowered its snap accuracy to 75%... I was considering nerfing it more, but I didn't want to over nerf the Sonics while mostly buffing the gauss, and since it is an end game weapon (the aliens cease using the pistol, and then the rifle becomes rare), there is a bit of an argument for making it a weapon that can do everything. As for the pistol, its aimed shot cost was reduced 50->45%, its snap cost down 30->25%, its aimed accuracy 85->80% (Gauss Pistol accuracy 70->75%, dart pistol 80->70%) Snap accuracy 65->55%, (gauss pistol's snap accuracy 40->50%, dart gun snap 40->45%). Damage reduced from 80->70 (keep in mind, I also lowered GP's damage, Dart guns damage was unchanged). The damage progression from Pistol->Rifle->Cannon now more closely resembles that of dart gun-> harpoon gun -> gas cannon. By the time one gets Ion armor, Sonic pistols aren't in use by the aliens anyway, so the damage may be more of a nerf to the player. Granted it does help when using plastic aqua armor -> even so, the pistol still easily penetrates the front armor of plastic aqua armor, which can't be said of the sonic cannon vs magnetic ion armor (which can do a maximum of 130*1.5*0.9-142 = 33.5 damage against the front armor. By the way-I'm playing the earlier version where one needs a lobsterman navigator to get the subs and mag ion armor, which naturally holds back research of subs/mag ion armor/displacers Link to comment Share on other sites More sharing options...
NKF Posted May 3, 2013 Share Posted May 3, 2013 Hmm, making the Sonic Pistol faster will likely make it a much more dangerous weapon even with the damage and accuracy drop. Not a bad thing mind you, to increase the challenge. The main problem with playing the older version of TFTD is the loss of (recovered and personal) equipment when you go on 2-parter missions. Make sure you bring everything with you, even the extras you normally leave in the Triton. - NKF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now