Skip to content

NTBF – New buildings for the towns in Tribes of the East 3.1.

User Avatar
#133
Auto-translated
I have an idea on how to add a building to a town that features an alternative creature. I've wanted this for a while, and I'm probably not the only one, to add an additional building to a town for hiring new creatures. While it seems impossible to create a fully functional additional building, I have a couple of ideas on how to create an alternative one. I'm warning you in advance and apologizing for the lengthy text. Unfortunately, I couldn't fully outline the entire scheme. First, I'll briefly describe what I've figured out: 1. A creature appears in the hiring window based on the ID of the building it's linked to (i.e., if a seventh-level creature is in a building with the ID `dwelling_1`, it will still appear on the first line in the hiring window). 2. It's not possible to assign new IDs; you can't simply enter `dwelling_8` or `special_8` for a building. In my case, the game crashes. (Correction: the previous information was incorrect; the game crashed for a different reason, related to the fact that the new building wasn't defined in the interface file. In reality, the game provides for 10 buildings of the `special` format, from `special0` to `special9`. Each town has at least a couple of such buildings that are not used, so they can be used in mods.) 3. Non-upgraded, upgraded, and alternate upgraded creatures appear in the first, second, and third slots in the hiring window, respectively. This is linked to the creature itself (i.e., if you assign an upgraded creature to a first-level building without an original, it will still appear in the second slot, not the first). 4. You can assign no more than two creatures per building level. 5. All buildings can theoretically be upgraded to the fifth level. You can change the building plan and the dependencies between buildings as you like, but I think everyone already knows that. 6. If you assign a third and fourth level (with a new original and two upgrades) to a building with creatures that has been upgraded to the second level (original and two upgrades), they will replace the primary creatures in the hiring window. This will happen as follows (according to the points written above): first, the old, non-upgraded unit will be replaced with a new one, while retaining the upgrades from the old creature. Then, the upgrades will be replaced with new ones. Obviously, this isn't exactly an alternative building, but rather a building "on top." Also, the third level of such a building looks terribly awkward (a new, non-upgraded unit and its old upgrades). However, this situation can be fixed with scripts. First, let's create five levels of the building so that all possible combinations are available at different stages of construction. 1. Define the original, non-upgraded unit. 2. Define the new, non-upgraded unit. 3. Define the new upgrade and alternate upgrade. 4. Define the original, non-upgraded unit. 5. Define the original upgrade and alternate upgrade. This gives us the following combinations: 1st level: only the original unit is in the hiring window. 5th level: the original unit with two upgrades is in the hiring window. 2nd level: only the new unit is in the hiring window. 3rd level: the new unit with two upgrades is in the hiring window. Now, we need to link these buildings with scripts. Of course, these scripts need a trigger. It would be inconvenient and unsightly to do this through dialog boxes. I have an idea to do it through the buildings themselves. For this, you can use buildings with the IDs `special` or even base it on taverns and forges. Any building with a resource to upgrade to the 5th level will work. Here's an example for the Elven town, trying to be as clear as possible: Let's take the `dwelling_1` building (Fairy building), `special_4` (building that increases Fairy growth), and the blacksmith. Let's try to add an alternative building with Knights to them. The scheme would be as follows: `dwelling_1` `upg1` (Fairies are defined) `upg2` (Knights are defined) `upg3` (Knight upgrades are defined) `upg4` (Fairies are defined) `upg5` (Fairy upgrades are defined) `special_4` `upg1` (Nothing is defined; the building is empty, but the icon and description are designed as a building with Fairy upgrades) `upg2` (The influence on Fairy growth is defined) `blacksmith` `upg1` (The blacksmith is defined) `upg2` (Nothing is defined; the building is empty, but the icon and description are designed as a building with an unupgraded Knight) Next: There are two options: `blacksmith upg2` (looking like a Knight hiring building) and `dwelling upg1` (looking like and being a Fairy hiring building) Let's assume we're building `blacksmith upg2` to hire Knights instead of Fairies. Then, the script needs to define: "If the `blacksmith upg2` building is built, then automatically build `dwelling_1 upg2` and prevent it from being built higher than the third level. Also, prevent the `special_4 upg1` building from being built." As you can see, no Fairies will be available in this case. In the alternative, we build `dwelling_1 upg1`. The script defines that "if this building is built, prevent `dwelling_1 upg1` from being built further and prevent the `blacksmith upg2` from being built." The `special_4 upg1` building appears, which was hidden before because it required `dwelling_1 upg1` to be built. We build `special_4 upg1`. The script defines that "if `special_4 upg1` is built, then automatically build `dwelling_1 upg5`." Now, Fairies are built, and Knights are no longer available. As you can see, by skillfully arranging the icons and adjusting the description, you can create the impression for the player that it's not three different buildings, but just one with different development options. The idea should work; I tested it on a minimal scale. There are a few minor bugs. First, for the script to work when building a building, you need to exit the town to the global map and re-enter (you can warn the player about this bug in the building description). Second, when building alternate creatures, there will be some minor chaos with the town level, because visually one building is being built, but in reality, several are. But this bug can even be played as a gameplay feature, and you can also warn the player about it in the building description. In general, this method can double the variety of creatures that can be hired in any castle. (P.S. I edited and corrected some incorrect information.)