SMACX Code Database

Buster's Uncle

AC2 Owner
Joined
Apr 13, 2009
Messages
1,657
Location
AC2
http://alphacentauri2.info/index.php?topic=14141.msg93563#msg93563

The popular unofficial patches for Alpha Centauri are (mostly) developed by disassembling the SMACX binary, terranx.exe, and writing new assembly code into the game. Which is pretty tricky, because it's hard to work out what uncommented assembly is supposed to do.

Previously, various modders have slowly built up individual notes on bits of the code, but these notes are quite limited and not shared. Now, thanks to Scient's hard work and the fortune of finding a version of the code with unobfuscated function names, we're now almost ready to publish a new database that documents how the game code works in more detail than ever before.

This database isn't of direct use to most players, but, combined with a decompiler and PRACX, it will lower the barrier of entry for modders and will allow more ambitious mods to be developed.
 
scient said:
I have made leaps and bounds working on the database over the past two weeks. I really am starting to get an idea of all the different classes for the game and how they work together. Well, at least in my head. I've been trying to mark up and identify as much as possible in the database, especially related to the interface code and how it interacts with logic and structures. I have merged 95% of what was in the PPC binary into my database related to function names and custom variable parameters. As of now, my database is more complete along with the huge amount that I have identified on my own. I have tried to keep the same naming conventions so everything stays fairly uniform.

I've decided on a cut off and release date, 6/15. I have done most of what I wanted to accomplish for a public release and should finish up the rest by then.
http://alphacentauri2.info/index.php?topic=17876.msg94926#msg94926
 
Someone asked me what the practical utility of this project was for the average user. scient replied:
scient said:
From the stand point of someone non-technical it probably means little. For modding? I hope it to be a cornucopia of information. You want to mess around with scroll bars? Easy. You want to see all the functions related to the infographic windows at bottom of main window? Done. You want to poke around all the diplomacy or battle code? Or perhaps the internal structure of a "unit" stored in memory and all the references to a unit's status? Done. Stuff like this and much more. The goal for me at least is to have a fully marked up database that could be used to start decompiling whole portions of the game.
http://alphacentauri2.info/index.php?topic=14141.msg94937#msg94937

...In short, it opens a lot of horizons for modding things that couldn't be modded before - provided the cooperation of a techie. For most of us, it means more new playable content...
 
SMACX v2.0 Code Analysis Database
http://alphacentauri2.info/index.php?topic=17994.0
scient (Brendan Casey) - 6/15/2016 said:
This is a work in progress of a complete analysis on the SMACX v2.0 binary.
There is much left to do regarding filling in missing functions as well as
details regarding internal structures. It is provided as is. There might be
mistakes as meticulous as I am. If you find somewhere that I did something
incorrectly, please post on the forums and let me know. I plan to continue
my analysis on the binary as time permits. However, I hope by releasing the
database in its current state that the community will benefit.
http://alphacentauri2.info/index.php?action=downloads;sa=view;down=341
 
scient said:
If anyone has any questions about the database I will be happy to try and answer them the best I can. I've already started working on next draft of it. I'll aim for a release either end of summer or sometime early in the fall. Since the majority of the functions have been identified, I plan on working trying to flush out details about internal structures used by the game and improve upon the ones I've identified. This will increase understanding of code flow and logic across multiple classes and functions.
http://alphacentauri2.info/index.php?topic=14141.msg96099#msg96099
 
Top Bottom