Author Topic: Resources to learn how to mod SMACX  (Read 1061 times)

0 Members and 1 Guest are viewing this topic.

Offline lonnigan

Resources to learn how to mod SMACX
« on: March 28, 2020, 02:21:19 AM »
Hey there,

First of all sorry if I'm breaking any rules by posting here, I looked for a bit and I couldn't find any equivalent of what I'm looking for.

I'm a big long time fine of SMACX and I've always been interested in trying to mod the game, being a senior dev (I'm quite noobish on modding old games though). Those great mods that are already out already are a great source of inspiration as well.
But I couldn't find any resource or repos on what to use and how to get started? Any idea on where I could get this?

Thank you!

Online Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49271
  • €440
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Resources to learn how to mod SMACX
« Reply #1 on: March 28, 2020, 02:26:58 AM »

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Resources to learn how to mod SMACX
« Reply #2 on: March 28, 2020, 03:23:15 AM »
This is certainly the right forum for your question.  Game mechanically, you can certainly learn by example with my mod.  My readme_mod.txt has an extensive CHANGELOG of everything I've done for almost 2 years.  All kinds of notes about why I did stuff.  You'll certainly find out a lot about why you'd mod anything, and what the process of seriously playtesting a mod is like.  I'd put my modding methods up against anyone in the industry, for any similar style or scope of game.

Offline lonnigan

Re: Resources to learn how to mod SMACX
« Reply #3 on: March 28, 2020, 12:40:57 PM »
Thanks! That's already very helpful, and the works you guys put in is quite inspiring.

It stuns me that such an old game that performed not very good commercially (AFAIK) and that looks like it should be just "replaced" by more recent instances of Civ games and fade away in history, still has an active modding community today. Shows how good and deep this game was and how impactful it was on the people that played it.

Even though your links are very helpful, it seems it only helps on how to change the game's graphics and balance by changing the assets or the core gameplay values.

I was thinking on trying to mod and improve the game engine and it's source code directly, if that is possible.

Thanks again.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Resources to learn how to mod SMACX
« Reply #4 on: March 28, 2020, 04:46:35 PM »
Then you want Scient's OpenSMACX project.  There is no source code for this game.  Anyone who has done any game binary improvements, has done it by disassembling the binary and hacking new machine code into it.  Well ok, Induktio has done something called "code injection" where after doing a certain amount of machine code stuff, he writes new things in C++ to replace it.  So it's not like every single aspect of such efforts are in disassembled machine code, but you'd better be darned comfortable working with such things, if you want to get anything done.  It's a lot of work and that's why I personally don't do it, I've stuck to *.txt only modding.  That just took me almost 2 years as it was.

There's not going to be any manuals or instructions for how to do any of that.  You can ask Scient and Induktio how they do things, and you can look at their Git repositories.  You have to have beaucoup de "personal fortitude" to take this stuff on.  Less than that, don't kid yourself, this isn't a modding friendly game.  There's just some diehards performing extreme heroics because they're assembly coding badassess.  I could be a badass too, I just choose not to be.  For that level of effort, I'd rather write a brand new commercial title.

Offline scient

Re: Resources to learn how to mod SMACX
« Reply #5 on: March 28, 2020, 08:03:32 PM »
If you have any experience with IDA and would like to contribute, let me know. Eventually, I'm going to start pushing a version of my IDB to git but haven't incorporated it into my workflow yet (all dev is done in a Windows VM and I have IDA loaded via host macOS). The project is in VC++ and the auxiliary patching script to redirect to dll is in Python 3. There are certain aspects you have full control over with current source but it's still in early phases to make wide spread changes.

Offline lonnigan

Re: Resources to learn how to mod SMACX
« Reply #6 on: March 30, 2020, 11:14:05 AM »
Again, this reverse engineering project is quite impressive, thanks for putting so much effort into it.

Can't say I have much experience using IDA (played around with it during my studies on very basic examples) but I am quite curious on the subject and would like to help if possible. Obvisouly can't promise anything as I would just do this on the side, but even if I help with just a tiny raindrop... better than nothing I guess. I work using either Fedora or Windows.

I'm curious, at what stage is this current project at? I read there that it was at en estimated 5% of reassembled code. What does that represent in terms of features?

Offline scient

Re: Resources to learn how to mod SMACX
« Reply #7 on: March 31, 2020, 06:56:17 PM »
Sounds good!

It's hard to quantify an exact percentage. There are around 6000 individual functions in binary. About 1200 of those are built-in functions or class global constr/destruct that can be ignored. There are about 750 functions that I haven't identified. Some of these are functions there were optimized out or part of classes that I haven't been able to tie them to. About 3000 are class related functions. The remaining 1050 are non-class functions related to game or utility code. This is where I've been focusing on game mechanic functions code. There are portions of the game that are entirely via classes but almost all use non-class functions in some way. Also, mapping out the game internal structures and each member value is underway. I keep chipping away at the unknown ones the more game code I decompile. I'm planning on targeting load/save game portions soon to aid with debugging and regression tests.

I have about 340 functions (some entire base classes + individual non-class functions) redirected to my dll. One area that is almost entirely decompiled is parsing in the game text files. If you look through source code you'll get a better idea of different aspects that are complete. Going to push an update with a bunch of changes soon. Just working through some testing and clean up at the moment.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Abort, Retry, Fail?' was the phrase some wormdog scrawled next to the door of the Edit Universe project room. And when the new dataspinners started working, fabricating their worlds on the huge organic comp systems, we'd remind them: if you see this message, always choose 'Retry.
~Bad'l Ron, Wakener, Morgan Polysoft

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 38.

[Show Queries]