Skip to content

Current questions and answers regarding the map editor.

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:

Легендарная война
Сердце вулкана
Передел мира