Jump to content

Quick list of abilities and their offsets in decompressed XComGame.upk


PaxEmpyrean

Recommended Posts

Switching abilities around takes some work. The Visual Perk Editor is helpful, but since it only tells you which values to replace rather than the offset of where those values are stored, it trips over itself when you have multiple instances of a skill in different trees or if you shuffle the skills around in the wrong order. To work around this, and because I'm rebuilding all of the soldier ability trees from scratch, I made a list of which value corresponds to which ability, and the offsets for each. Replacing abilities is as simple as overwriting the value at the listed offset with the value that corresponds to the ability you want instead. You don't need to start a new game for this to work with new soldiers, but existing soldiers get really weird if you mess with their ability trees.

 

Ability			Value	Location

Fire Rocket		12	6D6613
Holo Targeting		13	6D6630
Bullet Swarm		1A	6D6641
Suppression		15	6D665E
Shredder Rocket		16	6D666F
Rapid Reaction		17	6D668C
HEAT Ammo		5b	6D669D
Danger Zone		19	6D66BA
Grenadier		18	6D66CB
Will to Survive		11	6D66DD
Mayhem			5e	6D66FA
Rocketeer		5d	6D670B
			
Run & Gun		06	6D67D9
Aggression		20	6D67F6
Tactical Sense		21	6D6807
Close and Personal	22	6D6824
Lightning Reflexes	23	6D6835
Rapid Fire		24	6D6852
Flush			25	6D6863
Bring 'em On		27	6D6880
Close Combat		28	6D6891
Extra Conditioning	1b	6D68A3
Killer Instinct		29	6D68C0
Resilience		2b	6D68D1
			
Headshot		02	6D644D
Squadsight		03	6D646A
Snap Shot		10	6D647B
Damn Good Ground	0f	6D6498
Gunslinger		5f	6D64A9
Battle Scanner		08	6D64C6
Disabling Shot		09	6D64D7
Opportunist		0a	6D64F4
Executioner		0b	6D6505
Low Profile		05	6D6517
Double Tap		0d	6D6534
In the Zone		0e	6D6545
			
Smoke Grenade		2c	6D699F
Covering Fire		2f	6D69BC
Sprinter		1f	6D69CD
Smoke and Mirrors	5c	6D69EA
Field Medic		30	6D69FB
Rifle Suppression	31	6D6A18
Revive			38	6D6A29
Combat Drugs		33	6D6A46
Dense Smoke		34	6D6A57
Deep Pockets		35	6D6A69
Sentinel		36	6D6A86
Savior			37	6D6A97

Edited by PaxEmpyrean
Link to comment
Share on other sites

  • 3 months later...

Now that time has passed there are a few things that have changed on this topic:

 

1. The offset for different abilities have changed (updated values below).

2. Inspired by the Visual Perks Editor I and this thread I decided to create a tool of my own that handles offset.

 

The primary purpose was a user-friendly tool which makes it simple to visualize and create custom ability trees that can be installed with the ToolBoks mod.

 

Ironically on the very same day as the tool was created the Toolboks author anounced that he is including support for moding the abiltity trees directly in the ToolBoks mod...

But I guess it can still be used for reference or support when creating your very own distributable custom mods.

 

The tool is found here:

http://hem.bredband.net/bertrich/XCOM/PerkGen.htm

 

Current updated offset and default values are as follows:

Hex_Offset Decimal_Offset Perk_Value (Class_Rank Perk_Name)
6d6561 7169377 02 (Sniper_Squaddie: Headshot)
6d657e 7169406 03 (Sniper_Corporal_A: Squadsight)
6d658f 7169423 10 (Sniper_Corporal_B: Snap Shot)
6d65ac 7169452 0f (Sniper_Sergeant_A: Damn Good Ground)
6d65bd 7169469 5f (Sniper_Sergeant_B: Gunslinger)
6d65da 7169498 08 (Sniper_Lieutenant_A: Battle Scanner)
6d65eb 7169515 09 (Sniper_Lieutenant_B: Disabling Shot)
6d6608 7169544 0a (Sniper_Captain_A: Opportunist)
6d6619 7169561 0b (Sniper_Captain_B: Executioner)
6d662b 7169579 05 (Sniper_Major: Low Profile)
6d6648 7169608 0d (Sniper_Colonel_A: Double Tap)
6d6659 7169625 0e (Sniper_Colonel_B: In the Zone)
6d6727 7169831 12 (Heavy_Squaddie: Fire Rocket)
6d6744 7169860 13 (Heavy_Corporal_A: Holo Targeting)
6d6755 7169877 1a (Heavy_Corporal_B: Bullet Swarm)
6d6772 7169906 15 (Heavy_Sergeant_A: Suppression)
6d6783 7169923 16 (Heavy_Sergeant_B: Shredder Rocket)
6d67a0 7169952 17 (Heavy_Lieutenant_A: Rapid Reaction)
6d67b1 7169969 5b (Heavy_Lieutenant_B: HEAT Ammo)
6d67ce 7169998 19 (Heavy_Captain_A: Danger Zone)
6d67df 7170015 18 (Heavy_Captain_B: Grenadier)
6d67f1 7170033 11 (Heavy_Major: Will to Survive)
6d680e 7170062 5e (Heavy_Colonel_A: Mayhem)
6d681f 7170079 5d (Heavy_Colonel_B: Rocketeer)
6d68ed 7170285 06 (Assault_Squaddie: Run & Gun)
6d690a 7170314 20 (Assault_Corporal_A: Aggression)
6d691b 7170331 21 (Assault_Corporal_B: Tactical Sense)
6d6938 7170360 22 (Assault_Sergeant_A: Close and Personal)
6d6949 7170377 23 (Assault_Sergeant_B: Lightning Reflexes)
6d6966 7170406 24 (Assault_Lieutenant_A: Rapid Fire)
6d6977 7170423 25 (Assault_Lieutenant_B: Flush)
6d6994 7170452 27 (Assault_Captain_A: Bring em On)
6d69a5 7170469 28 (Assault_Captain_B: Close Combat)
6d69b7 7170487 1b (Assault_Major: Extra Conditioning)
6d69d4 7170516 29 (Assault_Colonel_A: Killer Instinct)
6d69e5 7170533 2b (Assault_Colonel_B: Resilience)
6d6ab3 7170739 2c (Support_Squaddie: Smoke Grenade)
6d6ad0 7170768 2f (Support_Corporal_A: Covering Fire)
6d6ae1 7170785 1f (Support_Corporal_B: Sprinter)
6d6afe 7170814 5c (Support_Sergeant_A: Smoke and Mirrors)
6d6b0f 7170831 30 (Support_Sergeant_B: Field Medic)
6d6b2c 7170860 31 (Support_Lieutenant_A: Rifle Suppression)
6d6b3d 7170877 38 (Support_Lieutenant_B: Revive)
6d6b5a 7170906 33 (Support_Captain_A: Combat Drugs)
6d6b6b 7170923 34 (Support_Captain_B: Dense Smoke)
6d6b7d 7170941 35 (Support_Major: Deep Pockets)
6d6b9a 7170970 36 (Support_Colonel_A: Sentinel)
6d6bab 7170987 37 (Support_Colonel_B: Savior)
Link to comment
Share on other sites

This tool looks really great!

 

Would you mind if it was linked to from the wiki? Even better, is it possible for it to be embedded into the perks wiki page? The current perks page is here : http://wiki.tesnexus.com/index.php/XCOM:EU_Perks

 

Also, if I provided offset values, would you be interested in adding a 2nd option to create ToolBoks custom mod entries for my upcoming expanded perk tree?

Link to comment
Share on other sites

I'd like to suggest instead the table be placed in it's own page, and that linked from the Wiki "Perks" page linked by Amineri above. Then it can also be included in other categories (such as 'Category:Enum Values XCOM Modding') or linked by other articles or mods that need the information.

 

We now have a 'Tools' page. The tool can be linked from there. Please note there is section to describe what it does as well a place for the link in the References section.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

This tool looks really great!

 

Would you mind if it was linked to from the wiki? Even better, is it possible for it to be embedded into the perks wiki page? The current perks page is here : http://wiki.tesnexus.com/index.php/XCOM:EU_Perks

 

Also, if I provided offset values, would you be interested in adding a 2nd option to create ToolBoks custom mod entries for my upcoming expanded perk tree?

I wouldn't mind at all. Would it be very impolite of me to ask if you could do it for me? I would probably spend the better part of a day figuring out how to do it and where to do it :)

I don't think it is possible to embed the tool directly in the wiki since it uses javascript.

 

Almost everything, including logic, in the tool is based on the principle that there is exactly 48 abilities and the code is very far from well structured and update friendly.

So I would probably have to rewrite more or less the entire tool to make the changes required... Challange accepted.

Just give me a few days to redesign how output is handled before I begin redesigning the entire thing :cool:

 

 

I'd like to suggest instead the table be placed in it's own page, and that linked from the Wiki "Perks" page linked by Amineri above. Then it can also be included in other categories (such as 'Category:Enum Values XCOM Modding') or linked by other articles or mods that need the information.

 

We now have a 'Tools' page. The tool can be linked from there. Please note there is section to describe what it does as well a place for the link in the References section.

 

-Dubious-

Same question to you... Would you mind helping me create the tool page? Or possibly give me a few hints how to do it?

I am completely new to the site and would be grateful for any assistance.

Link to comment
Share on other sites

I'll be happy to put an initial entry into the 'Tools' page, and then a dummy page from the template for the Table based upon what you posted here. I'll do that and send you a PM with direct links to both. Then you can edit either or both to suit yourself. And if you need a page to document your tool, we can put that up like we do for mods. Feel free to PM with any questions.

 

Don't worry about being new to the Wiki. It's been forgotten by many since it was first put up, but is getting more attention now. And it's only recently we have started to try to put some standard guildelines in place.

 

-Dubious-

Link to comment
Share on other sites

 

This tool looks really great!

 

Would you mind if it was linked to from the wiki? Even better, is it possible for it to be embedded into the perks wiki page? The current perks page is here : http://wiki.tesnexus.com/index.php/XCOM:EU_Perks

 

Also, if I provided offset values, would you be interested in adding a 2nd option to create ToolBoks custom mod entries for my upcoming expanded perk tree?

I wouldn't mind at all. Would it be very impolite of me to ask if you could do it for me?

 

Not at all impolite, but probably unrealistic ^_^. I still have many many mods in the pipeline to completion!

 

Almost everything, including logic, in the tool is based on the principle that there is exactly 48 abilities and the code is very far from well structured and update friendly.

So I would probably have to rewrite more or less the entire tool to make the changes required... Challange accepted.

Just give me a few days to redesign how output is handled before I begin redesigning the entire thing :cool:

 

The good news is that the revised GetPerkInTree functions are much more regularly structured. Each rank's hex code is exactly 22 bytes long, so offsets between the "byte-to-change" from one rank to the next follows that exactly. All the perks within a rank are in adjacent bytes.

 

For example, the support tree function header starts at hex location 0x6D6A76 in XcomGame.upk.

 

The function header takes 48 bytes, and there are two initial lines of code that take a total of 22 bytes. (both numbers here in decimal)

 

After that are 11 blocks of hex, each 22 bytes long. Each block corresponds to a rank (the code now allows up to 11 ranks, although only 1-7 will be supported in the initial release). Within each block, the perks are at offsets:

Perk 0 at offset 11

Perk 1 at offset 12

Perk 2 at offset 13

Perk 3 at offset 14 // perk 3 is defined, but will not be supported in the initial release

 

Each perk only occupies a single byte.

 

So basically to get the offset for perk 'x' at rank 'y', (assuming rank is from 1-11 and perk is from 0-3) you'd use:

 

Function_start + 48 + 22 + 22*(rank-1) + 11+(perk)

 

All four class GetPerkInTree functions follow exactly the same format. The only differences between the hex code are the initial offset, the header values, the table values for the two local variables, and the specific perks.

 

The lookup formula for each class would be identical to above -- the only difference is the Function_start value.

 

 

Psi: 0x6D63E8

Sniper: 0x6D6524

Heavy: 0x6D66EA

Assault: 0x6D68B0

Support: 0x6D6A76

 

 

The psi tree works the same as the class trees, but is limited to 4 ranks (it is a much smaller function)

Link to comment
Share on other sites

Hmm... Using functions to fetch information and make generally structured and well written code... What kind of strange magic is that? :blink:

I have been using more of a quick and dirty approach depending on a big array and a single function for everything.

So yes, as previously stated I will probably need to redesign the entire thing to be a bit more dynamic which would in turn probably be easier if I used some of that strange magic. :cool:

 

But, perhaps we can continue this discussion in a new thread related to the tool or your upcoming mod? I think we are getting pretty far from topic right now.

Edited by Bertilsson
Link to comment
Share on other sites

I'll be happy to put an initial entry into the 'Tools' page, and then a dummy page from the template for the Table based upon what you posted here. I'll do that and send you a PM with direct links to both. Then you can edit either or both to suit yourself. And if you need a page to document your tool, we can put that up like we do for mods. Feel free to PM with any questions.

Thank you, that would be very much appreciated.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...