Author Topic: SMACX Thinker Mod  (Read 167743 times)

0 Members and 10 Guests are viewing this topic.

Offline Induktio

SMACX Thinker Mod
« on: August 20, 2018, 10:44:45 AM »







Thinker is an AI improvement mod for Alien Crossfire that greatly boosts the stock AIs while providing various gameplay improvements.

Summary of main features:

* New production AI for bases (more sensible and balanced production choices)
* Improved terraforming AI (lots of condenser-farms, boreholes and forests)
* Rewritten code for AI faction social engineering choices
* AI builds more crawlers and deploys them better
* AI will deploy colony pods much sooner instead of wandering on the map
* Unit auto design feature creates improved prototypes for the AIs
* Customizable options for free formers and satellites for AI factions
* Faction placement balances random map starting locations
* Possible to select which landmarks are placed on random maps
* Many other additions to gameplay mechanics
* Game binary includes Scient's patch v2.0

Installation:

* Extract the files to game folder
* Check the readme for release notes
* Change configuration from thinker.ini or use the defaults
* Bundled alphax.txt includes optional/recommended changes only
* See detailed info on compatibility on the homepage

* Download links here
* More detailed information

Latest features are provided by develop builds if the release date indicates it is the newest file.

Other possible mods to use with Thinker:
* Pracx graphics enhancement patch
* SMAC-in-SMAX mod








« Last Edit: March 23, 2023, 02:00:30 PM by Induktio »

Offline Induktio

Re: SMACX Thinker Mod
« Reply #1 on: September 08, 2018, 11:03:30 AM »
There's some new features that could get into the next release. It could be possible to incorporate some of the fixes from Scient's patch to this one.

I attached the descriptions from Scient's patch v2.0 readme below and assigned numbers on them. Of the players who regularly play with that patch, which one of these fixes do you consider essential? These changes are more extensive than the ones in older v1.0 which is still linked in the sidebar for some reason.

(click to show/hide)
« Last Edit: June 11, 2025, 06:34:48 PM by Induktio »

Offline PvtHudson

Re: SMACX Thinker Mod
« Reply #2 on: September 11, 2018, 10:39:08 AM »
1,2,7,10,15,18,20,21,27(! - major obstacle),34,36,37,38,43,51.
become one with all the people

Offline Induktio

Re: SMACX Thinker Mod
« Reply #3 on: September 11, 2018, 03:25:59 PM »
For clarity, here are the items from PvtHudson's list:
Quote
1.  [BUG] If a faction's cumulative PROBE value is greater than 3 (SE morale, covert ops center) it is possible to "mind control" their bases when they should be immune. If the University uses SE Knowledge putting PROBE value down to -4, it would act as if it were 0 erroneously increasing "mind control" costs. After patch, PROBE values greater than 3 will always be immune to regular probes and values less than -2 will be treated as if they were -2.
2.  [CRASH] It is possible usually on larger maps that scrambling air interceptors would cause the game to crash. Even when the game didn't crash incorrect altitude values were being used in checks. Both of these have been fixed.
7.  [BUG] Fixed a check that was ending the turn for certain air units (choppers/missiles/grav) when entering a base which had no adjacent enemy units. There is still a check which will end the unit's turn if when entering a base it has less then one turn remaining unless an enemy is adjacent to base.
10. [CRASH] When moving units near or at the poles, it is possible for y coord to exceed the map bounds and crash the game. Patch adds handling to prevent y coord from going over min/max.
15. [BUG][SMAX] Enhanced probes (Algorithmic Enhancement) are now able to mind control bases/units normally immune due to high SE morale as stated in SMAX manual. For units it's purely the morale SE value so >=3 acts as if it were 2 (cost doubled). For bases, the value is calculated from morale SE and any base facility modifiers (Covert Ops: +2, Genejack: -1). If final value is >=3, it acts as if it were 2.
18. [BUG][SMAX] Enhanced probes don't receive a penalty to survival probability when target faction has built Hunter-Seeker Algorithm. Instead, the success probability is erroneously given the penalty for a second time after it has already been displayed in UI. This could cause diminished success rate when it should have been higher. Patch corrects check so survival rather than success probability is modified.
20. [MISC] Disabled cpu check which serves no purpose other than preventing the game from starting on newer cpu's. Patch enables ForceOldVoxelAlgorithm=1 in code by default and suppresses annoying warning.
21. [BUG][SMAX] Sealurk units now do not get a penalty when moving onto Sea Fungus like Isle of Deep.
27. [BUG][SMAX] Fixed bug when AI successfully completes probe action of freeing a captured faction leader (FREEWILLY/FREEWHO) where it would reset a non-captured faction.  The problem was that AI would always try to free the very first faction (usually PC) regardless of whether they were elminated or not.  Fix now obtains all potential faction leaders to free and randomly picks one.
34. [BUG] Fixed logic in PB code to prevent ODP/Flechette defenses being called a 2nd time (with a chance for defenses to fail) even after PB had already been shot down.  Each faction has one chance to defend against incoming missile based on closest base or unit to PB blast.  However, there is secondary check to give the tile owner a chance to defend against PB even if they have no units or bases in this space.  This check didn't take into account whether or not PB had already been shot down.
36. [BUG] Fixed a bug that would display NERVEGAS message even when attack on base failed -> checking attacker health
37. [MOD] Add ability to set reactor (1-4) for #UNITS in alpha/x.txt (ex. "Colony Pod,..., 00000000000000000000000000,4" -> gives Colony Pods Singularity Engine).  To do so, just add comma after Abil with value of reactor you want for unit.  If no value is set, it defaults to "1" like original code.  For SMAX only, there are two exceptions for Battle Ogre MK2 and Battle Ogre MK3 where default isn't "1" but "2" and "3" respectively.  The Ogre default can still be overriden if you set a different reactor value in alpha/x.txt.
38. [BUG] Allowing colony pods to be added to bases with fungus on tile ; allowing sea/land pods to be added to existing sea/land bases ignoring building restriction
43. [BUG] Abandoning a base after building a colony pod no longer skips the base production of the next base.  This was caused by the upkeep function using incorrect base values after the abandoned base was destroyed.  Fixed so acts like #STARVE.
51. [BUG] Additional check to initial tile when build aquifer rather that tiles around it

Scient's patch was built on a slightly different version of the game binary than the GOG version, so in the case one tried to import all of the patches, there's some chance it might cause new glitches. Over some of the changes, it could be said people have learned how to play around the bugs over the years, so changing them is not strictly necessary. At minimum, I think the crash bug fixes 2. and 10. should be included maybe in addition to 27. also. Probe bug fixes could be quite important too. If people have save games where bugs 2/10/27 can be triggered easily, that would be useful.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #4 on: September 14, 2018, 04:25:23 PM »
After some investigating it seems Scient's patches can be imported almost verbatim to the GOG version. There are some interdependencies in the code, so it would not be simple to take out any single fixes out of the whole patch, though. Importing all the fixes is pretty simple and can be done for at least v1.0. Here are the changes that would be imported from Scient's v1.0 patch:

(click to show/hide)

A total of 21 fixes is less than the 51 in v2.0 but many of those extra changes are a little bit on the modding side in contrast to simple bugfixes. I already have a savegame for the interceptor scrambling bug but can anyone remember where to find savegames where these bugs trigger?

[CRASH] When moving units near or at the poles, it is possible for y coord to exceed the map bounds and crash the game.
[BUG][SMAX] Fixed bug when AI successfully completes probe action of freeing a captured faction leader (FREEWILLY/FREEWHO) where it would reset a non-captured faction.

Offline PvtHudson

Re: SMACX Thinker Mod
« Reply #5 on: September 15, 2018, 09:33:00 AM »
Attached a save to reproduce "AI frees wrong captured leader" bug. Just press End turn and you will be "freed". Made on configuration described in http://alphacentauri2.info/index.php?topic=21007.0 though.
become one with all the people

Offline Induktio

Re: SMACX Thinker Mod
« Reply #6 on: September 15, 2018, 04:00:14 PM »
Yeah, that is a really funny bug when it occurs in the game. It is also reproducible in the base game without any mods. After I applied the patch, I can confirm the AI now frees Peacekeepers instead of the player. It seems the AI will not always perform the same probe action though.

I could probably consider creating a separate development build of Thinker if people want to try these changes before they get into the actual release. There's been quite a lot of stuff added to the code since the last release (v0.6).

Offline Induktio

Re: SMACX Thinker Mod
« Reply #7 on: September 19, 2018, 08:45:22 PM »
I now updated the downloads page to also include develop builds of the mod. They are versioned by the build date rather than a normal version number and contain all the recent changes from the repo. Also Scient patch v1.0 is included in the mod from now on.

Offline DrazharLn

Re: SMACX Thinker Mod
« Reply #8 on: September 27, 2018, 12:46:00 AM »
Scient did good work on their patch and their fixes aren't controversial. I don't really see why you don't just use their latest patch or Yitzi's as your starting point. Maybe that's been covered in another thread.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #9 on: September 27, 2018, 01:05:47 PM »
Scient did good work on their patch and their fixes aren't controversial. I don't really see why you don't just use their latest patch or Yitzi's as your starting point. Maybe that's been covered in another thread.

Well, occasionally somebody has requested "include some patches" without going to specifics. The issue is just binary patching is not very maintainable and the behaviour is not configurable. Particularly Yitzi's patch diverges from vanilla game behaviour on multiple aspects. Maybe it would be easier to look at this if you could describe the features that people want from those other patch versions?

On other news, I included a screenshot of a test game to see how the AI builds its empires in the current version. Turn is 145 and this is the moment when Gaia actually first reached 1000 labs output per turn. This test was done using version Thinker-dev-20180924 (it's in the downloads page). Next version after this will also see another big improvement because it will contain a patch that makes the governors choose borehole tiles more often.

Offline PvtHudson

Re: SMACX Thinker Mod
« Reply #10 on: September 28, 2018, 09:32:34 AM »
OMG, then what will Yang look like!
become one with all the people

Offline Geo

Re: SMACX Thinker Mod
« Reply #11 on: September 28, 2018, 10:20:18 PM »
OMG, then what will Yang look like!

Boreholes I have known...

Offline DrazharLn

Re: SMACX Thinker Mod
« Reply #12 on: September 29, 2018, 02:50:05 AM »
Scient did good work on their patch and their fixes aren't controversial. I don't really see why you don't just use their latest patch or Yitzi's as your starting point. Maybe that's been covered in another thread.

Well, occasionally somebody has requested "include some patches" without going to specifics. The issue is just binary patching is not very maintainable and the behaviour is not configurable. Particularly Yitzi's patch diverges from vanilla game behaviour on multiple aspects. Maybe it would be easier to look at this if you could describe the features that people want from those other patch versions?

Vanilla SMACX has a bunch of bugs, some of them game breaking, many of them confusing. Everything listed in Scient's patches is worth including IMO because they're almost all bug fixes and where they're not they're small and unobtrusive fixes (and I have checked the entire list :) )

The only controversial change I can find in the changelog is: "Fungal Missiles would spawn MW in ocean tiles -> fix by spawning IoD instead and adding in one Sealurk instead of Fungal Tower.", and the only controversial bit about that is what to do instead of spawning a fungal tower (which looks awful and dies at the end of the turn if on water). The remaining non-fix changes are backwards compatible and small.

I don't entirely understand your point about maintainability, either. Scient and other members of the community spent a lot of time discovering and fixing bugs and then testing the fixes. These bug fixes don't really need onward maintenance. The sites of the fixes are also annotated by scient, so if you're going to be hacking on some code nearby you can be aware of it. Tell IDA about it, even.

Similarly for configurability: bug fixes don't need configuration switches.

The only way these fixes could hurt maintainability are if they 1) confuse your reverse engineering tools too much; 2) break the boundaries of functions you want to hijack (unlikely). Including these fixes is likely to improve maintainability by removing bugs from the code base and so reducing bug reports etc.

Scient and others on the bugfixing team did good work over many years on SMACX. It seems pretty daft to me not to build on that work.

I attach scient's v2 patch files here for ease of access.

Offline DrazharLn

Re: SMACX Thinker Mod
« Reply #13 on: September 29, 2018, 02:52:46 AM »
Also Gaians shouldn't be building loads of roads and boreholes ;)

Offline Induktio

Re: SMACX Thinker Mod
« Reply #14 on: September 29, 2018, 12:25:10 PM »
The only way these fixes could hurt maintainability are if they 1) confuse your reverse engineering tools too much; 2) break the boundaries of functions you want to hijack (unlikely). Including these fixes is likely to improve maintainability by removing bugs from the code base and so reducing bug reports etc.

Scient and others on the bugfixing team did good work over many years on SMACX. It seems pretty daft to me not to build on that work.

Yes, I've seen what those changes are in v2, and maybe you consider them important changes but you can't expect to have the opinions heard if you don't comment which patch should be included. There's a big difference in patch size when it comes to v1 and v2. The first has 1300 bytes of changes while the second has over 3100 bytes. Even this website offers the v1.0 patch in the sidebar. Maybe it should be updated, but dunno. We might look into that later.

I do take an issue here about saying that I would not be building on Scient's work. There's probably very little chance I would have undertook this project if it was not for the reverse engineered databases Scient had provided. Maybe you notice this if you look at the header files. Figuring out what all those variables do would have been way too time consuming to do without any help. Even then I had to fill in some gaps continuously because some features needed to added.

***

Looks like I cannot overstate the importance of that borehole worker allocation patch. In some cases it can increase AI research output by as much as 50% because so many of those boreholes are left unused until the population is high. I actually continued the game in the screenshot after some changes and in only 10 short turns Gaia would deploy satellites, build cloning vats, and balloon the labs output to way over 2000 per turn. It would probably transcend around turn 180 but it is kinda bottlenecked by the mineral cost of the Ascent project when it has "only" 50 minerals in the top base.
« Last Edit: September 29, 2018, 02:11:32 PM by Induktio »

 

* 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

Air power rests at the apex of the first triad of victory, for it combines Mobility, Flexibility, and Initiative.
~Spartan Battle Manual

* 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]