Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to Победитель
#715
Auto-translated
Winner
I checked the editor, and the list in the campaign map selection is not empty, but it doesn't contain all the maps that are actually there. Perhaps the campaign editor needs some condition for a map to be added to the campaign.

How can I play multiplayer maps as if they were single-player maps? However, I have one option for that. Find your multiplayer map in the Maps folder, open it with an archiver, open the 'Maps' folder, and rename 'Multiplayer' to 'SingleMissions'. But how it will work...

That's the problem: I downloaded separate single-player maps and scenarios, including those specifically for my version of Heroes, version 3.1.
I downloaded all the original ones plus about thirty that were made and played a long time ago.
And the editor doesn't see any of them when creating a campaign, even though they are all in the maps folder.
In reply to aleksnice
User Avatar
#716
Auto-translated
I already have a general idea based on the example of recruiting a hero, and I would like to delve a little deeper so that the hero not only joins but also says something, for example: "Because you freed me, I will do my best and be your ally in the war against the demons who ambushed and captured me."
"Because you freed me, I will do my best and be your ally in the war against the demons who ambushed and captured me."
How can I do this with a script?
I just want to be able to change the text.
Thank you in advance for your answer, Winner!!!!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
#717
Auto-translated
Question: In the function StartCombat(heroname, nil, 5, 74, 6, 74, 4, 81, 4, 74, 4, 74, 6, nil); what does the number 6 represent, and more specifically, how should I correctly set this number to make the function work? For example, if the ID of a Seraph is 111, and I replace the first creature (Fury) with a Seraph, the function doesn't work. I believe this is due to that number 6.
Дайте мне всего шесть строк, написанных рукой самого честного человека, и я найду, за что его можно повесить.
Весьма хороший попутчик... До первого перекрестка.
User Avatar
#718
Auto-translated
Duncan, the following function is used to display messages:
MessageBox(--path to the text message--);
The text message must be in Unicode format and located in the map, i.e., in the archive that the map is opened from. The easiest way to do this is to extract an existing txt file from the map (e.g., the map description), rename it, write the desired text, and insert it back. At the same time, do not delete the original file!

His Most Reverend Eminence, the issue is not with the last six, but with the first five. It indicates the number of stacks in a battle. If you change the other parameters, you need to change this one as well. A follow-up question about StartCombat: how to properly format a battle between two heroes?

aleksnice, then I have nothing to advise.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#719
Auto-translated
Winner, could you please show screenshots of your work? I don't understand what needs to be archived and what text containing Unicode is. I just want to create a great map! Thank you for your answer, Winner!!!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
User Avatar
#720
Auto-translated
Step by step: 1. Open the map file located in the game folder / Maps using an archiver. 2. Drag the text document to your Desktop. 3. Rename the text document, for example, to 'msg'. 4. Enter your text into it. 5. Place the file back into the map archive. Now, to display this message in the game, you need to enter the following code: MessageBox("/Maps/SingleMissions/--your map name--/--text document name--"); If you enter this code without the function, the message will be displayed at the beginning of the game.
Attachments 5
5 files attached • Total size: 881.6 KB
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
#721
Auto-translated
I am referring to the Nival scripting guide:
StartCombat("Pelt", "Nemor", 10, 37, I'm not sure what number to put here – this is where the six is replaced, nil);
Pelt – Vlad, your hero, a Necromancer.
Nemor – Deidra, the opponent's hero, a Necromancer.
10 – the number of creatures of type 31 on the opponent's side.
31 – the type of creature, it seems to be a zombie.
nil – means there are no scripts.
If Deidra's actual army is different, for example, 10 liches, this army will not enter the battle. If Deidra wins, she will have 10 liches left, although I wouldn't recommend doing this, as problems may arise. After all, your hero – Vlad – needs to win. If Deidra is not on the map, she enters the battle on the first level with standard parameters (0, 1, 3, 1) with experience equal to zero (one) and with Dark Magic + Banshee Scream. If you want the opponent's hero to have different parameters, you need to do this with scripts.
Дайте мне всего шесть строк, написанных рукой самого честного человека, и я найду, за что его можно повесить.
Весьма хороший попутчик... До первого перекрестка.
In reply to Его Высокопреосвященство
User Avatar
#722
Auto-translated
And where is msg.txt? I don't understand.
Or did I miss something?

Added 3 minutes later
I already understand, I just didn't read it properly. I'll figure it out tomorrow, and if I don't understand something, I'll write.
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
In reply to Его Высокопреосвященство
User Avatar
#723
Auto-translated
His Eminence
I'm relying on the scripting guide from Nival:
StartCombat("Pelt", "Nemor", 10, 37, I don't know what number to put here - this is where the six is replaced, nil);
It doesn't work. It says "hero is not reserved". The hero's name is correct. Instead of six, I put 1, and there will only be one squad, but it doesn't even get to that point :(. Something is wrong here. Is it possible to start a battle with a hero who is on the map?
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#724
Auto-translated
Winner, where do I enter this?
Now, to display this message in the game, you need to enter the following code:
MessageBox("/Maps/SingleMissions/--your map name--/--text document name--");
If you enter this code without the function, the message will be displayed at the beginning of the game.
I'm a bit confused.
And also, do I need to archive the archive again, or just exit it?
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
User Avatar
#725
Auto-translated
The text document with the new name and content needs to be dragged back into the map archive (as shown in the screenshot). `

MessageBox("/Maps/SingleMissions/ExampleMap/msg.txt");
And this needs to be written in Map Properties -> Script ;).
Attachments 1
1 file attached • Total size: 197.0 KB
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#726
Auto-translated
I struggled with this for a long time, but I couldn't quite get it right. I did everything correctly, it seems, and I inserted the script `MessageBox("/Maps/SingleMissions/ExampleMap/msg.txt");`, but it appears as soon as the game starts, not when I approach the designated area! Without the script, it doesn't work at all!
Here's a picture:

Please check if it works on your computer!
And tell me if it works for you the way it doesn't work for me????
If it works for you, I'll send you my map, and you can check it, okay???
Thank you for your response, Pobeditel!!!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
User Avatar
#727
Auto-translated
If you simply use a MessageBox, it will only work at the beginning of the mission. If you need the message to appear when you enter a region after a garrison, insert the MessageBox into this function, before SetObjectOwner. That is, it should be somewhere like this: EnableHeroAI('Duncan',false); function garrison(hero) if hero=='Giovanni' then MessageBox("/Maps/SingleMissions/ExampleMaP/msg.txt"); SetObjectOwner('Duncan',PLAYER_1); end; Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'reg', nil); end; Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'reg', 'garrison', nil);
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#728
Auto-translated
Thank you, everything is working as I wanted. The question is similar to the previous one. I would like a message to appear before attacking a neutral creature as well. Is it possible to do that? Thank you for the answer, Winner! P.S. I don't want it to appear at the beginning of the game, but right before the attack, when the hero enters the creature's sector!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
User Avatar
#729
Auto-translated
Yeah. Duncan, please read the FAQ on mapmaking, which can be found in this section. The answer to this question is there:
Using a script. To start entering the script, click MapProperties in the top panel of the editor, go to the Script tab, and click Edit. You need to give the monster a script name in advance: select it, find the Name line in the left panel of the editor, and write, for example, Monster1 (remember that the editor is case-sensitive).
The script text looks something like this:

function fMes1(heroname)
MessageBox('[path to the text file in Unicode encoding]');
SetObjectEnabled('Monster1',true);
sleep(5);
MakeHeroInreractWithObject(heroname,'Monster1');
Trigger(OBJECT_TOUCH_TRIGGER,'Monster1',nil);
end;
SetObjectEnabled('Monster1',nil);
Trigger(OBJECT_TOUCH_TRIGGER,'Monster1','fMes1');
If something is unclear, ask ;).
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"

Statistics

Welcome our newest member: Фёдор Фёдорович