Page 1 of 1

Bonus Tech and Anti-Missiles

Posted: Fri Apr 06, 2018 9:50 pm
by harpy eagle
This thread is actually about two mods.

The first one introduces the concept of "Bonus Techs" to the game. Bonus Techs are techs are not researched directly, but instead are automatically acquired once all their prerequisites are met (in the same turn as the last prerequisite is researched).

Bonus techs appear in the tech tree and tech list like regular techs do, allowing the player to queue up all of their prerequisites by selecting them and clicking "set research"

The second mod makes it so that you need to research anti-missiles in order to get fusion anti-missiles or AM anti-missiles.

It adds two new bonus techs to the game: Fusion Anti-Missiles and Anti-matter Anti-Missiles, that each provide their respective anti-missile weapon. The regular warhead techs no longer provide anti-missiles.

The Fusion Anti-Missile tech is automatically acquired once Anti-Missiles and Fusion-Warheads are acquired, and the AM Anti-Missile tech is automatically acquired once Anti-Missiles and AM Warheads are acquired.

Because the techs do not cost anything to research, this mod does not affect the tech balance at all, other than making the core Anti-Missile tech necessary in order to use any anti-missile weapon.

Image

Re: Bonus Tech and Anti-Missiles

Posted: Mon Apr 16, 2018 5:00 am
by harpy eagle
Found an interesting bug caused by some leftover vanilla code.

Looks like there was once a tech called 'AM Anti-Missiles' already, that had 'Antimatter Anti-Missiles' as an allowed alias.

Since my mod adds a tech called 'Antimatter Anti-Missiles', somehow this causes AI part ordering to try to look up a tech called 'AM Anti-Missiles' (this part I'm a little unclear on, why this happens). Either way, it doesn't exist, so the game produces an error.

Solved by inserting an alias for my 'Antimatter Anti-Missiles' tech

Code: Select all

_G.allowed_aliases['AM Anti-Missiles'] = 'Antimatter Anti-Missiles'