Modding

From Alpha Centauri Wiki
Revision as of 14:40, 3 May 2016 by DrazharLn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SMACSid Meier's Alpha Centauri supports a rich mod culture that, along with off-topic chat and a continuing multiplayer community, has sustained the alpha centauri community through the quarter century since release.

As of 2016, there's still an active modding community, though we tend to technical and programming stuff at the moment. Come talk to us in the Modding subforum!

Contents

Scenarios

Scenarios are one of the most popular and fun ways to play the game. The scenario editor allows modders to create their own maps, set up the factions and more. Many scenarios incorporate other mods, such as custom factions, art, and custom rules or units.

The Game of The Month project has produced some of the most extravagant scenarios, often with custom rules, art, factions and even bespoke fiction on the forum.

See also: Scenario database, Game of the Month

Custom factions

Custom factions have always been easy to add to the game: simply make a sprite sheet and a text file. This accessibility has led to an enormous number of custom factions, and a fair amount of high quality art content for the game.

Custom factions are often used to spice games up after playing with the original factions, and for narrative or gameplay reasons in some scenarios.

See also: Faction.txt editing guide, Factions database

alpha(x).txt modifications

alpha(x).txt mods are another great accessible, yet powerful way of changing the game. By editing this simple text file, you can configure a great variety of game rules concerning the environment, the tech tree, unit combat and movement, and more.

This is a pretty big topic, so you're probably best served by the venerable SMAC Academy Alpha(x).txt editing guide and by Yitzi's list of additional alphax.txt variables.

Graphics mods

Simple mods to many of the graphics in SMAC are extraordinarily easy! Simply find the appropriate sprite sheet (PCX files in the root game directory) for whatever you want to edit, and edit it in your favourite editor. With this technique, you can customise the appearance of Planet, the native life, the user interface, factions and more.

Until recently, it wasn't possible to modify the appearance of the 3D units at all, but thanks to Ford_Prefect's CVR Editor, now we can reskin the Caviar models!

As far as I know, nobody's really done anything with that yet, so you, dear reader could be the first!

See also: BUncle's graphics articles, Caviar, Game of the Month, PRACX

.EXE modding / Programming changes

Starting with scient, a number of technically proficient community members have made significant contributions by modifying the code of the game.

In the beginning, this effort was primarily focussed on fixing a large number of bugs with the game. This work was done first by scient, with support from the communities at Civilization Gaming Network, WePlayCiv and latterly Alpha Centauri 2 who helped by reporting bugs, organising them, playtesting, running experiments and so on. Particular credit is due to vyeh, Neville, buster, chuft, Darsnan, GooglyBoogly, BlackCat, Googlie, Illuminatus, Lord Avalon, Mart, Petek, Psyringe, Rubin, and WPC Forums.

Later, scient's work was taken up by Yitzi, who has fixed all of the important remaining bugs, and by kyrub, who focussed on improvements to the AI. More recently, Dio released two patches, but I don't understand what they do.

In addition to fixing bugs, Yitzi has provided a great many additional options to modders wishing to tweak the game rules.

As the source code of SMAC is not available, these changes have been accomplished by disassembling the binaries, analysing the code, and writing fixes in place within the binary, also in assembly code.

In late 2014, PlotinusRedux released a new kind of patch for SMAC. This patch provides a number of user interface improvements that would have been extraordinarily difficult or tedious to implement in assembly.

PRACX installs a small patch into SMAC's core code, getting it to call an external library written in C++. This library then patches the running SMAC binary further, overriding calls to a number of functions with calls to new C++ implementations provided by the library.

See also: Installing patches, Category:Unofficial patches, Disassembly

Future work

Yitzi continues work on his patch following the disassembly method. For many bugs and small, engine features, this is a practical way to work, and Yitzi has proven himself to be very good at it.

In late 2015, scient announced that the Mac version of the game had been compiled without obfuscating function names. This is of great help when documenting or trying to understand a disassembled program! A project began to document the game code better and to complete the job of decompiling it. We hoped that we might be able to produce a compilable code base for SMAC, or, if that were not possible, to greatly aid future PRACX-style modifications and reimplemtations of the game.

Unfortunately, the project came apart after scient disappeared before publishing an important database containing his documentation and decompilation attempts for the game.

If that database could be recovered, or if a similar one could be created, it might be possible to restart the endeavour :)

Open source SMAC clone projects

opensmac

github project

forum thread

opensmac is a dead project in python/pyGame that aimed at reimplementing SMAC. Impressively, for such an early project, it can actually draw the game map tolerably well and has bases that can collect resources and so on.

JAC

github project

forum thread

JAC aims to be an open source SMAC clone, written in Java. Ford_Prefect started the project in January 2015 and is principal contributor. Iceberg7 (unknown to SMAC community, possibly just one of Ford's aliases?) is a minor contributor.

Development has been progressing slowly, but has been receiving commits as recently as March 2016.

The current state of the project is unknown, but looks like there are skeletal implementations of some important concepts, like the game map and units.