You must be logged in to post messages.
Please login or register

The University

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Adding Units and Researches to the ingame Tech Tree (Approved)
posted 01-19-16 07:56 PM CT (US)   
This article has been approved and can also be read at the University. - Leif Ericson

For quite some time, ingame Tech trees were believed to be an uneditable, hardcoded part of the game. While they do have several hardcoded behaviors, adding units and researches is a fairly straightforward process, though completely different then adding them to the game itself.

You'll need Advanced Genie Editor and a unit or research to add. There are four subtabs in AGE's Tech Tree tab. You'll need to access three of them in order for changes to work. To begin, select the Tech Tree tab, where the Age subtab should be open. Find the appropriate Age (green), add new item (red), then change the ID to match the unit or research ID (blue).

Age Tab


Buildings work almost exactly the same way:

Building Tab


Additionally, the ordering in these list sets the left-to-right priority for units and researches. When multiple items are in a building, the lower IDs will appear on the left side. This is only within the same list: all units will be farther to the left than any research.


Unit are more complicated, and work a little differently depending on if they are the first/only unit in their line (Villagers, nonelite Huskarls, Battering Rams) or are an upgrade. In either case, the first step is switching to the Unit subtab and adding a new unit (red). As with most edits in AGE, it is highly recommended to copy a similar existing entry rather then create new one from scratch. Once that's done match the new entry's ID to the unit you want (blue). Note that this is the ID in the Main unit tab, not the ID in the list you see here. Also set the Upper Building, (where it is trained) shown in green. Again the ID in the unit list, not in the building subtab. Finally, make sure the age is set properly, (orange) to 1 for a Dark Age unit, 2 for a unit first available in Feudal, 3 for Castle age, and 4 for Imperial Age.



For a unit that is not an upgrade, set the Enabling Research (green) to the research that enables the unit. Leave it as -1 if the unit is availiable without research, like the militia. If it has upgrades, go to the Connected units section, (blue) and add the unit you want to appear directly below it. Further upgrades are not required, hence no paladin here:



For an upgraded unit, Set the Required Research (blue) to the relevant unit upgrade. Alter a slot in Connected items (green) to the preceding unit in the chain. Set the second box (red) to the preceding unit ID and the first (orange) to 2, which represents units rather Ages, buildings, or researches. Finally, set the Connected Units to the next unit in the chain if it exists. If it doesn't, don't put any entries in Connected Units at all.



For researches, add a new research and copy a similar one to it. Set the Research number (green) to the research ID, the Upper building (blue) to the building where the tech is researched, Age and prerequisite upgrades in Connected Items, (black) and subsequent researches in Connected Researches (orange).



Be sure to edit all connected entries for each change you make. Generally, the object just won't show up if you forget one, but some missing changes can cause the game to crash when you view the tech tree. I spent a lot of time learning this the hard way when I added a second upgrade to the Scorpion without adding a Connecting unit to the Heavy Scorpion.


Finally, there a few important limitations to keep in mind when editing the Tech Tree:

·Unique units and techs that appear in the tree for only one civ can only be added to the castle. Otherwise, they will be appear for all civs. To activate this behavior, use researches that are civ specific for the Research ID, Enabling Research, or Required Research.
·You cannot add new buildings without exe editing
·The Dock and Monastery have a hardcoded connection number: If you add new units or techs, older ones will vanish, and if you take any away, lines that go nowhere in particular will appear.
·Units must have no more than one enabling technology to appear correctly. More complicated setups, as in Age of Chivalry, must be accomplished with duplicate units.
·The red X is placed on items disabled by the Technology tree of a civ. Disabling tems with another tech will not cause it to appear.

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times

[This message has been edited by Vardamir (edited 08-08-2017 @ 12:30 PM).]

Replies:
posted 01-19-16 09:32 PM CT (US)     1 / 42  
Nice work you have done Vardamir! It was about time for someone to do an article like this one! I hope this helps many new modders!

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)
posted 01-20-16 03:09 PM CT (US)     2 / 42  
Nice guide

Advanced Genie Editor
Follow coding here and here.
posted 01-20-16 04:05 PM CT (US)     3 / 42  
Great article Vardamir ! Much needed too, it will definitely be useful to many modders (starting with me ).

It's nice to see articles like that being created recently, we now pretty much have a complete AGE guide that covers all the basic aspects of data editing.

Fluctuat nec mergitur.
posted 01-20-16 08:59 PM CT (US)     4 / 42  
Vardamir, I love you so much. #VardamirForPresident2020

Hey I'm back
posted 01-24-16 00:58 AM CT (US)     5 / 42  


What on Earth have I done here?

I tried adding a building to the tree, and three units. One of which to the Town Centre.

Time of Tea
Still in the Dark Age
Don't be a melodramatic clown. ~Mr Wednesday
posted 01-24-16 08:32 AM CT (US)     6 / 42  
The lines to nowhere? That happens when a building has more connections than connected items. Are your new units showing up? You can't add new buildings without hex edits, though.

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times
posted 01-26-16 02:21 AM CT (US)     7 / 42  
I meant to write a guide for this for over 2 years but never got to it. :/

Good work!
posted 01-26-16 07:34 AM CT (US)     8 / 42  
You cannot add new buildings without exe editing
Darn, that explains why it doesnt work... ;-;
And exe editing is pretty complicated, right?

[This message has been edited by Knaber (edited 01-26-2016 @ 07:41 AM).]

posted 01-26-16 01:12 PM CT (US)     9 / 42  
It's certainly up there. If you only want to add one, there is a Sea Gate enabled for use on the tech tree but not actually used.

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times
posted 01-26-16 09:32 PM CT (US)     10 / 42  
does the sea gate also works on cd version ? iirc i was just able to add the sea gate icon into the age 2 hd version, because they included it for the forgotten.

edit: ok tried it out and it works, good to know seems they planed to include palisade gates into the game, strange why they didnt do it.

[This message has been edited by gag2000 (edited 01-26-2016 @ 09:38 PM).]

posted 07-07-16 05:10 PM CT (US)     11 / 42  
I enabled Slingers and Imperial Camels to all civs (by giving any civilization as requirement in their techs)(in part of my personal noob/cheat/unbalancing full-tech mod*), they are buildable but do not show in tech tree. I also added new level of Handcart and Blacksmith's upgrades, they also are researchable and working, and also do not appear in the tech tree. I added all of these in tech tree in AGE editor as shown in this thread.

The case of Slingers and Imperial Camels causes me to thing that tech trees could be after all hard-coded.

I play on AoE2:HD with both expansions and use AGE 2016.3.13.

What extactly does "Total units and techs by age" and "Total units and techs at first by age"? Maybe there problem lies, but i changed this for blacksmith with no effect.

EDIT: I've done with my new researches, but not with units.

*Aside note: I also add some pretty unbalancing additions to some team bonuses and buff Huskarl and Japanese. I also moved Huskarl and Slinger recruit icons to not block Eagle Warriors in Barracks and Hand Cannoners in Archery Range.

[This message has been edited by NEHT (edited 07-07-2016 @ 05:51 PM).]

posted 07-07-16 06:30 PM CT (US)     12 / 42  
What extactly does "Total units and techs by age" and "Total units and techs at first by age"?
I'm not sure if this does anything, actually.

I haven't done any tech tree work on the HD edition, but I would assume it's the same or a similar issue as Missionaries and unique ships in the base game. The Monastery and Dock have a hardcoded number of connections, with the higher number for Spanish/Vikings/Koreans... hardcoded for that particular civ.

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times
posted 11-20-16 11:00 PM CT (US)     13 / 42  
I tried to move the hand cannoneer to the siege workshop by changing the "Upper Building" to siege workshop, but in the tech tree it still appears in the Archery Range. Is there anything else I need to do?
posted 11-21-16 07:41 AM CT (US)     14 / 42  
You'll also need to add the hand cannoneer to the list of units available at the siege workshop and remove it from the Archery Ranges' list.

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times
posted 11-22-16 08:35 PM CT (US)     15 / 42  
Thanks, Vardamir! It's working!
posted 02-19-17 06:50 PM CT (US)     16 / 42  
The Monastery and Dock have a hardcoded number of connections, with the higher number for Spanish/Vikings/Koreans... hardcoded for that particular civ.
Is this the same thing for the Goths with Anarchy? Because if it wasn't the case then Anarchy would be shown on everyone else's tech trees as well because there's nothing else filling that slot for that civ.
Also, I can get a unique tech to show up on the tech tree, however when I hover over it, just a blank white box appears. How do I fix this?
Never mind, I fixed this by matching up the Help Converter by +21000 of the Language File Name in the language.dll.

[This message has been edited by Tocaraca (edited 02-19-2017 @ 07:57 PM).]

posted 02-22-17 11:23 AM CT (US)     17 / 42  
Is there any way to change in which vertical line a unit appears? There is such a value in the genie editor, but changing it doesn't seem to do anything. It seems pretty arbitrary where they are placed (and which units/techs are connected with a line while others are place underneath a different unit/tech)

Example:



As you can see, the Caravels obscure the Shipwright tech, while Fire Ship and Fire Galley are in different lines. Any way to change the order of things around here?
posted 02-22-17 10:17 PM CT (US)     18 / 42  
The arrangement is affected by the ordering the of the Connected Unit list for the dock.

Caravels obscuring shipwright is a different issue, though. The Dock and Monastery have a hardcoded number of connections. If you add new units or techs, older ones will vanish, and if you take any away, lines that go nowhere in particular will appear.

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times
posted 02-23-17 10:29 AM CT (US)     19 / 42  
It seems that for the dock there's more hardcoded than just the number of connections. Editing the order of units/techs in the list didn't work in this case, though it does work in other instances. I've been able to fix the fire galley problem by switching the IDs of fire galley and fire Ship in the Data File completely.
I've also moved the Caravel to the Castle - not entirely accurate but at least this way it only shows up for the Portugese and doesn't obscure shipwright. Thanks for the guide and the help!
posted 02-23-17 10:51 AM CT (US)     20 / 42  
Take care, it might block out something different at the castle then, since that building has a hardcoded amount (7) of lines, too. Might be better at the dock despite shipwright, since the Portuguese don't get that tech anyway.
posted 02-23-17 05:12 PM CT (US)     21 / 42  
Indeed, but placed in the dock it appears for all civilizations, not just portuguese.

This way, for portuguese, it obstructs spies but I think that's not too bad.

[This message has been edited by Jineapple (edited 02-24-2017 @ 03:08 AM).]

posted 02-23-17 06:31 PM CT (US)     22 / 42  
Putting them at the castle's a pretty good idea. If you sill want spies to show up, you can not show the elite version.

Alternatively, it just clicked that the number of connections only matters at the age with the most of them. If you lie and put the elite upgrade in the Castle Age, everything can fit:


AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times
posted 02-24-17 08:20 PM CT (US)     23 / 42  


Hi Jan, I recommend you to use Tech Tree View Editor to edit the tech tree.
Or you can relocate the Fire and Demolition Ship ID, and then edit some hex at EXE.

posted 02-25-17 10:08 AM CT (US)     24 / 42  
Just adding an obligatory warning that such edited .exe files cannot be released directly at AoKH. However, having an installer for the mod that adds modifications to a preexisting .exe like Userpatch does is fine.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 05-03-17 11:32 AM CT (US)     25 / 42  
Yeah, uh, userpatch has the full, decrypted age2_x1.exe inside its SetupAOC.exe ... it's stored in the database section and is the same 2.6MB the AoC binary is.

While it is checking for an existing age2_x1.exe, it's not using the preexisting exe, that would be a nightmare when updating an existing userpatch installation.

It is also nocd patching it, otherwise it would ask for a CD when you click on SinglePlayer. The function checking for the CD is modified compared to the untouched binary, and probably only returns 1.

Just wanted to clear that up. It's been bugging me for a while that people don't really know how UP installs.

Some more info on hardcoded stuff, anyway, the game has hardcoded checks to hide the Trebuchet (Packed) unit from the Castle, the Missionary from every Monastery except the Spanish, the (Elite Longboat) from every Dock but the Vikings and the (Elite) Turtleship from every Dock but the Koreans.

For this reason the Slinger shows up in everyone's techtree on Forgotten 2.2

I hacked around a bit by injecting into the game using a ddraw.dll hack, jumping to that specific part, adding an extra check for the Slingers, and while the Slingers are now hidden the lines are completely messed up and the space is still there.

In that same function for the techtree the Dock and Monastery also get built completely hardcoded, probably because of the unique units there ... haven't been able to quite understand what's happening there.

See here:

http://screenshotcomparison.com/comparison/208710

[This message has been edited by withmorten (edited 05-03-2017 @ 03:19 PM).]

posted 05-03-17 11:01 PM CT (US)     26 / 42  
Ah, thanks for clearing the Userpatch stuff up. I'm probably the main person mistakenly spreading that information.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 05-03-17 11:14 PM CT (US)     27 / 42  
To be fair, I wasn't completely sure until today either, I just decided to finally check and confirm my suspicions after finding this topic while googling for techtree stuff.

[This message has been edited by withmorten (edited 05-03-2017 @ 11:17 PM).]

posted 12-18-17 12:15 PM CT (US)     28 / 42  
İs edit Aokhd tech tree possible?
posted 12-22-17 01:02 PM CT (US)     29 / 42  
It's the same system as the aoc tech tree, so yes.
posted 09-16-18 07:41 AM CT (US)     30 / 42  
hi, really new to modding so its all a bit confusing. Im a scenario creator and im currently needing to make one civ have all techs even when not using full tech tree.

how will I go about doing this? also, will it break my game if I attempt this?

really appreciate if anyone can help me out with this, along with how to get that onto the live game.
posted 09-16-18 09:45 AM CT (US)     31 / 42  
I would recommend installing Userpatch. Among many improvements, it makes many triggers more useful. My understanding is that you can enable any techs you want for any single player. To do this, make a Research Technology trigger, select the player number, select the technology, and set the Number field to 1.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 09-16-18 03:09 PM CT (US)     32 / 42  
what is userpatch? So if I download that I can just use the ingame scenario editor triggers to research techs that are normally not available for a specific civ?
posted 09-18-18 11:28 PM CT (US)     33 / 42  
Userpatch is a huge community patch to the game. It has numerous multiplayer improvements, scenario design improvements, and AI improvements. One of the improvements does what you're looking for. However, there are some extra steps.

First, create a Research Technology effect for the tech and player and set the Number box on the right side to 5 (not 1 like I said earlier). This enables the tech for the player. Then create another Research Technology effect for the same tech and player and leave the Number box at 0. This will actually research the enabled tech. Let me know if it works for you.

Anyone playing your scenario will have to install Userpatch for the scenario to work for them, but it's really worth the install.

Also, Userpatch doesn't work on the Steam version.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 02-21-19 05:24 AM CT (US)     34 / 42  
I solved the problem, thanks!
posted 07-18-19 02:42 AM CT (US)     35 / 42  
·You cannot add new buildings without exe editing

So that is the problem. Having heard of any guide or can you give an INDEEP explanation to what the HELL you are talking about.
posted 07-20-19 05:31 PM CT (US)     36 / 42  
".exe editing" is editing the code of the game itself (the game's .exe file), something very few people know how to do. Also, you have to go through special steps if you want to let others legally use the changes that you made. You can't just give someone the modified .exe file because that is illegally distributing copies of the game.

Put simply, adding buildings to the tech tree view is practically impossible, even if those buildings are functional in your mod.

If you describe the changes you want to your mod's tech tree, we could see if there's a workaround that could work.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´

[This message has been edited by Leif Ericson (edited 07-20-2019 @ 05:32 PM).]

posted 07-22-19 12:54 PM CT (US)     37 / 42  
".exe editing" is editing the code of the game itself (the game's .exe file), something very few people know how to do. Also, you have to go through special steps if you want to let others legally use the changes that you made. You can't just give someone the modified .exe file because that is illegally distributing copies of the game.

Put simply, adding buildings to the tech tree view is practically impossible, even if those buildings are functional in your mod.

If you describe the changes you want to your mod's tech tree, we could see if there's a workaround that could work.
It is simple. It is actually just the Trade Workshop, plus a unit and some techs I have added to it that I want to show up in the ingame tech tree. By the way your answer is quite good and acceptable
posted 07-29-19 05:45 PM CT (US)     38 / 42  
Okay, one workaround I can think of is to rename one of the buildings that don't have a lot of stuff branching off of it, the Outpost, Palisade Wall, House, etc. Call this the Trade Workshop and branch all of the units and techs off of this renamed building. To make the renamed building usable in-game, you could duplicate this building and make the duplicate the actual in-game building. So, the old building is only used in the tech tree.

One possible disadvantage is that the units and techs might not have the tech tree branching lines connecting them. In my mod, I have some units and techs that are available at the Outpost, and I couldn't figure out how to get the branching lines to appear for the Outpost building. The other disadvantage is that the old renamed building won't be able to appear in the tech tree, but this might not be a big deal for you. For example, who really needs to see the House in the tech tree?

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 07-30-19 03:17 AM CT (US)     39 / 42  
Okay, one workaround I can think of is to rename one of the buildings that don't have a lot of stuff branching off of it, the Outpost, Palisade Wall, House, etc. Call this the Trade Workshop and branch all of the units and techs off of this renamed building. To make the renamed building usable in-game, you could duplicate this building and make the duplicate the actual in-game building. So, the old building is only used in the tech tree.

One possible disadvantage is that the units and techs might not have the tech tree branching lines connecting them. In my mod, I have some units and techs that are available at the Outpost, and I couldn't figure out how to get the branching lines to appear for the Outpost building. The other disadvantage is that the old renamed building won't be able to appear in the tech tree, but this might not be a big deal for you. For example, who really needs to see the House in the tech tree?
It is All right. I only wanted it for the sight any way, It is all right that it can't be done.
posted 11-17-19 09:38 AM CT (US)     40 / 42  
Hi, i pretty much know modding from Universalis games but despite i've read all this page still no idea how to make Paladin available to the Turks?

Can someone help me?

I couldnt find any Paladin page in the editor to make it civilization specific. I couldnt find anything showing civilization tech tree too.
posted 11-25-19 07:48 PM CT (US)     41 / 42  
In AGE, go to the Effects tab and search for Turks Technology Tree. Remove the Disable tech 265 effect command from the list.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 04-13-20 09:52 AM CT (US)     42 / 42  
Great guide, but so, there's no known way to add a Unique unit to another building than Castle (in HD version)?
I've tried to figure if there's some difference in Genie Editor between the Tech Tree infos of (for example) Slinger and other common units... but all seems equal, no more specifications that would make Slinger icon appear in Arch Range only for Incas, and how...
No one knows how to do, so?

[This message has been edited by jabura29 (edited 04-13-2020 @ 10:05 AM).]

Age of Kings Heaven » Forums » The University » Adding Units and Researches to the ingame Tech Tree (Approved)
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames