LightbulbWhat about D3D texture modding

Posts 1–10 of 10 · Page 1 of 1
What about D3D texture modding
Hello

Since we can't edit WarRock's textures with direct modding, what about coding a very simple D3D "hack" that would change weapon's texture ? It would be quite simple, when drawing textures in DrawIndexedPrimitive, we could check what is the current object, i.e. the weapon, and apply the golden/red texture to it via the function D3DXCreateTextureFromFile, and the apply it to the m_pD3Ddev with SetTexture.

What do you think about this ? I tried to do it myself, but my very simple D3D hack base is detected when I come ingame.

Any help ?
Thanks
You can modify the textures directly, but some are checked for consistency on startup. The time and effort spent making an undetected D3D hook that would allow you to switch textures would be probably better spent circumventing the check on startup. But yeah, it would be totally do-able, albeit, in my personal opinion, an utter waste of time.
Probably… But don't there are recent D3D hacks that work ? If so, they use a valid D3D hook…

BTW, is there a way to get the old weapon models, such as AW50F, M24, M4A1, MP5… Back ? Just like on Korean Warrock ? These models suck… :/
Quote Originally Posted by ploko View Post
Probably… But don't there are recent D3D hacks that work ? If so, they use a valid D3D hook…

BTW, is there a way to get the old weapon models, such as AW50F, M24, M4A1, MP5… Back ? Just like on Korean Warrock ? These models suck… :/
Again, you could probably just switch the models and hope WR doesn't do any consistency checks. I'm pretty sure that if any decent hacker put their mind to it, they could bypass the consistency check
Sure I would have tried, if I only found where are the models located xD
My work is almost done !

There is a screenshot :


Now I need to find the correct vertices/stride to apply the texture only to the weapon, and after I could try to check what is the current weapon used, and set a custom look
Looks cool, keep up the good work. Don't forget to share your work once you're done too
And there it is !!! Fully working mod for weapons. Only the weapon is modded I used a simple PrimitiveCount feature, it means that in DrawIndexedPrimitive, when the PrimitiveCount is the same that the modding weapon, then we apply the texture.

To know these numbers, we have to log them like we would do with addies or vertice. It's quite simple, just select the gun, then press a hotkey that will show a popup in DrawIndexedPrimitive with various PrimitiveCount. Most of the times, they aren't greater than 200, so you know which one to use Example :




So the number to keep in your code for K2 is 2034 :
Code:
int primAW50F = 3583, primMP5k = 2447, primMP7A1 = 1417, primAIAW = 2449, primK2 = 2034;
As you can see in my code, I've found Prims for AW50F, MP5k, MP7A1 and AIAW because there are some cool textures for them. Take a look at… My AW50F !




There is the code in DrawIndexedPrimitive :
Code:
if (Stride == 32)
{
	// Here begins the "logging"
	if (currentPrim > 0) {
		char buff1[6];
		sprintf(buff1,"%d",PrimitiveCount);
		MessageBoxA(GetActiveWindow(),buff1,"Essai",MB_OK);
	}
	// Here it ends.
	if (pTextureAW50F == NULL) D3DXCreateTextureFromFile(pDevice,L"C:/CT/aw50f.dds",&pTextureAW50F);
	if (pTextureMP5k == NULL) D3DXCreateTextureFromFile(pDevice,L"C:/CT/2mp5.dds",&pTextureMP5k);
	if (pTextureMP7A1 == NULL) D3DXCreateTextureFromFile(pDevice,L"C:/CT/mp7.dds",&pTextureMP7A1);
	if (pTextureAIAW == NULL) D3DXCreateTextureFromFile(pDevice,L"C:/CT/aiaw.dds",&pTextureAIAW);

	pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
	if (PrimitiveCount == primAW50F) pDevice->SetTexture(0,pTextureAW50F);
	else if (PrimitiveCount == primMP5k) pDevice->SetTexture(0,pTextureMP5k);
	else if (PrimitiveCount == primMP7A1) pDevice->SetTexture(0,pTextureMP7A1);
	else if (PrimitiveCount == primAIAW) pDevice->SetTexture(0,pTextureAIAW);
}
The green part is the path to the texture you want to apply. I put them in the "CT" directory at my hard drive root.

And you have to define the pointers for the texture, so under the int declarations :
Code:
LPDIRECT3DTEXTURE9 pTextureAW50F = NULL, pTextureMP5k = NULL, pTextureMP7A1 = NULL, pTextureAIAW = NULL;
I think that's all… If you have any questions, feel free to ask me
omg this looks hot ^^
Nice skin .
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us