Auto-translated
In short, sounds need to be imported as resources; then, everything will work properly! So that the editor assigns an ID and handles everything automatically.
New here? I'm Roha — want a quick tour?
In short, sounds need to be imported as resources; then it will work properly! So that the editor assigns an ID and handles everything else automatically.
I added a new sound like this; I checked the box when adding it that said "Export after creation." I didn't find another way to add it.
Play2DSound("/Maps/SingleMissions/Map Name/SecretArea.(Sound).xdb#xpointer(/Sound)");
The sound played. Guarantee ~75%
Okay. Since we are not interested in how it doesn't work, but how it does work, I will tell you how it worked for me. I downloaded the sound in wav format and put it in the Complete folder of the game folder. I opened my map and found the line in the Map Properties Tree => Loading Screen Sound (it doesn't really matter which one, the main thing is for the Sound type). I clicked New and entered the name — SecretAreaSound.(Sound). I clicked OK, and in the window that appeared, in the parameters, in Srcfile, I selected my sound from the Complete folder. Then I set Is3D to false and NeedLocalization to true. I hovered over the sound resource in the file system tree on the left, right-clicked => Export. The editor automatically reloaded, and I clicked OK in the window, and it closed. I go to the script and write thereThe sound played. Guarantee ~75%Play2DSound("/Maps/SingleMissions/Map Name/SecretArea.(Sound).xdb#xpointer(/Sound)");
I remember once trying to do something similar, when I needed to add voiceovers to the loading screen.
Thanks, it worked.
The editor has been studied at a decent level, and I want to create something complete. I am interested in the topic of how to add my fan-made campaign to Heroes 5 and link the leveled-up heroes between missions. I would be very grateful.
Hello. Campaigns are created through Tools => Create Campaign. It's not necessary to have all missions created; campaigns can be edited by simply opening them in the editor. After creation, a new window will appear; you'll quickly figure it out. If not, feel free to ask.
After creation, the campaign file will be saved to the folder: Game folder/User campaigns/.
1. How can I make it so that only my edited heroes appear in the tavern? I've looked everywhere, even found how to change building prices and how to modify the units added, but I don't know how to put my desired heroes in the tavern, with their own biography, army, and payment. I'm aware of the AllowPlayerTavernRace command, but I specifically want my edited heroes, with their own biography, army, and payment.
2. How can I make a caravan with a squad of troops appear out of nowhere and head to a specified town?
3. Is it possible to limit certain weeks? That is, to prevent some creatures from spawning because they ruin the atmosphere of the map?
1. To prevent unnecessary heroes from appearing in the tavern, adjust the Map Properties => Heroes settings. Uncheck the boxes for all the heroes you don't want to see in the taverns. Note: Are the new heroes completely new, or are they modified versions of existing ones? P.S. I'm not sure if it's possible to set the price of a hero in the tavern using scripts...
2. Use the CreateCaravan function. Specify the coordinates of the end point as the tile just before the exit from the city.
3. Yes, Map Properties Tree => Moon Calendar Modifications => Block Monster Weeks => true.
DeployReserveHero(...);
SetObjectOwner(..., PLAYER_1);
Note: this is necessary if you have reserved the hero for the computer.
It probably won't display because user-created heroes don't have their own unique ID. And the developers have a reserved list of these IDs somewhere. Simply put, set IsHideInEditor = false in AdvMapHeroShared. Then, in Map Properties => Players => Player Number => ReserveHeroList, add your scripted heroes. It's best to do this for computer-controlled heroes. Then, by setting a trigger (for example, touching a tavern), use:Note: this is necessary if you have reserved the hero for the computer.DeployReserveHero(...);
SetObjectOwner(..., PLAYER_1);