Thank you! This is an ambitious project for myself that is a culmination of over 10+ years of analysis on the SMACX binary compared to my more wack a mole patches of PST or SMAC/X. It might take me awhile but planning on sticking through it til the end.
It feels magnific to me. I think this could really be holy grail to SMAC(X), just like OpenXcom was to X-COM.
This is 100% playable with the patcher script I just released. Before it was kind of cumbersome to get everything up and running. I'm still looking for ways to streamline and smooth the process so people can start using it to play which in turn will lead to more testing and bug reports. Let me know if you need any help or have feedback. There is a copy of the compiled dll in the release section of GitHub if you don't feel like dealing with compiling the source.
Interesting, I should totally give it a spin when I have some time. Would love to help with bug-testing.
I've confirmed that there are no compatibility issues with applying the dll patcher on top of an existing GOG install or the latest version of my unofficial patch's exe. There is one regression with my patch where I've implemented the vanilla code but haven't applied an equivalent fix: "[BUG][MOD] Giving FREEPROTO factions (Spartans) undocumented retool strictness ability when learn necessary tech". I've been trying to give the code as light a touch as possible with changes that deviate from original game logic. I couldn't remember the rational for this fix at the time so I wanted to refresh my memory. In the end, after finding the original thread discussing this change I think I will re-implement it along with a more detailed explanation in the README. Eventually, I might implement a compiler macro that would allow someone to compile the dll with or without less obvious bug fixes. I've thought about reaching out to the game creators at some point to see if they wanted to weigh in. Maybe when the project is further along.
Retool strictness ability? I remember Spartans didn't pay extra for prototypes, is there something more to it?
This should work in theory with Yitzi's patch for SMACX as well as PRACX. However, I haven't gotten around to testing compatibility. There will likely be regressions or changes to how Yitzi's patch works because I'm pretty sure they made changes to functions that overlap ones I'm redirecting. I have that as a TODO item at some point. PRACX I think should be easy to validate, Yitzi's patch not so much. I have to create a map of their changed code to internal functions then ensure overlap doesn't break anything when code gets redirected to dll. I've made a map for my patches but it's not as easy with someone else's.
What about
kyrub's AI Patch? I think he built it on top of yours. That one is a big hit here, due to Codex being kind of vanilla purists. Hmmm... talking about that, you think it would be hard to make a "SMAC within SMAX" mode using your code? Essentially, SMAC, but with some features of SMAX, like the fixed energy maintenance.
Why you think PRACX is easier?
Yep! You can totally change any of existing function's code on Github, recompile the dll and the patched game will now use new code. The patcher script is just creating jumps to dll and doesn't actually change anything. Existing code inside the binary that I haven't decompiled yet will use the modified function (if that makes sense). Ex: Let's say you wanted to give all Colony Pod's 10 movement because lolz. You would add something like following to top of
speed_proto():
if (protoID == BSC_COLONY_POD) {
return 30; // desired movement * 3 for on roads -> 10 * 3
}
Now, all Colony Pod's should have base speed of 10 regardless of what is set in alphax.txt. Another example could be to create a new ability inside alphax.txt (would require minor tweaks to alpha.h/alpha.cpp to parse it) that you then use inside speed_proto() to make some change. Note, any changes like this will cause an imbalance between multiplayer games unless you were both using the same changes.
Oooh, that's cool! So the dll overrides the alphax.
Did you say... creating new abilities? Now that is SUPER-cool!
Yes and no. I know a big request has been to remove caps on things like bases and units. Those limits still exist for now. I cannot move those structures out of existing game memory until all references to them have been decompiled. I have completed pretty much all the start up functions that parse the games text files. Those structures have been moved to dll.
Hmmmm... I see. It makes sense, not finding out all references first could backfire badly.
Talking about caps... what about the one big flaw of the game, which we have never been able to change? Namely... the number of factions. We have all been wanting to play a 14-faction SMAX game for quite a while, now. Its the biggest flaw in the game, and one of which we have never found a way to mod out.
If I remember right, I think someone (you? Yitzi?) said that the value for that was a 8-bit integer, where the eighth number was for the native life, just like how Civ2 had eight civs, with the eight being the barbarians.
Of course, I suspect the game would require graphics changes in order to account for extra faction slots in a number of situations, like selecting factions in a game, the diplomacy tab, the Planetary Council interface...
The project is in C++, same as the original game. The patcher script is python 3.
C++? Aaaah man. I was kinda hoping for C Sharp myself. I don't know a thing about C++.