@Ramkhamhaeng: Well, I'm glad I asked, Cheat Engine with its value scan feature seems like a valuable hint. I had indeed, at one point, been inspecting registers in the VS debugger in search of my screen dimensions. The note about virus scanners is also interesting to me; I see that your code has already been in use for more than 5 years. Not sure if I understand the addLeaderheadGFC example correctly. E.g. the Dawn-of-Man screen calls that function on the CyGInterfaceScreen object. To identify the corresponding C++ function in the EXE, I guess we could anticipate that it'll call CvGlobals::getLeaderHeadInfo and maybe some functions CvLeaderHeadInfo; so breakpoints in those DLL functions could help. But those would be EXE-to-DLL calls, not calls via the Cy... wrappers in the DLL, so I don't think that's what you're suggesting. Regarding the diplo screen, I assume that it's entirely implemented in C++, so I don't see how the Python wrappers in the DLL (or in the EXE) would be involved at all.
Not sure what else I might want to investigate in the foreseeable future. Faster combat animations (for the late game) would be neat, but probably not worth the trouble even with those new techniques. Come to think of it, if someone were to implement a new Custom Game screen, rather than simulating a mouse or keyboard input to launch the game (as I had proposed), one could probably just figure out which function in the EXE gets called upon launch and call that function directly. In any case, thanks a lot for explaining your methods!
This could also be accomplished by introducing separate functions for internal and external calls through theI'm using this [EBP] to distinct if a DLL-function was called by the exe or not.
.def
file. But your method also allows checking for a specific call location in the EXE, which could be helpful. Your workaround for the lost network packet – shortening the leader and civ descriptions – reminds me of a crash that occurs in large single-player scenarios when the total length of the civ and leader descriptions exceeds a limit. This might involve a net message, but no actual network packet would be sent in single-player mode, so I guess this is essentially an unrelated bug – though the workaround, curiously, is the same.
• Width of info overlays (like f1rpo).
