Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Error Details:
Share Link
Current questions and answers regarding the map editor.Auto-translated
I haven't tested which buffs can be applied via script; Waterfall is more knowledgeable in this area, as he has tested it.
Well, I also haven't tested what can be applied via script (because I've never written a single script). But each skill has a BUFFS graph, and you can put something in there. xD For example, here's an example: the Berserker Rune is entered into the buffs graph, and now the Knight's center perk allows his army to attack twice.
Hello again! 👻 I have another question: is it possible to move the progress counter change out of scripts into a text file? I know this works with MessageBox, after opening the 3rd campaign map for Ornella and Arantir. There it looks like this:
"Вы наняли на этом погосте <value=quantity> зомби!"
What I want is to use something similar for SetObjectiveProgress. I wrote the script:
red_troops_count = 0;
function red3() print("Проверяем сколько челов собрал Влад"); if red_troops_count ~= 3 then red_troops_count = red_troops_count + 1; print("Влад собрал ", red_troops_count ," демонов из 3"); sleep(1); SetObjectiveProgress( "test_obj", red_troops_count ); else if red_troops_count == 3 then SetObjectiveProgress( "test_obj", red_troops_count ); print("Влад собрал всех демонов. Arrivederci Signor Giocatore!"); end; end; end;
for i = 1, 3 do Trigger( OBJECT_TOUCH_TRIGGER, "rh"..i, "red3" ) end;
And the quest progress text:
Собрано <value=red_troops_count> из 3 демонов
The script works (though I wish someone would teach me how to place 'end's properly, because sometimes +100500 scenario restarts just to check for script errors start to get tedious), but the quest progress text doesn't pick up that very progress, leaving the space between "Collected" and "of" empty.
Azgalor does not support this feature in quest descriptions, and besides, you invented the syntax yourself. For it to work (where it can work), it must be written exactly as in the example – in curly braces, separated by semicolons, in the form of an assignment of a name from the text file and a value. But if there are only a few quest progress stages, you can create a separate description for each: "1 out of 3 demons collected," "2 out of 3 demons collected," and so on. This is described in the FAQ in my signature.
Azgalor
Someone should teach me how to properly place the `end` statements.
Just indent all internal code blocks relative to the outer block, for example:
function red3()
print("Checking how many troops Vlad has collected");
if red_troops_count ~= 3 then
red_troops_count = red_troops_count + 1;
print("Vlad has collected ", red_troops_count, " demons out of 3");
sleep(1);
SetObjectiveProgress( "test_obj", red_troops_count );
else
if red_troops_count == 3 then
SetObjectiveProgress( "test_obj", red_troops_count );
print("Vlad has collected all the demons. Arrivederci, Signor Giocatore!");
end;
end;
end;
And there will be no problems with `end` statements; everything will be visually clear.
РПГ-сценарий для HoMM5: Путь героя ЧаВо по созданию карт для HoMM5: ЧаВо
Azgalor does not support this feature in quest descriptions, and besides, you invented the syntax yourself. For it to work (where it can work), it must be written exactly as in the example - in curly braces, separated by semicolons, in the form of an assignment of a name from the text file and a value. But if there are only a few quest progress steps, you can create a separate description for each: "1 out of 3 demons collected", "2 out of 3 demons collected", etc. This is described in the FAQ in my signature. Just indent all internal code blocks relative to the outer block, for example:
function red3() print("Checking how many creatures Vlad has collected"); if red_troops_count ~= 3 then red_troops_count = red_troops_count + 1; print("Vlad has collected ", red_troops_count ," demons out of 3"); sleep(1); SetObjectiveProgress( "test_obj", red_troops_count ); else if red_troops_count == 3 then SetObjectiveProgress( "test_obj", red_troops_count ); print("Vlad has collected all the demons. Arrivederci Signor Giocatore!"); end; end; end;
And there will be no problems with the 'end' statements, everything will be visually clear.
Yes, after submitting my question, I tried to write ObjectiveProgress like a message box, and received an error that the first argument was incorrect. It's a pity that the developers didn't implement this functionality for ObjectiveProgress as well, because, for example, I need the progress to change for each creature, and there are 20-30 of them planned (I only set 3 for testing the script), and for this I will have to create 30 text files?... Well, okay, true heroes always find a workaround, as they say. 😄 For now, I'll download the FAQ from your signature and read what's in it.
Are internal code blocks relative to the outer block things like checks and sub-functions? Like if, while, SetObjectiveState? I'm a complete zero in scripting terms. 💀
Added 1 minute ago }{0TT@6bI4
I also recommend using a script editor that kindly prompts you about missing 'end' statements and highlights which block is not closed.
I downloaded it, but haven't used it. I only read the introduction about Lua and what checks there are, etc. Thanks to it, I learned what an array is. I need to try working with it.
And another question that has been bothering me for a while. Basically, there's a function called MakeHeroReturnToTavernAfterDeath. The situation is this: I have an allied Knight with the hero Dugald. I've set it up so that this ally doesn't hire anyone except Dugald, meaning everything is set to zero through AllowPlayerTavernRace, and Dugald is allowed through AllowPlayerTavernHero(player, "Orrin", 1), and MakeHeroReturnToTavernAfterDeath is enabled so that the brave knight fights until he's defeated. The time comes, and this indeed happens; the player-Dugald loses, and now there's either a bug or something I don't understand: I can't rebuild Dugald. That is, I block him from being hired by the defeated player, allow him for myself, and, just to be sure it "works," I set his return to the tavern after death to zero, but he doesn't appear. A week or two goes by, and he still doesn't show up. Is there any way to fix this?
Hello. I have a couple of interesting questions. 1) Is it possible to transfer the specialization of any hero (for example, Shadia) to a hero of another faction, but with their own description and icon (it is probably possible to do this, but I am asking just in case). 2) When creating my own dwelling, I encountered a problem: the indicator of belonging to the player is half-hidden in the texture (screenshot attached). Is it possible to fix this? 3) I remember seeing an old icon of Godric (where he is holding a sword on his shoulder) somewhere. I have searched half the Internet, looked among the icons of the Tribes of the East, but I couldn't find it anywhere. Maybe someone knows where it is located.
1) How do I create my own hero? 2) Honestly, I don't know. Perhaps you could change the position of the effect, but then it will also shift upwards in all other places. 3) This icon?
Hello. And here I am again with my problems. The first one is related to mission 4 of my campaign. Judging by the feedback on the forum and walkthroughs on YouTube, the Necropolis castle is not destroyed. Although in the "Razed" section, it shows the ruins of a human city. Personally, everything works for me; the city explodes under "Meteor Shower" (screenshots are attached). I don't understand what causes this bug. The second problem: I don't understand how to systematize the appearance of "red heroes" in the tavern. Some players cannot hire heroes at all. Restarting the map solves the problem, but I would like to know: is it possible to eliminate this random probability?
Regarding the castle, I don't have any ideas yet, but hiring heroes is quite straightforward.
You need to use the function AllowPlayerTavernRace(player number, TOWN_XXX, nil) for all races except humans, and AllowPlayerTavernHero(player number, "hero name", nil) for all heroes except the red ones.