Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Nexii on May 21, 2020, 10:46:03 PM

Title: scient patch - faction effects
Post by: Nexii on May 21, 2020, 10:46:03 PM
A number of faction effects don't seem to work for me

At a minimum:
NODRONE
RESEARCH
IMMUNITY
IMPUNITY
ROBUST
COMMFREQ (may be bugged but did work in Yitzi's)

perhaps others. I tested most of the faction ability list but not every single one
Title: Re: scient patch - faction effects
Post by: bvanevery on May 22, 2020, 12:25:38 AM
RESEARCH??  I have trouble believing that.  Plenty of stock factions use RESEARCH.  Someone over the years would have noticed.

Are you Starting A New Game to make your changes go into effect?  Loading a game isn't enough.
Title: Re: scient patch - faction effects
Post by: Nexii on May 22, 2020, 12:27:40 AM
Not SOCIAL, RESEARCH but the other one that gives labs per base. All SOCIAL benefits seemed fine.
Title: Re: scient patch - faction effects
Post by: bvanevery on May 22, 2020, 12:31:04 AM
Ah,
Code: [Select]
;   RESEARCH    = Free research points per base per turn.I've never used this in my life and didn't know it existed.  Have you verified that it actually works in the official game binary?

Title: Re: scient patch - faction effects
Post by: Nexii on May 22, 2020, 12:35:18 AM
It worked on Yitzi's patch. I don't have the official binary installed but you could test.
Title: Re: scient patch - faction effects
Post by: EmpathCrawler on May 22, 2020, 03:25:33 AM
Are you sure about IMMUNITY? Yang would be unplayable without it.
Title: Re: scient patch - faction effects
Post by: Nexii on May 22, 2020, 06:16:34 AM
Seemed to be the case. FREEFAC/FACILITY was also inconsistent. Works for most facilities but not Rec Commons
Title: Re: scient patch - faction effects
Post by: EmpathCrawler on May 22, 2020, 02:23:18 PM
I just checked and IMMUNITY is definitely working in Thinker, which I don't think changed much of the underlying Scient patch.


Are you loading up a faction with a bunch of rules to see what works? There's a category of rules that are limited to 8 maximum. Most of the rules you named are limited. It's possible some of the weird ones like RESEARCH or MORALE that appear to be early versions of what became SOCIAL rules were never implemented properly, though I'm pretty sure PSY works.


http://alphacentauri2.info/wiki/Faction.txt_editing_guide
Title: Re: scient patch - faction effects
Post by: Nexii on May 22, 2020, 02:45:35 PM
Yea it's very strange, not having to do with the 8 type-2 limit. If you exceed that I believe the game warns you anyways. IMMUNITY seems to work after a repatch.

NODRONE, 1 works for Drones. But if I edit Cycon (cyborg.txt) to have the same bonus it doesn't work.

Might have figured it out (partly). TECHSTEAL without a parameter seems to mess up every faction benefit listed afterwards. This might be what's going on with my other custom faction files too.
Title: Re: scient patch - faction effects
Post by: Nexii on May 22, 2020, 03:02:38 PM
Yep this can be closed. I think it was that Yitzi's patch allowed the parameter to be omitted. Although IMO the game should consider TECHSTEAL, TERRAFORM, FANATIC, etc. without the number parameter as invalid faction files.

TECHSTEAL -> bad
TECHSTEAL, 1 -> good
Title: Re: scient patch - faction effects
Post by: scient on May 22, 2020, 04:05:05 PM
Yeah, my unofficial patch never touched that code. If you wanted to grab OpenSMACX, you could recompile it to remove the need for parameter if you wanted. The entire parser code of faction (https://github.com/b-casey/OpenSMACX/blob/master/src/alpha.cpp#L392) files has been decompiled.

Title: Re: scient patch - faction effects
Post by: Nexii on May 22, 2020, 05:01:55 PM
Yea it's not a big deal at all. Yitzi's patch had some code either added or enabled that warned a user about invalid faction files. So I got used to it thinking it was a standard feature.
Title: Re: scient patch - faction effects
Post by: bvanevery on May 22, 2020, 07:11:41 PM
I think it was that Yitzi's patch allowed the parameter to be omitted.

Yitzi unfortunately had poor long term judgment about such things.  IIRC there are basically 3 places in alphax.txt where he changed the encodings to mean other things.  That wasn't forward looking for people using his patch vs. not using it.  At least one of those encoding changes causes a crash, I think it's Stockpile Energy.  He's not around to fix his work, and he didn't leave enough notes for anyone else to enjoy following his work.  What he chose to do, has mostly not proven to be of sufficient interest to the contemporary binary modders.  So unfortunately a lot of work that he did lies fallow, waiting for someone to rediscover a need to care equally, for the work involved.

Anyone could write a trivial Python script to patch over these minor differences in encodings.  And thereby support compatibility between stuff.  But, nobody ends up wanting to write such scripts or do that kind of integration and maintenance work in practice.  That's what happens when a project that does consume a certain amount of real work, doesn't provide enough payoff for the person contemplating it.

For instance, a hobbyist modder merely wants their own mod to work, for the most part.  So why would they end up caring about public support burdens?  "Works on their box," they've solved their own problems.

Someone tending towards professionalism like myself, is trying to build his own reputation.  Not Yitzi's.  Furthermore, Yitzi never provided a modding feature I actually need.  Nor did he ever make the AI play better.  Nor do I actually get bitten by bugs for the most part.  From my perspective, the stock GOG binary works fine.
Title: Re: scient patch - faction effects
Post by: EmpathCrawler on May 22, 2020, 08:24:46 PM
Yeah, my unofficial patch never touched that code. If you wanted to grab OpenSMACX, you could recompile it to remove the need for parameter if you wanted. The entire parser code of faction (https://github.com/b-casey/OpenSMACX/blob/master/src/alpha.cpp#L392) files has been decompiled.


Can you explain what the atoi() function is?
Title: Re: scient patch - faction effects
Post by: lolada on May 22, 2020, 08:28:31 PM
http://www.cplusplus.com/reference/cstdlib/atoi/
https://en.cppreference.com/w/cpp/string/byte/atoi
Title: Re: scient patch - faction effects
Post by: EmpathCrawler on May 22, 2020, 10:31:49 PM
Thanks!
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 15.

[Show Queries]