Skip to content

Posts from Is it possible to increase the number of creature slots from 7 to 10 in castles/for heroes?

No ratings yet — be the first to rate!
User Avatar
5 years ago
Auto-translated
Over several evolutions of the heroes, the number of creatures accompanying a hero has increased. I think it would be nice to have more creature slots in own five.

Is it possible to increase the number of creature slots from 7 to 10 for Castles/heroes? If so, is this again done via .Exe or can other measures be used?

User Avatar
5 years ago
Auto-translated
Heh. A "simple" task. I don't think it's possible; even tinkering with the executable using a hex editor is unlikely to yield much. You'd have to make more significant changes to the code, and for that, you'd probably need the source code. This isn't just about increasing gameplay value; it requires adding completely new variables. Although, they did somehow manage to do it with NCF.
In short, it can't be achieved with simple methods.

However, you could create alternative buildings, which would ultimately give a total of 14 different creatures. However, only 7 of them would still be available.
I described how to do this earlier.
The idea is viable. The only thing that hasn't been tested is whether the AI will interact adequately with this scheme.
zahar0z
I have an idea on how to add a building to a city that has an alternative creature.
 
I've wanted this for a long time, and I'm probably not the only one, to add an additional building to a city for hiring new creatures.
It seems that it's impossible to create a full-fledged additional building, but there are a couple of ideas on how to create an alternative one.
 
 
 
 
I'm warning you in advance, there will be a lot of text.
But in short, unfortunately, I couldn't outline the entire scheme.
 
 
 
 
First, I'll briefly describe what I found out.
1) A creature appears in the hiring window based on the ID of the building to which it is attached (i.e., if there is a level 7 creature 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; i.e., you can't just 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 another reason, related to the fact that the new building was not specified in the interface file. In reality, the game provides for 10 buildings of the special format, from special0 to special9. Each city has at least a couple of such buildings that are not used, so they can be used in mods.)
 
3) Unimproved, upgraded, and alt-upgraded creatures appear in the first, second, and third squares in the hiring window, respectively. This, in turn, is linked to the creature (i.e., if you assign an improved creature to a level 1 building without an original, it will still appear in the second square, not the first).
4) You can assign no more than two creatures to a building per level.
5) All buildings can theoretically be built up to level 5. The building plan and the dependencies of buildings on each other can be changed as you like, but I think everyone already knows that.
6) If you assign levels 3 and 4 (with a new original and two upgrades) to a building with creatures built up to level 2 (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, unimproved 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.
 
 
 
It's clear that this is not exactly an alternative building, but rather a building "on top." And the third level of such a building looks terribly awkward (a new, unimproved unit and its old upgrades).
But this situation can be fixed with scripts.
You'll need a script to destroy the building, a script to rebuild it, and a script to assign a new valid level, but let's take it one step at a time.
 
First, let's create five levels of the building so that there are all possible combinations at different stages of construction.
 
1. Assign the original, unimproved unit.
2. Assign the new, unimproved unit.
3. Assign the new upgrade and alt-upgrade.
4. Assign the original, unimproved unit.
5. Assign the original upgrade and alt-upgrade.
 
This gives us the following combinations:
 
Level 1: Only the original unit is in the hiring window.
Level 5: The original unit with two upgrades is in the hiring window.
 
Level 2: Only the new unit is in the hiring window.
Level 3: The new unit with two upgrades is in the hiring window.
 
 
Now, you need to assign a relationship between these buildings using scripts.
Of course, these scripts need a trigger.
It would be inconvenient and ugly to do this through dialog boxes.
I have an idea to do it through the same buildings. For this, you can use buildings with IDs special or even use taverns and forges. Any building with a resource to upgrade to level 5 will do.
 
 
 
Let's take the city of the Elves as an example and try to make it as clear as possible.
 
Let's take the buildings dwelling_1 (Fairy building), special_4 (building that increases the growth of fairies), and blacksmith (forge). Let's try to add an alternative building with knights to them. The scheme would be as follows:
 
dwelling_1
upg1
(Fairies are assigned)
upg2
(Knights are assigned)
upg3
(Knight upgrades are assigned)
upg4
(Fairies are assigned)
upg5
(Fairy upgrades are assigned)
 
special_4
upg1
(Nothing is assigned; the building is empty, but the icon and description are designed as a building with fairy upgrades)
upg2
(The influence on the growth of fairies is assigned)
 
blacksmith
upg1
(The forge is assigned)
upg2
(Nothing is assigned; the building is empty, but the icon and description are designed as a building with an unimproved 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 are building blacksmith upg2 to hire knights instead of fairies. Then, using a script, we need to assign: "If the blacksmith upg2 building is built, then automatically build dwelling_1 upg2 and prevent it from being built higher than level 3. Also, prevent the special_4 upg1 building from being built." As you can understand, no fairies will be available in this case.
 
In the alternative version, we build dwelling_1 upg1, assign a script 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, and using a script, we assign that "if special_4 upg1 is built, then dwelling_1 upg5 is automatically built." 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 is not three different buildings, but only one with different development options.
 
 
 
The idea should work; I tested it on a minimal scale. There are a few minor bugs. First, in order for the script to build a building to work, you need to exit the city to the global map and go back in (you can warn the player about this bug in the building description). Second, when building alternative creatures, there will be some chaos with the city level, because visually one building is being built, but in reality, several buildings are being built. 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 it, corrected the incorrect information)
User Avatar
5 years ago
Auto-translated
A very interesting idea with alternative creatures, but it would be easier to implement direct creature progression. For example, there's a peasant dwelling, and it has 5 versions. Grades 2 and 3 could be moved to level 9 or 12 of the town and made dependent on the first-grade peasant huts. Then, at higher levels, you could completely remove the weak peasants from the army and replace them with, for example, halberdiers.
User Avatar
5 years ago
Auto-translated
I was actually referring to the slots, so that you could take 10 creatures into battle.

I can't say whether it's actually possible or not, I just know that some people are modifying the .Exe file and increasing the number of creatures and artifacts, some have even increased skills to level 8, and I've also seen on heroescommunity that someone has increased the maximum level.

So, as a newbie when it comes to working with .Exe files, it seems to me that this is possible, but whether it's actually feasible, I think those who created the frameworks will be able to answer. Perhaps in the future, when they take a look at this topic.
In reply to fktifzobr@mail.ru
User Avatar
5 years ago
Auto-translated
fktifzobr@mail.ru
A very interesting idea with alternative creatures, but it would be easier to implement direct creature progression.
For example, there's a Peasant dwelling, and it has 5 versions.
Grades 2 and 3 can be moved to level 9 or 12 of the town and made dependent on the Peasant huts of the first grade.
Then, at higher levels, you can completely remove the weak peasants from the army and replace them with, for example, halberdiers.
This could be a good idea. However, there's one catch: it's likely that it won't be possible to upgrade old creatures to new grades through the town. The game might simply not recognize the connection between them.
Added 2 minutes ago
Waterfall_13
So, as a newbie in working with .Exe files, it seems to me that this is possible, but whether it's actually feasible, I think those who created the frameworks will answer. Perhaps in the future, when they take a look at this topic.
I'm also a newbie, for the most part. But it seems to me that this cannot be done without the source code.

Added 37 minutes ago
Wow. I tried it, and it turns out it's possible.

https://yadi.sk/d/-X_eLdQ3nkkWSA

I wrote it as a test: the third upgrade for the Peasant building. For the test, they upgrade to improved Gremlins.
At first, the game didn't want to link these creatures, but then I wrote Gremlins as upgrades in the improved Peasant files. And it worked.
In theory, you can build two more upgrade levels this way. It's pretty cool. You can make a whole bunch of creatures available to the player.
And most importantly, it's very easy to do. If anyone is interested, take the test archive that I posted above, and see which files and how need to be changed.
User Avatar
5 years ago
Auto-translated
Awesome!
In reply to }{0TT@6bI4
User Avatar
5 years ago
Auto-translated
I'm shocked that I didn't come up with this idea earlier.
But fktifzobr suggested a good idea.

Added 1 hour 43 minutes ago
One question remains open. How will the AI interact with this scheme? That is, will it upgrade buildings to level 3 and recruit/retrain new creatures?

Added 9 minutes ago
I tested it. The AI also starts building the third level of the building and upgrading creatures.
In short, everything works very well.
User Avatar
5 years ago
Auto-translated
I didn't quite understand what breakthrough occurred. =)

A short video demonstrating it would be helpful.

UPD1: I browsed the .pak file and basically understood everything:
The upgrades for peasants (militiaman and landlord) have additional upgrades (Creature) listed.

But what does the "downgrade" look like? That is, you buy peasants, upgrade them to landlords, and then you can upgrade landlords to gremlins... but you can't upgrade gremlins back to landlords, right?

It seems like a new dwelling (townbuildingsharedstats) has been created.

In mapobjects, if I understand correctly, Peasant_3 has been added to the list of buildings.

An additional level of upgrade has been added to the UI for one of the dwellings.

UPD2: I added it to my game, tested it, and it's a very interesting feature, but there's one significant drawback: now there are creatures of order 1, order 2, and order 3... and you can only downgrade creatures of order 3. You can't downgrade creatures of order 2 (militiaman and landlord) into each other.
I haven't tried it, but logically, if you also add peasant upgrades to gremlins, then you could downgrade between the 4 variants.

Here's how it worked for me (it's possible that it works differently for Zakhar, I don't know; you need to consider that I didn't add it to the original 3.1 version, but to my own version).
Video demonstration



.
In reply to Waterfall_13
User Avatar
5 years ago
Auto-translated
Yes. The bug is indeed unpleasant. I didn't notice it right away.

Here is the fixed version.
https://yadi.sk/d/wHCTAs-DPsBAyg

Added after 4 minutes
Now it works like this.
On the second level (i.e., Ordinary grades), grades can be changed between each other.
Provided that a third-level building is constructed, a second-level grade can either be converted into one of the third-level grades or into another second-level grade.
Third-level grades can simply be regraded among themselves.
It is impossible to roll back a third level to a second level.

That being said, there is one bug. But I don't think it's critical. Regardless of the building level, when converting a second-level grade into another second-level grade, money is not deducted from the player.
In reply to zahar0z
User Avatar
5 years ago
Auto-translated
zahar0z
Yes, the bug was indeed annoying. I didn't notice it right away.

Here's the fixed version.
https://yadi.sk/d/wHCTAs-DPsBAyg

Added 4 minutes later
Now it works like this.
On the second level (i.e., Regular upgrades), upgrades can be swapped between each other.
Provided that a level 3 building has been constructed, a level 2 upgrade can either be converted into one of the level 3 upgrades or into another level 2 upgrade.
Level 3 upgrades can simply be regraded between each other.
It is not possible to downgrade a level 3 upgrade to a level 2 upgrade.

However, there is one bug, but I don't think it's critical. Regardless of the building level, when converting a level 2 upgrade to another level 2 upgrade, the cost is not deducted from the player.
I set the regrade cost in my mod to almost zero, from 0.1 to 0.01 (I didn't know what would happen if I set it to 0, so I decided not to risk it).
So I didn't even notice this bug; the regrade cost is almost nothing in my game.

I tested it, and it works. It turned out to be quite an interesting mechanic =)

Was the bug fix only in the two .xdb files for Creatures, or did you tweak something else as well?
In reply to Waterfall_13
User Avatar
5 years ago
Auto-translated
Only two creatures.
Could you also record a video like you used to, demonstrating the feature, if it's not too much trouble?
In reply to zahar0z
User Avatar
5 years ago
Auto-translated
zahar0z
Only two creatures.
Could you also record a video like you used to, demonstrating the feature, if it's not too much trouble?

I can, but tomorrow, I'm going to bed now.
User Avatar
5 years ago
Auto-translated
@**zahar0z** - that's really cool! This is a very useful mechanic... it can be used to add additional upgrades and alt-upgrades for logically related creatures from NCF (with parameter adjustments as needed)! Personally, I think the gameplay will become much more diverse, and for example, completing campaigns or scenarios, or even just well-known maps, will become more interesting, because essentially it will be a completely different game! In short, as they say, respect and kudos!
User Avatar
5 years ago
Auto-translated
I completely agree!
User Avatar
5 years ago
Auto-translated
As I mentioned yesterday, today we have =)

Review
.

Statistics

Welcome our newest member: recijeb