Skip to content

Current questions and answers regarding the map editor.

User Avatar
#4883
Auto-translated
By "function," I meant that the map archive should contain text documents with some kind of narrative text (like in the case of MessageBox), or perhaps, I don't know, just pieces of script, and this text document performs the function, excuse the tautology, of a function.
It's simpler than that. The main map file is map.xdb, which stores the description of almost everything on the map in XML format. This includes a link to the map script. By default, the editor names it MapScript.lua. All the code should be in it or called from it. The code is written in Lua, which is why the file has that extension. Text files *.txt can be located anywhere - inside the map (most often), in the game's resources, next to the game; the main thing is to specify the correct path to them in the scripts.

Almost all game resources are in data/data.pak. Everything you put inside the map will also be added to the resources. The root of the map is the path "/". That is, if something is inside the map in the folder foobar, it will be accessible as "/foobar/...". If the editor doesn't allow you to edit the path somewhere, you can always open map.xdb in a text editor and change the path manually (at your own risk).
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо