--Global Mission Sequence Table...
Cmp_mission_seq = {}
function cmp_mission_init()
Cmp_specific_doc = vint_document_find("cmp_mission")
--Populate data...
vint_dataresponder_request("cmp_mission_success", "cmp_mission_populate", 0)
--Set sequence...
cmp_common_screen_set_data(Cmp_mission_seq)
end
function cmp_mission_cleanup()
-- if true then
-- debug_print("vint", "cleanup cmp_mission_cleanup()\n")
-- end
end
function cmp_mission_first_frame()
local h = vint_object_find("background_force_black", 0, Cmp_common_doc)
vint_object_destroy(h)
-- vint_set_property(h, "visible", true)
-- local h = vint_object_find("background_base", 0, Cmp_common_doc)
-- vint_set_property(h, "background", false)
end
-------------------------------------------------------------
--Populates the script from the dataresponder...
-------------------------------------------------------------
-- @param mission_name This is the mission name... "DEATH AT SMILING JACKS"
-- @param layout "Left" or "Right" formats
-- @param num_unlockables_to_follow # of unlockables in the mission flow... ? not sure if this is relevant at this stage... I have no problem doing the unlockable data_responder once and logging all the data from the game.
-- @param cash_reward This is the cash reward... "4000"
-- @param cash_multiplier Multiplier for cash "4.0"
-- @param cash_reward_inc_multiplier Cash_reward with the multiplier... "12000" (This could be calculated internally)
-- @param respect_points_old Respect points before...
-- @param respect_pct_old Respect percentage before...
-- @param respect_level_old Respect level before...
-- @param respect_points_new Respect points after...
-- @param respect_pct_new Respect percent after...
-- @param respect_level_new Respect level after...
-- @param respect_multiplier Respect multiplier "2.0"
-- @param respect_points_multiplier Respect points after multiplier
-- @param respect_pct_multiplier Respect percent after multiplier
-- @param respect_level_multiplier Respect level after multiplier
function cmp_mission_populate(unlockables_to_follow, mission_internal_name, mission_name, layout, cash_reward, cash_multiplier, cash_reward_inc_multiplier, respect_points_old, respect_pct_old, respect_level_old, respect_points_new, respect_pct_new, respect_level_new, respect_multiplier, respect_points_multiplier, respect_pct_multiplier, respect_level_multiplier)
--[[
debug_print("vint", "unlockable# = " .. var_to_string(unlockables_to_follow).."\n")
debug_print("vint", "mission number = " .. var_to_string(mission_number).."\n")
debug_print("vint", "layout number = " .. var_to_string(layout).."\n")
debug_print("vint", "cash_reward" .. var_to_string(cash_reward).."\n")
debug_print("vint", "cash_multiplier = " .. var_to_string(cash_multiplier).."\n")
debug_print("vint", "cash_reward_inc_multiplier = " .. var_to_string(cash_reward_inc_multiplier).."\n")
debug_print("vint", "respect_points_old = " .. var_to_string(respect_points_old).."\n")
debug_print("vint", "respect_pct_old = " .. var_to_string(respect_pct_old).."\n")
debug_print("vint", "respect_level_old = " .. var_to_string(respect_level_old).."\n")
debug_print("vint", "respect points_new = " .. var_to_string(respect_points_new).."\n")
debug_print("vint", "respect_pct_new = " .. var_to_string(respect_pct_new).."\n")
debug_print("vint", "respect_level_new = " .. var_to_string(respect_level_new).."\n")
debug_print("vint", "respect_multiplier = " .. var_to_string(respect_multiplier).."\n")
debug_print("vint", "respect_points_multiplier = " .. var_to_string(respect_points_multiplier).."\n")
debug_print("vint", "respect_pct_multiplier = " .. var_to_string(respect_pct_multiplier).."\n")
debug_print("vint", "respect_level_multiplier = " .. var_to_string(respect_level_multiplier).."\n")
]]
Cmp_mission_seq[1].type = CMP_SCREEN_TITLE_INDEX
Cmp_mission_seq[1].title_string = mission_name
Cmp_mission_seq[1].mission_internal_name = mission_internal_name
Cmp_mission_seq[2].type = CMP_SCREEN_CASH_INDEX
Cmp_mission_seq[2].cash_reward = cash_reward
Cmp_mission_seq[2].cash_multiplier = cash_multiplier
Cmp_mission_seq[2].cash_reward_inc_multiplier = cash_reward_inc_multiplier
Cmp_mission_seq[3].respect_points_old = respect_points_old
Cmp_mission_seq[3].respect_pct_old = respect_pct_old
Cmp_mission_seq[3].respect_level_old = respect_level_old
Cmp_mission_seq[3].respect_points_new = respect_points_new
Cmp_mission_seq[3].respect_pct_new = respect_pct_new
Cmp_mission_seq[3].respect_level_new = respect_level_new
Cmp_mission_seq[3].respect_multiplier = respect_multiplier
Cmp_mission_seq[3].respect_points_multiplier = respect_points_multiplier
Cmp_mission_seq[3].respect_pct_multiplier = respect_pct_multiplier
Cmp_mission_seq[3].respect_level_multiplier = respect_level_multiplier
if unlockables_to_follow > 0 then
Cmp_mission_seq[4] = {}
Cmp_mission_seq[4].type = CMP_SCREEN_REWARD_INDEX
Cmp_mission_seq[4].rewards_count = unlockables_to_follow
else
Cmp_mission_seq[4] = Cmp_mission_seq[5]
Cmp_mission_seq[5] = nil
end
end
Cmp_mission_seq = {
[1] = {
type = CMP_SCREEN_TITLE_INDEX,
title_string = "DEATH AT SMILING JACKS",
on_start = cmp_mission_first_frame,
},
[2] = {
type = CMP_SCREEN_CASH_INDEX,
cash_reward = 20000,
cash_multiplier = 45,
cash_reward_inc_multiplier = 38000,
on_start = nil,
},
[3] = {
type = CMP_SCREEN_RESPECT_INDEX,
on_start = nil,
respect_points_old = 200,
respect_pct_old = .4,
respect_level_old = 2,
respect_points_new = 2000,
respect_pct_new = .5,
respect_level_new = 3,
respect_multiplier = 40,
respect_points_multiplier = 2000,
respect_pct_multiplier = .5,
respect_level_multiplier =5,
},
[4] = {
type = CMP_SCREEN_REWARD_INDEX
},
[5] = {
type = CMP_SCREEN_COOP_WAIT_INDEX,
},
}