New Ingame Tech Tree View
Posted on 04/15/16 @ 09:57 AM (updated 12/29/17
Please post your comments, questions and feedback into the corresponding forum thread :)
This is a new implementation of the ingame tech tree view (F2) completely replacing the old one. It is much easier moddable, as there are absolutely no hardcoded elements. Basically each element only requires its ID, type, age and rendering mode. The positioning is done by the rendering algorithm completely.
The current renderer uses the vanilla tree node positioning, but the whole remaining design is completely customizable, including the change of background graphics, control positions and sizes, age count and much more.
A little warning at this place: The tech tree replacement seems to be pretty stable by now, but anyway there may still be random bugs difficult to spot. If you encounter a crash that was caused by the new tech tree, let me know. It will help if you can give a short description of the steps leading to the crash, as this will make it easier to fix it.
I tested the new tech tree with the UserPatch installed; as far as I know there shouldn't be any incompatibilities.
You can follow development on GitHub: tech tree view and editor.
Note: As some of you may know, a few months ago I released the TechTreeEditor. This software is compatible with the new tech tree format (as of version 1.1.0), but also capable of doing much more than just modifiying the ingame tree view. If you want to do your modding in a more graphical way, feel free to test it out.
The ZIP archive consists of three folders: "NewTechTree" is the tech tree implementation itself, providing two installation variants: "Install" is the recommended and easiest one (this one changes the EXE file to load the TechTree.dll automatically). The other one, "Inject", is useful when you don't want to change your EXE file and rather apply the tech tree DLL changes at runtime (use it when you know what you are doing).
A modded sample empires2_x1_p1.dat is in the "DATA" folder. "Editor" contains a simple application to edit the new tech tree format. Read the respective README.md files for more detailed information.
"NewTechTree\Install": Unpack the EXE and DLL files into an arbitrary folder and run the EXE file. It will ask you for the age2_x1.exe, after that click "Install". This will patch your EXE and copy the TechTree.dll into the age2_x1 folder. If you haven't already created a custom empires2_x1_p1.dat with the new tech tree, you can unpack the empires2_x1_p1.dat from the archive into your DATA folder, replacing the old one (do not forget a backup!). Now you can start your age2_x1.exe as usual. It will automatically load the new tech tree and display it ingame.
"NewTechTree\Inject": Unpack the EXE and DLL files to the age2_x1 folder of Age of Empires II. If you haven't already created a custom empires2_x1_p1.dat with the new tech tree, you can unpack the empires2_x1_p1.dat from the archive into your DATA folder, replacing the old one (do not forget a backup!). Start the game by clicking on the AoETechTree.exe that you've put into the age2_x1 folder.
"Editor": Unpack all files into an arbitrary folder and run the EXE file. You're prompted to specify a DAT file to edit (use the one from the "NewTechTree" folder for testing), and some language DLL files for proper name display. After that you can add, edit and delete tree nodes, import/export the tech tree data, modify the design, and save your changes into a new DAT file.
The tech tree view itself was built with Microsoft Visual Studio 2017, so you'll need the appropiate Visual C++ redistributable.
The editor depends on the .NET Framework 4.5. It should already be installed on current windows systems; if not, you can find it here.
To find out if all requirements are installed just start the programs, they will tell you when some dependencies are not found.
Legal Info & Credits
This software is published under the MIT/X11 license. Please read the LICENSE for further information.
- The DLL-IDs of the labels below the age emblems are no longer hardcoded (useful for mods that change age names to something that doesn't end with "Age", like "Renaissance")
Note: This update breaks compatibility with files that were created with a version prior to 1.2.2; use one of the versions 1.2.2-1.2.4 to convert those files first!
- Fixed crash when opening the tech tree during a game (thanks to danielpereira for reporting it and providing test data)
- Updated to Visual Studio 2017 -> the required redistributable changed, see above for a link
- Fixed a crash when opening DAT files with modified terrain data
- Added configurable legend labels for the recently introduced custom node background types (thanks to Bala Arizalu for the idea!)
- Fixed a crash when opening old design files
- Updated the included tree data und design files
- Added support for custom tree element backgrounds (thanks to danielpereira for the idea and for providing a rough implementation!)
- Upgraded editor to .NET 4.5
- Fixed crash when switching civs in the tech tree view
- Removed leftover vertical line below elements with hidden children
- Fixed a few crashes when copying, pasting, moving and deleting nodes
- Implemented customizable designs and tree compression
|Author||Reviews ( All | Comments Only | Reviews Only )|
Good tool. It can create high-quality tech trees. But, there is a problem, some of the menu items like copy and paste would cause class casting exceptions. Is this the fault of running environment?
[Edited on 12/31/16 @ 11:03 PM]