D3D9 Model recognize - problem

Posts 1–6 of 6 · Page 1 of 1
D3D9 Model recognize - problem
Hello, I would like to ask:

I am making wallhack in d3d9, I am trying to recognize models but I have problem:

The game uses the same Stride, NumVertices, primCount for models in team #1 and also in team #2, is there any way I can separate them?

So team #1 will use green color, team #2 red color..

Thanks

I use to have the same issue! And now I fix it
Quote Originally Posted by daiguaer View Post
I use to have the same issue! And now I fix it
Can you tell me how to fix it?

Thanks
Quote Originally Posted by imnoobsvk View Post
Hello, I would like to ask:

I am making wallhack in d3d9, I am trying to recognize models but I have problem:ⓘ

The game uses the same Stride, NumVertices, primCount for models in team #1 and also in team #2, is there any way I can separate them?

So team #1 will use green color, team #2 red color..

Thanks

You could consider is examining other attributes or properties of the models that might differ between teams. For example, you could analyze the textures, color schemes, or patterns applied to the models to determine their affiliation. This may involve examining the game rendering pipeline, shader program or texture data.
for (Texture* t : Textures)
{
if ((t->Stride == Stride) &&
(t->NumVertices == NumVertices) &&
(t->PrimCount == primCount))

this code block :
you need to recover from if else blocks to pull outside data in
This type of data is transferred differently than analytical data. You can send a private message for more information.
This is only valid for this example, if you can post the code you wrote specifically, I might be interested.
Stride/NumVertices/PrimCount matching is expected, not the bug. Those three describe the geometry batch, and both teams are the same mesh with a different skin, so no amount of tuning there will ever separate them. You need an attribute that is per-actor.

What actually differs, in the order I'd try it:

  1. Texture. Skins are almost always split per team. Inside your DrawIndexedPrimitives hook call
    Code:
    dev->GetTexture(0, &tex)
    - it just reads cached state, so you don't need a separate SetTexture hook - and use the texture pointer as the key. Resolve texture -> team once and cache it.


  1. World matrix / shader constants. One character is drawn as several consecutive primitives under the same transform. Group them with
    Code:
    GetTransform(D3DTS_WORLD)
    (or hash the vertex shader constant block), then find the constant that flips between the two teams. Engines usually pass a tint or team id rather than baking it into the model.


  1. Vertex buffer.
    Code:
    GetStreamSource(0, &vb, &offset, &stride)
    . Usually a different VB pointer per team, or one VB used with different stream offsets.


If none of that holds, stop classifying at draw time and go for the actor instead: find the entity array once, then correlate each draw to an actor by world matrix or vertex range. More work up front, but you get team, name, health and distance out of one struct, and it survives map changes - texture-pointer maps don't, because the device recreates them on reset.

Cheapest way to find the discriminator: log a fingerprint per draw (texture ptr, VB ptr, stride, numverts, world matrix hash, first few constants), stand in front of team 1, then team 2, and diff the two logs. The field that flips is your answer. Don't try to guess it from the outside.
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us