Divergent/mods/Redone Limansk and Hospital/gamedata/scripts/modxml_greh_dialogs_dxml.sc...

111 lines
3.4 KiB
Plaintext
Raw Permalink Normal View History

2024-03-17 20:18:03 -04:00
function on_xml_read()
RegisterScriptCallback("on_xml_read", function(xml_file_name, xml_obj)
local xml_to_change = [[gameplay\dialogs_redforest.xml]]
if xml_file_name == xml_to_change then
local greh_guide_dialogs = [[
<dialog id="red_greh_guide_start">
<phrase_list>
<phrase id="0">
<text>red_greh_guide_start_dialog_1</text>
</phrase>
</phrase_list>
</dialog>
<dialog id="meet_red_greh_guide">
<dont_has_info>meet_red_greh_guide_over</dont_has_info>
<phrase_list>
<phrase id="0">
<text>meet_red_greh_guide_0</text>
<next>1</next>
</phrase>
<phrase id="1">
<text>meet_red_greh_guide_1</text>
<give_info>meet_red_greh_guide_over</give_info>
</phrase>
</phrase_list>
</dialog>
<dialog id="meet_red_greh_guide_list">
<has_info>meet_red_greh_guide_over</has_info>
<phrase_list>
<phrase id="0">
<text>meet_red_greh_guide_list_0</text>
<next>1</next>
</phrase>
<phrase id="1">
<text>meet_red_greh_guide_list_1</text>
</phrase>
</phrase_list>
</dialog>
<dialog id="travel_red_greh_guide">
<precondition>greh_dialogs_mlr_redone.have_money_to_redforest_guid_redforest</precondition>
<has_info>meet_red_greh_guide_over</has_info>
<phrase_list>
<phrase id="0">
<text>travel_red_greh_guide_0</text>
<next>1</next>
</phrase>
<phrase id="1">
<text>travel_red_greh_guide_1</text>
<next>2</next>
<next>3</next>
<next>4</next>
<next>5</next>
</phrase>
<phrase id="2">
<text>travel_red_greh_guide_2</text>
<precondition>greh_dialogs_mlr_redone.have_money_to_redforest_guid_redforest</precondition>
<action>greh_dialogs_mlr_redone.sell_money_to_redforest_guid_redforest</action>
<action>greh_dialogs_mlr_redone.redforest_guid_redforest</action>
<action>dialogs.break_dialog</action>
</phrase>
<phrase id="3">
<text>travel_red_greh_guide_3</text>
<precondition>greh_dialogs_mlr_redone.have_money_to_pripyat_guid_redforest</precondition>
<action>greh_dialogs_mlr_redone.sell_money_to_pripyat_guid_redforest</action>
<action>greh_dialogs_mlr_redone.pripyat_guid_redforest</action>
<action>dialogs.break_dialog</action>
</phrase>
<phrase id="4">
<text>travel_red_greh_guide_4</text>
<precondition>greh_dialogs_mlr_redone.have_money_to_outskirts_guid_redforest</precondition>
<action>greh_dialogs_mlr_redone.sell_money_to_outskirts_guid_redforest</action>
<action>greh_dialogs_mlr_redone.outskirts_guid_redforest</action>
<action>dialogs.break_dialog</action>
</phrase>
<phrase id="5">
<text>travel_red_greh_guide_5</text>
</phrase>
</phrase_list>
</dialog>
<dialog id="red_greh_guide_background">
<phrase_list>
<phrase id="0">
<text>dm_dialog_character_history</text>
<next>1</next>
</phrase>
<phrase id="1">
<text>red_greh_guide_background_1</text>
<next>2</next>
</phrase>
<phrase id="2">
<text>red_greh_guide_background_2</text>
<next>3</next>
</phrase>
<phrase id="3">
<text>red_greh_guide_background_3</text>
<next>4</next>
</phrase>
<phrase id="4">
<text>red_greh_guide_background_4</text>
<give_info>greh_guide_st</give_info>
</phrase>
</phrase_list>
</dialog>
]]
xml_obj:insertFromXMLString(greh_guide_dialogs)
end
end)
end