I've managed to sort the issue now anyway. Had my section in bind_stalker all wrong. Works a treat now. Will test it thoroughly, maybe even have traders sell the repair kits as well, which is something I didn't implement in SoC. Then I'll upload it to filefront.
---QUOTATION--- So any ideas anyone? It all seems to work apart from the fact that using a repair kit doesn't repair anything. The script was designed for SoC, maybe repairs work differently in CS?
I had to stop playing the game. I just got into Limansk with a broken gun and no armour left. With no engineers around to repair my stuff I'm dead meat - can't reach the hospital. This is why I started adapting my repair mod from SoC. So I need this mod to work so I can carry on playing. ---END QUOTATION---
There is a CS guy who does repairs in Limansk, Isn't there?
Everything you want to know about Degtarev's zone is in the: COP Survival guidehttp://cop.zsg.dk/
So any ideas anyone? It all seems to work apart from the fact that using a repair kit doesn't repair anything. The script was designed for SoC, maybe repairs work differently in CS?
I had to stop playing the game. I just got into Limansk with a broken gun and no armour left. With no engineers around to repair my stuff I'm dead meat - can't reach the hospital. This is why I started adapting my repair mod from SoC. So I need this mod to work so I can carry on playing.
My bad, I left out the font_prefix in the localisation.
The game now loads but killing someone crashes the game. I guess because the repair kit should then appear in the dead NPC's inventory (from death_items...).
EDIT
I'm an idiot. I also specified the wrong ogf in items.ltx.
While the game no longer crashes I'm not seeing any repair kits on dead bodies. The visual for it was equipments\item_merger.ogf but CS doesn't recognise this old SoC ogf file so I used dynamics\devices\dev_vodka\dev_vodka.ogf instead. Didn't think it would matter considering you can't drop the repair kits so it does not need a model. If it HAS to be item_merger.ogf what's the CS equivalent?
EDIT
Okay, it's working now. I wasn't killing enough NPC's to find any kits, had to set the probability very high to get one. Unfortunately using one doesn't repair anything!
So I'm trying to adapt my repair mod from SoC into CS but it seems it isn't that easy. The mod is actually a modified Autologic repair mod which was based on...someone else's, sorry I've forgotten who that was!
I believe it to be either the scripts that are causing the game not to load or the localisation file.
The vanilla localisation file does not contain any file look-ups (like string_table_general etc). I've got just this:
[string_table]
language = eng
files = string_table_repair_kit
The script on the other hand is probably the culprit as it is configured for SoC's weapon slots. CS is different so what needs to change?
function itemuse(what)
local obj_name = what:name()
if (string.find(obj_name, "repair_kit")) then
use_repair_kit(what)
end
end
function use_repair_kit(what)
local repair_slot_num = 0
local item_in_slot_1 = db.actor:item_in_slot(1)
local item_in_slot_2 = db.actor:item_in_slot(2)
local item_in_slot_6 = db.actor:item_in_slot(6)
if (item_in_slot_1 ~= nil) then
repair_slot_num = 1
end
if (item_in_slot_2 ~= nil) then
if (repair_slot_num == 0) then
repair_slot_num = 2
elseif (repair_slot_num == 1) then
if (item_in_slot_1:condition() > item_in_slot_2:condition()) then
repair_slot_num = 2
end
end
end
if (item_in_slot_6 ~= nil) then
if (repair_slot_num == 0) then
repair_slot_num = 6
elseif (repair_slot_num == 1) then
if (item_in_slot_1:condition() > item_in_slot_6:condition()) then
repair_slot_num = 6
end
elseif (repair_slot_num == 2) then
if (item_in_slot_2:condition() > item_in_slot_6:condition()) then
repair_slot_num = 6
end
end
end
if (repair_slot_num == 1) then
local rep_point = item_in_slot_1:condition() + 0.5
if (rep_point > 1) then
rep_point = 1
end
item_in_slot_1:set_condition(rep_point)
elseif (repair_slot_num == 2) then
local rep_point = item_in_slot_2:condition() + 0.5
if (rep_point > 1) then
rep_point = 1
end
item_in_slot_2:set_condition(rep_point)
elseif (repair_slot_num == 6) then
local rep_point = item_in_slot_6:condition() + 0.5
if (rep_point > 1) then
rep_point = 1
end
item_in_slot_6:set_condition(rep_point)
end
end