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...
Posts from Questions about the Heroes 4 map editor.
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.
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.
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.
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.
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 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.
If randomness is planned, then the player has a "save/load" option as a fallback.
"Hostility" can be implemented, for example, by strengthening the neutral creatures.
Or by making passages toll roads.
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.
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.
Многие их ищут, многим они вовсе не нужны, а многие даже не замечают их, не понимают что они вокруг нас, каждый день, везде.
А эти чудеса порой, сокрыты в обычных, привычных предметах.
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.
Многие их ищут, многим они вовсе не нужны, а многие даже не замечают их, не понимают что они вокруг нас, каждый день, везде.
А эти чудеса порой, сокрыты в обычных, привычных предметах.