Create a list of Essential NPCs who won't die. But they can be wounded if they get hurt. Like companions in Fallout or Skyrim. Tested for 1.5.1 but should work on others.
This addon allows you to create a list of Essential NPCs who cannot be killed and who ignore friendly fire from you and your companions (thanks to RavenAscendant for showing me the draftsman code snippets).
By default, only Hip is essential!
Note about languages!
If you have English version of the game, then the name should be written in English, and if it is Russian, then in Russian.If you write "Хип" in russian version of game, it will work.
Add more NPCs to the list by following examples below, you must put comma after the name if you want to add more, but leave last one without a comma:
local importantNPCs = {
"Hip"
}
or Russian:
local importantNPCs = {
"Хип"
}
or for multiple NPCs, like:
local importantNPCs = {
"Hip",
"Dima Hangman",
"Wolf"
}
So by default, only Hip is affected, but you can add any NPC (Yes, including your companions!)
If you don't want to use my Companions Don't Die mod but want to protect Hip or some other Stalkers you like, you can use this. If you want both, you can simply delete my other mod, and add the name of your companion (e.g like Dima Hangman) to the table called importantNPCs like I explained above.
I do not suggest you use both mods - if you want some NPCs AND your companions to not die, use this mod. If you just want your own companions to not die, use Companions Don't Die.
спасибо, ато надоело
Полезный мод
Doesn't work absolutely! Although before that your mod "Companions Don't Die" was installed and it worked perfectly. At the moment I have a "hip" companion and when I shoot at her she dies. Uncomment the wolf, shoot him - he also died. It's a pity, I was waiting for this mod, I just wanted to make the "hip" immortal.:(((
What edits did you make to the script?
Already figured it out. It turns out that the name needs to be entered in the language in which the game is running. If there is an English version of the game, then the name should be written in English, and if it is Russian, then in Russian. I have a Russian version. Wrote "Хип" - it worked.
I think we need to add this to the description of the mod.
Good idea!
I edited the description to show Russian version, you think it looks ok?
Ok, but need to clarify that this is only for the Russian version of the game.
i have the same, not work, can they all kill. use engl., but rus work too not.
I tryed this out since my merc contacts keep wandering out and dying from mutants, It's working for me. Thank you for this mod :)
Добавь в список Фургона с Кордона, а то его постоянно бандиты убивают
I'm trying to add Noah to the immortal list, but he's still dying to mercs all the time :(
For some reason, whenever the military from the south camp attack the rookie village and the military repairman dies, my game crashes. I'm gonna try installing this to my game and see if it solves the crashing by not having him able to get killed...though I hope he doesn't wander into the rookie village or it's gonna be a massacre
i dont quite understand the instructions for adding NPCs to the list, or rather, where exactly to add them, like, is it in the ingame console or...?
Скачал этот аддон, потому что Фанат и Хип уходили из деревни и умирали в самом начале игры
Написал в скрипте:
local importantNPCs = {
"Хип",
"Фанат",
"Волк"
}
Но Фанат всё равно умирает, когда я бью его ножом. Хип не проверял.
Установил мод, также попробовал - и сам её убить могу, и через дебаг меню проверил - она умерла с пары выстрелов военного. Явно что-то работает не так, хотя, кажется, всё по инструкции.
--
Eng: We complain about mod not working properly. Both me and One_Two have the same issue: on the Russian version of the game, it just doesn't affect listed NPCs, e.g. they die as usual.
I've spawned an army squad, and one soldier killed Hip in few shots. Same for damage taken from the player.
UPD: just checked this out. On the English version, everything is okay. But on Russian, it stops working. I've checked Hip's name with the debugger, it states "Хип" and that's what typed in the script in the first line where the names should be listed.
Слушай, зашёл в папку config/scripts/escape, там лежат файлы с названиями типа fanat, wolf и т.д.
Так вот если открыть такой файл (того же Фаната), там есть секция invulnerable = false. Попробуй заменить false на true, вдруг выгорит. Я сейчас этим заняться не смогу, только в понедельник.
проверил, у меня не сработало - всё так же смертные (проверял на Хип)
Неужели я нашёл решение. После трёх дней мучений, виновник найден.
Как я и подозревал, проблема в кодировке. Скриптовые файлы с Кириллицей надо открывать и редактировать в кодировке Windows 1251. По умолчанию же они открываются в кодировке Utf-8 (по крайней мере, у меня).
Решение проблемы:
0) Вы можете скачать готовую версию этого мода для русской версии игры, где уже сделаны бессмертными Хип и Стрелок, также можете расскомментировать/удалить лишние строки.
Drive.google.com
ИЛИ
1) Открыть файл immortal_important_npcs.script каким-нибудь продвинутым текстовым редактором. (Лично я использую бесплатный и удобный для этого дела VS Code от Microsoft, объясню на его примере).
Code.visualstudio.com
2) В редакторе, справа снизу, в строке фиолетового цвета будут надписи: UTF-8 и Plain Text. Первое - это кодировка, второе - режим подсветки синтаксиса, по умолчанию - обычный текст. Нас интересует надпись UTF-8. Нажимаем на неё.
3) В появившейся строке [Select Action] нажимаем на Reopen with encoding. Вводим 1251 и тыкаем на появившийся вариант "Cyrillic (Windows 1251)".
4) Если всё сделали правильно, в переменной local importantNPCs = { ... } строки русскоязычные, если вы их уже вводили, изменятся на кракозябры. Если там их не было, ничего не поменяется. В любом случае, сейчас вы должны ввести имена важных NPC, которых хотите сделать бессмертными, как указано в шапке мода, например:
local importantNPCs = {
"Хип",
"Стрелок",
"Фанат",
"Волк"
}
После того, как ввели, нажимаем снова на кодировку (теперь там написано Windows 1251), выбираем "Save with encoding", снова выбираем "Cyrillic (Windows 1251)".
Поздравляю! Вы великолепны. Проверил на своей версии, всё заработало.
5)* Бонус-уровень. В будущем, для редактирования файлов игры, рекомендую использовать установленный редактор. В нём, в разделе расширения (4 кубика в тулбаре сбоку) вводим Russian Language, устанавливаем самый верхний пак, применяем. Также вводим Lua, в самом вверху будет Lua Language Server, устанавливаем. Теперь при октрытии .script файлов будет удобная подсветка синтаксиса, а не серые буквы на сером фоне, и вы сможете просто и понятно редактировать файлы игры.
Удачи в зоне, сталкеры!
Eng: I've found a problem solution for this addon not working on the Russian version of the game. In short, there's a problem with encoding: it seems the game uses Windows 1251 encoding for Cyrillic symbols, and by default file immortal_important_npcs.script is saved in utf-8 (Unicode). Hence when we type something in Russian, for the game string "Хип" looks like "РҐРёРї" (I've got this by saving string "Хип" in utf-8 and reopening with Win 1251).
The solution is simple: open the file in Win 1251 encoding, type NPCs names, and save in this same encoding. I've used the Visual Studio Code editor for this. I recommend the author add two folders for -eng and -rus versions of the game with preset names in the Win 1251 encoding file for the Russian version, which I may provide.
UPD: here's the link for the Russian version of the mod already saved in Windows 1251 encoding, with immortal Hip and Strelok: Drive.google.com
Спасибо, попробую поставить твою правку.
Спасибо огроменное, все работает.
Thank you very much, works like a charm.
I wish it was working but nah, Mangun is supposed to be invincible but 3 bullets were enough to kill him. Is that normal ? (I use English for the game and the file was set for English name too)
Can someone please tell me how I can activate this for "Sloglav", is it in the debug mode or the console? Someone please explai this to me
I can't add to the list anyone with a "" in their name (e.g. Aspirin and Magnum in Rostok)
Hey, thanks for the work.
Is it possible to make it work with Grok's Ballistic Overhaul? When both installed everyone from the list in the script dieing very well. I checked this issue with clean Anomaly with only these two addons.
Thank you.
Hello, first of all, thanks for your work with this Addon
Now my query is ... Is there a complete list of important characters to add?
I am a super rookie in this and I would not like me to die any important character, but I have no idea who are ...
Thanks in Advance.
Is there anyway to make certain NPCs not immortal? Like Gatekeeper and ppl at rookie village. I dont wanna kill Sid or Barman.
I think one should be able to completely wipe out a camp.
This comment is currently awaiting admin approval, join now to view.
This comment is currently awaiting admin approval, join now to view.
This comment is currently awaiting admin approval, join now to view.
Doesn't work