Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to }{0TT@6bI4
User Avatar
5 years ago
Auto-translated
}{0TT@6bI4
If I'm not mistaken, for the heroes to successfully transfer from one mission to another, they must be present on both maps. Therefore, you'll have to copy the hero file.
Thank you...
And another question on the same topic: how do I copy this file? It doesn't work through the H5MMods folder, although it's possible I'm doing something wrong...
User Avatar
5 years ago
Auto-translated
Open the map file with any archiving program. Find the Shared file. Copy the file into the archive of the map to which you want to transfer it. After that, in this map, select any hero and enter your Shared.
In reply to }{0TT@6bI4
5 years ago
Auto-translated
}{0TT@6bI4
You can do anything in the editor. I can simply explain how to configure sounds and textures in the editor without unnecessary tricks.

P.S. If the sound suddenly doesn't work (;)), remember my words.
Khotabych, thank you for your help! Can you still explain how to properly import sounds into maps? I manually insert DDS files into the map and specify them in the xdb, but it doesn't work with sounds.

I've studied the structure; the game somehow converts them into bin files using the UID, but I can't figure out how to do it correctly. I want to create voiceovers for the intro sequence when the map starts and possibly for dialogues.
User Avatar
5 years ago
Auto-translated
In the Map Properties Tree, find the line "Loading Screen Sound," click "New," enter the name in English, and click "OK." In the window that appears, select the sound file (wav) from the "Complete" folder of your game in "Source File." Set "Is 3d" to "false." Then, hover over the resource in the file tree (on the left in the new window), right-click, and select "Export." Finally, click "OK."

You can do the same for any other sounds (New => Src File, Export => OK). Creating animations is even simpler.
In reply to }{0TT@6bI4
5 years ago
Auto-translated
}{0TT@6bI4
In the Map Properties Tree, find the line "Loading Screen Sound," click "New," enter a name in English, and click "OK." In the window that appears, select the sound file (wav) from the "Complete" folder of your game in "Source File." Set "Is 3d" to "false." Then, hover over the resource in the file tree (on the left in the new window), right-click, and select "Export." Finally, click "OK."

You can do the same for any other sounds (New => Src File, Export => OK). Creating animations is even simpler.
Goodness, how smart do you have to be to create a separate folder for loading files? I would never have guessed that you can only load data from the "Complete" folder. Thank you, this helped. I searched for manuals (even official ones) for so long, but I couldn't find this information anywhere.
User Avatar
5 years ago
Auto-translated
Having a separate folder for uploading user files is quite a hassle, but the developers know best. I'm currently working on a very comprehensive guide to the entire map editor (spoiler alert), and I will definitely include this point there.
User Avatar
5 years ago
Auto-translated
Hello everyone! How can I add or subtract gold from a player's current amount? For example, a player has 2500 gold, and after completing a quest, they receive 1000, resulting in a total of 3500. I tried doing it like this:

gold=GetPlayerResource(1,GOLD); I declared a variable.

and then I used this command to change the player's gold amount:

SetPlayerResource (1, GOLD, gold-1000);

But the command doesn't work correctly. It does change the player's gold amount, but not as it should. Instead of 3500 gold, the function gives approximately 45000.
In reply to John_Lock
User Avatar
5 years ago
Auto-translated
User01322342
Hello everyone! How can I subtract or add gold from a player's current amount? For example, a player has 2500 gold, and after completing a quest, they receive 1000, resulting in a total of 3500. I tried to do it like this:

1) `gold = GetPlayerResource(1, GOLD);` - I declared a variable.

and used this command to change the player's gold amount:

2) `SetPlayerResource(1, GOLD, gold - 1000);`

3) But the command doesn't work correctly. It does change the player's gold amount, but not as it should. Instead of 3500 gold, the function gives approximately 45000.
I apologize, and I might be wrong, but I have three questions regarding these three points:
1) After executing this command, did you try outputting the value of `gold` to the console? Does it correctly display the gold amount, and does it match?
2) There's no way to verify the correctness of this command. But I wonder, why not do all the calculations before executing the `SetPlayerResource` command? And why is there a "-" if you said the player received +1000 gold?
3) Could you provide a screenshot of the console and the code? It can't just appear out of nowhere that the amount is 45k.
User Avatar
5 years ago
Auto-translated
Inside the team, instead of the soulless variable "gold," write the actual "GetPlayerResource(1, GOLD) - 1000."
User Avatar
5 years ago
Auto-translated
I was testing the campaign editor in the map editor and noticed that when selecting missions for the campaign, not all maps are available. Specifically, the latest maps I created are not visible there. Has anyone encountered this issue, and does anyone know how to fix it?
User Avatar
5 years ago
Auto-translated
We already discussed this issue with one of the mapmakers in our group. The website blocks tags, so I'm attaching the solution (a copy of the correspondence) as a txt file. Judging by the lack of further questions, one of the solutions is viable.
Attachments 1
1 file attached • Total size: 4.2 KB
User Avatar
5 years ago
Auto-translated
Hmm, well, that’s clear now. We’ll see. Thanks.
In reply to Fallenru
User Avatar
5 years ago
Auto-translated
Fallenru
I sincerely apologize, and I might be wrong, but I have 3 questions regarding these 3 points:
1) After executing this command, did you try outputting the value of gold to the console? Does it correctly display the amount of gold, and does it match?
2) There is no way to verify the correctness of this command. But I have a thought: why not do all the calculations before executing the SetPlayerResource command... and why is there a "-" here... if you said that the player received +1000 gold?
3) Can you provide a screenshot of the console and the code itself? It can't just appear out of nowhere, 45k...

There is an error in my example, but it doesn't affect anything. If I put a '+' sign, the gold will still be displayed incorrectly.
Here are the screenshots: resource panel and console before executing this command:



And here are the screenshots after:*



Don't pay attention to the hero errors; they don't affect this.

"But I have a thought: why not do all the calculations before executing the SetPlayerResource command?" Your quote. And what specific calculations should be done?

P.s. The screenshots were uploaded strangely; if you click on them, the quality will be better
In reply to }{0TT@6bI4
User Avatar
5 years ago
Auto-translated
}{0TT@6bI4
Instead of the soulless variable 'gold' within the team, write the actual 'GetPlayerResource(1, GOLD)-1000'.
I tried to do it as you suggested, but unfortunately, the script editor reports an error:
Attachments 1
1 file attached • Total size: 1.0 KB
In reply to John_Lock
User Avatar
5 years ago
Auto-translated
User01322342
I tried to do it as you suggested, but unfortunately, the script editor gives an error:
The line is written like this:

SetPlayerResource(1,6, GetPlayerResource(1,6)-1000); 


?
This line worked in my script.

Statistics

Welcome our newest member: recijeb