Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
4 years ago
Auto-translated
}{0TT@6bI4, I'll try... Hey, where can I find a list of all the hotkeys for the editor? I just didn't know about this convenient camera zoom using Page Up/Page Down.

Added 7 minutes later
Unfortunately, it didn't help. I tried creating a new camera in the same position/slightly shifted, both now and yesterday, but the result is the same. Maybe I should delete all the cameras and create them again?
In reply to Азгалор
User Avatar
4 years ago
Auto-translated
A question arose. Perhaps it's a silly one, but still. Is there a way to edit cutscenes after closing the editor, so that the changes are reflected in the cutscene on the map itself? Otherwise, a single crash due to a minor error means you have to discard the entire cutscene.
User Avatar
4 years ago
Auto-translated
Azgalor, I showed many hotkeys in the "Volume I of the Complete Map Editor Guide." For example, G disables the annoying grid. If recreating the camera didn't help, recreating everything probably won't either. But to clarify: cameras should always be created with a shutter, W.

Grigory Kovalev, create a new video in the extended editor (with Close MOD closed), save it, and close it. You can find a guide on creating videos on my channel.
Go to GameFolder/data/; there will be folders for the video you just created. Replace all of them with files from the map. That's it, you can edit. Important! After the map editor exits the "empty" mode (close mod is gray), all files remain in place and do not disappear (if you pressed Save). Then, you can move them from the data folder back into the map.
index.bin is responsible for the visibility of files in the editor.
In reply to }{0TT@6bI4
User Avatar
4 years ago
Auto-translated
Another question arose. Is it possible to create a hero in such a way that he can be used on other maps? Simply put, a shared hero is only visible on the map where he was created.
In reply to Григорий Ковалев
User Avatar
4 years ago
Auto-translated
Grigory Kovalev
Another question arose. Is it possible to create a hero so that he can be used on other maps? Simply put, a shared hero is only visible on the map where he was created.
To do this, you need to pack the hero's files into a .pak archive and place the archive in the game's data folder. To add this hero to a map, you need to manually enter the path to the hero's MapObjects in the Shared section, for example, I moved the Fortress's red knights, named them RedHeavenHero01-03_HoF in Shared, and accordingly, on the maps, I use the existing RedHeavenHero01-03 and add _HoF to it, and the hero changes to the transferred one.
In reply to Азгалор
User Avatar
4 years ago
Auto-translated
Could you please provide a script where, after a dialogue, a creature joins my party, and how can I ensure that this creature survives the mission? There was a similar situation in the "Hammers of Fate" expansion, in the mission called "Meeting," where the Daughter of Malassa had to survive.
User Avatar
4 years ago
Auto-translated
function CreatureXXXShouldSurvive(hero, id) while 1 do if GetHeroCreatures(hero, id) < 1 then SetObjectiveState("Quest Name", OBJECTIVE_FAILED) sleep(20) Loose() end sleep(1) end end ``` And in the appropriate place in the code: ```lua startThread(CreatureXXXShouldSurvive, "hero name", creature ID)
In reply to }{0TT@6bI4
User Avatar
4 years ago
Auto-translated
function StartScene(Mardigo, CREATURE_CLERIC) StartDialogScene('/MyScene/StartScene/DialogScene1/DialogScene.xdb#xpointer(/DialogScene)') Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", nil); while 1 do if GetHeroCreatures(Mardigo, CREATURE_CLERIC) < 1 then SetObjectiveState("zadanie4", OBJECTIVE_FAILED) sleep(20) Loose() sleep(1) SetObjectiveState("zadanie1", OBJECTIVE_ACTIVE); SetObjectiveState("zadanie2", OBJECTIVE_ACTIVE); SetObjectiveState("zadanie3", OBJECTIVE_ACTIVE); SetObjectiveState("zadanie4", OBJECTIVE_ACTIVE); AddHeroCreatures("Mardigo", 1, 40); AddHeroCreatures("Mardigo", 5, 10); AddHeroCreatures("Mardigo", 10, 1); RemoveObject("500"); RemoveObject("501"); RemoveObject("502"); RemoveObject("503"); RemoveObject("504"); RemoveObject("505"); RemoveObject("506"); RemoveObject("507"); RemoveObject("508"); end end end Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", "StartScene");
How do I spell "Khotabych" correctly?
User Avatar
4 years ago
Auto-translated
Good lord, what are you writing? Why did you put everything together in one place? Create a function, as I wrote in the message above. And make the StartScene function and everything related to it separate. But it already has startThread(CreatureXXXShouldSurvive, "hero name", creature ID). And also, you only need to replace with your own ideas where there is something obvious to replace: XXX or a Russian phrase. P.s. I'm writing from my phone, but when I get home to my PC, I'll write you a completely correct script if you don't figure it out yourself.
User Avatar
4 years ago
OBJECTIVE_KIND_MANUAL
User Avatar
4 years ago
Auto-translated
function CreatureShouldSurvive(hero, id)
while 1 do
if GetHeroCreatures(hero, id) < 1 then
SetObjectiveState("zadanie4", OBJECTIVE_FAILED)
sleep(20)
Loose()
end
sleep(1)
end
end

function StartScene()
StartDialogScene('/MyScene/StartScene/DialogScene1/DialogScene.xdb#xpointer(/DialogScene)')
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", nil);
for i=1,4 do
SetObjectiveState("zadanie"..i, OBJECTIVE_ACTIVE) --All quests are strictly numbered from 1 to 4, so we iterate through them in a loop
end
startThread(CreatureShouldSurvive, 'Mardigo', CREATURE_CLERIC)
AddHeroCreatures("Mardigo", 1, 40);
AddHeroCreatures("Mardigo", 5, 10);
AddHeroCreatures("Mardigo", 10, 1);
for i=500,508 do --Since all objects to be removed have a strict numbering from 500 to 508, I iterate through them in a loop
RemoveObject(i)
end
end

Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", "StartScene");
In reply to }{0TT@6bI4
User Avatar
4 years ago
Auto-translated
Everything worked fine, but when the dialogue ended, the other player's turn began, and the mission failed.
In reply to Alinksolo
User Avatar
4 years ago
Auto-translated
Alinksolo
Everything worked well, but when the dialogue ends, the other player's turn begins, and the mission fails.

Try replacing the function that checks for clerics in the hero's army with this one:

function CreatureShouldSurvive(hero, id)
while 1 do
sleep ( 10 );
if GetHeroCreatures(hero, id) == 0 then
SetObjectiveState("zadanie4", OBJECTIVE_FAILED);
sleep ( 10 );
Loose();
break
end;
end;
end;

P.s. This is the skeleton of the function that checks for the presence of a dragon with Ilia in Lords of the Realm.

And as another option: move AddHeroCreatures("Mardigo", 10, 1); above startThread, i.e.:

AddHeroCreatures("Mardigo", 10, 1);
startThread(CreatureShouldSurvive, 'Mardigo', CREATURE_CLERIC)
AddHeroCreatures("Mardigo", 1, 40);
AddHeroCreatures("Mardigo", 5, 10);
In reply to Азгалор
User Avatar
4 years ago
Auto-translated
Thank you, thank you so much, Azgalor and Khotabych, you are a great help, thank you very much!!

Statistics

Welcome our newest member: recijeb