@print(GetObjectNamesByType('TOWN')) The name turned out to be AdvMapTown-12119 (the city of Angelat, the one in the upper right corner of the map).
Here's the code: 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)
++
And one more question... where can I find descriptions of artifact sets? (and how to create my own set?) I found descriptions of set bonuses in the Artifacts.xdb file, but there is no mention of where the sets themselves are stored. I decided to create my own set (for example, Angel Wings + Ring of Swiftness +20% initiative + Horseshoe + Crown of Leadership + Armor of the Forgotten Hero), but I ran into a problem - how will the game understand the new set, and most importantly - how to name it in the Artifacts.xdb file? There is no mention anywhere of where the functions responsible for sets are stored. The description in the artifact is okay... For now, I see one option - to collect the Artifact.xdb file and record the set there... upd. I found it) the descriptions of their sets are in DefaultStats.xdb))) you can edit them)
I sketched out a set, but there is a problem - I couldn't make the set description appear + the 7th level creatures are not added (yes, I decided to clone the dragon set, but with different artifacts).