Skip to content

Posts from Questions about the Heroes 4 map editor.

4.7 (3 ratings)
In reply to Nero_Best_Demon
Auto-translated
Nero_Best_Demon
Well, I created it like this... I took a quest where I need to find a house for people, and they give me an artifact as a reward. Then, I created a trigger event in that "flagless" hero so that if my hero "has this artifact," he switches to the red side (meaning my player). But unfortunately, as soon as I get the artifact, nothing happens...
I must have made a mistake somewhere in all of this. Send me the map with this script in a private message, and I'll take a look to see what's wrong.
Герои Геленвейла: Очищающее пламя
User Avatar
Auto-translated
Okay... the map is practically ready. I'll post it in the comments when it's completely finished.

Added 46 minutes later
And by the way, if anyone wants to help me with my projects, feel free to send me a private message. I want to restore the popularity of the 4th installment of Heroes through my campaigns... because it's my favorite. I'll try, even if only slightly, to restore its former glory.
User Avatar
Auto-translated
Is it possible to add an entry to the player's journal in any way other than by visiting standard locations that offer quests?
In reply to Larisa
Auto-translated
Larisa
Is it possible to add an entry to the player's journal in any way other than by visiting standard locations that provide quests?

In my opinion, unfortunately, no.
Ваяю кампанию под HoMM4, обновленный мод Equilibris ver. 3.55 <заморожено>
User Avatar
Auto-translated
Okay, so I guess I'll have to come up with some alternative to the journal.

And another question. I want to make it so that all units located in a specific area lose a certain number of creatures once a day, and heroes take damage. It seems like it's impossible to do it directly, but I can implement something similar by filling the entire area with yellow spheres that trigger the same script, which will randomly remove creatures and health with a certain probability. I understand that calling a script at every step is a terribly inefficient solution, but it seems to be the only way to achieve the desired result. And now, the actual question: how slow and poorly will this work? Will it cause slowdowns or glitches on older computers (assuming the game itself runs normally)? I've tested it myself, and everything seems fine. The script itself isn't heavy, but the area is large.
In reply to Larisa
Auto-translated
Larisa
Okay, so I guess I'll have to come up with some alternative to the journal.

And another question. I want to make it so that all units located in a certain area lose a certain number of creatures once a day, and the heroes take damage. It seems that it's impossible to do it directly, but I can implement something similar by simply filling the entire area with yellow spheres that trigger the same script, which will randomly reduce the number of creatures and health. I understand that calling a script at every step is a terribly inefficient solution, but it seems to be the only way to achieve the desired result. And now, the actual question: how slow and poorly will this work? Will it cause slowdowns or glitches on older computers (assuming that the game itself runs normally)? I tested it myself, and everything is fine. The script itself isn't heavy, but the area is large.

If the units are unknown in advance, then the only way is through PE (those yellow spheres). In this case, they will take damage at every step, since it will not be possible to identify the units. In my opinion, this could be very annoying for players. There shouldn't be too many slowdowns, after all, modern computers can easily handle a game from 2002.
If, however, the units can be identified in advance, then the above-mentioned problems can be avoided.
Ваяю кампанию под HoMM4, обновленный мод Equilibris ver. 3.55 <заморожено>
In reply to Valex
User Avatar
Auto-translated
Valex
Moreover, they will take damage at each step, as it will not be possible to identify the units. IMHO, this could greatly annoy players.
Not at each step. There are random numbers, so you can set the probability of losses to, say, 3% or so. And it should annoy players, but not excessively. The idea is to make the inhospitable snowy wasteland even more inhospitable and repulsive, so that getting stuck there without good preparation would be truly dangerous. Unfortunately, the units are unknown in advance, and it should work for everyone.
In reply to Larisa
Auto-translated
Larisa
Not on every map. There are random numbers, so you can set the probability of losses to, say, 3% or so. And it should be annoying.

The terrain becomes challenging.
If randomness is planned, the player has a way out in the form of save/load. :)
You can place PE (presumably, Permanent Enemies) not so densely, or near resource sources, or cities - depending on the map.
"Hostility" can be implemented by, for example, increasing the number of neutrals.
Or make the passages paid. Or... there are many options.
Ваяю кампанию под HoMM4, обновленный мод Equilibris ver. 3.55 <заморожено>
User Avatar
Auto-translated
If randomness is planned, then the player has a "save/load" option as a fallback.
Sure. In my opinion, saving after every step is an even greater form of masochism... The goal is not to kill the player, but to annoy them :D
"Hostility" can be implemented, for example, by strengthening the neutral creatures.
Or by making passages toll roads.
In that case, you need to somehow explain to yourself and others why everything is the way it is, and not otherwise. If the neutral creatures are strong and numerous, then where did they all come from, and what are they doing in this dangerous place? If the passage is a toll road, then who on earth could have thought that anyone would even consider going there, and be willing to pay for it? And also, why can't I level a small, lonely tower to the ground, even though I can easily deal with a pack of black dragons? And if the guard is serious, then again, what could they possibly be guarding?! But here, everything is simple and logical - it's cold and empty, and an imprudent traveler will quickly perish in such a place without any outside help. But, firstly, you can prepare accordingly, and then it will be easier, and secondly, you can simply not go there; the map provides at least two other possible routes.
Auto-translated
As the author, you know best. The advice given above was provided with the caveat: it depends on the map.
Ваяю кампанию под HoMM4, обновленный мод Equilibris ver. 3.55 <заморожено>
User Avatar
Auto-translated
I have a question that's not exactly about the editor, but about editing maps, specifically regarding H4Util. I'm trying to extract scripts from my Campaigns using the command "H4Util -pa new_era.h4c," but it tells me that 0 maps were found and creates empty .h and .c files. In reality, there are two maps in the Campaigns, and they contain scripts. I'm sure it used to work. What stupid mistake am I making this time? Google didn't find a solution. The version of H4Util is 2.4, and H4Runner is 1.1. Sorry for the silly question!

UPDATE: It turns out that, firstly, the utility only works with individual scenarios, not with Campaigns. Secondly, when I exported the scenarios from the Campaigns and tried to extract scripts from each map separately, it gave me a ton of strange errors, mostly of the form "command not found + a bunch of unreadable characters," and at some point, it crashed. As for the maps themselves, the first one does have some questionable scripts, but the second one has no scripts at all. Both maps open normally in the editor and in the game. Also, the first map was previously successfully processed in H4Util (there were warnings somewhere, but the result was normal). So, the problem is not in the scripts themselves (at least, not only in them). What else could it be?

UPDATE 2: The problem was solved by re-downloading H4Util from a different website. It was simply missing one file, and because of this, when there were certain objects on the map, it apparently went into an infinite loop/recursion, consumed all the memory, and crashed. Unfortunately, I don't remember where I got the bad version, but I know that the version from here http://www.celestialheavens.com/viewpage.php?id=157 is good.
In reply to Larisa
User Avatar
Auto-translated
Larisa
Okay, so I guess I'll have to come up with some alternative to the magazine.

And another question. I want to make it so that all units located in a certain area lose a certain number of creatures once a day, and heroes take damage. It seems that it's impossible to do it directly, but I can implement something similar by simply filling the entire area with yellow spheres that trigger the same script, which will randomly reduce the number of creatures and health. I understand that calling a script at every step is a terribly inefficient solution, but it seems to be the only way to achieve the desired result. And now, the actual question: how slow and poorly will this work? Will it cause lag or glitches on older computers (assuming that the game itself runs normally)? I tested it myself, and everything is fine. The script itself isn't heavy, but the area is large.

Perhaps there is another option. Personally, I think: before entering the zone, create a local event, let's say, "entering the dangerous zone." In the script, the variable "Entering the dangerous zone" is set to True. We create a calendar event in the properties of the army/hero: 1 day, repeat every first day, if the variable "Entering the dangerous zone" is equal to True, then perform the necessary actions. Before the local event "Entering the dangerous zone," we create a local event "Exiting the dangerous zone," which sets the variable "Entering the dangerous zone" to False. On the second entry/exit from the dangerous zone, we create two more such events.
The downside of this idea: it is impossible to predict whether the hero will move with the entire army in one unit or create separate units. That is, a separate unit may trigger the variable "Entering the dangerous zone" to True, and the player will receive some negative effects that should not occur while he is not in the zone.
However, this can be solved by the same global placement of local events on each cell of the dangerous zone. That is, let's say, if there is no hero in this unit, then an invincible army attacks this unit. In general, here is such an idea.
Наш мир полон тайн и чудес.
Многие их ищут, многим они вовсе не нужны, а многие даже не замечают их, не понимают что они вокруг нас, каждый день, везде.
А эти чудеса порой, сокрыты в обычных, привычных предметах.
User Avatar
Auto-translated
Perhaps there is another option. Personally, I think: before entering the zone, create a local event, let's say, "entering the dangerous zone." In the script, the variable "Entering the dangerous zone" is set to True. We create a calendar event in the properties of the army/hero: 1 day, repeat every first day, if the variable "Entering the dangerous zone" is equal to True, then perform the necessary actions. Before the local event "Entering the dangerous zone," we create a local event "Exiting the dangerous zone," which sets the variable "Entering the dangerous zone" to False. On the second entry/exit from the dangerous zone, we create two more such events.
The downside of this idea: it is impossible to predict whether the hero will go into the zone with the entire army in one unit, or whether he will create separate units. That is, a separate unit may set the variable "Entering the dangerous zone" to True, and the player will receive some negative effects that should not exist while he is not in the zone.
However, this can be solved by the same global placement of local events on each cell of the dangerous zone. That is, let's say, if there is no hero in this unit, then an invincible army attacks this unit.
In general, this is the idea.
I was thinking about a similar option, but because we cannot find out in advance who and when will come there, it is not suitable. There may be both creatures and heroes (including those hired by the player during the game), both a human and a computer... and it should work for everyone, without any side effects. But if it were possible to find out in advance, then your solution would be optimal.
User Avatar
Auto-translated
Perhaps, for each hero, it would be worth adding penalties in their properties when entering the dead zone, and limiting the number of heroes and armies, or even completely preventing the hiring of other heroes by both the computer and the player. And single armies could be destroyed by a script with an invincible army. Or, gates could be placed so that only the main hero can pass through, and penalties could be applied only to him.
Наш мир полон тайн и чудес.
Многие их ищут, многим они вовсе не нужны, а многие даже не замечают их, не понимают что они вокруг нас, каждый день, везде.
А эти чудеса порой, сокрыты в обычных, привычных предметах.
User Avatar
Auto-translated
Hello, could you please tell me if it’s possible to get a hero after completing the Seer’s Hut, and how to do it? (Heroes 4)

Statistics

Welcome our newest member: Emil