Skip to content

Posts from Scripts

4.8 (8 ratings)
Auto-translated
Hey everyone, does anyone know if there's a way to fix the talkboxforplayers function? Or maybe there's a decent alternative to this function? Just a reminder that when used in multiplayer, it breaks save files.
In reply to Mostovik
User Avatar
Auto-translated
Mostovik
Does anyone know if there's a way to fix the talkboxforplayers function? Or maybe there's a suitable alternative to this function? Just a reminder that when used in multiplayer, it breaks saves.

Try creating a folder with the file in the map at the following path: /map/UI/CommonBoxes/TalkBox/
and place the file there.
This is assuming that the game version is in Russian.
Attachments 1
1 file attached • Total size: 38 B
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
Auto-translated
It didn't help. Do you have any idea why this is happening? Why was this particular advice given?
User Avatar
Auto-translated
in the Russian version of the game, this file doesn't exist, and without it, the function shouldn't work at all. If it works but corrupts saves, then the problem lies elsewhere, and it's unlikely to be fixable.
Нет войне.
In reply to Mostovik
User Avatar
Auto-translated
Mostovik
It didn't help. Do you have any idea why this is happening? Why was that particular advice given?
If you are using standard icons in dialogues, try copying them into the map. (Also, save files may be corrupted due to version mismatches; all players should be using version 3.1).

Question: Is it possible to modify the landscape using scripts? Lower/raise levels, add/remove water, etc. If not, what principle is used to generate the map in the original Heroes of Might and Magic?
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
User Avatar
Auto-translated
Is it possible to modify the landscape using scripts?
I think the only way to work around this is by using removable rocks, stones, trees, etc., to hide another landscape underneath. Scripts only work with objects, i.e., everything described in map.xdb, while the landscape is stored in the binary file GroundTerrain.bin.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Jack_of_shadows
User Avatar
Auto-translated
Jack_of_shadows
I think the only way to work around this is by using removable rocks, stones, trees, etc., under which you can hide a different landscape. Scripts only work with objects, i.e., everything that is described in map.xdb, while the landscape is stored in the binary GroundTerrain.bin file.

Not quite what I was looking for, unfortunately. But thanks for the idea!
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
User Avatar
Auto-translated
Hey everyone, are there any forum members who are familiar with combat scripts or know where I can find documentation about them? Ideally, please provide a link to such a document. How do they work, how do you write them (in a separate document in a script editor or somewhere else), and what do you do with them after you've written them?
User Avatar
Auto-translated
Min_Carolin, refer to the Novice's guide, section "Tactical Mode." It contains a comprehensive description. The script is written in a separate file and assigned to a hero using the command:
SetHeroCombatScript(HERO_NAME, '/combat_script.xdb#xpointer(/Script)');
You can find examples on many maps; simply search for this command.
Attachments 1
1 file attached • Total size: 475.0 KB
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Jack_of_shadows
User Avatar
Auto-translated
Jack_of_shadows
Min_Carolin, check the Beginner's Guide, in the Tactical Mode section. It contains a fairly comprehensive description. The script is written in a separate file and assigned to a hero using the command:
SetHeroCombatScript(HERO_NAME, '/combat_script.xdb#xpointer(/Script)');
You can find examples on many maps; just browse through popular ones and search for this command.
Thank you very much. I've been looking for this legendary guide for a long time, which many people mentioned, but none of my Google searches yielded any results.
User Avatar
Auto-translated
Hey everyone, could you please tell me if it's possible to update or add text to the quest description? So that this text doesn't appear immediately in the quest window. And also, please explain how to set the day for a specific function to be executed, starting the count from the day another function is executed.
User Avatar
Auto-translated
Can I update/add texts to the quest description?
Manual quests support execution stages; you can configure a separate description text for each stage. See the SetObjectiveProgress function and the ProgressCommentsFileRef property of the quest.
How do I set the day for executing a specific function, starting the count from the day another function is executed?
At the moment of counting, remember the current day:
start_day_for_waiting_something_important = GetDate(ABSOLUTE_DAY);
Then, check in a trigger for a new day whether the required time has passed:
Trigger(NEW_DAY_TRIGGER, 'NewDay');
function NewDay()
if ((GetDate(ABSOLUTE_DAY) - start_day_for_waiting_something_important) == REQUIRED_TIME) then
YOUR CODE
end
end
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
User Avatar
Auto-translated
Botojan, I can only offer a couple of comments; I'm not sure how critical they are in your specific case.
if newowner == PLAYER_1 == nil then
I wouldn't recommend using such a complex syntax. There's a high chance of making a mistake.
""Bobruisk"", ""TownCaptured""
I'm not entirely sure if double-double quotes like that will be processed correctly.
for i = 1, 14 do
total = total + GetHeroCreatures( heroname, i ) * costs;
end;
The link to the Haven castle is within the loop from 1 to 14 – these are the IDs of the creatures in that castle. Look for the IDs you need in the documentation.
AddHeroCreatures( heroname, 15 + i, factor[i + 15] * coeff );
Similarly, the magic number 15 is an offset to the IDs of the Dungeon creatures.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо

Statistics