function on_xml_read()
RegisterScriptCallback("on_xml_read", function(xml_file_name, xml_obj)
if xml_file_name == [[gameplay\character_desc_yantar.xml]] then
-- sakharov
local xml_inject = [[
redemption_storyline_1_1
redemption_storyline_1_4
redemption_storyline_2_5
redemption_storyline_3_1
redemption_storyline_3_5_illeon_alive
redemption_storyline_3_5_illeon_dead
redemption_storyline_4_1
redemption_storyline_5_1
redemption_storyline_6_2
redemption_storyline_lab_items
]]
local query_1_res = xml_obj:query("specific_character[id=yan_stalker_sakharov]")
local xml_elem = query_1_res[1]
xml_obj:insertFromXMLString(xml_inject, xml_elem, #xml_elem.kids)
elseif xml_file_name == [[gameplay\character_desc_bar.xml]] then
-- barman
local xml_inject = [[
redemption_storyline_2_1
redemption_storyline_2_3
redemption_storyline_4_2
redemption_storyline_4_5
redemption_storyline_4_6
redemption_storyline_5_9
]]
local query_1_res = xml_obj:query("specific_character[id=bar_visitors_barman_stalker_trader]")
local xml_elem = query_1_res[1]
xml_obj:insertFromXMLString(xml_inject, xml_elem, #xml_elem.kids)
-- voronin
local xml_inject2 = [[
redemption_storyline_5_3
redemption_storyline_5_6
redemption_storyline_6_3
]]
local query_1_res2 = xml_obj:query("specific_character[id=bar_dolg_leader]")
local xml_elem2 = query_1_res2[1]
xml_obj:insertFromXMLString(xml_inject2, xml_elem2, #xml_elem2.kids)
elseif xml_file_name == [[gameplay\character_desc_darkvalley.xml]] then
-- sultan
local xml_inject = [[
redemption_storyline_4_3
redemption_storyline_4_4
]]
local query_1_res = xml_obj:query("specific_character[id=zat_b7_bandit_boss_sultan]")
local xml_elem = query_1_res[1]
xml_obj:insertFromXMLString(xml_inject, xml_elem, #xml_elem.kids)
elseif xml_file_name == [[gameplay\character_desc_military.xml]] then
-- lukash
local xml_inject = [[
redemption_storyline_5_4
redemption_storyline_5_5
redemption_storyline_6_4
]]
local query_1_res = xml_obj:query("specific_character[id=mil_smart_terrain_7_7_freedom_leader_stalker]")
local xml_elem = query_1_res[1]
xml_obj:insertFromXMLString(xml_inject, xml_elem, #xml_elem.kids)
end
end)
end