--Global Mission Sequence Table...
Cmp_activity_seq = {}
function cmp_activity_init()
Cmp_specific_doc = vint_document_find("cmp_activity")
--Populate data...
vint_dataresponder_request("cmp_activity_success", "cmp_activity_populate", 0)
--Set sequence...
cmp_common_screen_set_data(Cmp_activity_seq)
end
function cmp_activity_cleanup()
if CMP_TEST_MODE then
debug_print("vint", "cleanup cmp_activity_cleanup()\n")
end
--game_peg_unload(Cmp_image)
end
function cmp_activity_first_frame()
--Do nothing
local h = vint_object_find("background_force_black", 0, Cmp_common_doc)
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 (Not used by cmp_common JMH, it is sent in as a paremeter 11/3/2010)
-- @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
-- @param district_pct_old District percent before...
-- @param district_pct_new District percent after...
-- @param district_cash_per_day Cash per day...
function cmp_activity_populate(unlockables_to_follow, mission_number, 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, district_pct_old, district_pct_new, district_cash_per_day, district_team_name, image)
--[[
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", "mission name = " .. var_to_string(mission_name).."\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")
debug_print("vint", "district_pct_old = " .. var_to_string(district_pct_new).."\n")
debug_print("vint", "district_pct_new = " .. var_to_string(district_pct_new).."\n")
debug_print("vint", "district_cash_per_day = " .. var_to_string(district_cash_per_day).."\n")
debug_print("vint", "district_team_name = " .. var_to_string(district_team_name).."\n")
]]
if image == nil or image == "" then
image = "ui_cmp_tank_mayhem"
end
-- Store our image name to global...
Cmp_image = image
--Callback with image...
game_peg_load_with_cb("cmp_common_image_loaded", 1, image)
Cmp_activity_seq[1].type = CMP_SCREEN_TITLE_INDEX
Cmp_activity_seq[1].title_string = mission_name
Cmp_activity_seq[1].image = image
Cmp_activity_seq[2].type = CMP_SCREEN_CASH_INDEX
Cmp_activity_seq[2].cash_reward = cash_reward
Cmp_activity_seq[2].cash_multiplier = cash_multiplier
Cmp_activity_seq[2].cash_reward_inc_multiplier = cash_reward_inc_multiplier
Cmp_activity_seq[3].respect_points_old = respect_points_old
Cmp_activity_seq[3].respect_pct_old = respect_pct_old
Cmp_activity_seq[3].respect_level_old = respect_level_old
Cmp_activity_seq[3].respect_points_new = respect_points_new
Cmp_activity_seq[3].respect_pct_new = respect_pct_new
Cmp_activity_seq[3].respect_level_new = respect_level_new
Cmp_activity_seq[3].respect_multiplier = respect_multiplier
Cmp_activity_seq[3].respect_points_multiplier = respect_points_multiplier
Cmp_activity_seq[3].respect_pct_multiplier = respect_pct_multiplier
Cmp_activity_seq[3].respect_level_multiplier = respect_level_multiplier
Cmp_activity_seq[4].district_pct_old = district_pct_old
Cmp_activity_seq[4].district_pct_new = district_pct_new
Cmp_activity_seq[4].district_cash_per_day = district_cash_per_day
Cmp_activity_seq[4].district_team_name = district_team_name
-- Cmp_activity_seq[4].district_pct_old = .22 --district_pct_new --.22
-- Cmp_activity_seq[4].district_pct_new = .325 --district_pct_new --.325
-- Cmp_activity_seq[4].district_cash_per_day = 3000 --district_cash_per_day -- 3000
-- Cmp_activity_seq[4].district_team_name = "Luchador" --"Luchador"
--Do we show rewards or not?
if unlockables_to_follow > 0 then
Cmp_activity_seq[5] = {}
Cmp_activity_seq[5].type = CMP_SCREEN_REWARD_INDEX
Cmp_activity_seq[5].rewards_count = unlockables_to_follow
else
--Swap out unlockables with Completion...
Cmp_activity_seq[5] = table_clone(Cmp_activity_seq[6])
Cmp_activity_seq[6] = nil
end
end
Cmp_activity_seq = {
[1] = {
type = CMP_SCREEN_TITLE_INDEX,
title_string = "DEATH AT SMILING JACKS",
image = 0,
on_start = cmp_activity_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_CONTROL_INDEX,
on_start = nil,
district_pct_old = .22,
district_pct_new = .325,
district_cash_per_day = 3000,
district_team_name = "Luchador",
},
[5] = {
type = CMP_SCREEN_REWARD_INDEX,
rewards_count = 0
},
[6] = {
type = CMP_SCREEN_COOP_WAIT_INDEX,
},
}