Automat: Vielseitige Geschichten und Fragebögen

Als ich noch jung™ war, gab es diese Büchlein, bei denen man in der Geschichte immer wieder eine Entscheidung treffen und dann abhängig davon auf einer anderen Seite weiterlesen musste. So fand man dann je nach Geschick die Liebe seines Lebens oder einen frühen Tod im Säuregraben. Ebenfalls angesagt waren Persönlichkeitstests, die dir nach fünf beantworteten Fragen mitteilten, welches Spice Girl du warst.

Automat erlaubt es, diese Konzepte auf eine Webseite zu übertragen. Als Eyecandy kommen großformatige Hintergrundbilder hinzu. So lassen sich die verschiedensten Anwendungen realisieren: Gruselstories, Persönlichkeitsquizze, Flowcharts, Entscheidungshilfen, oder eine Anwendung, bei der man mindestens elf Mal auf einen Knopf drücken muss wie im Beispiel.

Automat: Vielseitige Geschichten und Fragebögen

Für all das muss man lediglich folgende Dinge beherrschen:

  • Bilder im images-Ordner speichern
  • Die Konfigurationsdatei data.json anpassen, ohne dabei Syntaxfehler zu machen

Automat steht unter der MIT-Lizenz, also macht damit, was ihr wollt.

Viel Spaß.

How to compile the Advanced Genie Editor on Linux (Ubuntu 18.04)

The Advanced Genie Editor is an excellent software to inspect and modify the core game files of games that use the Genie format – that includes Age of Empires II in particular. It is written in C++ and licensed under an open source license1, which makes the whole thing twice as nice (the open source part, not the fact that it is written in C++).

While the Advanced Genie Editor is just available for download as a Windows executable, it can also be compiled and run on Linux systems.

As I happen to play my Age of Empires II on my Linux as well (using Wine/PlayOnLinux), this is what I desire, to be able to look up stuff easily when developing other Age of Empires II related tools.

Unfortunately, being rather inexperienced with the whole C++ build chain, I never really got it to compile. Which sucked, because I would either have to reboot into Windows or use my windows laptop next to my main PC to run the precompiled windows version. This also meant no copy-pasting.

But after some more hours of trial and error, I finally got it to work!

HowTo

On a freshly installed Ubuntu 18.04, run the following commands:

sudo apt install git build-essential cmake libwxgtk3.0-dev libboost-all-dev libsfml-dev
git clone https://github.com/Tapsa/AGE.git
cd AGE
mkdir extern
cd extern
git clone https://github.com/Tapsa/genieutils.git
git clone https://github.com/Tapsa/pcrio.git
cd ..
cp "Misc Files"/zlib.cpp extern/genieutils
cp /usr/share/SFML/cmake/Modules/FindSFML.cmake cmake/
mkdir build
cd build
cmake .. -DEXTERN_DIR=extern
make

The make step will take some time.

Finally, you will have an AdvancedGenieEditor3 executable in AGE/build/! Happy modding.

(You cannot change the (absolute) location of the AGE/build/extern/genieutils/libgenieutils.so library though. Otherwise, the program will not work anymore, as it will be unable to locate the library.)

  1. GPLv3

The Age of Empires II Technology Trees In Your Web Browser

Age of Empires II currently offers 31 unique civilization to play as. Compared to, for example, the three races that players can choose from in StarCraft 2, that might seem overwhelming at first. However, all Age of Empires II civilizations share a common pool of units, buildings and technologies, with only a few unique elements to each civilization. This lowers the bar for newer players significantly.

A civilization’s technology tree shows which units, buildings and technologies are available to that civilization in which age. This follows some general rules, like that mesoamerican civilizations do not have access to cavalry, and further civilization-specific rules that disable certain units and technologies for a civilization. Due to the common pool, all technology trees look similar, albeit not identical.

The Age of Empires II Technology Trees In Your Web Browser

The leftmost part of the Japanese technology tree

Sometimes, players wish to access the technology tree for one or more civilizations without having the game open, to see which units, buildings or technologies are available to a civilization.

Let’s build an online technology tree!

We start by analyzing the layout of the in-game technology tree:

  • There are eight rows, two per age.
  • Squares are connected  by exclusively horizontal and vertical lines.
  • Elements of one upgrade line are all within the same column.
  • Buildings are centered on their immediate unit and technology children.

Sounds doable!

Our next step is to collect all available building, unit and technology names. We devise a clever algorithm to recreate the desired layout that contains the data we collected before.

Next we notice that some civilizations have unique units, which move parts of the tree around when they are inserted.

Crestfallen, we exclaim “Oh no!” and scrap the idea of an accurate representation of the in-game tech tree, because while we are rather motivated, we are first and foremost lazy programmers.

Instead, we create a “master” technology tree which contains the elements of all technology trees in the game. Unfortunately, this means that it gets even wider than the original version(s). Also, some squares will be disabled for 30 out of 31 civilizations, but whatever. At this point, we don’t care.

Speaking of disabling: We add a the functionality to display big red crosses when an item is disabled. Hereafter, we spend two hours scrolling through the tech tree of every civilization and adding the information which buildings, units and technologies are disabled to our application.

As a finishing touch, we add all the icons, and we are basically done!

The Age of Empires II Technology Trees In Your Web Browser

Add dank memes to your blog posts to boost your reach among adolescent audiences.

We present: A bland online version of the Age of Empires II technology tree. In your browser, even kind of mobile-friendly, MIT-Licensed (except the icons).

Unfortunately this version is currently without the civilization bonuses that are usually displayed below the civilization selection box, as we could also not be bothered to manually type them all. Fixed! omg