Comments (5)
Hey. I haven't really worked on this project in a while, but I'd be glad to help.
I had the same problem when I was trying to port this project to DMC5, but never committed the fix. I've committed the change that should fix this. Let me know if there's anything else you need help with.
from reframework.
Thanks any improvements to the obj explorer is helpful. What I meant was I am developing my own mod https://github.com/hntd187/RE2-Mod-Framework/blob/master/src/Speedrun.cpp and I was trying to find enemy health but actually accessing this seems problematic and crashes a lot.
I get it similar to this
auto enemy_manager = globals.get<RopewayEnemyManager>("app.ropeway.EnemyManager");
but then reading it doesn't work. I was trying to read the enemy_manager->enemyList
but reading into the actual list doesn't work. The resharper export marks it as a DotNetGenericList
do you have any insight on reading this? Or if you know a better way to get the current enemy info I'm happy to use that instead, thanks a lot for the help
from reframework.
Here's a little example of how to get all the enemies' HP.
auto enemy_manager = g_framework->getGlobals()->get<RopewayEnemyManager>("app.ropeway.EnemyManager");
if (enemy_manager == nullptr) {
return;
}
// Be sure to check for null pointers.
// This is the active enemies list
auto enemy_controllers = enemy_manager->enemyControllers;
if (enemy_controllers == nullptr || enemy_controllers->data == nullptr) {
return;
}
// numElements is the total allocated, not the actual number of elements, so there could be empty entries
for (auto i = 0; i < enemy_controllers->data->numElements; ++i) {
// app.ropeway.EnemyController
auto enemy_controller = utility::REArray::getElement<RopewayEnemyController>(enemy_controllers->data, i);
// Not valid.
if (enemy_controller == nullptr) {
break;
}
// May not be necessary, if the field is guaranteed to not be corrupted.
if (!utility::REManagedObject::isManagedObject(enemy_controller)) {
continue;
}
REBehavior* hitpoint_controller = nullptr;
// Traverse the enemy controller's children to find the hitpoint controller
for (auto component = enemy_controller->childComponent; component != nullptr && component != enemy_controller; component = component->childComponent) {
if (utility::REManagedObject::isA(component, "app.ropeway.HitPointController")) {
hitpoint_controller = (REBehavior*)component;
break;
}
}
if (hitpoint_controller == nullptr) {
continue;
}
// Get the health
auto health = utility::REManagedObject::getField<int32_t>(hitpoint_controller, "CurrentHitPoint");
// Do whatever you wanted to do here.
}
from reframework.
Interesting, I was doing something very similar to this, lemme try this and get back to you, thanks a lot for the help
from reframework.
Okay that works perfectly, I wonder what I was doing wrong here, but I think I wasn't traversing to the hit point controller correctly so thanks that helps a lot.
from reframework.
Related Issues (20)
- (Most Recent Nightly Build) REFramework Menu HUGE In-Game HOT 5
- It does not detect resident evil 4 controllers HOT 1
- RE7 PC Version: Menu Option to Invert Mouse Does Not Work HOT 1
- RE8 low resolution textures HOT 2
- Dragon's Dogma 2 Update from 27.6. broke REframework HOT 6
- #971,#973,#978,#965 pd-upscaler not working HOT 4
- REFramework with Steam Emulator for Dragons Dogma 2 HOT 3
- DD2 Ray Tracing not working (Linux) HOT 2
- RE7 dx11 vr hand position bug
- DD2 Crashes on launch with OpenXR or OpenVR HOT 1
- Add option to change DLSS preset and activate Auto Exposure.
- Kunitsu-Gami: Path of the Goddess HOT 1
- kunitsu-gami path of the goddess crash HOT 2
- Reframework mod crashes just as it initializes on Capcom Screen HOT 8
- Scene timescale in SF6 only affects the menus, not the fighting itself
- BUG from RE4 Remake Steam
- RE8 left hand not tracking HOT 1
- emulation-dumper fails for Apollo Justice Trilogy HOT 2
- the log is 18gb thats not normal
- DD2 Pause Menu Misaligned
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reframework.