DurtyFree/gta-v-data-dumps

Ped Component Variations dump drawable ids wrong

DurtyFree opened this issue · 6 comments

Creating the complete ped component variations dump includes calculating drawable ids. These drawable ids are currently not correctly calculated.

This needs some more research, I havent got time yet to dive deep into this. This issue is open for any tip & discussion.

I have tried to get some error pattern dlc based in your file... but its realy strange...
What I found out is, that inside a dlc inside one componentVariation the offset is the same. But it differs from dlc to dlc and from component to component.

Here is the beginning of the list... I have not done it for all dlcs just for a few. If its help I can do this also for the other.

[{
"DlcName": "Male_freemode_beach",
"ComponentVariationsOffset": [
"2":-1,
"4":-1,
"6":-1,
"7":-1,
"8": -1,
"11":-1,
]
},
{
"DlcName": "Female_freemode_beach",
"ComponentVariationsOffset": [
"2":-1,
"4":-1,
"6":-1,
"7":-1,
"8": -1,
"11":-1,
]
},
{
"DlcName": "Female_freemode_business",
"ComponentVariationsOffset": [
"1":-1,
"2":-1,
"4":+3,
"6":+1,
"7":0,
"8": +4,
"11":+4,
]
},
{
"DlcName": "Male_freemode_business",
"ComponentVariationsOffset": [
"1":-1,
"2":-1,
"4":-1,
"6":+2,
"7":+2,
"8": +5,
"11":+4,
]
},
{
"DlcName": "Male_freemode_valentines",
"ComponentVariationsOffset": [
"1":-7,
"4":-2,
"6":-2,
"7": -5,
"8": -5,
"11":-5,
]
},
{
"DlcName": "Female_freemode_valentines",
"ComponentVariationsOffset": [
"1":-7,
"2":-7,
"4":-2,
"6":-2,
"7": 0,
"8": -2,
"11":-5,
]
}]

Hi @Mindsaver thanks for the effort you have put into your research, it makes sense combined with what I know so far

In order to calculate the drawable ids, from my understanding I have to rebuild the logic that GTA uses on startup to decide the load order of all DLC packs / patches, I havent got behind this fully yet. But this would explain the offsets from collection to collection.

For the "component to component" offset It depends on the way I currently count the drawable id up per component. It depends on the gender & component type currently. When generating the component drawable ids, i just count up for the same gender & component type

I think only with deep research into the GTA engine this can be answered. Until this its only possible to retrieve this component data (with correct drawable id) from the GTA memory I guess.

Until this its only possible to retrieve this component data (with correct drawable id) from the GTA memory I guess.

How would that be possible?

Until this its only possible to retrieve this component data (with correct drawable id) from the GTA memory I guess.

How would that be possible?

hi, you need to write your own software that reads GTA memory at certain memory locations, which requires some reverse engineering in before. Its not straight forward. There is some method tho to retrieve minimal data using natives, like getting the max num of some component types and iterate that + retrieve name for example
I have decided against any approach that requires GTA to run, for all my dumps. So I am basically working with GTA game files only to retrieve the data I require
Only issue here is that to apply some things ingame, often an id is needed, which is generated at game startup time. To be able to create those ids (without having the game to run) I need to reverse and dig into GTA logics to create those ids

@Mindsaver If you want to do more error pattern matching, you can check out this version of the dump which contains the DrawableId I have retrieved from the game (which should be correct) and the DrawableIdGuess, which I have calculated on my own (which is most likely wrong).
You can try to resolve patterns how the gaps between the ids happen, most likely because of some wrong dlc load order I have, or some wrong drawables order.

pedComponentVariations.zip

With the latest commit I have fixed most drawable ids (for now / temporarily) by mixing GTA shop data with drawable ids retrieved from GTA runtime. I have also added all missing singleplayer components / props.
f12521c