Jump to content

xcomutil and gauss weaponry


illegal youth

Recommended Posts

hello everyone....

 

thought i'd see if anyone can help me figure this out. i'm messing around with the xcomutil.cfg file to get rid of some of the forced changes. i've already set my barracudas and mantas back to intercept only, but i'd also like to fix the gauss weapons so they use ammo once again. i do want to use the improved weapons because of the other changes made to the dart pistol and the heavy gauss. so here are the lines of code i'm looking at:

 

// Patches for Improved Weapons

 

:IWpnXcom

 

0x0000: .P .i .s .t .o .l 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 03 00 05 01 02 01 FF FF 0C 0C FF 3C 3C 4E 36 12 1E 08 09 64 32 14 05 00 01 01 01 01 00 00 00 00 00

0x0012: .H .e .a .v .y . .L .a .s .e .r 00 00 00 00 00 00 00 00 00 06 06 78 0C 02 03 FF FF FF 02 02 03 00 4B 6E 00 21 3C 0A 08 64 32 14 12 00 00 01 01 01 00 01 00 00 00

0x0016: .H .i .g .h . .E .x .p .l .o .s .i .v .e 00 00 00 00 00 00 16 16 C8 04 02 01 FF FF FF 0F 0F 02 00 00 00 00 00 00 0A 08 .d .2 14 06 01 00 00 00 00 00 00 00 00 00

 

:IWpnTftd

 

0x0000: .D .a .r .t . .P .i .s .t .o .l 00 00 00 00 00 00 00 00 00 03 03 00 05 01 02 01 FF FF 0C 0C FF 28 28 50 3C 14 32 00 08 64 32 14 05 00 01 01 00 01 00 00 00 00 00

0x0010: .G .a .u .s .s . .P .i .s .t .o .l 00 00 00 00 00 00 00 00 05 05 28 04 01 02 FF FF FF 10 10 03 1E 28 46 1E 19 32 00 08 64 32 14 07 00 01 01 00 01 00 00 00 00 00

0x0011: .G .a .u .s .s . .R .i .f .l .e 00 00 00 00 00 00 00 00 00 00 00 50 07 01 03 FF FF FF 01 01 03 32 41 64 28 1E 3C 00 00 64 32 14 08 00 01 01 00 01 00 01 00 00 00

0x0012: .H .e .a .v .y . .G .a .u .s .s 00 00 00 00 00 00 00 00 00 06 06 78 0C 02 03 FF FF FF 02 02 03 28 4B 6E 32 21 42 00 08 64 32 14 12 00 01 01 00 01 00 01 00 00 00

 

does anyone know what i would change to get ammo back for gauss weaponry?

 

thanks!

 

edit: i did a little research on here and discovered i needed a hex editor to view the obdata.dat file, which stores the weapon values. did that, and now i see where these number come from, but i don't know which corresponds to ammo! so a little help would be much appreciated...

Link to comment
Share on other sites

does anyone know what i would change to get ammo back for gauss weaponry?

 

thanks!

 

edit: i did a little research on here and discovered i needed a hex editor to view the obdata.dat file, which stores the weapon values. did that, and now i see where these number come from, but i don't know which corresponds to ammo! so a little help would be much appreciated...

Well, take a look at the OBDATA page on the UFOPaedia website. It pertains to EU, but can be used for TFTD as the structure is the same.

 

I think the ammo-less weapons have that quality because of offsets 26-28 in obdata.dat (columns 27-29). The first one in the range (offset 26 or column 27) is the ammo the weapon uses. At least in my version of TFTD, the values for the Gauss Pistol is 47, 48 for the Gauss Rifle and 49 for the Heavy Gauss Cannon. The other two offsets are 255 (Gauss only uses one ammo type). So edit these values in there and you should be good to go. Not sure if xcomutil mucks with clip size so you might have to edit offset 38 (column 39) to for the Gauss clips to 20, 15 and 10. Hope this helps. If not, I'm sure NKF or Bomb Bloke will be by to catch something I've overlooked. :)

 

Oh, I almost forgot. For the Dart Pistol, edit offset 26 to have a value of 1 (255 for 27-28). Dart pod ammo clip size should be 12, so if it is different in your game change offest 38 to reflect this.

 

- Zombie

Link to comment
Share on other sites

Zombie is on the right track, but there is a little more to it...

 

BTW, the dart pistol is already set to use clips (offset 26 is already set to 01)

 

Now, you mentioned editing xcomutil.cfg to make the changes...if this was the method you were planning to use, remember that you'll need to re-run XCUsetup...and then you'll still have to change the damage values for the clips in obdata.dat manually if you want the Gauss weapons to have the XcomUtil improved values, so I'd recommend just editing obdata.dat manually (remember to backup the file FIRST)

 

Now, like Zombie sez, offset 26 should be set to 47(2F), 48(30), or 49(31) respectively for the G.Pistol, G.Rifle, and Gauss Cannon (values in parens are Hex)

 

Next, you'll need to change offset 22 (weapon damage) to 00...that's right, 0! See, weapons that use ammo don't do damage...the ammo does!

 

I seriously doubt that XcomUtil messed with the gauss clips (no reason to), so if you want the 'improved' damage values you'll need to update offset 22 (weapon damage) for each of the clips: line 47 is the gauss pistol clip (update offset 22 to 40(28)), line 48 is gauss rifle clip (update to 80(50)), and line 49 is gauss cannon (update to 120(78))

 

Finally, as Zombie suggested check to make sure that offset 38 (ammo count) is correct for each clip: pistol(line 47)=20(14), rifle(line 48)=15(0F), cannon(line 49)=10(0A)

 

A couple of observations:

1] the damage of the 'improved' pistol is REDUCED!! (40 vs 45)

2] the damage of the rifle is increased to 133% (80 vs 60)

3] the damage of the cannon is increased to 160%! (120 vs 75)...additionally, the cannon's new stats make it a COMPLETELY different class of weapon (original gauss cannon had NO auto, 50/40 (Acc%/TU%) snap, and 90/80 aimed...the new version has 40/50 auto, 75/33 snap, and 110/66 aimed)...so its MUCH faster, MUCH more accurate, has autofire, and does 160% damage...seems way over the top, but now I understand why ppl say these things actually work vs Lobstermen...

 

Crus8r

Link to comment
Share on other sites

thanks for the replies, everyone. i got impatient yesterday, so i compared the original obdata.dat numbers to the xcomutil numbers and found that columns 15 and 20 were different (refering to my post above), so i reverted those back to the original, and i got clips back. not sure if this was the best solution (maybe i should put column 20 back to xcomutil's setting?) because now the game crashes everytime i exit geoscape. but that doesn't really matter since xcomutil splits the .exe, so tactical always loads. a minor annoyance, but nothing that stops the game. but, upon review of the replies, it seems i did something right, heh. i'll go over the files again with the other suggestions when i have the time.

 

the reason i wanted to edit xcomutil's weapons patches is because i wanted the program for other reasons (auto re-equip, auto sort, fodder's patch, a heavy gauss worth using, the alternate base start--not the improved one, etc.) but didn't want the unlimited ammo change made to gauss weapons, or the changes made to the subs.

Link to comment
Share on other sites

Ok, I think I see where you're coming from...

 

First off, when referring to columns (Zombie and I have been using the term "offsets", which is hex-editing lingo), you should start at the very beginning of the line (the G in Gauss Pistol, for example) and it is standard practice in hex-editing to start counting at zero...so 'offset 0' for the Gauss Pistol is the letter G, while 'offset 6' would be the P.

 

If you count this way, I believe that you'll find that what you're calling columns 15 & 20 would be offsets 26 and 31...check and see before you proceed.

 

I must admit that I missed the change to offset 31 :) ...this controls the damage type, and it should be 255(FF) for Gauss weapons that use clips (remember that weapons that use clips don't do damage...the ammo does)...XcomUtil set this to 03 because that is the value for Gauss damage, but clip-using weapons get their damage types set by the clip (think about the Gas Cannon for a sec...its damage type (and amount) depends on the clip type, right?)

 

Did you change offset 22 (I believe you would have called it column 11) to 00? This might be causing the crash as the game trys to reconcile the fact that your weapon has a damage value set, but also uses clips that have a damage value as well.

 

BTW, when I listed numbers to change, I gave the decimal value followed by the hex value in parens...with these pointers in mind, try the suggestions I made before and see if that straightens everything out...

 

@Zombie: I don't believe that weapon editing is one of the abilities of the Clarkwehyr Editor...at least, not the version I'm using (v1.52, which is the same as indicated on the link you provided.) Is there another version, or were you thinking of a different editor?

 

Crus8r

Link to comment
Share on other sites

ah ok. i'll remember the standard counting stuff in hex editing for the future. good to know.

 

i actually did not change offset 22. i realized that was damage when comparing the numbers to the changes made on the high explosive. when i saw that value was set to 200 decimal, i realized it was the damage offset. i left those alone on the gauss weapons. offsets 26 and 31 (upon checking) are the only ones i changed. i wonder if there is a way to change the clip damage? it doesn't really matter that much... although i do like having a heavy gauss that does 120 damage!

 

but, then again, because i've reactivated clips, are my "improved" gauss weapons really only doing their normal damage values of 45, 60, and 75 instead of 40, 80, and 120?

Link to comment
Share on other sites

Well, like I said, I think its possible that the non-zero value at offset 22, combined with the damage values from the clips, may be whats causing your crashes...try zeroing them (trust me, the weapons will still do damage as long as you're using clips)

 

To get the XcomUtil damage values, you'll need to update offset 22 for each of the clips: line 47 is the gauss pistol clip (update offset 22 to 40(28)), line 48 is gauss rifle clip (update to 80(50)), and line 49 is gauss cannon clip (update to 120(78))

 

Remember that if you're using a hex editor, you should use the values in parenthesis, as they are the hex equivalents of the decimal numbers...also most hex editors will start counting lines at 0, so you might be thinking lines 48, 49, and 50...just check the label at the start of the line, it will tell you what each is.

 

Crus8r

Link to comment
Share on other sites

ok, here's what i've done:

 

0x0010: .G .a .u .s .s . .P .i .s .t .o .l 00 00 00 00 00 00 00 00 05 05 00 04 01 02 2F FF FF 10 10 FF 1E 28 46 1E 19 32 00 08 64 32 14 07 00 01 01 00 01 00 00 00 00 00

0x0011: .G .a .u .s .s . .R .i .f .l .e 00 00 00 00 00 00 00 00 00 00 00 00 07 01 03 30 FF FF 01 01 FF 32 41 64 28 1E 3C 00 00 64 32 14 08 00 01 01 00 01 00 01 00 00 00

0x0012: .H .e .a .v .y . .G .a .u .s .s 00 00 00 00 00 00 00 00 00 06 06 00 0C 02 03 31 FF FF 02 02 FF 28 4B 6E 32 21 42 00 08 64 32 14 12 00 01 01 00 01 00 01 00 00 00

0x002F: .G .a .u .s .s . .P .i .s .t .o .l . .C .l .i .p 00 00 00 39 4E 28 02 01 01 FF FF FF 1B 1B 03 00 00 00 00 00 00 14 08 64 32 46 02 00 00 00 00 00 01 00 00 01 00

0x0030: .G .a .u .s .s . .R .i .f .l .e . .C .l .i .p 00 00 00 00 3D 4E 50 03 01 01 FF FF FF 1C 1C 03 00 00 00 00 00 00 0F 08 64 32 46 03 00 00 00 00 00 01 00 00 01 00

0x0031: .G .a .u .s .s . .C .a .n .n .o .n . .C .l .i .p 00 00 00 3E 4E 78 04 01 01 FF FF FF 1D 1D 03 00 00 00 00 00 00 0A 08 64 32 46 04 00 00 00 00 00 01 00 00 01 00

 

i think this is right...

 

the game still crashes when i exit geoscape. i did a fresh install and everything.

Link to comment
Share on other sites

Well, that is all correct...so I have no idea why your game is crashing :)

 

On the other hand, your Gauss weapons are all set with the improved values, and still use clips...so you got that fixed up... :)

 

Since you said that the crashes are not keeping you from playing, I guess that'll work for now...

 

Crus8r

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