68 lines
3.0 KiB
Plaintext
68 lines
3.0 KiB
Plaintext
|
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 = [[
|
||
|
<actor_dialog>redemption_storyline_1_1</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_1_4</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_2_5</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_3_1</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_3_5_illeon_alive</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_3_5_illeon_dead</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_4_1</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_5_1</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_6_2</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_lab_items</actor_dialog>
|
||
|
]]
|
||
|
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 = [[
|
||
|
<actor_dialog>redemption_storyline_2_1</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_2_3</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_4_2</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_4_5</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_4_6</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_5_9</actor_dialog>
|
||
|
]]
|
||
|
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 = [[
|
||
|
<actor_dialog>redemption_storyline_5_3</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_5_6</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_6_3</actor_dialog>
|
||
|
]]
|
||
|
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 = [[
|
||
|
<actor_dialog>redemption_storyline_4_3</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_4_4</actor_dialog>
|
||
|
]]
|
||
|
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 = [[
|
||
|
<actor_dialog>redemption_storyline_5_4</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_5_5</actor_dialog>
|
||
|
<actor_dialog>redemption_storyline_6_4</actor_dialog>
|
||
|
]]
|
||
|
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
|