Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
#2863
Auto-translated
Thank you. Will this turn the map into a mod?

Whatever
User Avatar
#2864
Auto-translated
Yes, that happened before, Heroist. There's a setting for this in the cities, something like it's in the properties tree. Let's get started.
We need to extract all the files from the dialogue scene... But we need to find out where they are in the scripts: there should be a link to the main dialogue scene file, and from there to all the other files.
Rhenish, open the script belonging to the map with the video you selected. Find the line StartDialogScene(blah-blah-blah). This "blah-blah-blah" is the path to the file named dialogue_scene_name.xdb, which is what you need. However, there may be several StartDialogScene lines if there are multiple videos in the scenario, but you'll have to find a way to distinguish them! Or try it randomly, but that will take a relatively long time. So, let's go back to dialogue_scene_name.xdb. In fact, the easiest way is to copy this file to your map (preserving the paths) and all the files associated with it. How do you determine which files are associated? There are two ways: external signs (they are all in the same folder, which is named something like dialogue_scene_1, or they all have similar names, like dialogue_scene_1.xdb, dialogue_scene_1_replica_1.txt, and so on). This method has a drawback: you might miss something. For example, the replicas are in the right place, but the sounds are in a different place, which will be a problem, and the video won't be transferred 100%. You can, of course, dig deeper into the archive and still find the missing files... Or you can open dialogue_scene_name.xdb in a text editor and simply look for links to external files. This is not difficult, because you need ALL the links, all the file paths that are there. That is, you search through the document, find the name of some file - that means you need to copy the file to your map. That's roughly how it works. I'll write the script now. --------
Unless you prevent hiring the corresponding upgrade in the city using the CreaturesUpgradesFilter property.
Oh, yes. It won't be possible, Heroist.
 

К А
Стикеры GBF в Telegram
User Avatar
#2865
Auto-translated
Thank you all for your help.

Whatever
In reply to MasteR
User Avatar
#2866
Auto-translated
Juss456
Thanks! And where can I find new Town Portal heroes? They have cool icons, but I can't find them in the files. They're also not in the editor.
Ranlit and Agbet?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2867
Auto-translated
Rhenish, here's a version with partial conversion. Breaking it down into units is good, but firstly, it's not entirely obvious to players, and secondly, it's not obvious to me. I'm not sure I can write a script to find slots in the army. But here, you can convert vampires in parts and immediately convert the maximum number. I haven't checked the script (!), I don't have the opportunity, but it seems to be working fine...
function OurTalkBox()
TalkBoxForPlayers( PLAYERFLT_1, nil,nil,'path to the test file with the description of Vyacheslav's ability and the question of how many creatures to convert','path to an additional text file, I don't know what it's for, play around with it', 'callbackvamps', 1, 'path to the text of the window title','path to the text of the title before the buttons, I also don't know what it's for, if it's not needed, set it to nil', 0, 'path to the first answer, I recommend putting one creature there','path to the second answer, in this case, 5 creatures','here, for example, 15 creatures','here, for example, 50','the largest number of creatures that can be converted with the given number of vampire princes and the given number of resources for the player' );
end;

function callbackvamp(nom)
if nom==1 then
if (((GetPlayerResource(1, GOLD)>=700) and (GetPlayerResource(1, MERCURY)>=1)) and (GetHeroCreatures('Visas', 155)>=1)) then
RemoveHeroCreatures('Visas',155,1);
AddHeroCreatures('Visas',89,1);
else
MessageBox('path to the file where it will be written that there are not enough resources');
end;
elseif nom==2 then
if (((GetPlayerResource(1, GOLD)>=3500) and (GetPlayerResource(1, MERCURY)>=5)) and (GetHeroCreatures('Visas', 155)>=5)) then
RemoveHeroCreatures('Visas',155,5);
AddHeroCreatures('Visas',89,5);
elseif ((GetPlayerResource(1, GOLD)<3500) or (GetPlayerResource(1, MERCURY)<5)) then
MessageBox('path to the file where it will be written that there are not enough resources');
elseif (GetHeroCreatures('Visas', 155)<5)
MessageBox('path to the file where it will be written that there are not enough vampires');
end;
elseif nom==3 then
if (((GetPlayerResource(1, GOLD)>=10500) and (GetPlayerResource(1, MERCURY)>=15)) and (GetHeroCreatures('Visas', 155)>=15)) then
RemoveHeroCreatures('Visas',155,15);
AddHeroCreatures('Visas',89,15);
elseif ((GetPlayerResource(1, GOLD)<10500) or (GetPlayerResource(1, MERCURY)<15)) then
MessageBox('path to the file where it will be written that there are not enough resources');
elseif (GetHeroCreatures('Visas', 155)<15)
MessageBox('path to the file where it will be written that there are not enough vampires');
end;
elseif nom==4 then
if (((GetPlayerResource(1, GOLD)>=35000) and (GetPlayerResource(1, MERCURY)>=50)) and (GetHeroCreatures('Visas', 155)>=50)) then
RemoveHeroCreatures('Visas',155,50);
AddHeroCreatures('Visas',89,50);
elseif ((GetPlayerResource(1, GOLD)<35000) or (GetPlayerResource(1, MERCURY)<50)) then
MessageBox('path to the file where it will be written that there are not enough resources');
elseif (GetHeroCreatures('Visas', 155)<50)
MessageBox('path to the file where it will be written that there are not enough vampires');
end;
elseif nom==5 then
max=GetPlayerResource(1, GOLD)/700 - mod(GetPlayerResource(1, GOLD),700)/700;
if max>GetPlayerResource(1, MERCURY) then
max=GetPlayerResource(1, MERCURY);
end;
if max>GetHeroCreatures('Visas', 155) then
max=GetHeroCreatures('Visas', 155);
end;
if max>0 then
RemoveHeroCreatures('Visas',155,max);
AddHeroCreatures('Visas',89,max);
else
MessageBox('path to the file where you will write that the player cannot convert any creatures');
end;
end;
if (GetHeroCreatures('Visas', 155)>0) then
QuestionBox('path to the text file where you will ask if the player wants to continue converting the remaining vampire princes', 'OurTalkBox', nil);
end;
end;

function vamps(hero)
if (hero=='Visas' and GetHeroCreatures('Visas', 155)>0 and GetDate(DAY_OF_WEEK)==1) then -- checking if all conditions are met
OurTalkBox;
end;
sleep(1); -- this and the following line are not needed if you don't include the line with the comment below.
MakeHeroInteractWithObject('hero','city_name');
end;

SetObjectEnabled('city_name',nil); -- it's problematic to add this line. Let's just say, it's better not to, I don't know what glitches it will cause. It's needed so that entering the city doesn't precede the appearance of the conversion window, but you can convert after visiting the city, right?

Trigger(OBJECT_TOUCH_TRIGGER,'city_name','vamps');
 

К А
Стикеры GBF в Telegram
User Avatar
#2868
Auto-translated
It will be easier to initiate the conversion process when visiting a certain building or by casting a special travel spell.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2869
Auto-translated
Yes, I remembered that I forgot to take the money there.
 

К А
Стикеры GBF в Telegram
User Avatar
#2870
Auto-translated
My video wasn't created using a map. It's a separate MOD. I don't know how to open the script in it.
Правило во взгляде...
In reply to RedHeavenHero
User Avatar
#2871
Auto-translated
RedHeavenHero
Ranlit and Agbet?
Yes, they are. Although, I suspect they are the result of some mapmaker's work, not the developers. In any case, that question is irrelevant. Here's another one:
Is there a way to block a map for editors of those who download it? To prevent any changes to the map itself and its scripts? To block the console, console commands, and cheats?
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
User Avatar
#2872
Auto-translated
My video wasn't created with the map. It's a separate MOD. I don't know how to open the script in it.
So, this isn't a dialogue scene, but just a video clip? If so, it's likely impossible to play it in the map.
 

К А
Стикеры GBF в Telegram
In reply to RedHeavenHero
User Avatar
#2873
Auto-translated
RedHeavenHero
It would be easier to trigger the conversion when visiting a certain building or by casting a special travel spell.
The idea of using a travel spell is quite good.
Правило во взгляде...
In reply to MasteR
User Avatar
#2874
Auto-translated
Juss456
Yes, they exist. Although, I suspect they are the result of some mapmaker's work, not the developers. In any case, the question is resolved. Another question:
Is there a way to block a map for editors of those who download it? To prevent any changes to the map itself and its scripts? To block the console, console commands, and cheats?

I have some assumptions about this... But it's better not to block the console because it is a crucial tool for viewing errors. Cheats cannot be blocked separately, as they relate to the same scripts.

Whatever
In reply to Ment
User Avatar
#2875
Auto-translated
Ment
So, it's not a dialogue scene, but just a video clip? If so, it's probably impossible to play it in the map.
A MOD is a separate h5m package. Only then is there an index.bin, which helps to reopen it in the editor.

Added 8 minutes later
Juss456
Yes, they are. Although I suspect they are the result of some mapmaker's work, not the developers. In any case, the question is no longer relevant.
No, Agbeth appears in the mission "An Eye for an Eye," and Ranlit is an enemy hero in the last mission of the Tribes of the East.
Another question:
Is there a way to block the map for editors of those who download it? To prevent any changes to the map itself and the scripts? To block the console, console commands, and cheats?
Why are you so worried about this?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
#2876
Auto-translated
RedHeavenHero


Why are you so worried about this?

I don't want people to immediately start digging through scripts in the editor or examining the map whenever they encounter any issues. And especially, I don't want them to try to fix things themselves, potentially causing bugs, glitches, and other problems.
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
User Avatar
#2877
Auto-translated
I personally don't see anything wrong with this. I used to play several maps on version 3.0, manually deleting the 3.1 scripts and entering the correct ones in the console. As for independence, this will only harm those who try to fix something – it will be their problem.
Or, include an installer with the map file that contains a program that will change the console and map editor settings until it is uninstalled.

Whatever

Statistics

Welcome our newest member: leyu