Skip to content

Current questions and answers regarding the map editor.

User Avatar
#5872
Auto-translated
FataLisT, if I understand correctly, the idea is to display certain in-game texts at will, without copying them. Here's how I did it:
1. For example, I needed to display the name and description of an artifact in my artifact shop.
2. I found that all artifacts in the resources have a uniform path: /Text/Game/Artifacts/ARTIFACT_NAME/Name.txt (Description.txt).
3. I had to manually create a table of artifacts in the code, like this: [ARTIFACT_SWORD_OF_RUINS] = 'SwordOfRuin', which gave me a way to go from the artifact ID to its name in the resources (in reality, my table contains several parameters, not just the name).
4. Then I created functions like:

function GetArtefactName(id)
  return '/Text/Game/Artifacts/'..artefact_table[id]..'/Name.txt'
end

function GetArtefactDesc(id)
  return '/Text/Game/Artifacts/'..artefact_table[id]..'/Description.txt'
end

That's all there is to it.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо