Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to Kusacka
User Avatar
#5189
Auto-translated
Kusacka
Replace a building on the adventure map with another one where you can purchase creatures. For example, replace a Demon Tower with an Archers Tower. I will create the condition explaining why it should be changed; I am interested in the process itself. Because I don't know how to delete a building.

It seems you can't delete it, but there is a command - ReplaceDwelling (Replaces a dwelling with a dwelling of the same level of the specified faction, and also provides for specifying the creatures that are sold there.)
Syntax
{{{
ReplaceDwelling( name, newTownType, [creatureId1, [creatureId2,
[creatureId3, [creatureId4] ] ] ] )
}}}

For example, Demon Tower to Archers Tower.
ReplaceDwelling( 'Demon Tower', 0, 3 )


Where 'Demon Tower' is the script name of the building
0 is the faction ID
3 is the creature ID
In reply to Kusacka
User Avatar
#5190
Auto-translated
Kusacka
Replace one building with another on the adventure map, where you can purchase creatures. For example, replace a Demon Tower with an Archers Tower. I will create the condition explaining why it should be changed; I am interested in the process itself. Because I don't know how to delete a building.
First, you can delete a building by setting Object Properties => IsRemovable => true. Then, use RemoveObject(dwelling name) and CreateDwelling.
But the easiest way is to use the function
ReplaceDwelling(name, newTownType, [creatureId1, [creatureId2,
[creatureId3, [creatureId4] ] ] ] )
TownType is the new race of the dwelling. It transforms into a dwelling of the same level (so, an Archers Tower will turn into a Necropolis or a Rampart). It is not necessary to specify the IDs of the new creatures; then, the game itself will set the creatures available for hire, which are by default in this type of dwelling.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5191
Auto-translated
Thank you to everyone for your help. And I'm back with another question.

How can I restore a town from its ruins?

In other words, there are destroyed towns of Haven and Dungeon. Is there a way to change the object into a town?

I tried SetObjectOwner, but it seems to only work on towns.
In reply to Kusacka
User Avatar
#5192
Auto-translated
Kusacka
How can a town be restored from ruins?

I mean, there are destroyed Human and Demon towns. Is there a way to change an object into a town?

I tried SetObjectOwner, but it seems to only work for towns.

There doesn't seem to be a direct function to restore a town from ruins. You can try a workaround:
function RazeOfTown()
MakeTownMovable(nTownname);
--makes the town movable
SetObjectPosition(nTowname, x, y, floor);
--teleports the town to some empty area, hidden from view (e.g., in a Dungeon)
PlayVisualEffect(...);
--some nice effects of the town's destruction
CreateStatic("RazedTown", /Path to model.xdb#xpointer(/Model), x, y, floor);
--creates ruins in place of the town
end;
...
...
function TownRebuilt()
RemoveObject("RazedTown");
--removes the ruins
PlayVisualEffect(...);
--some nice effect of the town's restoration
SetObjectPosition("TownName", x, y, floor);
--returns the town to its place
end;
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
#5193
Auto-translated
}{0TT@6bI4
There doesn't seem to be a direct function to restore a town from its ruins. You can try a workaround:
function RazeOfTown()
MakeTownMovable(nTownname);
--makes the town movable
SetObjectPosition(nTowname, x, y, floor);
--teleports the town to some empty, hidden area (e.g., in a Dungeon)
PlayVisualEffect(...);
--some nice effects of the town's destruction
CreateStatic("RazedTown", /Path to model.xdb#xpointer(/Model), x, y, floor);
--creates the town's ruins in its place
end;
...
...
function TownRebuilt()
RemoveObject("RazedTown");
--removes the ruins
PlayVisualEffect(...);
--some nice effect of the town's restoration
SetObjectPosition("TownName", x, y, floor);
--returns the town to its place
end;


I used the RazeTown("Town Name") command to destroy the town. It worked great.

I just didn't know how to restore the town. Thanks. I'll try it today
#5194
Auto-translated
So, you see that many people ask various questions about mapmaking, but almost no new maps are released. And if they are, it's usually from the old-timers of the forum. Vita Gorodilov doesn't count.
User Avatar
#5195
Auto-translated
Well, firstly, if maps are released by experienced mapmakers, is that a bad thing? Secondly, maps have already been released: one by Master, another is in development by him, one by EnterEsc, and I've created something, plus there's a multiplayer map by the same Master... I'll give you a little spoiler: one user (I won't say who) is preparing a campaign, and I know at least 4 other people are working on maps... Thirdly, Vita isn't asking questions here. And fourthly, this isn't the right topic for discussion.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5196
Auto-translated
Hello. Can anyone explain what the Shared section and the Blocked Tiles, Active Tiles, and Hole Tiles parameters are for in the object properties? The object in question is a town.
User Avatar
#5197
Auto-translated
BlockedTiles – these are the tiles occupied by an object, and they will be impassable, i.e., red, when the object is placed. ActiveTiles – these will be green; attempting to move onto them equals interacting with the object. HoleTiles – these will not only be impassable but will also cut out the texture of the surface beneath them, so you can see the underground part of the object (like a dwarven city, various holes in the ground, etc.). Everything is defined in relative coordinates from the center tile of the object.
 

К А
Стикеры GBF в Telegram
User Avatar
#5198
Auto-translated
Thank you very much. I have another question: I changed the city model, and because of this, so-called holes appeared in the textures around the city borders, meaning the underground part of the city is visible. Could you tell me how to figure out which tile needs to be corrected? And where can I find the central coordinate?
User Avatar
#5199
Auto-translated
To understand which Hole tiles need to be removed, it is enough to know the location of the center. Finding the center is very simple: in the Objects Properties Tree, find Pos => + => set any coordinate, press Enter. Then, look at the city from above, hovering over the cell with the same coordinates: the cell located at the coordinates set manually through Pos is the central one.
It is easier to remove all Hole Tiles and then add them back if needed, or to create a new city instead of modifying an old one.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
#5200
Auto-translated
}{0TT@6bI4
To understand which of the Hole tiles need to be removed, it is enough to know the location of the center. Finding the center is very simple: in the Objects Properties Tree, find Pos => + => Set any coordinate, press Enter. Then, look at the city from above, hovering over the cell with the same coordinates: the cell located at the coordinates specified manually through Pos is the central one.
It's easier to remove all Hole Tiles and then add them back if needed, or to create a new city instead of modifying an old one.
Thank you for your help with the tiles.
Is there a guide on how to create a new city?
I copied the Shared graph and worked with a copy of one of the existing cities, but for some reason, the hero couldn't enter it (the icon to enter the city was not displayed), although teleporting to the city and exiting it was still possible.
User Avatar
#5201
Auto-translated
There is no manual. And it would take a long time to explain...
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5202
Auto-translated
I decided to create a unique arena on a separate map, so that when attacking a city, in addition to all the walls, another wall from the battle with the Warlord would be added. I managed to add the wall, and it even works, but for some reason its model is not displayed. Do you have any ideas on how to fix this issue?
User Avatar
#5203
Auto-translated
To change the visuals of battle maps, go to AdvMapDesc => CombatArenas => Place the "Lord's Wall" object on the map in the background. Save, and start a battle with this arena (or with your own, if you created a new one). It worked perfectly for me.

P.S. How did you determine that the wall was added successfully if you couldn't see its model?
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________

Statistics

Welcome our newest member: Emil