Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
Auto-translated

I checked the map's contents and didn't find the types.xml file. Could you please tell me where to find it and that I should edit it? We only use map.xdb as a reference and don't modify it, right? Also, this map is for multiplayer, so maybe there's something special about it, just like with combat scripts...

I also noticed something else: in the map folder, there's a file called Agrael-2.(AdvMapHero).xdb. I experimented with it when I added all the heroes using checkboxes and, in Map Properties / Player Properties / Player 2 / Reserve Heroes List / Add, I added Agrael-2 to the reserve for the third player (AI stack). The list turned out to include all available heroes, not just those from the tavern. This works for my needs now because I've learned how to retrieve heroes from the reserve and reassign them to players. In this way, I can manually add all the missing heroes to the reserve: Arantir, Wier, Timhan, Maahir, etc. - by adding their *.xdb files to the map folder and, probably, specifying these files somewhere.

Ещё только учусь =)
User Avatar
Auto-translated
types.xml does not need to be modified; in the map archive, in Maps/.../MapName/, the map.xdb file contains a list of ReservedHeroes for each player. Similar to how new heroes are added through the editor, add a new one (just remember to change the inline:id – for example, replace any number).
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
Auto-translated

I think I figured it out, but it's a little different. I opened the map.xdb file with Notepad, found the necessary code snippets, but I was too afraid to edit them 😁 in case I accidentally broke something.
In the end, through trial and error, I found the following method:
- I added the hero through Map Properties / Player Properties / Player 2 / Reserve Heroes List / Add to the reserve, as described above.
- A new line with this hero appeared in MapPropertiesTree / Players / [2] / ReservedHeroes. I edited it, selecting the hero from the Shared list. I also experimented with both options, including heroes not from the tavern.
- After getting crashes when calling such a hero, I started comparing the fields, and through a scientific approach, I found that adding stats in MapPropertiesTree / Players / [2] / ReservedHeroes and specifying the location level (land/dungeon) is enough. The hero's abilities (Timhan was used as a test subject) were displayed and worked in battle.
But it's already night, I'll continue tomorrow. For now, I tried to get two heroes this way, and "it worked."

Ещё только учусь =)
User Avatar
Auto-translated

Thank you!

I've confirmed my hypothesis.
The map crashes when calling the function due to a discrepancy in the Floor variable within the reserved hero's parameters. You don't need to edit the stats; leaving them at 0 doesn't affect anything, and DeployReserveHero works correctly.
Ultimately, you just need to check MapPropertiesTree / Players / [2] / ReservedHeroes, opening the hero's line by clicking the three dots on the right, in the Property column, the Floor value should be 0 or 1, and it should match the location (land/Dungeon) where the hero is summoned from the reserve. Some heroes are assigned to land, others to Dungeon.
Also, to prevent the console from displaying a red warning, don't forget to assign some units to the heroes in the reserve. I added 1 unit. If you do nothing, the game assigns basic units itself. But the red message irritates my perfectionist soul.)



Added 2 hours 2 minutes ago
And I have a related question: to avoid manually copying 100500 text descriptions of specializations and the heroes themselves, how can I correctly specify the path in the code so that it can be displayed in a pop-up message? I see that there are these paths in the hero properties. I'll have to either specify them in a separate array for each hero, or if there's an option for a universal property/field, use a single variable to pull the data from there. But something tells me that I'll have to go through each one individually.

Added 1 hour 28 minutes ago

upd: I found a section in the FAQ by Jack_of_shadows: "How to find and correctly write paths to icons, effects, sounds, and other internal game resources?" It's described there. I'll try to do it similarly, taking the data from the hero properties. If I run into trouble, I'll come back with this question.😅

Ещё только учусь =)
User Avatar
Auto-translated
FataLisT, if I understand correctly, the idea is to display certain in-game texts at will, without copying them. Here's how I did it:
1. For example, I needed to display the name and description of an artifact in my artifact shop.
2. I found that all artifacts in the resources have a uniform path: /Text/Game/Artifacts/ARTIFACT_NAME/Name.txt (Description.txt).
3. I had to manually create a table of artifacts in the code, like this: [ARTIFACT_SWORD_OF_RUINS] = 'SwordOfRuin', which gave me a way to go from the artifact ID to its name in the resources (in reality, my table contains several parameters, not just the name).
4. Then I created functions like:

function GetArtefactName(id)
  return '/Text/Game/Artifacts/'..artefact_table[id]..'/Name.txt'
end

function GetArtefactDesc(id)
  return '/Text/Game/Artifacts/'..artefact_table[id]..'/Description.txt'
end

That's all there is to it.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
User Avatar
Auto-translated
I use a custom-made program that scans the game files and generates scripts based on them. For creatures, it generates information in the following format: For heroes: For artifacts: And for spells: Here you can download a pack with the scanned vanilla (not entirely) game. It's easy to connect it to any scripts and get information easily. Maybe it will be useful to someone. https://drive.google.com/file/d/17Xy0NygbnXhLnj1MTFH847yO1dm0Pzjp/view?usp=sharing
Нет войне.
User Avatar
Auto-translated
Jack_of_shadows, you are right, the idea is to gather all the data in one place. Thank you, I will take your advice about unifying the creation of the path through the ID into account. I am gradually collecting the *.lua file, and it is becoming a kind of database for the map, with the possibility of adapting it later for other ideas.

Gerter, thank you, your files will help many people who see them.
Ещё только учусь =)
User Avatar
Auto-translated
FataLisT, the coordinates for deploying a hero are specified using DeployReserveHero; I haven't encountered any issues with being unable to place a hero in a dungeon using the floor coordinate. In general, all reserve heroes are standard AdvMapHero objects that *are* on the map, but technically have zero coordinates; Deploy moves them. And for all AdvMap objects, the only criterion for correct operation is a specified valid (even if empty) Shared file. The coordinates can be set to any value; if I'm not mistaken, setting the floor to 99 does not cause a crash. But that was a long time ago, so conduct an experiment!
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
}{0TT@6bI4
FataLisT, the coordinates for deploying a hero are specified using DeployReserveHero; I haven't encountered a problem with being unable to place a hero in a dungeon using the floor coordinate. In general, all reserve heroes are standard AdvMapHero objects that are present on the map, but technically have zero coordinates; Deploy moves them. And for all AdvMap objects, the only criterion for correct operation is the specified valid (even if it's empty) Shared file. The coordinates can be set to any value; if I'm not mistaken, setting the floor to 99 does not cause a crash. But that was a long time ago, and it might not be true anymore, so conduct an experiment!
I conducted another experiment, and the result was as you described. Previously, I only changed the Shared file to the desired hero, and then it crashed. Then, I only changed this floor parameter, and it started working. It's a mystery! Well, it's not a shame to admit that the conclusion I made earlier turned out to be incorrect.
Ещё только учусь =)
User Avatar
Auto-translated
Hello everyone. Can you help me solve a problem? I created an image for the map loading screen. Everything seems to be correct: the size matches, the format matches, and I filled the bottom with black. I insert the image in the editor, launch the game, and the image appears distorted. In the upper left corner of the screen, only a small part of the image is visible, and the image is shifted to the right. Also, half of the screen is filled with black. What should I do?
In reply to Скаут
User Avatar
Auto-translated
Scout
Hello everyone. Can you help me solve a problem? I created an image for the map loading screen. Everything is as it should be: the size matches, the format matches, and I filled the bottom with black. I insert the image in the editor, go into the game, and the image is distorted. In the upper left corner of the screen, only a small part of the image is visible, and on the right, the image is shifted. Also, half of the screen is filled with black. What should I do?

I've seen this before, but I haven't had to fix it. Upload the image here, maybe it was saved incorrectly, and I'll take a look.
In reply to Mооnst@r
User Avatar
Auto-translated

I uploaded the screenshot and the source file to Yandex Disk. Here's the link:

https://disk.yandex.ru/d/lwr_gut_fz3BxQ

I just couldn't figure out how to attach an image on the website. The screenshot is for clarity.

In reply to Скаут
User Avatar
Auto-translated
Scout

I uploaded the screenshot and the source file to Yandex Disk. Here's the link:

https://disk.yandex.ru/d/lwr_gut_fz3BxQ

I just couldn't figure out how to attach the image to the site. The screenshot is for clarity.

You have a tga extension and the image is not compressed, which might have affected it.
Attachments 1
1 file attached • Total size: 353.6 KB
In reply to Mооnst@r
User Avatar
Auto-translated
Oh well, it seems things aren't going as planned. Now there's just a black screen. Damn, it's so hard to figure all this out. I don't even know what to think.

Statistics

Welcome our newest member: Emil