{"id":16455220,"url":"https://github.com/asiern/replicanthook","last_synced_at":"2025-03-23T10:32:40.755Z","repository":{"id":48329573,"uuid":"336524268","full_name":"Asiern/ReplicantHook","owner":"Asiern","description":"NieR Replicant ver.1.22474487139 Memory Hook","archived":false,"fork":false,"pushed_at":"2023-04-10T13:26:06.000Z","size":63,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T19:51:53.041Z","etag":null,"topics":["hook","memory-hacking","modding-resources","modding-tools"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Asiern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-06T11:42:39.000Z","updated_at":"2023-12-20T09:22:33.000Z","dependencies_parsed_at":"2024-10-11T10:21:41.292Z","dependency_job_id":"d4aeb6d9-eb01-461d-b74e-a3e98de1e603","html_url":"https://github.com/Asiern/ReplicantHook","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asiern%2FReplicantHook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asiern%2FReplicantHook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asiern%2FReplicantHook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asiern%2FReplicantHook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asiern","download_url":"https://codeload.github.com/Asiern/ReplicantHook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090844,"owners_count":20559296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hook","memory-hacking","modding-resources","modding-tools"],"created_at":"2024-10-11T10:21:32.512Z","updated_at":"2025-03-23T10:32:40.230Z","avatar_url":"https://github.com/Asiern.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NieR Replicant Hook\n\nA C++ library to attach to the NieR Replicant process and read/write memory.\n\n[Using ReplicantHook](#using-replicanthook) \u003cbr\u003e\n[Memory Reference](#memory-reference)\u003cbr\u003e\n[ReplicantHook Reference](#replicanthook-reference)\n\n## Using ReplicantHook\n\n```\n#include \u003ciostream\u003e\n#include \"ReplicantHook.hpp\"\n#include \u003cthread\u003e\nusing namespace std;\n\n//Function used to exit the program\nvoid ENDPressed(ReplicantHook* hook) {\n\twhile (true) {\n\t\tif (GetKeyState(VK_END) \u0026 0x8000) //END button pressed\n\t\t{\n\t\t\t//Disable cheats before exiting\n\t\t\thook-\u003eInfiniteHealth(false);\n\t\t\thook-\u003eInfiniteMagic(false);\n\t\t\t//Stop hook\n\t\t\thook-\u003estop();\n\t\t\treturn; //exit function\n\t\t}\n\t}\n}\n\n\n/*This is a showcase program of the hook\n* As NieR Replicant ver.1.22474487139 is a x64 program, you must compile this solution in x64.\n*/\nint main()\n{\n\t_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); //Look for memory leaks\n\n\tReplicantHook hook = ReplicantHook(1); //Pass game version as parameter\n\tcout \u003c\u003c \"Replicant Hook\\n\";\n\tcout \u003c\u003c \"Hooking...\" \u003c\u003c endl;\n\t//Hook to process\n\twhile (!hook.isHooked()) {\n\t\thook.start();\n\t\tSleep(500);\n\t}\n\tcout \u003c\u003c \"Hooked\" \u003c\u003c endl;\n\n\t//Enable some cheats\n\thook.InfiniteHealth(true);\n\thook.InfiniteMagic(true);\n\n\t//Create a thread to exit when the 'END' button is pressed\n\t//thread exitThread(ENDPressed, \u0026hook);\n\n\t//Print some values\n\twhile (hook.isHooked()) {\n\t\thook.update();\n\t\tcout \u003c\u003c \"Magic \" \u003c\u003c hook.getMagic() \u003c\u003c endl;\n\t\tcout \u003c\u003c \"Health \" \u003c\u003c hook.getHealth() \u003c\u003c endl;\n\t\tcout \u003c\u003c \"Gold \" \u003c\u003c hook.getGold() \u003c\u003c endl;\n\t\tcout \u003c\u003c \"Zone \" \u003c\u003c hook.getZone() \u003c\u003c endl;\n\t\tSleep(500);\n\t\tsystem(\"cls\");\n\t}\n\n\t//Join thread and exit\n\t//exitThread.join();\n\n\treturn 0;\n}\n```\n\n---\n\n## Memory Reference\n\nYou can find all the used IDs and offsets [here](https://docs.google.com/spreadsheets/d/14InwW9gADoyNCYglMC1XKAQ8ynC-UG6q9iGekA2w56Y/edit?usp=sharing)\n\n---\n\n## ReplicantHook Reference\n\n#### Version codes\n\n- `v1.0.0.0` \u003e `0`\n\n- `v1.0.3.0` \u003e `1`\n\n#### Methods\n\n- `start` - attach the hook to `NieR Replicant ver.1.22474487139.exe` process\n- `stop` - detach the hook from process\n- `isHooked` - return true if hooked\n- `getProcessID` - returns process ID\n- `update` - refresh hook \u0026 attributes\n- `getLevel` - return player's Level\n- `getHealth` - returns player's Health\n- `getMagic` - returns player's Magic\n- `getGold` - returns player's Gold\n- `getZone` - returns world's Zone\n- `getName` - returns player's Name\n- `getX` - returns player's X position\n- `getY` - returns player's Y position\n- `getZ` - returns player's Z position\n- `getActorModel` - returns current actor model name\n- `setX` - sets player's X position\n- `setY` - sets player's Y position\n- `setZ` - sets player's Z position\n- `setPosition` - sets the position of the player\n- `setHealth` - sets player Health\n- `setMagic` - sets player's Magic\n- `setGold` - sets player's Gold\n- `setZone` - sets world's Zone\n- `setName` - sets player's Name\n- `setLevel` - sets player's Level\n- `setActorModel` - sets actor model (you need to trigger a loading zone to see the results)\n- `InfiniteHealth` - enables or disables infinite Health\n- `InfiniteMagic` - enables or disables infinite Magic\n- `addItem` - adds items to inventory\n- `removeItem` - removes items from inventory\n- `getInventory` - returns the game Inventory and respective memory offsets as a map\n\n## Contributors\n\n- [`DeepGameResearch`](https://twitter.com/DeepGameRes) - model addresses finding\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasiern%2Freplicanthook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasiern%2Freplicanthook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasiern%2Freplicanthook/lists"}