Posts from Scripts
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.
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
It didn't help. Do you have any idea why this is happening? Why was that particular advice given?
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?
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
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., 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!
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
SetHeroCombatScript(HERO_NAME, '/combat_script.xdb#xpointer(/Script)');
You can find examples on many maps; simply search for this command.
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.
Can I update/add texts to the quest description?
How do I set the day for executing a specific function, starting the count from the day another function is executed?
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
if newowner == PLAYER_1 == nil then
""Bobruisk"", ""TownCaptured""
for i = 1, 14 do
total = total + GetHeroCreatures( heroname, i ) * costs;
end;
AddHeroCreatures( heroname, 15 + i, factor[i + 15] * coeff );