Skip to content

Posts from Current questions and answers regarding the map editor. Auto-translated

5.0 (12 ratings)
User Avatar
#2316
Auto-translated
Ment - No, I was looking yesterday, there are only artifacts and creatures there. ColdaT - So, when creating a map in the editor, did you place a random town for each player? (a large circle with the inscription "random town"). And then, in the properties of each player, did you specify this town as the main town and set it to generate a hero in that town? Then everything should work... Mystic99999 - Use Yandex search to help you. Mine isn't very good quality, and my computer often freezes.

Whatever
#2317
Auto-translated
I created it by generating a random map. During creation, you can choose a faction, and there's randomness involved. I even tried setting randomness through the map editor, but it didn't work. Now I'm trying to redo it, but something isn't working...
Attachments 1
1 file attached • Total size: 17.6 KB
User Avatar
#2318
Auto-translated
and what about the checkbox for "random towns only"?

Whatever
User Avatar
#2319
Auto-translated
Okay, Heroes player, I think I'm getting confused myself, but it seems like this is 134 (WIZARD_FEAT_SUPRESS_DARK), a Wizard-specific ability.
 

К А
Стикеры GBF в Telegram
User Avatar
#2320
Auto-translated
thanks, I'll try =)

In general, there's a peculiar logic to it. For example, the main skills come first. Then, level 1 perks, then racial perks, and finally, the remaining level perks.
Interestingly, racial perks are almost always in the same order as in the skill wheel, but in a counter-clockwise direction. Only at the end, the order might get a little mixed up. (That's how I tried to orient myself).
The only major mistake made when creating the ID, in my opinion, is the silly distribution of "racial perks." IMHO, it's nonsense. It would have been much more convenient to simply list the perk, indicating in parentheses who can obtain it (since it could be several). I nearly blew my mind trying to figure out that it was 99. But alas =)

Added 7 minutes later
Oh my god, I had the English skill wheel all this time!!! My brain is fried...

Yes, thank you, that's it. Seal_of_Dark (Seal of darkness in English. Skill Wheel)

Whatever
User Avatar
#2321
Auto-translated
The only significant flaw in the creation of the IDs, in my opinion, is the silly distribution of "racial perks." IMHO, it's nonsense.
If I understand correctly, this is a remnant from the original Heroes 5.
 

К А
Стикеры GBF в Telegram
User Avatar
#2322
Auto-translated
Well... to be honest, I don't remember them at all...

Whatever
#2323
Auto-translated
Is there any method for placing units so that they are grouped together, rather than scattered across the map individually? =)
In reply to Heroist
User Avatar
#2324
Auto-translated
Heroist
Generally, there is a peculiar logic there. For example, the main skills come first. Then level-1 perks, then racial ones, and then the remaining level-perks.
What' same interesting is that racial perks almost always follow the same order as in skeelwheele, but counter-clockwise. Only at the end can it get a bit mixed up. (That was the only way I tried to orient myself).
The only major mistake made during the creation of IDs, in my opinion, is the foolish distribution into "racial perks". IMHO - nonsense. It would be much more convenient to simply write the perk, indicating in parentheses who can receive it (since there could be several). I racked my brain trying to figure out that this was 99. But alas =)
Who is stopping you from creating your own "class" that will work with perks in whatever way is more convenient for you (which would have functions determining who a perk can belong to)? The order of traversing IDs doesn't matter at all if you use named constants like WIZARD_FEAT_SUPRESS_DARK instead of "magic" numbers (99). Simply instead of using for loops, you work with perks manually via copy-paste, specifying the information for each ID about who it can belong to. Plus, right there (in this "class"), you can override any ID names, for example by writing SUPRESS_DARK = WIZARD_FEAT_SUPRESS_DARK. And by connecting the file containing this "class" via doFile, you can refer to the perk as SUPRESS_DARK.

An example from the area of town buildings (the push function is defined in another connected "class" - it adds an element to the end of the list; constants YES and NO are also defined in another "class"):
-- Коэффициент перевода ID здания в его внутренний код
BUILDING_ID_TO_CODE_COEF = 10

BUILDING_LEVEL_1 = 1
BUILDING_LEVEL_2 = 2
BUILDING_LEVEL_3 = 3
BUILDING_LEVEL_4 = 4
BUILDING_LEVEL_5 = 5

-- Получить код здания по его ID и уровню
function getBuildingCode(buildingID, buildingLevel)
local buildingCode = BUILDING_ID_TO_CODE_COEF * buildingID + buildingLevel
return buildingCode
end

-- Получить ID здания по его коду
function getBuildingID(buildingCode)
local buildingID = intg(buildingCode / BUILDING_ID_TO_CODE_COEF)
return buildingID
end

-- Получить уровень здание по его коду
function getBuildingLevel(buildingCode)
local buildingLevel = mod(buildingCode, BUILDING_ID_TO_CODE_COEF)
return buildingLevel
end

-- Коды базовых общих зданий
TOWN_HALL_1 = getBuildingCode(TOWN_BUILDING_TOWN_HALL, BUILDING_LEVEL_1)
FORT_1 = getBuildingCode(TOWN_BUILDING_FORT, BUILDING_LEVEL_1)
MARKETPLACE_1 = getBuildingCode(TOWN_BUILDING_MARKETPLACE, BUILDING_LEVEL_1)
SHIPYARD_1 = getBuildingCode(TOWN_BUILDING_SHIPYARD, BUILDING_LEVEL_1)
TAVERN_1 = getBuildingCode(TOWN_BUILDING_TAVERN, BUILDING_LEVEL_1)
BLACKSMITH_1 = getBuildingCode(TOWN_BUILDING_BLACKSMITH, BUILDING_LEVEL_1)
MAGIC_GUILD_1 = getBuildingCode(TOWN_BUILDING_MAGIC_GUILD, BUILDING_LEVEL_1)
DWELLING_1_1 = getBuildingCode(TOWN_BUILDING_DWELLING_1, BUILDING_LEVEL_1)
DWELLING_2_1 = getBuildingCode(TOWN_BUILDING_DWELLING_2, BUILDING_LEVEL_1)
DWELLING_3_1 = getBuildingCode(TOWN_BUILDING_DWELLING_3, BUILDING_LEVEL_1)
DWELLING_4_1 = getBuildingCode(TOWN_BUILDING_DWELLING_4, BUILDING_LEVEL_1)
DWELLING_5_1 = getBuildingCode(TOWN_BUILDING_DWELLING_5, BUILDING_LEVEL_1)
DWELLING_6_1 = getBuildingCode(TOWN_BUILDING_DWELLING_6, BUILDING_LEVEL_1)
DWELLING_7_1 = getBuildingCode(TOWN_BUILDING_DWELLING_7, BUILDING_LEVEL_1)
GRAIL_1 = getBuildingCode(TOWN_BUILDING_GRAIL, BUILDING_LEVEL_1)

-- Коды улучшенных общих зданий
TOWN_HALL_2 = getBuildingCode(TOWN_BUILDING_TOWN_HALL, BUILDING_LEVEL_2)
TOWN_HALL_3 = getBuildingCode(TOWN_BUILDING_TOWN_HALL, BUILDING_LEVEL_3)
TOWN_HALL_4 = getBuildingCode(TOWN_BUILDING_TOWN_HALL, BUILDING_LEVEL_4)
FORT_2 = getBuildingCode(TOWN_BUILDING_FORT, BUILDING_LEVEL_2)
FORT_3 = getBuildingCode(TOWN_BUILDING_FORT, BUILDING_LEVEL_3)
MARKETPLACE_2 = getBuildingCode(TOWN_BUILDING_MARKETPLACE, BUILDING_LEVEL_2)
MAGIC_GUILD_2 = getBuildingCode(TOWN_BUILDING_MAGIC_GUILD, BUILDING_LEVEL_2)
MAGIC_GUILD_3 = getBuildingCode(TOWN_BUILDING_MAGIC_GUILD, BUILDING_LEVEL_3)
MAGIC_GUILD_4 = getBuildingCode(TOWN_BUILDING_MAGIC_GUILD, BUILDING_LEVEL_4)
MAGIC_GUILD_5 = getBuildingCode(TOWN_BUILDING_MAGIC_GUILD, BUILDING_LEVEL_5)
DWELLING_1_2 = getBuildingCode(TOWN_BUILDING_DWELLING_1, BUILDING_LEVEL_2)
DWELLING_2_2 = getBuildingCode(TOWN_BUILDING_DWELLING_2, BUILDING_LEVEL_2)
DWELLING_3_2 = getBuildingCode(TOWN_BUILDING_DWELLING_3, BUILDING_LEVEL_2)
DWELLING_4_2 = getBuildingCode(TOWN_BUILDING_DWELLING_4, BUILDING_LEVEL_2)
DWELLING_5_2 = getBuildingCode(TOWN_BUILDING_DWELLING_5, BUILDING_LEVEL_2)
DWELLING_6_2 = getBuildingCode(TOWN_BUILDING_DWELLING_6, BUILDING_LEVEL_2)
DWELLING_7_2 = getBuildingCode(TOWN_BUILDING_DWELLING_7, BUILDING_LEVEL_2)

-- Коды базовых расовых зданий
CASTLE_TRAINING_GROUNDS_1 = getBuildingCode(TOWN_BUILDING_HAVEN_TRAINING_GROUNDS, BUILDING_LEVEL_1)
CASTLE_MONUMENT_TO_FALLEN_HEROES_1 = getBuildingCode(TOWN_BUILDING_HAVEN_MONUMENT_TO_FALLEN_HEROES, BUILDING_LEVEL_1)
CASTLE_STABLE_1 = getBuildingCode(TOWN_BUILDING_HAVEN_STABLE, BUILDING_LEVEL_1)
CASTLE_FARMS_1 = getBuildingCode(TOWN_BUILDING_HAVEN_FARMS, BUILDING_LEVEL_1)
INFERNO_INFERNAL_LOOM_1 = getBuildingCode(TOWN_BUILDING_INFERNO_INFERNAL_LOOM, BUILDING_LEVEL_1)
INFERNO_ORDER_OF_FIRE_1 = getBuildingCode(TOWN_BUILDING_INFERNO_ORDER_OF_FIRE, BUILDING_LEVEL_1)
INFERNO_HALLS_OF_HORROR_1 = getBuildingCode(TOWN_BUILDING_INFERNO_HALLS_OF_HORROR, BUILDING_LEVEL_1)
INFERNO_SACRIFICIAL_PIT_1 = getBuildingCode(TOWN_BUILDING_INFERNO_SACRIFICIAL_PIT, BUILDING_LEVEL_1)
DUNGEON_ALTAR_OF_ELEMENTS_1 = getBuildingCode(TOWN_BUILDING_DUNGEON_ALTAR_OF_ELEMENTS, BUILDING_LEVEL_1)
DUNGEON_RITUAL_PIT_1 = getBuildingCode(TOWN_BUILDING_DUNGEON_RITUAL_PIT, BUILDING_LEVEL_1)
DUNGEON_TRADE_GUILD_1 = getBuildingCode(TOWN_BUILDING_DUNGEON_TRADE_GUILD, BUILDING_LEVEL_1)
DUNGEON_HALL_OF_INTRIGUE_1 = getBuildingCode(TOWN_BUILDING_DUNGEON_HALL_OF_INTRIGUE, BUILDING_LEVEL_1)
ACADEMY_LIBRARY_1 = getBuildingCode(TOWN_BUILDING_ACADEMY_LIBRARY, BUILDING_LEVEL_1)
ACADEMY_ARCANE_FORGE_1 = getBuildingCode(TOWN_BUILDING_ACADEMY_ARCANE_FORGE, BUILDING_LEVEL_1)
ACADEMY_ARTIFACT_MERCHANT_1 = getBuildingCode(TOWN_BUILDING_ACADEMY_ARTIFACT_MERCHANT, BUILDING_LEVEL_1)
ACADEMY_TREASURE_CAVE_1 = getBuildingCode(TOWN_BUILDING_ACADEMY_TREASURE_CAVE, BUILDING_LEVEL_1)
RAMPART_AVENGERS_BROTHERHOOD_1 = getBuildingCode(TOWN_BUILDING_PRESERVE_AVENGERS_BROTHERHOOD, BUILDING_LEVEL_1)
RAMPART_MYSTIC_POND_1 = getBuildingCode(TOWN_BUILDING_PRESERVE_MYSTIC_POND, BUILDING_LEVEL_1)
RAMPART_BLOOMING_GROVE_1 = getBuildingCode(TOWN_BUILDING_PRESERVE_BLOOMING_GROVE, BUILDING_LEVEL_1)
RAMPART_TREANT_SAMPLING_1 = getBuildingCode(TOWN_BUILDING_PRESERVE_TREANT_SAMPLING, BUILDING_LEVEL_1)
NECROPOLIS_AMPLIFIER_1 = getBuildingCode(TOWN_BUILDING_NECROMANCY_AMPLIFIER, BUILDING_LEVEL_1)
NECROPOLIS_UNHOLY_TEMPLE_1 = getBuildingCode(TOWN_BUILDING_NECROMANCY_UNHOLY_TEMPLE, BUILDING_LEVEL_1)
NECROPOLIS_UNEARHED_GRAVES_1 = getBuildingCode(TOWN_BUILDING_NECROMANCY_UNEARHED_GRAVES, BUILDING_LEVEL_1)
NECROPOLIS_DRAGON_TOMBSTONE_1 = getBuildingCode(TOWN_BUILDING_NECROMANCY_DRAGON_TOMBSTONE, BUILDING_LEVEL_1)
FORTRESS_RUNIC_SHRINE_1 = getBuildingCode(TOWN_BUILDING_FORTRESS_RUNIC_SHRINE, BUILDING_LEVEL_1)
FORTRESS_ARENA_1 = getBuildingCode(TOWN_BUILDING_FORTRESS_ARENA, BUILDING_LEVEL_1)
FORTRESS_GUARDPOST_1 = getBuildingCode(TOWN_BUILDING_FORTRESS_GUARDPOST, BUILDING_LEVEL_1)
FORTRESS_RUNIC_STONEWORKS_1 = getBuildingCode(TOWN_BUILDING_FORTRESS_RUNIC_STONEWORKS, BUILDING_LEVEL_1)
FORTRESS_RUNIC_ACADEMY_1 = getBuildingCode(TOWN_BUILDING_FORTRESS_RUNIC_ACADEMY, BUILDING_LEVEL_1)
STRONGHOLD_HALL_OF_TRIAL_1 = getBuildingCode(TOWN_BUILDING_STRONGHOLD_HALL_OF_TRIAL, BUILDING_LEVEL_1)
STRONGHOLD_GARBAGE_PILE_1 = getBuildingCode(TOWN_BUILDING_STRONGHOLD_GARBAGE_PILE, BUILDING_LEVEL_1)
STRONGHOLD_TRAVELLERS_SHELTER_1 = getBuildingCode(TOWN_BUILDING_STRONGHOLD_TRAVELLERS_SHELTER, BUILDING_LEVEL_1)
STRONGHOLD_PILE_OF_OUR_FOES_1 = getBuildingCode(TOWN_BUILDING_STRONGHOLD_PILE_OF_OUR_FOES, BUILDING_LEVEL_1)
STRONGHOLD_SLAVE_MARKET_1 = getBuildingCode(TOWN_BUILDING_STRONGHOLD_SLAVE_MARKET, BUILDING_LEVEL_1)

-- Коды улучшенных расовых зданий
DUNGEON_ALTAR_OF_ELEMENTS_2 = getBuildingCode(TOWN_BUILDING_DUNGEON_ALTAR_OF_ELEMENTS, BUILDING_LEVEL_2)
RAMPART_AVENGERS_BROTHERHOOD_2 = getBuildingCode(TOWN_BUILDING_PRESERVE_AVENGERS_BROTHERHOOD, BUILDING_LEVEL_2)
RAMPART_MYSTIC_POND_2 = getBuildingCode(TOWN_BUILDING_PRESERVE_MYSTIC_POND, BUILDING_LEVEL_2)
FORTRESS_RUNIC_SHRINE_2 = getBuildingCode(TOWN_BUILDING_FORTRESS_RUNIC_SHRINE, BUILDING_LEVEL_2)
FORTRESS_RUNIC_SHRINE_3 = getBuildingCode(TOWN_BUILDING_FORTRESS_RUNIC_SHRINE, BUILDING_LEVEL_3)
STRONGHOLD_HALL_OF_TRIAL_2 = getBuildingCode(TOWN_BUILDING_STRONGHOLD_HALL_OF_TRIAL, BUILDING_LEVEL_2)
STRONGHOLD_HALL_OF_TRIAL_3 = getBuildingCode(TOWN_BUILDING_STRONGHOLD_HALL_OF_TRIAL, BUILDING_LEVEL_3)

-- Добавление всех уровней указанного здания в список
function addAllBuildingLevels(townType, codeBuildingList, buildingID)
push(codeBuildingList, getBuildingCode(buildingID, BUILDING_LEVEL_1))
if (buildingID == TOWN_BUILDING_TOWN_HALL) then
push(codeBuildingList, TOWN_HALL_2)
push(codeBuildingList, TOWN_HALL_3)
push(codeBuildingList, TOWN_HALL_4)
elseif (buildingID == TOWN_BUILDING_FORT) then
push(codeBuildingList, FORT_2)
push(codeBuildingList, FORT_3)
elseif (buildingID == TOWN_BUILDING_MARKETPLACE) then
push(codeBuildingList, MARKETPLACE_2)
elseif (buildingID == TOWN_BUILDING_MAGIC_GUILD) then
push(codeBuildingList, MAGIC_GUILD_2)
push(codeBuildingList, MAGIC_GUILD_3)
push(codeBuildingList, MAGIC_GUILD_4)
push(codeBuildingList, MAGIC_GUILD_5)
elseif (buildingID == TOWN_BUILDING_DWELLING_1) then
push(codeBuildingList, DWELLING_1_2)
elseif (buildingID == TOWN_BUILDING_DWELLING_2) then
push(codeBuildingList, DWELLING_2_2)
elseif (buildingID == TOWN_BUILDING_DWELLING_3) then
push(codeBuildingList, DWELLING_3_2)
elseif (buildingID == TOWN_BUILDING_DWELLING_4) then
push(codeBuildingList, DWELLING_4_2)
elseif (buildingID == TOWN_BUILDING_DWELLING_5) then
push(codeBuildingList, DWELLING_5_2)
elseif (buildingID == TOWN_BUILDING_DWELLING_6) then
push(codeBuildingList, DWELLING_6_2)
elseif (buildingID == TOWN_BUILDING_DWELLING_7) then
push(codeBuildingList, DWELLING_7_2)
elseif (buildingID == TOWN_BUILDING_DUNGEON_ALTAR_OF_ELEMENTS)
and (townType == TOWN_DUNGEON)
then
push(codeBuildingList, DUNGEON_ALTAR_OF_ELEMENTS_2)
elseif (buildingID == TOWN_BUILDING_PRESERVE_AVENGERS_BROTHERHOOD)
and (townType == TOWN_PRESERVE)
then
push(codeBuildingList, RAMPART_AVENGERS_BROTHERHOOD_2)
elseif (buildingID == TOWN_BUILDING_PRESERVE_MYSTIC_POND)
and (townType == TOWN_PRESERVE)
then
push(codeBuildingList, RAMPART_MYSTIC_POND_2)
elseif (buildingID == TOWN_BUILDING_FORTRESS_RUNIC_SHRINE)
and (townType == TOWN_FORTRESS)
then
push(codeBuildingList, FORTRESS_RUNIC_SHRINE_2)
push(codeBuildingList, FORTRESS_RUNIC_SHRINE_3)
elseif (buildingID == TOWN_BUILDING_STRONGHOLD_HALL_OF_TRIAL)
and (townType == TOWN_STRONGHOLD)
then
push(codeBuildingList, STRONGHOLD_HALL_OF_TRIAL_2)
push(codeBuildingList, STRONGHOLD_HALL_OF_TRIAL_3)
end
end

-- Получение списка кодов зданий по типу города и списку их ID
function getBuildingCodeList(townType, townBuildingList)
local codeBuildingList = {}
for i, buildingID in townBuildingList do
addAllBuildingLevels(townType, codeBuildingList, buildingID)
end
return codeBuildingList
end

-- Проверка, построено ли в городе указанное здание
function hasTownThisBuildingCode(town, buildingCode)
local hasBuildingCode = NO
local buildingID = getBuildingID(buildingCode)
local targetLevel = getBuildingLevel(buildingCode)
if (GetTownBuildingLevel(town, buildingID) >= targetLevel) then
hasBuildingCode = YES
end
return hasBuildingCode
end

-- Получение списка построенных зданий в городе
function getTownBuildingCodeList(town)
local currentTownBuildingCodeList = {}
local townType = GetTownRace(town)
local townBuildingList = getTownTypeBuildingList(townType)
local fullTownBuildingCodeList = getBuildingCodeList(townType, townBuildingList)
for i, buildingCode in fullTownBuildingCodeList do
if (hasTownThisBuildingCode(town, buildingCode) == YES) then
push(currentTownBuildingCodeList, buildingCode)
end
end
return currentTownBuildingCodeList
end
Разработчик Heroes 5.5 WarGame Edition.
Сайт проекта - пока неактивен
Автор Асимметричных шахмат
User Avatar
#2325
Auto-translated
Nargott - well, of course, that would be more convenient. In general, no one is stopping anyone, it's just that it was needed only once. If it were used constantly, then it would be a different matter. But thank you, I'll keep it in mind. ColdaT - in what sense? To check in the editor - if player 1 and player 3 are next to each other, then you can assign players 1 and 3 to the team...

Whatever
User Avatar
#2326
Auto-translated
I decided it was time to make another video for the map. I created the video, it plays, everything is fine, and I spent a lot of time on it. I saved it 10 times and exited the editor. I go back in, and there's no video, and there's no map that was created for it. The video isn't in the map itself either. This editor really gets on my nerves sometimes. Is there any way to recover it?

Although, I guess not...
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
#2327
Auto-translated
Juss456
I finally had some time and decided to make another video for the map. I created the video, it plays perfectly, and I spent a lot of time on it. I saved it 10 times, exited the editor. I go back in, and there's no video, and there's no map that was created for it. The video isn't in the map itself either. This editor really gets on my nerves sometimes. Is there any way to revive it?

Although, I guess not...
Did the video play in the game? If not, the problem might be that you didn't export the video or didn't open the map (File-Open) before creating the video, for which you were making the video.
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля
User Avatar
#2328
Auto-translated
Yes, I forgot to export it. Thank you.
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
User Avatar
#2329
Auto-translated
Hello everyone! How do I create a specific loop for a script? I need it to add two types of creatures (non-native) to the castle at the beginning of each week. Thank you in advance!
Герман стоял неподвижно. Герман сошёл с ума. "Старуха!!!" - закричал он в ужасе. Он сидит в Обуховской больнице, в семнадцатом нумере, не отвечает ни на какие вопросы и бормочет необыкновенно скоро: "Тройка, семёрка, туз. Тройка, семёрка, дама".
User Avatar
#2330
Auto-translated
via new day trigger
if I have time and no one else posts it first, I'll write the complete code.

Whatever