Results 1 to 10 of 10
  1. #1
    ploko's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0

    Lightbulb 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

  2. #2
    Alen's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Location
    Liquid Generator
    Posts
    27,920
    Reputation
    2548
    Thanks
    4,224
    My Mood
    Fine
    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.

  3. #3
    ploko's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    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… :/
    Last edited by ploko; 05-27-2012 at 03:40 AM.

  4. #4
    Alen's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Location
    Liquid Generator
    Posts
    27,920
    Reputation
    2548
    Thanks
    4,224
    My Mood
    Fine
    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

  5. #5
    ploko's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    Sure I would have tried, if I only found where are the models located xD

  6. #6
    ploko's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    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
    Attached Thumbnails Attached Thumbnails
    screenshot_002.jpg  


  7. #7
    Alen's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Location
    Liquid Generator
    Posts
    27,920
    Reputation
    2548
    Thanks
    4,224
    My Mood
    Fine
    Looks cool, keep up the good work. Don't forget to share your work once you're done too

  8. #8
    ploko's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    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
    Attached Thumbnails Attached Thumbnails
    screenshot_003.jpg  

    Sans titre-1.jpg  

    Last edited by ploko; 05-28-2012 at 03:00 PM.

  9. #9
    Pitcher's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Screwing your mom.
    Posts
    524
    Reputation
    53
    Thanks
    797
    My Mood
    Flirty
    omg this looks hot ^^


    Back on the 30th of september.

    WarRock Contributer Force

    My hacks are only for WarRock International!


  10. #10
    Dubsteeq's Avatar
    Join Date
    Jun 2012
    Gender
    female
    Location
    Home.
    Posts
    130
    Reputation
    10
    Thanks
    7
    My Mood
    Fine
    Nice skin .

Similar Threads

  1. What is the new mod system thingo about?
    By epicgamer in forum Combat Arms Mod Help
    Replies: 7
    Last Post: 05-10-2011, 08:35 PM
  2. [SOLVED] about this texture mod tut
    By rowan112 in forum Call of Duty Modern Warfare Help
    Replies: 1
    Last Post: 09-11-2010, 05:12 PM
  3. [SOLVED] about texture mods
    By rowan112 in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 09-10-2010, 07:17 AM
  4. Umm what about Texture Hack for the new patch 1.0.175
    By Shai157 in forum Call of Duty Modern Warfare 2 Help
    Replies: 1
    Last Post: 01-14-2010, 08:14 AM
  5. NFV2 Bypass --> WHAT ABOUT PUNKBUSTER??!??
    By menenl in forum WarRock - International Hacks
    Replies: 2
    Last Post: 06-10-2006, 08:29 PM