Help! ByNameModding

Landnage

Platinian
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.
 
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 ?
 
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.
 
Back
Top Bottom