Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
10 years ago
Auto-translated
Ment, it's almost done, but the problem remains...
I used the ID of existing items... take a look.
User Avatar
10 years ago
Auto-translated
The issue isn't with the item ID, but with the set ID... You have ARTFSET_EFFECT_7LEGION listed there, but where is that effect defined? It's essentially an ID, and the game should have it somewhere; otherwise, how would it work?
In reply to Ment
User Avatar
10 years ago
Auto-translated
function AddArchangelsSpecialization()
if GetObjectDwellingCreatures('AdvMapTown-12119', CREATURE_ANGEL) ~= -1 then
local add = 1
if grail_built == 1 then
add = add + 3
end
SetObjectDwellingCreatures('AdvMapTown-12119', CREATURE_ANGEL, GetObjectDwellingCreatures('AdvMapTown-12119', CREATURE_ANGEL) + add)
end
end

function NewDay();
if GetDate(DAY_OF_WEEK) == 1 then
AddArchangelsSpecialization()
end
end

Trigger(NEW_DAY_TRIGGER, 'NewDay')

grail_built = 0

function WaitForBuildGrail()
while GetTownBuildingLevel('AdvMapTown-12119', ID_14) == 0 do
sleep(10)
end
grail_built = 1
end

startThread(WaitForBuildGrail)
The town's name is not assigned as the default. Give it a script name and substitute it instead of AdvMapTown-12119. ID_14 is also incorrect; just use 14.
User Avatar
10 years ago
Auto-translated
RedHeavenHero, replaced AdvMap with Dunhart (with a bonus of 250 coins) - it worked (even without changing ID_14). Thank you.
Ment, if I understand correctly, I wrote this ID in DefaultStats.xdb:

7Legion_5_Creature_Tier>7<7Legion_5_Creature_Tier
7Legion_5_Creature_Count>1<7Legion_5_Creature_Count
If this is not where to write the ID, then where should I write it? Replacing someone else's ID is not a problem, I just need to know where and how to change it.
RedHeavenHero, what set would you recommend?
User Avatar
10 years ago
Auto-translated
<7Legion_5_Creature_Tier>7
<7Legion_5_Creature_Count>1
That's not it at all; these variables are stored exclusively in the executable file. But yours isn't there, and it can't be.
It's not a problem for me to replace someone's ID; I just need to know where and what to change it to.
Leave the ID of an existing set (I would take, for example, the lion set; it is very close to yours in "spirit." Or you can take the runic set because it has the most questionable bonuses, in my opinion) and assign new artifacts to it in place of the old ones (or you can assign some of your artifacts + leave what is already there).
The initiative bonus of the lion set can probably be adjusted in DefaultStats (check if there is such a parameter there). Adding a 7th-tier creature can only be done through scripts.
User Avatar
10 years ago
Auto-translated
Okay, let's say...
How can I add, for example, creatures of level 6 and 7 through a runic set? (by replacing the ID)? Can you provide a clear example?
I've already figured out how to use scripts in maps (I read the LUA tutorial), but I had an idea to create an independent H5U file so that I wouldn't have to modify maps unnecessarily.
User Avatar
10 years ago
Auto-translated
but the idea was to create an independent h5u so as not to bother with the maps again.
I'll have to change the executable file again, otherwise it won't work.
Or, we can actually change the artifacts in the Dragon set. After all, as I understand it, the Dragon set won't be assembled on your map? Otherwise, why would you need two sets with the same effects?
User Avatar
10 years ago
Auto-translated
Ment, yes, it won't be possible to include everything.
It was necessary to fit similar parameters into 2-3 art files, no more.
I just thought that it would be easier to actually change the configs than to reverse engineer the executable.
User Avatar
10 years ago
Auto-translated
Unfortunately, not everything can be achieved solely through resource modifications.
User Avatar
10 years ago
Auto-translated
That part, where there's this ID_14 that seemingly came from nowhere, won't work.
User Avatar
10 years ago
Auto-translated
RedHeavenHero, why? And how do you explain the increase in creatures then? You suggested the code...
User Avatar
10 years ago
Auto-translated
The ID is definitely in the documentation - IDs_for_scripts.pdf.


Added 41 seconds later
There will be no increase from the tear.
User Avatar
10 years ago
Auto-translated
then I have no idea where the increase came from o_O
User Avatar
10 years ago
Auto-translated
This is an increase "from specialization," and there won't be an increase "from tears."
2. How can I implement a "week of" bonus when building a Grail (like the "week of demons" in Heroes 3), and also ensure that after construction, the bonus only increases the growth of a SPECIFIC type of creature, without changing the bonus for other creatures? (For example, if you build a Grail in a Knight city with an Archangel specialization, you get a +1 Archangel bonus from the city's specialization + a +3 bonus from the Grail + all weeks are declared Archangel or Elrath weeks...).
In short, identifiers are recorded in scripts either completely (CREATURE_PALADIN) or as a number (12), but not with a newly invented form of notation like ID_14.
User Avatar
10 years ago
Auto-translated
Thank you, everything is correct. And here's another question: we have a map, but when selecting a castle in it, you can't choose a hero (i.e., you can select the castle, but you can't select a starting hero). I checked in the editor, everything seems fine, and inside the map archive, it's Multiplayer, not single-player. How can I fix this?

Statistics

Welcome our newest member: recijeb

Users Online 1 users 1229 guests