Help! ByNameModding

Landnage

Platinian
Original poster
Jan 14, 2022
5
2
3
24
United State
BNM::LoadClass AvailableCharacter;
BNM::Method<bool> get_IsOwned;
BNM::Method<bool> IsOutfitOwned;
BNM::Method<bool> IsSkinOwned;
BNM::Method<bool> IsOutfitLocked;

void *hack_thread(void *)
{
AvailableCharacter = LoadClass(OBFUSCATE_BNM("SYBO.Subway.Meta"), OBFUSCATE_BNM("AvailableCharacter"));

}

This is my first time using ByNameModding and it's pretty confusing. So I loaded the class AvailableCharacter and now how do I hook the method and return the value in bool or anything else.
 

TRYOFF

Platinian
Sep 2, 2020
5
0
3
25
MY HOME
C++:
BNM::HOOK(LoadClass(OBFUSCATE_BNM("SYBO.Subway.Meta"), OBFUSCATE_BNM("AvailableCharacter")).GetMethodByName(OBFUSCATE_BNM("get_method")), update, old_update);
 

Landnage

Platinian
Original poster
Jan 14, 2022
5
2
3
24
United State
C++:
BNM::HOOK(LoadClass(OBFUSCATE_BNM("SYBO.Subway.Meta"), OBFUSCATE_BNM("AvailableCharacter")).GetMethodByName(OBFUSCATE_BNM("get_method")), update, old_update);
C++:
bool (*old_isOutfitOwn)(std::uintptr_t instance);

bool _isOutfitOwn(std::uintptr_t instance) {

if (instance != NULL && options::skinUnlock) {

return true; // true, false

}

return old_isOutfitOwn(instance);

}

BNM::HOOK(AvailableCharacter.GetMethodByName(OBFUSCATE_BNM("IsOutfitOwned")), Menu::_isOutfitOwn, Menu::old_isOutfitOwn);
Is this correct ?
 

usbsocram

Platinian
Jun 22, 2023
6
0
1
33
Bom sucesso
Hello everyone,

I'm interested in learning more about ByNameModding and was wondering if anyone could share their expertise or point me towards resources or tutorials for beginners. Specifically, I'm looking for best practices and initial steps to take when using this modding approach.

Thank you in advance for your guidance!

Best regards.