Skip to content

Posts from Current questions and answers regarding the map editor. Auto-translated

5.0 (12 ratings)
User Avatar
#5386
Auto-translated
Good afternoon. I don't know what a "non-playable faction" is, but you can "hardcode" a hero in Map Properties => Players Properties => Select the player and the hero for them.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5387
Auto-translated
You were absolutely right, }{0TT@6bI4. By assigning different file paths, I managed to enable both the videos and the Lua file for the artifacts. But another problem arose. In the videos where there is a Monsterlink, their custom name is not displayed. Most likely, this is because I was assigning the MonsterCustomName through the window that appears when the spacebar is pressed. Is there a way to redo this within the campaign, or is it necessary to create empty videos and replace the files with the necessary corrections in them?
User Avatar
#5389
Auto-translated
When creating files with spaces in their names, they are assigned names with Cyrillic characters, which causes the game to "lose" them. If the index.bin file containing references to the required videos has been saved, it can be placed in the data folder, changes can be made, and the folders with the changes can be sent to the campaign; if not, new files will have to be created, replaced, and edited.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5390
Auto-translated
Got it, I'll start fixing it now.
In reply to Безымянный
User Avatar
#5391
Auto-translated
Nameless
Hello. In the "Treasure Hunters" map, there is a non-playable faction - Inferno, and also a starting hero that cannot be changed. How can I do the same for my map?

Go to the map settings (Map Properties), then to the player settings (Players Properties). In the Player line, select the player you need. In Main Hero, select the hero that cannot be changed. If you want the hero to be selectable when choosing the map, you need to select Main Town and then check the Generate Hero In Town box (I think GHIT doesn't work on SingleMission maps, only Multiplayer). To prevent playing as this player (or, as you wrote, the race), uncheck the Human Playable box for the player you want.



Added 20 minutes later

Hello! I have a question: How can I write a script that will track who I am fighting?

I need my hero to have "bad consequences" with a specific race, i.e., when I engage them in combat, I receive +1 to a "bad" counter for being a rebel and daring to raise my crossbow and sword against them. And I would also like to clarify about the comparison variable (if I named it correctly) "~=", what result does it give? For example, "if GetDifficulty() ~= DIFFICULTY_EASY then". I just don't quite understand how to use it correctly.

And finally, what I'm interested in: Can I place arena walls with gates on the map? Is there a way to animate them so that the gates open and close?

User Avatar
#5392
Auto-translated
Create a new script (xdb and lua) and link it to your hero using the function SetHeroCombatScript("Hero Name", "/Path to script/ScriptName.xdb#xpointer(/Script)")

In the combat script itself:
function Start()
--We only consider the case when our hero attacks; if the "bad counter" increased when we were attacked, that would be unfair.

local EnemyCreat = GetDefenderCreatures()
flag = 1
for key, unit in EnemyCreat do
if GetCreatureType(unit)=="Bad ID" or GetCreatureType(unit)=="Bad ID 2" then --N blocks of "bad ID" checks
SetGameVar("BadCounter", GetGameVar("BadCounter")+1)
flag = nil
break
end
end
if flag then
SetGameVar("GoodCounter", GetGameVar("GoodCounter")+1)
end
end
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5393
Auto-translated
Accordingly, in the standard script, you can find out the value of the bad and good battle counters using GetGameVar("Bad/GoodCounter") + 0.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5394
Auto-translated
~= means "not equal to". Accordingly, if GetDifficulty() ~= DIFFICULTY_EASY, then the code will be executed when the difficulty is not Recruit.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5395
Auto-translated
Regarding the opening gates – it’s very difficult to implement. It took me half an hour to create just one static object – opening and closing Orcish gates. I’ll try to make a small mod that adds all these objects to the editor.

Just kidding. It was difficult to find the files in the editor the first time, but it went faster afterward.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#5396
Auto-translated
}{0TT@6bI4
Create a new script (xdb and lua) and link it to your hero using the function SetHeroCombatScript("Hero Name", "/Path to script/ScriptName.xdb#xpointer(/Script)")

In the combat script itself:
function Start()
--We only consider the case when our hero attacks; if the "bad counter" increased when we were attacked, it would be unfair.

local EnemyCreat = GetDefenderCreatures()
flag = 1
for key, unit in EnemyCreat do
if GetCreatureType(unit)=="Bad ID" or GetCreatureType(unit)=="Bad ID 2" then --N blocks of "bad ID" checks
SetGameVar("BadCounter", GetGameVar("BadCounter")+1)
flag = nil
break
end
end
if flag then
SetGameVar("GoodCounter", GetGameVar("GoodCounter")+1)
end
end
Thank you, I'll try it. And thank you for the explanation about ~= . Regarding the gates - I understand, we'll wait. 😎
#5398
Auto-translated
Good day. This question has probably been discussed before, but I don't have the energy to scroll through more than 300 pages of the forum. Please tell me: GSC creates mountains and other objects; how do I remove the orange surface underneath them? (It's visible when the **Show All Passability** button is pressed). The hero cannot move across this surface, and you cannot place buildings/dwellings (or rather, you can, but the entrance must be outside the orange zone). I really want to remove some of the randomly placed mountains and place a dragon utopia, etc. None of the tabs like PLATEAU, + - level (raise), lower (dig), smooth (smith), level (zero), eraser help. There must be a simple way.
Attachments 1
1 file attached • Total size: 433.8 KB
In reply to Kvazar1211
User Avatar
#5400
Auto-translated
Kvazar1211
Good day. This question has probably been discussed before, but I don't have the energy to scroll through more than 300 pages of the forum. Please tell me:
The GSC creates mountains and other objects. How do I remove the orange surface underneath them? (It's visible when the Show All Passability button is pressed). The hero cannot move across this surface, and you cannot place buildings/dwellings (or rather, you can, but the entrance must be outside the orange zone). I really want to remove some of the randomly placed mountains and place a Dragon Utopia, etc. None of the tabs like PLATEAU, + - level (raise), lower (dig), smooth (smith), level (zero), eraser help. There must be a simple way.
These are masks; they create impassable tiles. But you can place objects on them. Masks should only be used to cover areas where bots/players should not be able to go at all. But if you need temporary impassability, you should use regions because you cannot remove a mask with a script.

Added 2 hours 19 minutes later
Hello! I saw a tutorial on creating hero specializations, like a custom ability, passive bonus, and a spell for killing your own troops... I became curious, is it possible to create a specialization like "Archers Commander": to buff the damage and armor of certain creatures (or all of them?) and also display an icon about this action on the appropriate creatures?
User Avatar
#5401
Auto-translated
At the beginning of the battle, you can apply certain effects/buffs to specific creatures or to all creatures. I haven't tested which buffs can be applied via script; **Waterfall** is more knowledgeable about this, as he has tested it.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________