Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: bvanevery on July 17, 2019, 01:30:07 AM

Title: making faction specific techs
Post by: bvanevery on July 17, 2019, 01:30:07 AM
It's possible for a specific faction to have a tech that nobody else has, and that won't be in the game if that faction isn't in the game.  Proof of concept is provided with Progenitor Psych. 

prereqs are None, FldMod
prereqs are None, FldMod

The general form is to set the 1st prereq of a tech to "None", and the 2nd prereq to any valid tech.  This will cause the tech to be displayed correctly in the Datalinks.  If you don't do it this way, for instance if you use a tech that's marked Deactivate like the "User Tech", you'll get a box called "Not Available" as a prereq in the Datalinks.  Aside from looking stupid, if the player clicks on that box, the game will crash.  So use the formula I came up with!

Alien factions start the game with Progenitor Psych and Field Modulation.  These techs can be renamed, and they can be made to provide different abilities.  However as long as these techs are in the game, the Aliens will get them at the start of the game.  This behavior is hardwired into the binary, and .txt modding can't change it.

So what is the play mechanical value of this?  Other factions have to get the tech from the faction(s) that start with it.  They could trade for it, or steal it, but they can't research it.  And if the owning factions aren't in the game, then the tech can't be had at all.  In the case of something like Progenitor Psych, that's a good thing, as factions won't be distracted by researching a pointless tech.  Assuming one moves Aquafarm to somewhere else like I did, then the only value of the tech is enabling communication with the Progenitors.

This tech could be used to provide predefined units that are faction specific.  It could also be used to restrict facilities on the basis of whether a faction is in the game or not, i.e. no Network Nodes unless the University is playing.  The advisability of any such decision, is left up to the creativity of modders.

I thought it might be good to make players not have to learn the stupid Progenitor Psych, as it waters down one's research in the early game.  That said, human players may want to communicate with Aliens, and now they'll have to work harder to do it.  We shall see whether that's ok, desirable, or malfeatured.

Ah shoot this might not work the way I said.  I forgot to actually test whether a human faction can research Progenitor Psych or not.  Drat.

Damn, doesn't work the way I thought it did.  With no Aliens in the game, the Pirates did in fact learn Progenitor Psych.  My formula doesn't show any dependencies in the Datalinks, but the Field Modulation dependency is nevertheless there.  Back to the drawing board.
Title: Re: making faction specific techs
Post by: PvtHudson on July 19, 2019, 10:31:27 AM
Correct way to alienate progenitor techs is described in http://alphacentauri2.info/index.php?topic=21039.0 (http://alphacentauri2.info/index.php?topic=21039.0) (scroll to 'Alien tech:' in bold).
Title: Re: making faction specific techs
Post by: bvanevery on July 19, 2019, 02:24:54 PM
 Unfortunately the 'correct' way introduces a game crashing bug, as I reported earlier.  Here is an example of how to trigger it.  I made User Technology a prereq of Information Networks.  I did not change User Technology at all; it has prereqs of Disable and Disable.  When you hit F2, User Technology will be displayed as a prereq of Information Networks.  If you click on User Technology, say out of reasonable curiosity, you will see the following display:

clicking on NOT AVAILABLE crashes game
clicking on NOT AVAILABLE crashes game

NOT AVAILABLE is death.  If you want to 'correctly' alienate the techs from the tree, you have to tell your players not to click on this.  And if you don't think you can do that in the real world, then you'll have to deal with the consequences of your mod crashing the game.  Players might ask "What happened?" somewhere, or they might just shrug and uninstall your mod as a buggy piece of crap.  I don't want the latter scenario to happen, and a faction specific tech isn't enough of an advantage for me to take the risk as a modder.

Now, maybe if someone makes faction specific techs the whole point of their mod, then maybe one would be willing to put up with this game crasher.  That's a pretty hefty formal design exercise though, as any ability or facility made faction specific, isn't available in the game at all, if that faction isn't in the game.

Title: Re: making faction specific techs
Post by: bvanevery on July 26, 2019, 05:00:24 AM
I've realized it can be done in a non-buggy way.  It would have to be a late game tech, and a "leaf" dead end from some other tech.  Only the faction you want to have it, gets it at the start of the game.  This approach might have some skewing effects on some kind of tech cost mechanism though.  Like everyone else is working on Tier 1 techs and now you've got a Tier 10 tech, might change some cost formula somewhere, due to the average having such a high tech in it.  It may or may not be consequence free, but it wouldn't crash anything.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 5: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default), Aeva.english (default).
Style sheets: 0: .
Files included: 36 - 1181KB. (show)
Queries used: 14.

[Show Queries]