Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to Jack_of_shadows
Auto-translated
Thank you, that was very helpful.
Perhaps you could tell me how cutscenes are made?
User Avatar
Auto-translated
I won't give you a hint. But this has been discussed quite a bit, for example here: How to create a video for a map?
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Jack_of_shadows
User Avatar
Auto-translated
Does anyone still have the manual for the "Novik" map? All the links are broken, and I can't find it anywhere. I would be very grateful for any help.
In reply to †G¤bli№†
User Avatar
Auto-translated
†G¤bli№†
I'm thinking about creating a new map with the title: "Brain Test." It would be a map with a lot of puzzles. Is it possible to make it so that you can walk through objects?
Yes, it is possible. On the left panel, select AdvMapShared, click the three dots, and in the window that appears, select BlockedTiles and delete everything. Voilà.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Hello, I decided to use a script for the first time, and, of course, it didn't work:o Please tell me what's wrong here? (the idea is to display a text message at the beginning of the game):
Trigger(NEW_DAY_TRIGGER, "hello")
function hello()
if GetDate(DAY) == 1 then
then MessageBox(GetMapDataPath().."message.txt");
end;
In reply to Navkratis
User Avatar
Auto-translated
Navkratis
Good afternoon, I decided to use a script for the first time, and, of course, it didn't work:o Please tell me what's wrong here? (the idea is to display a text message at the beginning of the game):
Trigger(NEW_DAY_TRIGGER, "hello")
function hello()
if GetDate(DAY) == 1 then
then MessageBox(GetMapDataPath().."message.txt");
end;
Have you tried passing the turn? Your script doesn't work at the beginning of the game right now, but after a turn, as the daily trigger only runs the functions from the turn following the initial one.

Added 2 minutes ago
Navkratis
Good afternoon, I decided to use a script for the first time, and, of course, it didn't work:o Please tell me what's wrong here? (the idea is to display a text message at the beginning of the game)
Just write MessageBox(....); in the script without any functions.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Could you provide the correct version? I've tried several options, but the message doesn't appear, neither on the first attempt nor on any other day...
In reply to Navkratis
User Avatar
Auto-translated
Navkratis
Could you please provide the correct version? I've tried several variations, but the message doesn't appear, neither on the first day nor on any other day...
Open the script and write:
...
MessageBox(GetMapDataPath().."message.txt");
...
Trigger(NEW_DAY_TRIGGER, "hello");
function hello()
if GetDate(DAY)==1 then
then
MessageBox(GetMapDataPath().."message.txt");
end;
Pay closer attention; you have two "then" in one condition... Naturally, it didn't work immediately, nor later. I recommend reading the editor's comments; it seems to highlight such errors.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
In general, I checked what comments the script editor gives, and it complained that another "end" should be added. Now the script looks like this:
Trigger(NEW_DAY_TRIGGER, "hello");
function hello()
if GetDate(DAY)==0 then
MessageBox(GetMapDataPath().."message.txt");
end;
end
At the bottom, it says "syntax successfully checked," but in the game itself, nothing still happens:(
P.S. When opening the map itself, even before clicking on MapScript.lua, the editor with an error sign says "An invalid character was found in text content" Line: 79392 < Item >, could it be related to this? But then what is it and how can I fix it?
In reply to Navkratis
User Avatar
Auto-translated
Navkratis
In general, I looked at the comments the script editor was writing; it complained that another end should be added. Now the script looks like this:
Trigger(NEW_DAY_TRIGGER, "hello");
function hello()
if GetDate(DAY)==0 then
MessageBox(GetMapDataPath().."message.txt");
end;
end
At the bottom, it says "syntax successfully checked," but in the game itself, nothing still happens:(
P.S. When opening the map itself, even before I click MapScript.lua, the editor with an error sign says "An invalid character was found in text content" Line: 79392 < Item >, could this be the problem? But then what is it and how can I fix it?
What kind of person is this?) There is no 0th day (probably there is)!! If we don't take this into account, then there is no period after the second end.
Regarding the invalid character, run an error diagnostic - what object did you recently place on the map, and after what changes did it start to produce the error? Answer as detailed as possible.:D

Added 5 minutes later
Navkratis

At the bottom, it says "syntax successfully checked," but in the map itself, even before I click MapScript.lua, the editor with an error sign says "An invalid character was found in text content" Line: 79392 < Item >, could this be the problem? But then what is it and how can I fix it?
Probably, either you placed some kind of broken object, or you changed something in the object, and clearly, forgive me, this is not your level to change objects with scripts, so it's one of the two.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Replaced the day with the first and added a semicolon to the last end, but nothing changed.
}{0TT@6bI4
Probably, either you placed some incorrect object, or you changed something in the object, and frankly, it's not your level to change objects with scripts, so it's one of the two.
Trying to make a message – this is my first and only script :) Before that, I was working on the landscape for a week and didn't run any script editors, so I don't know what exactly it's complaining about.
In reply to Navkratis
User Avatar
Auto-translated
Navkratis
I replaced the day with the first and added a semicolon to the last end, but nothing changed.

Trying to make this message is my first and only script :) , before that, for a week, I was working on the landscape and didn't run any script editors, so I don't know what exactly it's complaining about.
Open the script and write:
--Map script
path=GetMapDataPath();

MessageBox(path.."message.txt");
function newday()
if GetDate(DAY)==1 then
MessageBox(path.."message.2.txt");
elseif GetDate(DAY)>1 then
MessageBox(path.."message.3.txt");
end;
end;

Trigger(NEW_DAY_TRIGGER, "newday");
This script displays the message "message.txt" at the beginning of the game, the message "message.2.txt" on the next day, and the message "message.3.txt" on all other days.
Go to these links and read the manuals
https://docviewer.yandex.ru/view/0/?*=jKK4Rd1sHKLitso%2FwrU8h1mEs0B7InVybCI6Imh0dHA6Ly93d3cuaG1tcC5ydS9fbGQvMS8xMDFfNV8xLnBkZiIsInRpdGxlIjoiMTAxXzVfMS5wZGYiLCJub2lmcmFtZSI6dHJ1ZSwidWlkIjoiMCIsInRzIjoxNTg4Mzk5MTUxMTg2LCJ5dSI6IjI2NTAzMTI2NjE1ODgwNjEyMTIiLCJzZXJwUGFyYW1zIjoibGFuZz1ydSZ0bT0xNTg4Mzk5MTQ1JnRsZD1ydSZuYW1lPTEwMV81XzEucGRmJnRleHQ9aG9tbSs1KyVEMSU4MCVEMSU4MyVEMCVCQSVEMCVCRSVEMCVCMiVEMCVCRSVEMCVCNCVEMSU4MSVEMSU4MiVEMCVCMiVEMCVCRSslRDAlQkYlRDAlQkUrJUQxJTgxJUQwJUJBJUQxJTgwJUQwJUI4JUQwJUJGJUQxJTgyJUQwJUIwJUQwJUJDJnVybD1odHRwJTNBLy93d3cuaG1tcC5ydS9fbGQvMS8xMDFfNV8xLnBkZiZscj0yMTMmbWltZT1wZGYmbDEwbj1ydSZzaWduPTc5ZWY5YzI3Mzk4YzY1ODQ5YmI2ZDNiOGU5MjIyMjc5JmtleW5vPTAifQ%3D%3D&lang=ru

Here's another one: https://www.youtube.com/results?search_query=%D0%BA%D0%BA+%D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D1%82%D1%8C+%D1%81%D1%86%D0%B5%D0%BD%D0%B0%D1%80%D0%B8%D0%B9+%233+homm+5

After reading the manual and watching all the videos, come back here. Also, a few messages ago, there's a link to Novikov's manual, read it too.

Added 5 minutes ago
And to start, download the archive from here https://yadi.sk/d/W6cz5UBu3SGAvb
Unzip it, move the entire folder to your desktop, open the folder Practice => Homm5MapScriptsEditor, run the program, and open the map.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
I already have the first guide from the link; I tried to write a script based on it, as well as the Novikov guide, but to be honest, I didn't really understand it – it provides a line of code, explains what it does in the game, but doesn't provide the complete script with it, and for me, as someone with no background in programming, that's not at all obvious :o And also, I used to create maps for Heroes II and IV, made many campaigns for the first Starcraft, made a test map in Age of Wonders 2 – and I learned all of that on my own. As for the editor for Heroes V, studying it at any stage turns into a constant, never-ending headache :D At the same time, if I stop playing Heroes for a few months, I feel like I've already forgotten half of it) Although, maybe I'm just getting old)

Okay, I've complained a bit, I'll go download the two remaining links, maybe something will come of it) In any case, thank you for your time :)

Statistics

Welcome our newest member: Emil