Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

4X I'll pay for Alpha Centauri ai .exe mod

passerby

Arcane
Joined
Nov 16, 2016
Messages
2,788
I was experimenting recently with alphax.txt to provide a challange in single player, by leveling a field between human and AI.
Buffing AI and nerfing ( but not removing ) the best winning strategies of human player - borderline exploits ( crawlers, forest, satellites, popbooming, copters, etc. )
I believe I can find cool nerfs, where all these things AI cannot into are still worthy tricks, but instead of being I win buttons, they're required to match AI buffs.

Unfortunately in my experiments I've stumbled upon a roadblock that can't be solved with alphax.txt mod:
- Even if I encourage AI to research centauri ecology and build formers early, AI wont build formers later, nor replace destroyed ones.
- AI will keep building military units until support eat all production and it can't build anything anymore.

These two issues basically grinds AI bases development to a halt by the midgame.
If you survive an early game, you won the game, it's only a matter of time and your efficiency from that point.

Proposed solution procedure:

If a function that decides base production, choose a military unit to build than make a check:

x = 0,6 + 0,1 * ai-fight + 0,2 if at war

if ( base support cost > x * base production )
{
if ( number of formers <= ( base size/5 + 1 ) && number of formers < 3 ) build former;

else if
( base colony pods < 1 ) build colony pod;
// requires testing, maybe condition or alphax.txt variable to disable it, but often factions refuse to spread past initial few bases

else
build anything else that doesn't increase support ( base facility, probe, crawler etc.)
// put a conditional checks into the original function to assure it has zero chance of choosing a military unit and rerun the function to achieve this effect
}
else build a military unit choosen by the original function;

I believe this modification would assure that AI will continue to spread, terraform, and build base facilities to the end of the game at good pace.

I'll paypal 100$ kyrub , or anyone else with assembler skills up to task of implementing it on top of the latest Ytzi patch.
You can now mod Ytzi patch to play pure SMAC in SMAX engine, which I do.
I need Ytzi patch for buffs/debuffs mentioned in the beginning and I enjoy bugfixes.

If someone thinks he could do it but 100$ is too little, please tell, maybe someone else will declare to join my initiative with their money.
 

kyrub

Augur
Joined
Aug 13, 2009
Messages
347
I'll paypal 100$ kyrub , or anyone else with assembler skills up to task of implementing it on top of the latest Ytzi patch.
You can now mod Ytzi patch to play pure SMAC in SMAX engine, which I do.
I need Ytzi patch for buffs/debuffs mentioned in the beginning and I enjoy bugfixes.

I am sorry, I am not into that .exe modding stuff anymore. My life has taken a nice turn and I am enjoying other ways of spending my time. I went so far, that I forgot where my reference files are and deleted them - probably (EDIT, I found them, see bottom!). I also don't need the money. Maybe someone else will find it appealing.

One thing I can say to you, though: don't underestimate current AI in SMAC. It is much more complex that those trivial equations you have written. The problem is, that the complexity and flexibility at times kills the logic of AI routines, when special situations occur. This equation for correction for #units is from my archaic notes (I have increased the first number to 2 in AI patch if I remember correctly to increase the effect).

...............................1 + [sqr((3 + AIwealth - AIpower - Naval_InvasionPlanned) * BaseSupprt) ]/ 9]

PRICE + PRICE * ---------------------------------------------------------------------------------------------------------------

........................................BaseMinerals


(As you can see, having AI power=1 and AI wealth=0 gives iniciative to cummulate a lot of units.)
 
Last edited:

passerby

Arcane
Joined
Nov 16, 2016
Messages
2,788
It's good to hear about positive turn in your life.

I imagine ai is very complex, because it actually works at the beginning and can even surprise you sometimes.
Given a humble amount of money I was offering, procedure I came up with was intentionally the most basic thing I could think of, that should bypass the problem I identify.
Identified problem being, that AI does barely build any base facilities, or formers. The simple idea is to prevent building any military units after support reach certain percentage of production.

I can't enjoy my favourite game anymore, because ai doesn't develop it's bases and give up past early game.
Other ai deficiences I think can be bruteforced through bonuses induced by alphax.txt

I know only absoulute basics of programming, possibly enough to do it myself if we had C source.
I was trying to find functions that determine base production in IDA with Scient's database of smac2.0 without success.

Could you provide addresses of such functions, or addresses of variables like AIwealth, AIpower, BaseSupprt, #units, etc., maybe it's possible to use variable addresses to search for functions that use them ?
I don't know, maybe I could manage to do some basic stuff myself if I knew where to start.

Feel free to answer here, in private, or to ignore me.
Thank you for your awesome contributions to the cause.
 
Last edited:

Jason Liang

Arcane
Joined
Oct 26, 2014
Messages
8,356
Location
Crait
This is why after a while I think the only way to play single player SMAC/ SMAX is with Advanced Start enabled.
 

whatevername

Arcane
Joined
Sep 2, 2013
Messages
666
Location
666
Could you provide addresses of such functions, or addresses of variables like AIwealth, AIpower, BaseSupprt, #units, etc., maybe it's possible to use variable addresses to search for functions that use them ?

Are those variables loaded from that alpha.txt file?
You'll need SoftIce for this. Either find that text file contents in RAM after that file is loaded (you can use any software that can search a process for a string... if it's wchar it'll be A.I.w.e.a.l.t.h where the dots are zeroes) or put an execute breakpoint on the function that loads that file(for example CreateFileW..... you'll need an API tracer for this and a win32 API manual that you can get from MSDN). Then you put a read breakpoint on the address where the value for "AIwealth" is stored. When that stuff is parsed it's probably going to a variable that'll be AIwealth. Now when you put a mem access breakpoint on it you can get all the fuctions that access it, 1 of them could be some AI function lol. Good luck.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom