Owen007

valo skin changer

Sep 6th, 2021 (edited)
6,652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.82 KB | None | 0 0
  1. Since I am slowly drifting away from this game and getting bored of it, decided to release this, I also think is about time for p2cs to start showing skin hacks, and of course this will only be possible if they are fed a paste.
  2.  
  3. Weapon effects, sound effects,animations and the scope wont be applied.
  4.  
  5. It is intended for internal cheats. It is not .pak editing, it is not a cheat release, it it is a feature release, you need a working cheat base to make it work, thread is meant for developers with already the basic knowledge.
  6. If you don't understand the code below and you don't know what to do with this, I recommend you leave this thread since there is nothing useful in here for you, for now.
  7.  
  8. Lets start.
  9.  
  10. Valorant won't load skin mesh/material objects if you or any other player in the match doesn't own the skin, so we need to force load it, for that we will use unrealengine function StaticLoadObject
  11.  
  12. Code:
  13. SIG: E8 ? ? ? ? 48 89 83 ? ? ? ? 48 8B 4C 24 ? 48 85 C9 74 05
  14. typedef uintptr_t(__fastcall* staticLoadObject_t)(UObject* objectclass, UObject* InOuter, const wchar_t* origInname, const wchar_t* filename, UINT32 LoadFlags, uintptr_t Sandbox, bool AllowReconciliation, uintptr_t InstancingContext);
  15. extern staticLoadObject_t fn_StaticLoadObject;
  16.  
  17. Alright, now we have the most important function to load objects that aren't loaded, now we need to get the weapon material and mesh.
  18.  
  19. Code:
  20.    auto MaterialClass = Engine::FindObject(L"/Script/Engine.MaterialInstanceConstant");
  21.    auto StaticWeaponMesh = Engine::FindObject(L"/Script/Engine.SkeletalMesh");
  22.  
  23. material = Engine::fn_StaticLoadObject((Engine::UObject*)MaterialClass,
  24.        0, L"/Game/Equippables/Melee/Dragon/1P/Materials/EQ_Melee_Dragon_MI.EQ_Melee_Dragon_MI", 0, 0, 0, true, 0);
  25.  
  26. wepmesh = Engine::fn_StaticLoadObject((Engine::UObject*)StaticWeaponMesh,
  27.        0, L"/Game/Equippables/Melee/Dragon/1P/Models/GN_Melee_Dragon_Skelmesh.GN_Melee_Dragon_Skelmesh", 0, 0, 0, true, 0);
  28.  
  29. Nice, now we have the material and mesh, now we just need to apply it, we can either do this by calling UpdateMesh and UpdateMaterial or with the following code:
  30.  
  31. Code:
  32. void ApplySkin(uintptr_t Mesh, uintptr_t Material, uintptr_t weapon)
  33.    {
  34.  
  35.        if (Mesh && Material && weapon) {
  36.  
  37.            uintptr_t pMesh1P = *(uintptr_t*)(weapon + OFF_WEAPONMESH1P);
  38.  
  39.            if (pMesh1P) {
  40.  
  41.                *(uintptr_t*)(pMesh1P + OFF_SKELETALMESH) = Mesh;
  42.                *(uintptr_t*)(pMesh1P + 0x20) = Material;
  43.                *(uintptr_t*)(pMesh1P + OFF_OVERRIDEMATERIALS) = pMesh1P + 0x20;
  44.                *(uint32_t*)(pMesh1P + OFF_OVERRIDEMATERIALS + 8) = 1;
  45.            }
  46.        }
  47.    }
  48.  
  49. How can we find the names of the mesh/material for the skins ?
  50. That is easy, they can be found inside the paks, use FModel to explore the paks.
  51.  
  52. Code:
  53. AES KEY: 0x4BE71AF2459CF83899EC9DC2CB60E22AC4B3047E0211034BBABE9D174C069DD6
  54. AES KEY SIG: C7 45 ? ? ? ? ? C7 45 ? ? ? ? ? C7 45 ? ? ? ? ? C7 45 ? ? ? ? ? 0F 10 45 D0
  55.  
  56. Example for the Vandal dragon skin:
  57. Load the paks folder, navigate to
  58.  
  59. ShooterGame->Content->Equippables->Guns->Rifles->AK->Dragon->1P->Materials, then click on the Assets tab, look for the _MI one, and thats the asset u want
  60.  
  61. Then the material path to load the object would be. /Game/Equippables/Guns/Rifles/AK/Dragon/1P/Materials/AK_Dragon_MI.AK_Dragon_MI
  62.  
  63. The mesh resides in the same AK/Dragon folder, inside the Models, look at the example code up to find the path for relative skins.
  64.  
  65. Voilà, and from now on all p2c will offer skin hacks, enjoy.
  66.  
  67. Something extra, if you call this function Function/MainMenuCheatManager/UnlockAllSkin it will unlock all skins in the menu, you can apply them and it will be persistent even after game restart, but of course you wont own them and they wont load ingame, but it is interesting. https://i.imgur.com/Ozj1A2T.png
Add Comment
Please, Sign In to add comment