Hey!
I apologize for my absence from the community. You are correct, I have been extremely busy. Various things in life have kept me occupied. I still do have the patch stored with a large number of changes I never released. I forget if I ported all changes over to SMAC.
Even though I have been absent, I have be actively working on SMAC/X project. I have shifted from fixing bugs to complete decompilation of the game. There are just too many things I'd like to change and resolve that patching at the assembly level is no longer an option. This will take a number of years, at least if I work on it solo in my free time, however I have made a lot of progress. I have identified almost all the major functions inside the binary which makes stepping through the code and looking at logic a lot easier. Also, I have decompiled a few of the base internal classes back into C++. I've been doing them in blocks and building upon each other with subclasses.
Perhaps in a couple weeks when I have some time off I will make a post on forums about my work along with the unreleased patch. If I don't have time, then I will email you everything and let Yitzi sort it out.
I hope all is well. If you don't hear back from me on boards or by email in a few weeks, feel free to remind me.
Brendan (scient)
I just had a quick look and it seems like I pretty much finished the patch entirely. I don't know why I never released it. The text files were being cleaned up for typos and mistakes by James Ó Nuanáin (Guv'ner). I'm not sure if he ever released his work, so I'll have to see if he posted a final version. I know I do have a few more revisions that I never included up until ~6/2013.
I took a few screenshots of everything. Since it looks like all the work is pretty much done, I will definitely post a public draft the installer for people to test in about two weeks. Then troubleshoot any problems.
That's awesome! I will have to touch base with PlotinusRedux. I too am decompiling the asm back into c++ source code more or less 1-1. I've been optimizing the code and updating it as I see fit. So far, I've mainly been working on start up code to parse the initial files. While I have identified all the major game logic, I wanted to have a working engine shell first.
As for code analysis, I first started identifying functions on my own about two years ago. Then I realized a nice trick. The mac binary, due to how gcc (I think that was compiler used) and macosx works, contains all the ORIGINAL function names. As in, what the SMAC/X devs used. This makes identifying the logic of what a function is suppose to do a lot easier. Granted, it has taken a lot of time and effort to match the PPC code up with the intel code (mac code base vs win code base). There are also a number functions not referenced directly which do not have this information. However, I have almost the entire binary mapped out in IDA. I still have much work to do, I've started going through and cleaning it up. This analysis has taken up the bulk of my time, countless hours have gone into my database. I would be happy to sync up work with whoever.
Overall, it would be great to set up a git (not necessarily on github) to help with working on this project. My goal is to have an open source version of SMAC/X in the end, similar to OpenXCom and Riven X.
I will see about getting myself on the boards sometime around 12/20 when I'll have some time off. I look forward to chatting with everyone, it's been too long!
Contact successful!I have a whole slew of user comments on things that I have identified using the program Ollydebug. I also released a notepad file that listed all the addresses and names of the labels from labels.txt that are present in the assembly game code. I have never used C++ coding but woud be willing to look into it for this game.QuoteHey!
I apologize for my absence from the community. You are correct, I have been extremely busy. Various things in life have kept me occupied. I still do have the patch stored with a large number of changes I never released. I forget if I ported all changes over to SMAC.
Even though I have been absent, I have be actively working on SMAC/X project. I have shifted from fixing bugs to complete decompilation of the game. There are just too many things I'd like to change and resolve that patching at the assembly level is no longer an option. This will take a number of years, at least if I work on it solo in my free time, however I have made a lot of progress. I have identified almost all the major functions inside the binary which makes stepping through the code and looking at logic a lot easier. Also, I have decompiled a few of the base internal classes back into C++. I've been doing them in blocks and building upon each other with subclasses.
Perhaps in a couple weeks when I have some time off I will make a post on forums about my work along with the unreleased patch. If I don't have time, then I will email you everything and let Yitzi sort it out.
I hope all is well. If you don't hear back from me on boards or by email in a few weeks, feel free to remind me.
Brendan (scient)QuoteI just had a quick look and it seems like I pretty much finished the patch entirely. I don't know why I never released it. The text files were being cleaned up for typos and mistakes by James Ó Nuanáin (Guv'ner). I'm not sure if he ever released his work, so I'll have to see if he posted a final version. I know I do have a few more revisions that I never included up until ~6/2013.
I took a few screenshots of everything. Since it looks like all the work is pretty much done, I will definitely post a public draft the installer for people to test in about two weeks. Then troubleshoot any problems.
Good news :).
I would *really* like to get the active decompilers sharing data with each other, since otherwise there's just massive duplication of effort which could instead be directed towards more improvements to AC. The initial work of merging discovered functions would be significant, but I suspect would be quickly payed back by having three times as many people working on the project.
Yitzi, PlotuxRedux, Dio, and scient when you get here:
Would you be willing to share your data if it was frictionless to sync?
What form is your decompiling work stored in, and what program do you use?
Are you willing to help merge everyone's information?
I want to see this happen because I like it when things get fixed and improved and think this would be a major step forward. I don't know exactly what I can do to help as a non-programmer, but if there's anything I can do to make it more likely I'm in (e.g. teaching people github, talking to people, organizing things).
...While I have identified all the major game logic, I wanted to have a working engine shell first.
I haven't used github much, pretty indifferent. I liked the idea of launchpad because it also included the ability to track bugs in a more robust way than github. Something I had wanted to have set up for SMAC/X project as well.
For example, see here: https://launchpad.net/rivenx
Riven X project doesn't have bug tracking but if you look into launchpad vs github there is some discussion about it.
From what I looked into, legally decompiling it isn't an issue. However, resources it might get hazy.
I agree, I will wait to make a test release until after they are merged.
I've attached the installer script. It's a very easy scripting language to create the installer.
From what I looked into, legally decompiling it isn't an issue. However, resources it might get hazy.It probably violates the EULA, but we'd be able to pass for fair use if we don't include a bunch of files we're not changing that are required for the game to run. And it's pretty unlikely they'd bother objecting, we're just stirring up business for the gog copy.
I haven't used github much, pretty indifferent. I liked the idea of launchpad because it also included the ability to track bugs in a more robust way than github. Something I had wanted to have set up for SMAC/X project as well.Looking around the (https://github.com/jfroy/rivenx) two (https://bugs.launchpad.net/rivenx) riven x repositories, the github one feels monumentally more sleek and functional. Kinda like imgur verses the old image hosts. launchpad's bug tracker does look more advanced, but this project is not one that needs the kind of features it provides, and github's issue tracker is pretty neat in it's way. Minimalist, but in very a good way. Example (https://github.com/etesp/Alpha-Centauri-Ultimate/issues).
For example, see here: https://launchpad.net/rivenx
Riven X project doesn't have bug tracking but if you look into launchpad vs github there is some discussion about it.
Perhaps others have a better idea about which we should use. I thought having repository as well as bug tracking system would be a great way to index bugs as well as start decompiling the code. Actually, as I have been working on a few functions I have found a number of bugs in engine. They will happen under rare circumstances but still exist. For example, there is a set of functions designed to index the text files to speed up reading from them which it does. However, the code has bug that breaks the implementation completely so it never works. I have since corrected this. :)
I've attached the installer script. It's a very easy scripting language to create the installer.Cool, got it. I'll probably not do this just yet, but it's on my to do list (https://github.com/etesp/Alpha-Centauri-Ultimate/issues/18).
...- but you deserve a separate organizer badge, if we can think of an image...Morgan Industries Employee of the Month?
What would that look like, besides a big M or Morgan's head? Or would one of those do?...- but you deserve a separate organizer badge, if we can think of an image...Morgan Industries Employee of the Month?
Me too :DCool :).
I'll put a Downloads badge on you now - but you deserve a separate organizer badge, if we can think of an image...
As far as I know, you cannot copy right source code. So while it may violate the EULA, I don't think the actual source code will be an issue. However, resources such as icons, images and perhaps text files would fall under this. I did some cursory legal research so I could be wrong.Right, I think that fits with my understanding. Let's keep all the text files and peripherals separately in the ACU and AC-Text files repositories, and the decompilation work/collections of addresses and functions and stuff in another.
You've convinced me heh. Github looks like the way to go.Awesome. Now all we need is names. I created https://github.com/AlphaCentauri-Ultimate a while back, but ACU is more specifically the megapack and it's.. not my favorite name, seems a bit too self-confident, I've just not thought of anything better (except Alpha Centauri 1.5 which yitzi already has plans for). We could use that organization or start a new one. And then we'd want a repository name.
And yes, a big thank you should go to ete for reaching out to me. I had been meaning to rejoin the community and talk about work I've done but always seemed to put it off.I know that feeling. Glad you're back :).
It probably violates the EULA
I think we should stay away from numerals like 2 in case hell freezes over and Firaxis/EA/Take Two come to terms and decide to put out an official sequel to SMAC/X heh.
This is true.
Speaking of resources, I'm not sure if I ever mentioned this before my hiatus. I noticed that the linux edition port includes all the video files as MPG as opposed to the proprietary WVE format. With a few minor changes, you can get the windows game to play these if I remember correctly. It also solved the issue where with directx WVE code would mess up and not allowing you to alt-tab after a movie was played.
Lal would work as an organizer, too, maybe less confusingly - but a gold M would be easiest... Need to think on this...I'm happy with that too.
I think we should stay away from numerals like 2 in case hell freezes over and Firaxis/EA/Take Two come to terms and decide to put out an official sequel to SMAC/X heh.Good point, and right. I'll start a topic for naming.
As for name, perhaps a poll. I have been referencing it in my own code as: "Alpha Centauri Redux". However, something like "SMAC/X Open", "Open SMAC/X", "Open Alpha Centauri", or "Alpha Centauri Open" would work too.
Huh, that's worth knowing. I guess it is a pretty old game.It probably violates the EULA
Actually, as far as I can tell there is no EULA for the original (non-GOG) version...we'd still need to make sure it fits fair use, though (so nothing that would cut into anyone's business).
Indeed.. :). I'm up for playing project manager and filling in bits of any non-art non-programming jobs that need doing, testing, bug organization, writing, suggestions, etc...I think we should stay away from numerals like 2 in case hell freezes over and Firaxis/EA/Take Two come to terms and decide to put out an official sequel to SMAC/X heh.
Although there's nothing to keep us from eventually coming out with an unofficial sequel to SMAC/X...provided, of course, that we can find the writing and graphics/movies talent to pull off a worthy successor. (And the coding and game-design talent, but those will be somewhat easier since in those fields we're not trying to replicate one of the best games ever made, just a very good one, and I know that I have at least some capability in those fields, which I don't in movie-making/graphics.)
Also, scient, we will want to combine your fixes into my patch...I think scient's plan is to post what he has to test in a couple weeks when he'll have more free time, at which point the two will be merged and united with the set of updated text files I'm working on (https://github.com/etesp/Alpha-Centauri-Textfiles) and possibly ACU if it's ready for a release. I'm not sure the best way to handle merging your different works in a way that'll pave the way for future easy merges since each of you is working in a slightly different way, that's something you guys should all probably discuss.
Indeed.. :). I'm up for playing project manager and filling in bits of any non-art non-programming jobs that need doing, testing, bug organization, writing, suggestions, etc...
I think we can cover writing, though. Rymdolov is scary good, and I've dashed off a few pieces of AC fanfic I'm not ashamed of...Indeed.. :). I'm up for playing project manager and filling in bits of any non-art non-programming jobs that need doing, testing, bug organization, writing, suggestions, etc...
If you're talking about the possibility of an unofficial sequel, writing is not going to be a "filled-in because it needs doing" job; that seems to be the approach BE took to writing, and that's why it's not a proper sequel to SMAC.
I can write fairly good stuff if I apply myself. It's not my favorite part of creating things, but it'd not be half-arsed. Of course I'd rather have others doing the bulk or the writing, organization is what I most enjoy.Indeed.. :). I'm up for playing project manager and filling in bits of any non-art non-programming jobs that need doing, testing, bug organization, writing, suggestions, etc...
If you're talking about the possibility of an unofficial sequel, writing is not going to be a "filled-in because it needs doing" job; that seems to be the approach BE took to writing, and that's why it's not a proper sequel to SMAC.
I'm curious what the issue was, I tracked it down to a function UV2Player::play that has calls to old direct x (4 or 5) functions starting at offset 0x4BF4B0 in SMACX exe. However, I never went further from there.
(http://i.imgur.com/PwTt2gV.png)
void __cdecl PRACXShowMovie(const char *pszFileName)
{
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
char szCmd[512];
int i;
strcpy(szCmd, ".\\movies\\playuv15.exe -software ");
strcat(szCmd, pszFileName);
i = strlen(szCmd) - 4;
if (i > -1 && szCmd[i] != '.')
strcat(szCmd, ".wve");
m_fPlayingMovie = true;
if (CreateProcess(".\\movies\\playuv15.exe", szCmd, NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
WaitForSingleObject(pi.hProcess, 2 * 60 * 1000);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
PostMessage(*m_pAC->phWnd, WM_MOVIEOVER, 0, 0);
}
Writing is probably the only thing I could contribute to a project like this, but I'd love to have a hand in it.
...
I highly recommend using NSIS to create a single click installer. I have included the NSI script along with all the comments. This allows for managing all the related files besides just the exes such as the various languages for text files and ability to update registry among other things. I tried to make clear comments for each section, but more than happy to explain anything....
At present time both terran.exe and terranx.exe (on windows) can play AVI files. What I checked is:This is true.
Speaking of resources, I'm not sure if I ever mentioned this before my hiatus. I noticed that the linux edition port includes all the video files as MPG as opposed to the proprietary WVE format. With a few minor changes, you can get the windows game to play these if I remember correctly. It also solved the issue where with directx WVE code would mess up and not allowing you to alt-tab after a movie was played.
I've got that issue fixed already, but a mainstream format is always better than proprietary. Are the mpg's decent quality? I tried converting myself but couldn't get decent quality without a massive increase in file size.
Oh, of course. I wasn't injecting myself into this conversation saying that I could contribute herein, as I'm waaaay out of my depth. Merely that I'll offer whatever I can if and when a sequel project is started.Writing is probably the only thing I could contribute to a project like this, but I'd love to have a hand in it.
I don't think we'll need much writing for the "modding SMAC/X" project, but when/if we get to an unofficial sequel we'll need top quality writers (i.e. better than most professional video game writers). So if that's the only thing you can contribute but you can do it well enough, that'd be a great help when the unofficial sequel gets going.
...
For the movie fix, I was looking at using the open source ffmpeg library which can actually read the format directly, when I hit on a an absurdly simple solution:Code: [Select]void __cdecl PRACXShowMovie(const char *pszFileName)
{
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
char szCmd[512];
int i;
strcpy(szCmd, ".\\movies\\playuv15.exe -software ");
strcat(szCmd, pszFileName);
i = strlen(szCmd) - 4;
if (i > -1 && szCmd[i] != '.')
strcat(szCmd, ".wve");
m_fPlayingMovie = true;
if (CreateProcess(".\\movies\\playuv15.exe", szCmd, NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
WaitForSingleObject(pi.hProcess, 2 * 60 * 1000);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
PostMessage(*m_pAC->phWnd, WM_MOVIEOVER, 0, 0);
}
To the user, the effect is indistinguishable from the video being played by the app itself--and since playuv15.exe uses it's own window handle, it doesn't screw up the game's window.
I play SMAC and SMAC-X on a iMac G4 800MHz.
The Carbon version plays okay with Rosetta emulation on Intel processors, but it's still just about as slow as playing it on a PPC G4.
Writing is probably the only thing I could contribute to a project like this, but I'd love to have a hand in it.
I don't think we'll need much writing for the "modding SMAC/X" project, but when/if we get to an unofficial sequel we'll need top quality writers (i.e. better than most professional video game writers). So if that's the only thing you can contribute but you can do it well enough, that'd be a great help when the unofficial sequel gets going.
Oh, of course. I wasn't injecting myself into this conversation saying that I could contribute herein, as I'm waaaay out of my depth. Merely that I'll offer whatever I can if and when a sequel project is started.
Hmm. On the one hand, I'm finding Pandora to be about 70% of what I hoped to achieve with a SMACX 2.
Yitzi,
The character, story, and atmosphere aren't as good as SMACX by a long shot, but they're light years better than BE.
The factions themselves are basically SMAC clones--scientist, religious, ecological, military, diplomat, etc. And that is integrated fairly well into the diplomatic conversations--other factions will accuse the scientist of dangerous experiments whereas if you're the scientist you get to speak very condescendingly to the other factions. The bit of flavor missing there is no character is given to 3rd parties in conversation--the religious leader will talk about sin and converting the world as well as what she specifically likes or doesn't like about your faction, but if she asks you to declare war on the ecology leader she just gives that leader's name rather than calling her a crazed tree huger dancing naked under the stars.
There's no grand unifying story like the world you're on achieving consciousness, but there are a couple of storied events that drastically affect play--a gradual eclipse that drives the native life mad, and a world wide invasion by the former inhabitants of the planet that tends to suspend all wars while everyone cooperates to survive.
It's clearly meant to be a SMAC clone--it's got the same unit workshop, fungus, etc.
It has an interesting mechanic that randomizes what techs are prerequisites for what (within limits), so you have to come up with a different tech strategy each game.
It's missing wonder and victory/defeat movies, which is a big negative for me as I find they add a lot of atmosphere to games. But BE and Civ 5 don't have those either.
It's also missing the sense of climate. You can raise and lower terrain, but you're just changing whether that hex is plains, hills, or mountains like the Civ games rather than pulling a 3D grid up or down, and I haven't noticed that doing so has any affect on rainfall.
I'd definitely recommend it, and it's the closest modern game to SMACX I've seen--it's about 70% of the way to what I'd want SMACX 2.0 to be, which is a lot closer than anything else has come.
Yeah, I was taking SMAC unchanged except for a modern GUI and graphics as 100%.
I've actually really been enjoying playing it the more I understand it.
Currently it just has the original SMAC factions (I mean, literally identical down to the sex of each faction)--I hope they add the SMAX expansion factions soon. Apparently players can make factions, but it's mod management is non-existent.
I don't like it's pollution system at all. Pollution in SMACX is as it should be--it damages the planet, infuriates native life, and pisses off the ecology faction. In Pandora, pollution does nothing but increase unhappiness--and fungus, native to the planet, causes pollution! Pollution is more toxicity to humans than ecological damage.
I do really like the randomizing of tech for each game--it makes for very different strategies depending on what techs are earlier in the tree and what ends up as a prerequisite for what. Techs are always in their tech era, and it has code that insures within an era improvements on the same tech come later than each other in the tree--so 50% bonus armor is always further in than 25% bonus armor, though 25% may or may not be a prerequisite for 50%. And you can only see 3 steps down the line from the techs you've discovered.
To pull that back into SMACX would require turning on the option that lets you choose your tech and adding a display of the entire tech tree--probably too much to do.
I thought you might find this interesting, Yitzi--apparently since the developer is pretty much done improving Pandora, they gave a player access to the source code to improve the AI--http://www.slitherine.com/forum/viewtopic.php?f=173&t=55054. Too bad they don't that with all games, like SMAC/X.
Actually, rather than wait two weeks if Yitzi or whoever would like to merge my patch that would be great. Releasing a stand alone patch just splitters the patches even more and since Yitzi has been doing the majority of patch work merging the new patches into his sounds like the best solution. Especially since I don't plan to continue releasing patches.Can anyone tell me why I shouldn't post scientIficPatch v.2 in Downloads?
I highly recommend using NSIS to create a single click installer. I have included the NSI script along with all the comments. This allows for managing all the related files besides just the exes such as the various languages for text files and ability to update registry among other things. I tried to make clear comments for each section, but more than happy to explain anything.
I have a mix of various text files by Guv. The ones I have packaged as part of my patch are not the latest. I believe the ones in "final_update_txt.zip" are the final set he sent me via email. I didn't merge them together so folks can see. However, some kind of unified text files would be a good call. He did a LOT of work updating and cleaning up the stock ones.
Also, inside my patch files I included my internal patches.txt I use to locate specific patch data to speed up applying them to binary. Actually, I don't think I ever applied Kyrub's patches to my binaries. However, everything else should be there. I tested all my patch code extensively.
My readme includes detailed explanations of all the patches and what they do.
Enjoy. I should of shared this sooner with the community.
Was sighted commenting on rpgcodex forums earlier this week about the paid mods fiasco.
http://www.rpgcodex.net/forums/index.php?threads/steam-is-no-longer-charging-for-mods-now-lmao.98728/page-31#post-3884105 (http://www.rpgcodex.net/forums/index.php?threads/steam-is-no-longer-charging-for-mods-now-lmao.98728/page-31#post-3884105)
He is still around, but he tends to disappear for a long time once in a while.
Actually, rather than wait two weeks if Yitzi or whoever would like to merge my patch that would be great. Releasing a stand alone patch just splitters the patches even more and since Yitzi has been doing the majority of patch work merging the new patches into his sounds like the best solution. Especially since I don't plan to continue releasing patches.
I highly recommend using NSIS to create a single click installer. I have included the NSI script along with all the comments. This allows for managing all the related files besides just the exes such as the various languages for text files and ability to update registry among other things. I tried to make clear comments for each section, but more than happy to explain anything.
I have a mix of various text files by Guv. The ones I have packaged as part of my patch are not the latest. I believe the ones in "final_update_txt.zip" are the final set he sent me via email. I didn't merge them together so folks can see. However, some kind of unified text files would be a good call. He did a LOT of work updating and cleaning up the stock ones.
Also, inside my patch files I included my internal patches.txt I use to locate specific patch data to speed up applying them to binary. Actually, I don't think I ever applied Kyrub's patches to my binaries. However, everything else should be there. I tested all my patch code extensively.
My readme includes detailed explanations of all the patches and what they do.
Enjoy. I should of shared this sooner with the community.
Processing config:
Processing plugin dlls: "C:\Program Files (x86)\NSIS\Plugins\*.dll"
- AdvSplash::show
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage::Destroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- LangDLL::LangDialog
- Math::Script
- NSISdl::download
- NSISdl::download_quiet
- Splash::show
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::GetFileCRC32
- VPatch::GetFileMD5
- VPatch::vpatchfile
- nsDialogs::Create
- nsDialogs::CreateControl
- nsDialogs::CreateItem
- nsDialogs::CreateTimer
- nsDialogs::GetUserData
- nsDialogs::KillTimer
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::OnNotify
- nsDialogs::SelectFileDialog
- nsDialogs::SelectFolderDialog
- nsDialogs::SetRTL
- nsDialogs::SetUserData
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack
!define: "MUI_INSERT_NSISCONF"=""
Changing directory to: "C:\Users\*\Documents\patch_2.0_files\##patcher"
Processing script file: "C:\Users\*\Documents\patch_2.0_files\##patcher\SMACX Patch.nsi"
!include: "C:\Program Files (x86)\NSIS\Include\MUI2.nsh"
!include: "C:\Program Files (x86)\NSIS\Contrib\Modern UI 2\MUI2.nsh"
NSIS Modern User Interface version 2.0 - Copyright 2002-2009 Joost Verburg (C:\Program Files (x86)\NSIS\Contrib\Modern UI 2\MUI2.nsh:8 )
!define: "MUI_INCLUDED"=""
!define: "MUI_SYSVERSION"="2.0"
!define: "MUI_VERBOSE"="3"
!include: closed: "C:\Program Files (x86)\NSIS\Contrib\Modern UI 2\MUI2.nsh"
!include: closed: "C:\Program Files (x86)\NSIS\Include\MUI2.nsh"
!define: "APP_NAME"="SMAC/X Unofficial Patch"
!define: "VERSION"="02.00.00.00"
!define: "VERSION_SHRT"="2.00"
!define: "REG_ROOT"="HKLM"
!define: "REG_APP_PATH"="Software\Microsoft\DirectPlay\Applications"
!define: "PATCH_FILES_PATH"="K:\#AC-ACX Project\##current patch files"
VIAddVersionKey: "ProductName" "SMAC/X Unofficial Patch"
VIAddVersionKey: "CompanyName" "scient"
VIAddVersionKey: "LegalCopyright" "scient © 2013"
VIAddVersionKey: "FileDescription" "SMAC/X Unofficial Patch"
VIAddVersionKey: "FileVersion" "02.00.00.00"
CRCCheck: on
XPStyle: on
SetCompressor: /FINAL /SOLID LZMA
Name: "SMAC/X Unofficial Patch"
Caption: "SMAC/X Unofficial Patch v2.00 Installer"
OutFile: "SMACX_UP_v2.00_Installer.exe"
!define: "MUI_ABORTWARNING"=""
!define: "MUI_UNABORTWARNING"=""
!define: "MUI_LANGDLL_REGISTRY_VALUENAME"="Installer Language"
!insertmacro: MUI_PAGE_DIRECTORY
!insertmacro: end of MUI_PAGE_DIRECTORY
!insertmacro: MUI_PAGE_INSTFILES
!insertmacro: end of MUI_PAGE_INSTFILES
!insertmacro: MUI_UNPAGE_CONFIRM
!insertmacro: end of MUI_UNPAGE_CONFIRM
!insertmacro: MUI_UNPAGE_INSTFILES
!insertmacro: end of MUI_UNPAGE_INSTFILES
!insertmacro: MUI_LANGUAGE
!insertmacro: end of MUI_LANGUAGE
!insertmacro: MUI_RESERVEFILE_LANGDLL
!insertmacro: end of MUI_RESERVEFILE_LANGDLL
Function: ".onInit"
!insertmacro: MUI_LANGDLL_DISPLAY
!insertmacro: end of MUI_LANGDLL_DISPLAY
ReadRegStr $0 HKLM\Software\Microsoft\DirectPlay\Applications\Sid Meier's Alpha Centauri\UnofficialPath
StrCmp "$0" "" equal=0, nonequal=default_path
ReadRegStr $0 HKLM\Software\Microsoft\DirectPlay\Applications\Sid Meier's Planetary Pack\Path
StrCmp "$0" "" equal=0, nonequal=default_path
ReadRegStr $0 HKLM\Software\Microsoft\DirectPlay\Applications\Sid Meier's Alpha Centauri\Path
StrCmp "$0" "" equal=0, nonequal=default_path
ReadRegStr $0 HKLM\Software\Microsoft\DirectPlay\Applications\Sid Meier's Alien Crossfire\Path
StrCmp "$0" "" equal=0, nonequal=default_path
StrCpy $0 "$PROGRAMFILES\Sid Meier's Alpha Centauri" () ()
StrCpy $INSTDIR "$0" () ()
FunctionEnd
!define: "BCKPATH"="$INSTDIR\_backup_v2.00"
Section: "-MainProgram"
SetShellVarContext: current
Rename: $INSTDIR\fungalpayld_sm.pcx->$INSTDIR\fungpayld_sm.pcx
Rename: $INSTDIR\humref_sm.pcx->$INSTDIR\humanref_sm.pcx
Rename: $INSTDIR\sporelnch_sm.pcx->$INSTDIR\sporlnch_sm.pcx
WriteINIStr: [PREFERENCES] ForceOldVoxelAlgorithm=0 in $INSTDIR\Alpha Centauri.ini
IfFileExists: "$INSTDIR\fx" ? 0 : +2
WriteRegStr: HKLM\Software\Microsoft\DirectPlay\Applications\Sid Meier's Alpha Centauri\Complete=Yes
WriteRegStr: HKLM\Software\Microsoft\DirectPlay\Applications\Sid Meier's Alpha Centauri\UnofficialVer=2.00
WriteRegStr: HKLM\Software\Microsoft\DirectPlay\Applications\Sid Meier's Alpha Centauri\UnofficialPath=$INSTDIR
CreateDirectory: "$INSTDIR\_backup_v2.00\fx"
Delete: "$INSTDIR\*.016"
Delete: "$INSTDIR\*.256"
Delete: "$INSTDIR\*.icd"
Delete: "$INSTDIR\clcd*.dll"
Delete: "$INSTDIR\clokspl.exe"
Delete: "$INSTDIR\dplayerx.dll"
Delete: "$INSTDIR\drvmgt.dll"
Delete: "$INSTDIR\secdrv.sys"
Delete: "$INSTDIR\logfile.txt"
CopyFiles: (silent) "$INSTDIR\fx\CPU nn already linked.wav" -> "$INSTDIR\_backup_v2.00\fx", size=0KB
CopyFiles: (silent) "$INSTDIR\fx\wpn missile launcher.wav" -> "$INSTDIR\_backup_v2.00\fx", size=0KB
CopyFiles: (silent) "$INSTDIR\fx\wpn singularity laser.wav" -> "$INSTDIR\_backup_v2.00\fx", size=0KB
CopyFiles: (silent) "$INSTDIR\terran.exe" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\alpha.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\basename.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\believe.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\blurbs.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\concepts.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\credits.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\facedit.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\faction.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\flavor.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\gaians.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\help.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\hive.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\Holobook.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\interlude.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\jackal.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\labels.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\menu.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\monument.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\morgan.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\movlist.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\peace.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\scenario.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\script.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\spartans.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\system.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\techlongs.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\techshorts.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\tutor.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
CopyFiles: (silent) "$INSTDIR\univ.txt" -> "$INSTDIR\_backup_v2.00", size=0KB
SetOutPath: "$INSTDIR\fx"
File: "K:\#AC-ACX Project\##current patch files\ALL\CPU nn already linked.wav" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Users\*\Documents\patch_2.0_files\##patcher\SMACX Patch.nsi" on line 150 -- aborting creation process
# TODO
# custom image on launch -> AdvSplash
# banner image
!include "MUI2.nsh"
!define APP_NAME "SMAC/X Unofficial Patch"
#!define WEB_SITE "http://www.civgaming.net/forums/"
!define VERSION "02.00.00.00"
!define VERSION_SHRT "2.00"
!define REG_ROOT "HKLM"
!define REG_APP_PATH "Software\Microsoft\DirectPlay\Applications"
#!define REG_GOG_PATH "Software\GOG.com"
!define PATCH_FILES_PATH "K:\#AC-ACX Project\##current patch files"
Glad you're not dead, sir. :Dscient talked to ANYone five months ago and I'm only hearing about it now?
Like Rumpelstiltskin just say my name and I appear (maybe with a bit of delay haha). I'll do a more in-depth post in one of other threads related to my work on SMACX.
For learning RCE, I suggest writing small basic programs in C/C++ and then popping the compiled debug binary into IDA/debugger. OllyDbg is great debugger for beginners. For disassembly, IDA is industry standard. There are some others like Hopper for mac. IDA also had a great decompiler plugin that is quite helpful with SMACX code. This way you have your own original source code and can see what's going on under the hood.
Great books under Reverse Engineering section here:
http://dfir.org/?q=node/8 (http://dfir.org/?q=node/8)
The x86 binary (windows) was compiled with an older version of Microsoft Visual C++ (5 or 6).
So I've been talking with DrazharLn about sharing the database like a week ago. He reached out to me via email, my life has been hectic. I have a little bit of time before things get busy again so I'm currently working on cleaning a few things up and merging notes into the database. There is much do to with understanding data structures as well as what certain globals or enums do. I have tried to identify as much as I can as I work on it. Either way, it makes it a lot easier to say find specific combat, base or diplomacy code than blindly look around. Want to understand something related to global map? Just see all references to g_MAP in database. Things like this. It makes finding patterns and understanding code flow more manageable.
Once I finish a draft ready for public, I will host it on here as reference and maybe if people identify more stuff merge that info in future draft. If I run out of time and don't finish want I wanted to, will post it anyway. Either way, it will get posted by first week in June.
Sooner is better than later - just sayin'.
alt_at(int, int)
bad_reg(int) : 00575502
base_project(int)
bit_at(int, int)
by_zoom(int, int) : bases
byteflip_dogleader(DogLeader *)
byteflip_dogvehicle(DogVehicle *)
byteflip_leaders(Leader *)
byteflip_monument(Monuments *)
byteflip_offers(void)
byteflip_player(Player *)
byteflip_regions(Region *)
byteflip_snoopdogleader(SnoopDogLeader *)
byteflip_timecontrol(TimeControl *)
byteflip_vehicle(Vehicle *)
clear(char *) : null string
climate_at(int, int)
code_at(int, int)
crappy(int, int) : something to do with base_terraform()
expand(int) : expanding abstract map?, param * 5
friction_level(int, int) : get fac_struct_friction_level (0056CB82)
get_special(char *, int *) : 005DC85C
get_special_link(char *,int *) : 005DC817
has_agenda(int fac1, int fac2, int enum) : checks against fac_struct_diplo_agenda (00577AA9)
has_treaty(int,int,int) : checks against fac_struct_diplo_status (00560CBB)
help_spock(void): 0x0051F1EC
hof_load(void) : hall_of_fame()
hof_save(void) : hall_of_fame()
io_mapwin(MapWin *, std::_FILE *)
is_ocean(int, int)
map_loc(int, int)
on_abstract(int, int)
polygon(Buffer *, Vert *, int, int)
polygon_dest(Buffer *, Vert *, int, unsigned char *)
pop_close(void)
popp(char *, char *, int (*)(void))
population_limit(int) : base_growth() / base_doctors()
reactor_power(int) : 005799CD
recurse_zorder(Win *) : 005F4EC0
region_at(int, int)
rocky_at(int, int)
scan_out_line_poly(int, int)
scan_out_line_poly_dest(int, int)
sunny(int, int)
temp_at(int, int)
vector_dist(int, int)
vector_dist(int, int, int, int)
veh_down(int)
veh_who(int, int)
xrange_abstract(int) : similar to xrange but specifc to WORLD global?
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.
SMACX v2.0 AnalysisI spent an hour or two posting/linking this at the forums listed above and on Facebook. Let's hope we can draw some tech input...Quote from: scient (Brendan Casey) - 6/15/2016This 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 (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=341)