Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
#2936
Auto-translated
Regarding the icons for TalkBox, the table I compiled might be useful:
http://yadi.sk/d/E3j_pQhhCXj8w

To use it, you need to:
1. Place the const.lua file in the game folder along with the other files.
2. Include it in your main script: doFile(GetMapDataPath()..'const.lua');
3. In TalkBox, instead of an icon, pass something like icons_table['Titan'] - this will display the Titan icon (note that the parameter must be a string, so quotes are required. Theoretically, icons_table.Titan should also work, but I haven't tested it).
4. You can, of course, view the list of possible icons in the file itself. It contains all the monsters, some of the heroes, seemingly all the building icons on the map, and some other minor things. There are minimal comments. The table is not yet complete; I periodically add to it as I use a very large number of TalkBoxes on my map.

5. As a bonus, this file also contains a second table - creatures_table. With its help, you can obtain the following parameters for a monster by its ID:
- the path to the file with the monster's name
- the monster's strength parameter
- a string that can be used to extract the monster's icon from the previous table.
To clarify the last point: if you need to display the icon of a specific monster and you have its ID on hand, say CREATURE_PEASANT, then you can obtain the icon for TalkBox in this way:
icons_table[creatures_table[CREATURE_PEASANT][CREATURES_TABLE_ICON]]
Another possible use of this table is, for example, if you are displaying a TalkBox from the perspective of a certain monster, you can use its name as the title (parameter titleTextRef) by simply specifying creatures_table[CREATURES_TABLE_NAME]

If anything is unclear, feel free to ask.
In reply to Jack_of_shadows
User Avatar
#2937
Auto-translated
Jack_of_shadows
Regarding the icons for TalkBox, the table I compiled might be useful:
http://yadi.sk/d/E3j_pQhhCXj8w

To use it:
1. Place the const.lua file in the game folder along with the other files.
2. Include it in your main script: doFile(GetMapDataPath()..'const.lua');
3. In TalkBox, instead of an icon, pass something like icons_table['Titan'] - this will display the Titan icon (note that the parameter must be a string, so quotes are required. Theoretically, icons_table.Titan should also work, but I haven't tested it).
4. You can, of course, view the list of possible icons in the file itself. It contains all the monsters, some heroes, seemingly all the building icons on the map, and some other minor things. There are minimal comments. The table is not yet complete; I periodically add to it as I use a very large number of TalkBoxes on my map.

5. As a bonus, this file also contains a second table - creatures_table. Using it, you can obtain the following parameters for a monster by its ID:
- the path to the file containing the monster's name
- the monster's strength parameter
- a string that can be used to extract the monster's icon from the previous table.
To clarify the last point: if you need to display the icon of a specific monster and you have its ID, say CREATURE_PEASANT, you can obtain the icon for TalkBox in this way:
icons_table[creatures_table[CREATURE_PEASANT][CREATURES_TABLE_ICON]]
Another possible use for this table is, for example, if you are displaying a TalkBox from the perspective of a monster, you can use its name as the title (the titleTextRef parameter) by simply specifying creatures_table[CREATURES_TABLE_NAME]

If anything is unclear, feel free to ask.

I didn't expect someone could do that! I only need one icon, but this is a whole set! I'll try these options tomorrow. I only have a problem with one icon in the TalkBox. It looks strange. The text I want to see in the center to the right of the icon is not displayed. If I display it elsewhere, it "sticks out" beyond the TalkBox. Could this be due to some mod, like the one that removes the scrollbar in message boxes? Or am I simply filling in the wrong fields in the function? This problem only occurs with the main text; the title and answer options are displayed as they should be
Кампании для 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
#2938
Auto-translated
Juss456, regarding the text mentioned above, a solution was already provided. It's simply a mistake made by the developers. There's also a limit on the size of this text, meaning you can't write a very long message; the maximum is what fits in a single window.
In reply to Jack_of_shadows
User Avatar
#2939
Auto-translated
Jack_of_shadows
- a string that can be used to extract the monster icon from the previous table.
What is the purpose of this intermediary?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to Jack_of_shadows
User Avatar
#2940
Auto-translated
Jack_of_shadows
Juss456, regarding the text mentioned above, a solution was already suggested; it's simply a mistake made by the developers. There's also a limit on the size of this text, meaning you can't write a very long message; the maximum is what fits in a single box.
That's why it's better to display the main text in a message box before the talk box.
Мои карты:
Town
Готовится:Чума (40%), Сосиска(42%), Война Грааля
User Avatar
#2941
Auto-translated
RedHeavenHero
Why this intermediary?
Yes, it turned out to be not very elegant, but this method integrated better into my dialogue management functions. After all, I primarily created these tables for my specific map.
Oligarch
That's why it's better to display the main text in a message box before the TalkBox.
If the dialogue between the player and the NPC is built on TalkBoxes, with several dozen phrases, displaying a MessageBox before each phrase, or even only before the large ones, would be a significant loss in visual appeal.
User Avatar
#2942
Auto-translated
Olegarkh, Jack_of_shadows, thank you, everything works as it should.
Кампании для 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
#2943
Auto-translated
Good evening. I have a lot of questions. I have 4 videos. 1 - Opening. How can I set it up so that it plays right at the beginning of the map, after it loads?
How can I make the 2nd video, Meet, play after Blue and Purple meet. By the way, after this video, I want to try to make it so that Blue has a quest to bring the Pendant of Mastery to Purple. The next video plays after Blue brings the artifact. He and Purple should become allies.
How do I set all of this up?

And also, can I set specific defeat conditions for Blue: the hero Vyacheslav is freed from prison by another player, Purple is defeated. For Purple, the same: Vyacheslav is not freed by Blue, Blue is defeated?
In case of defeat, I need to play the Dead video before the statistics are displayed.
The same for the Win video when victorious.

Can you help me with all of this?
Правило во взгляде...
User Avatar
#2944
Auto-translated
Is it possible to force an AI player to hire only specific heroes? Assuming they are all available on the map, but belong to different factions. Or at least, to make the AI hire only red Haven heroes – that would also be a good option, theoretically.

Whatever
User Avatar
#2945
Auto-translated
In the map properties tree: ``` players.[player].TavernFilter players.[player].TavernFilter.BannedHeroesRaces banned hero races players.[player].TavernFilter.BannedHeroes banned heroes (script names) players.[player].TavernFilter.AllowedHeroes these will be allowed even if banned in BannedHeroesRaces ``` If a hero is scripted, to make him recruitable only on a single map (i.e., without mods), his script name needs to be added to AdditionallyRollableHeroes (at the very end of the tree). Example usage can be found in "After".
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2946
Auto-translated
okay, thanks, I'll try.

Added after 16 minutes
it doesn't work. I added Add_rolable RedHeavenHero01 - 06, banned the Haven race for the AI player, but allowed these six heroes. It still doesn't hire them.

Whatever
User Avatar
#2947
Auto-translated
There, player number 1-8 corresponds to the numbers 0-7. Is this correct?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#2948
Auto-translated
of course. maybe it still shouldn't be allowed to use heroes from a banned faction?

Whatever
User Avatar
#2949
Auto-translated
How do I start a battle with a specific hero standing on the map? StartCombat seems to only work with reserved heroes. Or, another question: how do I reserve a campaign hero, but also be able to set all of his parameters?

Added after 46 seconds
Heroist
Okay, thanks, I'll try it.

Added after 16 minutes
It's not working. I set Add_rolable RedHeavenHero01 - 06, banned the Heaven race for the AI player, but allowed these six heroes. It still won't hire them.
Are all the other races also banned?
Кампании для 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
#2950
Auto-translated
What about the others? Among the available heroes, only Humans and Demons are listed in the map properties.
Demons and Humans are banned. Reds have been added and are available. But he doesn't recruit them.
Removed the ban on the Human race - he immediately recruited Iris.
Removed the ban on the Demon race - he immediately recruited Deleb.

Whatever