Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access in-game data? #1

Open
bo3tools opened this issue Feb 22, 2021 · 1 comment
Open

How to access in-game data? #1

bo3tools opened this issue Feb 22, 2021 · 1 comment
Labels
priority:low question Further information is requested

Comments

@bo3tools
Copy link

Is there a way to read the current in-game data, like player's HP or AC (u.uhp, u.uac from struct you) and level object data from the generated JS code? I've seen the create_global function that looks like it makes a setter/getter that references a set pointer but I couldn't find any examples on how is it used and how to get global struct offsets of the game.

@apowers313
Copy link
Owner

You would have to export the variables as a global in NetHack. See CREATE_GLOBAL in sys/libnh/libnhmain.c

@apowers313 apowers313 added question Further information is requested priority:low labels Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants