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 to modify/alter the behaviour of the game.
This was originally intended for research project to understand the game mechanics and how developers worked hard to create them.
So don't use this project to misuse the game's identity and source of original game devs.
- General section.
- DLL File - This project is DLL file rather than standard application.
- DLL Injection - This project needs DLL injection into IGI game.
- Hooking - This project uses Minhook for API calls.
- GTLibc -C/C++ library for interactig with Game.
- Pattern Scanning - This project use pattern memory scanning to check Game/Player is loaded properly.
- Game specific section.
- IGI Graphs Structure - Project IGI 1 Graph structure data.
- IGI 3D Models - Project IGI uses 3D models in form of MEF (Mesh External File).
- IGI Camera View - IGI use game Camera called Viewport to display the game updates.
- Native section.
- Native Invoker - Native invoker is a technology to invoke native methods from Game using their Hash with its Handler.
Open 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 to inject DLL.
The project could be build for IGI Editor 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
You can modify the project the only file you need to focus on is Features file which could be found here 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.
There are shown 5 examples into Features.cpp file.
- Enable Debug mode.
- Restart game.
- Weapon pickup.
- Frames setting
- Humanplayer load.
Lets say you found new hash for Native now how to add them into project and use them. So you have to follow the steps.
- First Add your Hash to Natives.hpp class like this
MY_FIRST_NATIVE = 0x00402F90
- Go to Natives folder and open NativeHelper.hpp file and in any relevant section add its definition.
NATIVE_DECL void MY_FIRST_NATIVE_LOAD() { NATIVE_INVOKE<Void>((Void)HASH::MY_FIRST_NATIVE); }
- Now go to Features.cpp class and use it.
// Native method.
if (GT_HotKeysPressed(VK_CONTROL, VK_F1)) {
MY_FIRST_NATIVE_LOAD();
}
QTASK::UPDATE();
g_AutoMsgBox->Show("", 70);
LEVEL::LOAD();
g_AutoMsgBox->Show("", 70);
LEVEL::SET(level);
QTASK::HASH_INIT(1);
QTASK::UPDATE();
auto StartLevelCaller = (int(__cdecl*)(int))0x00416900;
StartLevelCaller(*(PINT)0x00567C8C);
QTASK::RESET();
string resource = "LANGUAGE:objectives.res";
auto res_addr = RESOURCE::LOAD(resource);
LOG_INFO("Resource '%s' loaded at %p",resource,res_addr);
string resource = "LOCAL:my_resource.extension"; //Place your resource in game Local/root directory.
auto res_addr = RESOURCE::LOAD(resource);
LOG_INFO("Resource '%s' loaded at %p",resource,res_addr);
string resource = "MISSION:sounds/sounds.qvm";
RESOURCE::UNLOAD(resource);
std::vector<string> res_list{"STATUSSCREEN:status.res","LANGUAGE:messages.res","LOCAL:menusystem/missionsprites.res"};
RESOURCE::UNLOAD(res_list);
string resource = "LOCAL:menusystem/ingamemenu.qvm";
auto resource_addr = RESOURCE::UNPACK(resource.c_str());
string resource = "LOCAL:language/ENGLISH/menusystem.res";
auto resource_addr = RESOURCE::FIND(resource.c_str());
RESOURCE::FLUSH(resource_addr);
string resource = "LOCAL:missions/location0/level1/terrain/terrain.qvm";
auto resource_addr = RESOURCE::FIND(resource.c_str());
LOG_INFO("Resource '%s' loaded at address : %p",resource,resource_addr);
string resource = "MISSION:AI/2216.qvm";
bool is_loaded = RESOURCE::IS_LOADED(resource);
if(is_loaded) LOG_INFO("Resource is loaded");
RESOURCE::ANIMATION_INFO_SAVE("IGI_Animations.txt");
RESOURCE::FONT_INFO_SAVE("IGI_Fonts.txt");
RESOURCE::SOUND_INFO_SAVE("IGI_Sound.txt");
RESOURCE::MATERIAL_INFO_SAVE("IGI_Material.txt");
RESOURCE::LIGHTMAP_INFO_SAVE("IGI_Lightmap.txt");
RESOURCE::OBJECT_INFO_SAVE("IGI_Object.txt");
RESOURCE::RESOURCE_INFO_SAVE("IGI_Resource.txt");
RESOURCE::TERRAIN_INFO_SAVE("IGI_Terrain.txt");
RESOURCE::TEXTURE_INFO_SAVE("IGI_Texture.txt");
RESOURCE::GRAPHICS_2D_INFO_SAVE("IGI_2D_Graphics.txt");
RESOURCE::GRAPHICS_3D_INFO_SAVE("IGI_3D_Graphics.txt");
string model = "435"; //Watertower Id. or provide full id like '435_01_1'
string model_name = RESOURCE::MEF_FIND_MODEL_NAME(model);
LOG_INFO("Model name: '%s'",model_name.c_str());
string model = "Watertower";
string model_id = RESOURCE::MEF_FIND_MODEL_ID(model,false);
LOG_INFO("Model id: '%s'",model_id.c_str()); // Output: Model id: '435'
string model = "Watertower";
string model_id = RESOURCE::MEF_FIND_MODEL_ID(model);
LOG_INFO("Model id: '%s'",model_id.c_str()); // Output: Model id: '435_01_1'
string model = "435";
RESOURCE::MEF_REMOVE_MODEL(model);
string model = "435_01_1";
RESOURCE::MEF_REMOVE_MODEL(model);
string model = "Watertower";
RESOURCE::MEF_REMOVE_MODEL(model);
std::vector<string> models_list{"Watertower","Watchtower","Barracks"};
RESOURCE::MEF_REMOVE_MODELS(models_list);
RESOURCE::MEF_RESTORE_MODELS();
RESOURCE::MEF_EXTRACT();
string qsc_file = "LOCAL:config.qsc"; //Input file.
string qas_file = "LOCAL:config.qas"; //Output file.
int status = SCRIPT::PARSE(qsc_file, qas_file); //Status '0' success, 'Non-zero' error.
string qas_file = "LOCAL:config.qas"; //Input file.
string qvm_file = "LOCAL:config.qvm"; //Output file.
int status = SCRIPT::ASSEMBLE(qas_file, qvm_file); //Status '0' success, 'Non-zero' error.
string qsc_file = "LOCAL:objects.qsc";//Place 'objects.qsc' file game root/local directory.
SCRIPT::COMPILE(qsc_file); //Output: "objects.qvm".
string q_file = "LOCAL:objects.qas";
SCRIPT::CLEANUP(q_file);
string qvm_file = "MISSION:sounds/sounds.qvm";
auto qvm_addr = QVM::LOAD(qvm_file);
string qvm_file = "LOCAL:humanplayer/humanplayer.qvm";
int status = QVM::READ(qvm_file); //Status '0' success, 'Non-zero' error.
string qvm_file = "LOCAL:common/sounds/sounds.qvm";
auto qvm_addr = QVM::LOAD(qvm_file);
int status = QVM::READ((int)qvm_addr); //Overloaded method 'QVM::READ(int)'
if(status == 0) QVM::CLEANUP(qvm_addr);
Camera::Controls controls;
controls.UP(VK_SPACE); //Key event - Camera Up. (Z-Axis)
controls.DOWN(VK_MENU); //Key event - Camera Down. (Z-Axis)
controls.LEFT(VK_LEFT); //Key event - Camera Left. (Y-Axis)
controls.RIGHT(VK_RIGHT); //Key event - Camera Right. (Y-Axis)
controls.FORWARD(VK_UP); //Key event - Camera Forward. (X-Axis)
controls.BACKWARD(VK_DOWN); //Key event - Camera Backward. (X-Axis)
controls.CALIBRATE(VK_BACK); //Key event - Camera Calibrate. [Reset to X-Axis]
controls.QUIT(VK_RETURN); //Key event - Quit Free cam.
controls.AXIS_OFF(0.5f); //Offset value to move Camera from Axis.
CAMERA::FREECAM(controls);
The following code snippets demonstrate various memory and player operations in C++:
address_t memory_address = MEMORY::ALLOC(1, 1024);
MEMORY::DEALLOC();
PLAYER::INDEX_NAME_SET(0, "Player1");
string player_name = "Player2"; PLAYER::INDEX_NAME_SET(1, player_name);
PLAYER::INDEX_MISSION_SET(0, 2);
PLAYER::ACTIVE_NAME_SET("ActivePlayer");
string active_player_name = "ActivePlayer2";
PLAYER::ACTIVE_NAME_SET(active_player_name);
string active_player_name = PLAYER::ACTIVE_NAME_GET();
int active_player_mission = PLAYER::ACTIVE_MISSION_GET();
PLAYER::ACTIVE_MISSION_SET(3);
char* is_profile_active = PLAYER::IS_PROFILE_ACTIVE();
CONFIG::READ();
CONFIG::READ("config.cfg");
CONFIG::WRITE();
CONFIG::WRITE("weaponconfig.cfg");
CONFIG::WEAPON_CONFIG_READ();
CONFIG::WEAPON_CONFIG_READ("my_weapon_config.cfg");
Original Author : HeavenHM@2022.