Tech Tree Availability Constants

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
User avatar
Leif Ericson
Waheguru
Posts: 1434
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Tech Tree Availability Constants

Post by Leif Ericson »

I created code for The General with defconsts to specify which units, techs, and buildings were available for each civ, and I figured this code could be helpful for others as well. I believe the info is correct across all game versions. I'll try to keep this file updated as new DE updates are released.

With an AI that loads this file, you can use up-compare-const to check if the object or tech is available in the player's civ tech tree without having to use #load-ifs or (civ-selected):

(defrule
(up-compare-const PALADIN-AVAILABLE == YES)
=>
(chat-to-all "Paladin is available in my civ's tech tree!")
)

The Civ Tech Tree Constants.per file lists which techs a civ has available. The Civ Unique Constants.per redefines my-unique-unit-upgrade, my-unique-research, and my-second-unique-research for each civ, as well as adding constants that specify the unique unit's attack and armor upgrade types at the blacksmith.
Attachments
Tech Tree Constants.zip
Updated for patch 114480
(8.59 KiB) Downloaded 56 times
Last edited by Leif Ericson on Mon Jun 24, 2024 9:48 am, edited 5 times in total.

User avatar
Leif Ericson
Waheguru
Posts: 1434
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Tech Tree Availability Constants

Post by Leif Ericson »

Updated to include Bohemians and Poles and include tech tree changes from the last few patches.

User avatar
KimberlyAzula
Forumer
Posts: 99
Joined: Thu Oct 07, 2021 8:17 am
Location: Germany

Re: Tech Tree Availability Constants

Post by KimberlyAzula »

I didn't know this existed, this is great.
Thank you, Leif!
There is no denying The Morrígan's prophecies!

GamesGod
Swami
Posts: 118
Joined: Fri May 20, 2016 4:01 am
Location: Russia

Re: Tech Tree Availability Constants

Post by GamesGod »

Great, it's just a pity that it's too late)) the upgrade I am currently working on - I have already added all 4 new civilizations in it)) the only thing I can't check the performance, because I bought only the basic version of DE :D
Developer of GamesGod AI

User avatar
CheeseOnToast
Yogi
Posts: 388
Joined: Sun Aug 31, 2014 5:48 pm

Re: Tech Tree Availability Constants

Post by CheeseOnToast »

Hope everyone can keep this file maintained for each balance update. :lol:

User avatar
Leif Ericson
Waheguru
Posts: 1434
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Tech Tree Availability Constants

Post by Leif Ericson »

Updated for the Dynasties of India December 2022 update.

User avatar
Leif Ericson
Waheguru
Posts: 1434
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Tech Tree Availability Constants

Post by Leif Ericson »

Updated for the Return of Rome. The zip now includes two files, one with tech tree info and one with info about unique units and techs.

User avatar
Leif Ericson
Waheguru
Posts: 1434
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Tech Tree Availability Constants

Post by Leif Ericson »

Updated for patch 107882.

User avatar
Promiskuitiv
Waheguru
Posts: 1369
Joined: Thu Nov 10, 2011 1:07 pm

Re: Tech Tree Availability Constants

Post by Promiskuitiv »

Thank you!
I'm sure this saves many people a lot of time, I'm also going to use it as I only had a select few tech constants ready for each civ. :ph34r:

User avatar
Leif Ericson
Waheguru
Posts: 1434
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Tech Tree Availability Constants

Post by Leif Ericson »

As a heads up, I haven't updated these files for the last few patches. I'll update it soon.

Post Reply