{"id":27246258,"url":"https://github.com/jones-hm/project-igi-internals","last_synced_at":"2025-04-10T21:37:07.039Z","repository":{"id":113644808,"uuid":"404397984","full_name":"Jones-HM/project-igi-internals","owner":"Jones-HM","description":"I.G.I Internal is project to access internal methods of the game by using DLL injection method","archived":false,"fork":false,"pushed_at":"2025-03-21T03:04:08.000Z","size":1242,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T08:59:51.741Z","etag":null,"topics":["game-dev","igi","igi-anya","igi-dev","igi-editor","igi-jones","igi-native","igi-qvm","igi-source","modding-tools","project-igi","project-igi-editor","qvm-editor"],"latest_commit_sha":null,"homepage":"https://igi-natives-search.netlify.app","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/Jones-HM.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-09-08T15:22:37.000Z","updated_at":"2025-03-21T03:04:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"7380ffac-2871-436b-8b32-e36a4660c1ad","html_url":"https://github.com/Jones-HM/project-igi-internals","commit_stats":null,"previous_names":["jones-hm/igi-internals","jones-hm/project-igi-internals"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jones-HM%2Fproject-igi-internals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jones-HM%2Fproject-igi-internals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jones-HM%2Fproject-igi-internals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jones-HM%2Fproject-igi-internals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jones-HM","download_url":"https://codeload.github.com/Jones-HM/project-igi-internals/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248304939,"owners_count":21081551,"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":["game-dev","igi","igi-anya","igi-dev","igi-editor","igi-jones","igi-native","igi-qvm","igi-source","modding-tools","project-igi","project-igi-editor","qvm-editor"],"created_at":"2025-04-10T21:37:06.521Z","updated_at":"2025-04-10T21:37:07.027Z","avatar_url":"https://github.com/Jones-HM.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project I.G.I Internal\n\n[Project I.G.I](https://en.wikipedia.org/wiki/Project_I.G.I.) Internal is Project to access internal methods of the game by using **DLL injection method** into the game and calling [IGI Natives methods](https://github.com/IGI-Research-Devs/IGI-Internals-Data/blob/main/IGI-Natives.json) to modify/alter the behaviour of the game.\u003c/br\u003e\nThis was originally intended for research project to understand the game mechanics and how developers worked hard to create them.\u003c/br\u003e\nSo don't use this project to misuse the game's identity and source of original game devs.\u003c/br\u003e\n\n## Pre-Requisite\n- **General section.**\n- [DLL File](https://en.wikipedia.org/wiki/Dynamic-link_library) - This project is DLL file rather than standard application.\u003c/br\u003e\n- [DLL Injection](https://en.wikipedia.org/wiki/DLL_injection) - This project needs DLL injection into _IGI_ game.\u003c/br\u003e\n- [Hooking](https://en.wikipedia.org/wiki/Hooking) - This project uses [Minhook](https://github.com/TsudaKageyu/minhook) for API calls.\u003c/br\u003e\n- [GTLibc](https://github.com/haseeb-heaven/GTLibc) -C/C++ library for interactig with Game.\u003c/br\u003e\n- [Pattern Scanning](https://memoryhackers.org/konular/external-internal-pattern-scanning-guide.95460/) - This project use pattern memory scanning to check Game/Player is loaded properly.\u003c/br\u003e\n- **Game specific section.**\n- [IGI Graphs Structure](https://github.com/IGI-Research-Devs/IGI-Research-Data/blob/main/Research/GRAPH/Graph-Structure.txt) - Project IGI 1 Graph structure data.\n- [IGI 3D Models](https://github.com/IGI-Research-Devs/IGI-Research-Data/blob/main/Research/Natives/IGI-Models.txt) - Project IGI uses 3D models in \nform of _MEF_ (**M**esh **E**xternal **F**ile).\n- [IGI Camera View](https://www.researchgate.net/figure/Definition-of-pitch-roll-and-yaw-angle-for-camera-state-estimation_fig15_273225757) - IGI use game Camera called [Viewport](https://en.wikipedia.org/wiki/Viewport) to display the game updates.\n- **Native section.**\n- Native Invoker - Native invoker is a technology to invoke native methods from Game using their **Hash** with its **Handler**. \n\n## Building DLL project.\nOpen this project in your favourite IDE _(Visual Studio)_ and build it and your output will be **Release/Debug** folder depends which configuration you choosed and you will find file _IGI-Internals-Release.dll_ so download your favourite DLL injector make sure its **x86(32-bit)** compatible otherwise injection wouldn't work or you can use recommended [IGI-Injector](https://github.com/IGI-Research-Devs/IGI-Injector) to inject DLL.\n\n## Building project for IGI Editor.\nThe project could be build for [IGI Editor](https://github.com/IGI-Research-Devs/IGI1Editor) the only thing we need to change is **Features.cpp** file we have to update with **Features file for Editor** which could be found here [Features_Editor.cpp](https://github.com/IGI-Research-Devs/IGI_Internal/blob/master/IGI_Internal/Features_Editor.cpp)\n\n\n## Modifying this project.\nYou can modify the project the only file you need to focus on is **Features file** which could be found here [Features.cpp](https://github.com/IGI-Research-Devs/IGI_Internal/blob/master/IGI_Internal/Features.cpp) in _DllMainLoop()_ method go to _MENU_SCREEN_INGAME_ section add you logic for Adding/Removing Buildings/Weapons/A.I etc into the game.\u003c/br\u003e\n\nThere are shown 5 examples into _Features.cpp_ file.\n- Enable Debug mode.\n- Restart game.\n- Weapon pickup.\n- Frames setting\n- Humanplayer load.\n\n## Adding new hashes for Natives.\nLets say you found new hash for Native now how to add them into project and use them.\nSo you have to follow the steps.\n1. First Add your Hash to _Natives.hpp_ class like this \n```cpp\n  MY_FIRST_NATIVE = 0x00402F90\n```\n2. Go to Natives folder and open _NativeHelper.hpp_ file and in any relevant section add its definition.\n```cpp\n  NATIVE_DECL void MY_FIRST_NATIVE_LOAD() { NATIVE_INVOKE\u003cVoid\u003e((Void)HASH::MY_FIRST_NATIVE); }\n```\n3. Now go to _Features.cpp_ class and use it. \n```cpp\n  // Native method.\n  if (GT_HotKeysPressed(VK_CONTROL, VK_F1)) {\n\tMY_FIRST_NATIVE_LOAD();\n  }\n```\n\n# This section requires to be updated.\n## IGI-Internals Docs\n\n## Game Section\n\n### Restarting Level.\n```cpp\nQTASK::UPDATE();\ng_AutoMsgBox-\u003eShow(\"\", 70);\nLEVEL::LOAD();\ng_AutoMsgBox-\u003eShow(\"\", 70);\n```\n\n### Starting new Level.\n```cpp\nLEVEL::SET(level);\nQTASK::HASH_INIT(1);\nQTASK::UPDATE();\nauto StartLevelCaller = (int(__cdecl*)(int))0x00416900;\nStartLevelCaller(*(PINT)0x00567C8C);\nQTASK::RESET();\n```\n\n## Resource Section.\n\n### Loading predefined resource.\n\n```cpp\nstring resource = \"LANGUAGE:objectives.res\";\nauto res_addr = RESOURCE::LOAD(resource);\nLOG_INFO(\"Resource '%s' loaded at %p\",resource,res_addr);\n```\n\n### Loading custom resource.\n\n```cpp\nstring resource = \"LOCAL:my_resource.extension\"; //Place your resource in game Local/root directory.\nauto res_addr = RESOURCE::LOAD(resource);\nLOG_INFO(\"Resource '%s' loaded at %p\",resource,res_addr);\n```\n\n### Unloading a resource.\n\n```cpp\nstring resource = \"MISSION:sounds/sounds.qvm\";\nRESOURCE::UNLOAD(resource);\n```\n\n### Unloading resources.\n\n```cpp\nstd::vector\u003cstring\u003e res_list{\"STATUSSCREEN:status.res\",\"LANGUAGE:messages.res\",\"LOCAL:menusystem/missionsprites.res\"};\nRESOURCE::UNLOAD(res_list);\n```\n\n### Unpack a resource .\n\n```cpp\nstring resource = \"LOCAL:menusystem/ingamemenu.qvm\";\nauto resource_addr = RESOURCE::UNPACK(resource.c_str());\n```\n\n### Flush a resource.\n\n```cpp\nstring resource = \"LOCAL:language/ENGLISH/menusystem.res\";\nauto resource_addr = RESOURCE::FIND(resource.c_str());\nRESOURCE::FLUSH(resource_addr);\n```\n\n### Finding resource address.\n\n```cpp\nstring resource = \"LOCAL:missions/location0/level1/terrain/terrain.qvm\";\nauto resource_addr = RESOURCE::FIND(resource.c_str());\nLOG_INFO(\"Resource '%s' loaded at address : %p\",resource,resource_addr);\n```\n\n### Checking resource loaded.\n\n```cpp\nstring resource = \"MISSION:AI/2216.qvm\";\nbool is_loaded = RESOURCE::IS_LOADED(resource);\nif(is_loaded) LOG_INFO(\"Resource is loaded\"); \n```\n\n### Saving all resource information.\n\n```cpp\nRESOURCE::ANIMATION_INFO_SAVE(\"IGI_Animations.txt\");\nRESOURCE::FONT_INFO_SAVE(\"IGI_Fonts.txt\");\nRESOURCE::SOUND_INFO_SAVE(\"IGI_Sound.txt\");\nRESOURCE::MATERIAL_INFO_SAVE(\"IGI_Material.txt\");\nRESOURCE::LIGHTMAP_INFO_SAVE(\"IGI_Lightmap.txt\");\nRESOURCE::OBJECT_INFO_SAVE(\"IGI_Object.txt\");\nRESOURCE::RESOURCE_INFO_SAVE(\"IGI_Resource.txt\");\nRESOURCE::TERRAIN_INFO_SAVE(\"IGI_Terrain.txt\");\nRESOURCE::TEXTURE_INFO_SAVE(\"IGI_Texture.txt\");\nRESOURCE::GRAPHICS_2D_INFO_SAVE(\"IGI_2D_Graphics.txt\");\nRESOURCE::GRAPHICS_3D_INFO_SAVE(\"IGI_3D_Graphics.txt\");\n```\n\n## Resource - MEF Models Section.\n\n### Finding MEF Model Name.\n\n```cpp\nstring model = \"435\"; //Watertower Id. or provide full id like '435_01_1'\nstring model_name = RESOURCE::MEF_FIND_MODEL_NAME(model);\nLOG_INFO(\"Model name: '%s'\",model_name.c_str());\n```\n\n### Finding MEF Model Id.\n\n```cpp\nstring model = \"Watertower\";\nstring model_id = RESOURCE::MEF_FIND_MODEL_ID(model,false);\nLOG_INFO(\"Model id: '%s'\",model_id.c_str()); // Output: Model id: '435'\n```\n\n### Finding MEF Model Full Id.\n\n```cpp\nstring model = \"Watertower\";\nstring model_id = RESOURCE::MEF_FIND_MODEL_ID(model);\nLOG_INFO(\"Model id: '%s'\",model_id.c_str()); // Output: Model id: '435_01_1'\n```\n\n### Removing MEF Model by Id\n\n```cpp\nstring model = \"435\";\nRESOURCE::MEF_REMOVE_MODEL(model);\n```\n\n### Removing MEF Model by Full Id\n\n```cpp\nstring model = \"435_01_1\";\nRESOURCE::MEF_REMOVE_MODEL(model);\n```\n\n### Removing MEF Model by Name\n\n```cpp\nstring model = \"Watertower\";\nRESOURCE::MEF_REMOVE_MODEL(model);\n```\n\n### Removing MEF Models.\n\n```cpp\nstd::vector\u003cstring\u003e models_list{\"Watertower\",\"Watchtower\",\"Barracks\"};\nRESOURCE::MEF_REMOVE_MODELS(models_list);\n```\n\n### Restoring MEF Models.\n\n```cpp\nRESOURCE::MEF_RESTORE_MODELS();\n```\n\n### Extracting MEF Models.\n\n```cpp\nRESOURCE::MEF_EXTRACT();\n```\n\n## Script Section. [QSC= 'Q' Script, QAS = 'Q' Assembler Script]\n\n### Parse script file. [QSC to QAS Conversion.]\n```cpp\nstring qsc_file = \"LOCAL:config.qsc\"; //Input file.\nstring qas_file = \"LOCAL:config.qas\"; //Output file.\nint status = SCRIPT::PARSE(qsc_file, qas_file); //Status '0' success, 'Non-zero' error.\n```\n\n### Assemble script file. [QAS to QVM Conversion.]\n```cpp\nstring qas_file = \"LOCAL:config.qas\"; //Input file.\nstring qvm_file = \"LOCAL:config.qvm\"; //Output file.\nint status = SCRIPT::ASSEMBLE(qas_file, qvm_file); //Status '0' success, 'Non-zero' error.\n```\n\n### Compile script file.[QSC to QVM Conversion.]\n```cpp\nstring qsc_file = \"LOCAL:objects.qsc\";//Place 'objects.qsc' file game root/local directory.\nSCRIPT::COMPILE(qsc_file); //Output: \"objects.qvm\".\n```\n\n### Cleanup script file.\n```cpp\nstring q_file = \"LOCAL:objects.qas\";\nSCRIPT::CLEANUP(q_file);\n```\n\n## Script Section. - [QVM = 'Q' Virtual Machine].\n\n### Loading qvm file.\n\n```cpp\nstring qvm_file = \"MISSION:sounds/sounds.qvm\";\nauto qvm_addr = QVM::LOAD(qvm_file);\n```\n\n### Reading qvm file.\n\n```cpp\nstring qvm_file = \"LOCAL:humanplayer/humanplayer.qvm\";\nint status = QVM::READ(qvm_file); //Status '0' success, 'Non-zero' error.\n```\n\n### Cleanup qvm file.\n\n```cpp\nstring qvm_file = \"LOCAL:common/sounds/sounds.qvm\";\nauto qvm_addr = QVM::LOAD(qvm_file);\nint status = QVM::READ((int)qvm_addr); //Overloaded method 'QVM::READ(int)'\nif(status == 0) QVM::CLEANUP(qvm_addr);\n```\n\n## Camera section.\n\n### Enabling Free camera with controls\n\n```cpp\nCamera::Controls controls;\n\ncontrols.UP(VK_SPACE); //Key event - Camera Up. (Z-Axis)\ncontrols.DOWN(VK_MENU); //Key event - Camera Down. (Z-Axis)\ncontrols.LEFT(VK_LEFT); //Key event - Camera Left. (Y-Axis)\ncontrols.RIGHT(VK_RIGHT); //Key event - Camera Right. (Y-Axis)\ncontrols.FORWARD(VK_UP); //Key event - Camera Forward. (X-Axis)\ncontrols.BACKWARD(VK_DOWN); //Key event - Camera Backward. (X-Axis)\ncontrols.CALIBRATE(VK_BACK); //Key event - Camera Calibrate. [Reset to X-Axis]\ncontrols.QUIT(VK_RETURN); //Key event - Quit Free cam.\ncontrols.AXIS_OFF(0.5f); //Offset value to move Camera from Axis.\n\nCAMERA::FREECAM(controls);\n```\n\n### Memory and Player Operations\n\n### Memory and Player Operations\n\nThe following code snippets demonstrate various memory and player operations in C++:\n\n### Memory Allocation\n\naddress_t memory_address = MEMORY::ALLOC(1, 1024);\n\n### Memory Deallocation\n\n```MEMORY::DEALLOC();```\n\n### Player Name Setting\n\n```cpp\nPLAYER::INDEX_NAME_SET(0, \"Player1\");\n```\n\nstring player_name = \"Player2\";\nPLAYER::INDEX_NAME_SET(1, player_name);\n\n### Player Mission Setting\n\n```cpp\nPLAYER::INDEX_MISSION_SET(0, 2);\n```\n\n### Active Player Name Setting\n\n```cpp\nPLAYER::ACTIVE_NAME_SET(\"ActivePlayer\");\n\nstring active_player_name = \"ActivePlayer2\";\nPLAYER::ACTIVE_NAME_SET(active_player_name);\n```\n\n### Active Player Name and Mission Retrieval\n\n### Get the name of the active player.\n```cpp\nstring active_player_name = PLAYER::ACTIVE_NAME_GET();\n```\n\n### Get the mission of the active player.\n```cpp\nint active_player_mission = PLAYER::ACTIVE_MISSION_GET();\n```\n\n### Active Player Mission Setting\n\n```cpp\nPLAYER::ACTIVE_MISSION_SET(3);\n```\n\n### Player Profile Status Check\n\n```cpp\nchar* is_profile_active = PLAYER::IS_PROFILE_ACTIVE();\n```\n\n### Configuration Operations\n\n\n### Read Default Configuration File\n```cpp\nCONFIG::READ();\n```\n\n### Read Specified Configuration File\n```cpp\nCONFIG::READ(\"config.cfg\");\n```\n\n### Write Default Game Configuration File\n```cpp\nCONFIG::WRITE();\n```\n\n### Write Specified Configuration File\n```cpp\nCONFIG::WRITE(\"weaponconfig.cfg\");\n```\n\n### Read Default Weapon Configuration File\n```cpp\nCONFIG::WEAPON_CONFIG_READ();\n```\n\n### Read Specified Weapon Configuration File\n```cpp\nCONFIG::WEAPON_CONFIG_READ(\"my_weapon_config.cfg\");\n```\n\nOriginal Author : _HeavenHM@2022_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjones-hm%2Fproject-igi-internals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjones-hm%2Fproject-igi-internals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjones-hm%2Fproject-igi-internals/lists"}