Peacock/static/FrankensteinPlanningTemplat...

17824 lines
3.0 MiB

{
"$setpageargs": {
"DisableChallengesMasteryHandling": true
},
"pageisclosable": true,
"metricscontext": {
"contractid": "$.Contract.Metadata.Id",
"location": "$.Contract.Metadata.Location"
},
"buttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT"
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK"
}
],
"onpageopened": {
"$mergeobjects": [
{
"show-background-layers": {
"show-background": {
"$if $arg _isingame": {
"$then": false,
"$else": true
}
},
"showMenuTabsUnderlay": true,
"show-world-map": false,
"show-overlay": false
},
"set-background": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.Contract.Metadata.Type,usercreated)",
"$eqs ($.Contract.Metadata.Type,creation)",
"$eqs ($.Contract.Metadata.Type,featured)",
"$isnull $.Contract.Metadata.TileImage"
]
},
"$then": "$res $.Location.Properties.Icon",
"$else": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": ["$.GameMode"]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
}
}
},
"emit-sound-signal": {
"$setup": {
"$set CurrentDifficulty": {
"$if $stringvalid $.Contract.Metadata.Difficulty": {
"$then": "$.Contract.Metadata.Difficulty",
"$else": "normal"
}
},
"$in": {
"signal-name": "$formatstring SET_DIFFICULTY_{$.CurrentDifficulty}"
}
}
}
},
{
"$use $.UserCentric": {
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
},
{
"$if": {
"$condition": {
"$and": [
"$not $isnull $.PaymentDetails",
"$not $arg IsMultiplayerContract"
]
},
"$then": {
"set-payout-data": {
"header": "Payout",
"value": "$.PaymentDetails.Amount"
},
"set-account-data": {
"header": "Account",
"value": "$.Currency.Balance"
}
},
"$else": {
"set-payout-data": {},
"set-account-data": {}
}
}
}
]
},
"onpageclosed": {
"set-mastery-data": {},
"set-payout-data": {}
},
"body": {
"$setupcomponents": {
"difficulty-manager": {
"always-reload-setup": true,
"setup": {
"difficulty": "$.Contract.Metadata.Difficulty"
}
}
},
"_comment": "do not change - id is used in PlanningButtons.json!",
"id": "planning_root",
"controller": "list",
"direction": "horizontal",
"actions": {
"cancel": {
"$if": {
"$condition": {
"$and": ["$arg multiplayer", "$arg _isingame"]
},
"$then": {
"$setup": {
"$set Trigger": "on-cancel",
"$in": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_MENU_LOBBY_MODAL_QUIT_MULTIPLAYER_BUTTON_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_LOBBY_MODAL_QUIT_MULTIPLAYER_TITLE",
"description": "$loc UI_MENU_LOBBY_MODAL_QUIT_MULTIPLAYER_LEAVEPAGE_DESC",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"trigger-action": {
"name": "$.Trigger"
}
}
]
}
}
}
},
"$else": {
"trigger-action": {
"name": "on-cancel"
}
}
}
},
"on-cancel": {
"$if $arg backtomainmenu": {
"$then": {
"$if": {
"$condition": {
"$and": ["$arg multiplayer", "$arg _isingame"]
},
"$then": {
"exit-to-main-menu": {},
"notify-replan-level": {}
},
"$else": {
"show-modal": {
"config": {
"type": "system",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "$loc UI_DIALOG_CONFIRM_EXIT_TO_MENU"
}
},
"onbutton": [
{
"exit-to-main-menu": {},
"notify-replan-level": {}
}
]
}
}
}
},
"$else": {
"request-back": {}
}
}
},
"action-y": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"link": {
"page": "report",
"args": {
"url": "report",
"args": {
"contractid": "$arg contractid"
},
"contractid": "$arg contractid",
"contracttitle": "$.Contract.Metadata.Title"
}
}
}
},
{
"case": "escalation",
"return": {
"$if": {
"$condition": {
"$and": [
"$not $.IsFirstInGroup",
"$not $arg _isingame"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_RESET_ESCALATION_TITLE",
"description": "$loc UI_DIALOG_RESET_ESCALATION_DESCRIPTION"
}
},
"onbutton": [
{
"$merge": [
{
"alter-history": {
"target": "destination",
"force-no-cache": true
}
},
{
"alter-history": {
"target": "hub",
"force-no-cache": true
}
},
{
"delete-current-page-from-history": {}
},
{
"link": {
"page": "planning",
"addtohistory": true,
"args": {
"url": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id",
"resetescalation": true
}
}
}
}
]
}
]
}
},
"$else": null
}
}
}
]
}
},
"children": [
{
"stateproviders": [
{
"type": "elusivetargetavailability",
"contract": "$.Contract"
},
{
"$if": {
"$condition": {
"$and": [
"$arg multiplayer",
"$not $arg _isingame"
]
},
"$then": {
"type": "multiplayerlobby"
}
}
}
],
"selectable": false,
"pressable": false,
"actions": {
"on-contract-playable": {
"refresh-page": {}
},
"on-contract-missed": {
"refresh-page": {}
},
"lobby-state-changed": {
"$notransform": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.state,lobby-state-awaiting-player-ready)",
"$eqs ($.state,lobby-state-player-ready)",
"$eqs ($.state,lobby-awaiting-game-start)"
]
},
"$then": {
"alter-actions": {
"target": "planning_root",
"path": "cancel",
"value": {
"$setup": {
"$set Trigger": "on-cancel",
"$in": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_MENU_LOBBY_MODAL_QUIT_MULTIPLAYER_BUTTON_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_LOBBY_MODAL_QUIT_MULTIPLAYER_TITLE",
"description": "$loc UI_MENU_LOBBY_MODAL_QUIT_MULTIPLAYER_LEAVEPAGE_DESC",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"trigger-action": {
"name": "$.Trigger"
}
}
]
}
}
}
}
}
},
"$else": {
"alter-actions": {
"target": "planning_root",
"path": "cancel",
"value": {
"trigger-action": {
"name": "on-cancel"
}
}
}
}
}
}
}
}
},
{
"controller": "group",
"id": "headline_container",
"row": 4.25,
"col": 0,
"selectable": false,
"pressable": false,
"_comment": "the container that will hold the HeadlineElement. It will show info on whatever item is selected",
"children": {
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"controller": "group",
"id": "escalation_level_headline_container",
"row": 4.25,
"col": 0,
"selectable": false,
"pressable": false,
"_comment": "the container that will hold the Escalation_Level_Headline. It will show info which Level of Escalation the Player is currently on"
}
},
{
"default": {
"id": "escalation_level_headline_container",
"pressable": false,
"selectable": false
}
}
]
},
{
"controller": "list",
"id": "category_container",
"showpressableprompt": false
},
{
"view": "menu3.containers.ScrollingTabsContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal",
"buttonprompts": [
{
"actiontype": ["lb", "rb"],
"actionlabel": "$loc UI_BUTTON_PROMPTS_BROWSE_CATEGORIES"
}
],
"topnavigation": {
"header": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"title": {
"$if $arg contract-creation": {
"$then": "$loc $.Contract.Metadata.Title",
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": "$.Contract.Metadata.Title"
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
}
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
},
"ncols": 10,
"controller": "category",
"handleback": false,
"container": "category_container",
"children": [
{
"view": "menu3.basic.CategoryElement",
"id": "category_background",
"showpressableprompt": false,
"data": {
"header": "$loc $.Contract.Metadata.Title",
"title": "$loc UI_BRIEFING_TITLE",
"icon": "background"
},
"buttons": [
{
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_REPORT_CONTRACT"
}
},
{
"case": "escalation",
"return": {
"$if": {
"$condition": {
"$and": [
"$not $.IsFirstInGroup",
"$not $arg _isingame"
]
},
"$then": {
"actiontype": "action-y",
"actionlabel": "$loc UI_MENU_PAGE_TITLE_RESET_ESCALATION"
},
"$else": null
}
}
}
]
}
],
"actions": {
"select": {
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"replace-children": {
"target": "escalation_level_headline_container",
"children": {
"view": "menu3.basic.HeadlineEscalationLevelAddon",
"data": {
"completedlevels": "$.GroupData.CompletedLevels",
"totallevels": "$.GroupData.TotalLevels",
"completed": "$.GroupData.Completed"
}
}
}
}
}
]
},
"contextpopped": {
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
},
"children": {
"controller": "list",
"view": "menu3.containers.ScrollingListContainer",
"id": "planning_scroll_container",
"row": 1,
"nrows": 3,
"ncols": 10,
"direction": "horizontal",
"data": {
"direction": "horizontal"
},
"children": {
"$setup": {
"$set show": {
"$switch $.Contract.Metadata.Type": [
{
"case": "elusive",
"return": {
"$if $iscontractplayable $.Contract": {
"$then": {
"$switch $.ElusiveContractState": [
{
"case": "not_completed",
"return": true
},
{
"default": false
}
]
},
"$else": false
}
}
},
{
"default": true
}
]
},
"$set contract": "$.Contract",
"$in": {
"$merge": [
{
"$if $.show": {
"$then": {
"controller": "list",
"view": "menu3.containers.ListContainer",
"direction": "vertical",
"groupselect": true,
"data": {
"direction": "vertical"
},
"children": [
{
"id": "briefing_button",
"view": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": "menu3.basic.ButtonTileLarge"
},
{
"case": "sniper",
"return": "menu3.basic.ButtonTileSmall"
},
{
"case": "escalation",
"return": {
"$if $arg _isingame": {
"$then": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileXSmall"
},
{
"default": "menu3.basic.ButtonTileSmall"
}
]
},
"$else": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
}
},
{
"default": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
]
},
"showpressableprompt": false,
"data": {
"showningame": {
"$if $arg _isingame": {
"$then": true,
"$else": false
}
},
"title": "$loc UI_MAP_LEGEND_LABEL_GENERAL_OBJECTIVES",
"buttonnumber": "1",
"icon": "objective"
},
"actions": {
"on-selected-in-group": {
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
}
},
"select": {
"hide-node": [
"planningpage",
"playpage"
],
"show-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-selectable": {
"planningpage": false,
"objectivepage": true,
"playpage": false
},
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
},
"replace-children": {
"target": "headline_container",
"children": [
{
"$use $.UserCentric": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"title": "$loc UI_CONTRACT_NO_ACCESS_UGC_DESCRIPTION",
"typeicon": "contract"
}
},
"$else": {
"$setup": {
"$set Tags": {
"$sm:createtags": {
"id": "$.Contract.Metadata.Id",
"tags": "$.Data.MatchingTags"
}
},
"$in": {
"view": {
"$if $($arraysize $.Tags)": {
"$then": "menu3.basic.HeadlineWithTags",
"$else": "menu3.basic.HeadlineElement"
}
},
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$($user $.Contract.Metadata.CreatorUserId).name",
"publicid": "$formatpublicid $.Contract.Metadata.PublicId",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type",
"tags": "$.Tags"
},
"stateproviders": [
{
"type": "userresolution",
"target": "creatorname",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
]
}
}
}
}
}
},
{
"case": "featured",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc UI_MENU_PAGE_HUB_FEATURED",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type"
}
}
},
{
"case": "tutorial",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City} "
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "mission",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "flashback",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": {
"$if $not $.Data.IsFreeDLC": {
"$then": "$loc UI_CONTRACT_HEADER_SEASONAL",
"$else": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}"
}
},
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "campaign",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $.Contract.Metadata.GroupTitle",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "sniper",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set GameModeName": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.GameMode,singleplayer)",
"$eqs ($.GameMode,multiplayer)"
]
},
"$then": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "$formatstring / {$loc UI_MENU_GAME_MODE_MULTIPLAYER}",
"$else": "$formatstring / {$loc UI_MENU_GAME_MODE_SINGLE_PLAYER}"
}
},
"$else": ""
}
},
"$in": "$formatstring {$.City}{$.GameModeName}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"default": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
}
]
}
}
]
}
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
}
}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Contract.Metadata.Type,tutorial)",
{
"$if": {
"$condition": {
"$and": [
"$not $isnull $.Contract.Data.MandatoryLoadout",
"$not $eqs ($.Contract.Metadata.Type,sniper)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": {
"selectable": false,
"pressable": false
},
"$else": {
"id": "planning_button",
"view": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": "menu3.basic.ButtonTileLarge"
},
{
"case": "sniper",
"return": "menu3.basic.ButtonTileSmall"
},
{
"case": "escalation",
"return": {
"$if $arg _isingame": {
"$then": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileXSmall"
},
{
"default": "menu3.basic.ButtonTileSmall"
}
]
},
"$else": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
}
},
{
"default": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
]
},
"showpressableprompt": false,
"data": {
"showningame": {
"$if $arg _isingame": {
"$then": true,
"$else": false
}
},
"title": {
"$if $eqs ($.Contract.Metadata.Type,sniper)": {
"$then": {
"$if $not $arg multiplayer": {
"$then": "$loc UI_MENU_PAGE_TITLE_PLANNING_SNIPER",
"$else": "$loc UI_MENU_PAGE_TITLE_PLANNING_SNIPER_MULTIPLAYER"
}
},
"$else": "$loc UI_MENU_PAGE_TITLE_PLANNING"
}
},
"buttonnumber": "2",
"icon": "planning"
},
"buttons": [
{
"$if": {
"$condition": {
"$and": [
"$isnull $.Contract.Data.MandatoryLoadout",
"$not $eqs ($.Contract.Metadata.Type,sniper)"
]
},
"$then": {
"actiontype": "action-x",
"actionlabel": {
"$if $arg _isonline": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_LOADOUT_SAVE_DEFAULT",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_LOADOUT_SAVE_DEFAULT_OFFLINE"
}
}
},
"$else": null
}
}
],
"actions": {
"action-x": {
"$if": {
"$condition": {
"$and": [
"$isnull $.Contract.Data.MandatoryLoadout",
"$not $eqs ($.Contract.Metadata.Type,sniper)"
]
},
"$then": {
"set-default-loadout": {
"on-success-action": [
{
"reload-ui": {
"target": "loadout_overview_tile_2"
}
},
{
"reload-ui": {
"target": "loadout_overview_tile_3"
}
},
{
"reload-ui": {
"target": "loadout_overview_tile_4"
}
},
{
"reload-ui": {
"target": "loadout_overview_tile_5"
}
}
],
"on-error-action": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": {
"$if $arg _isonline": {
"$then": "$loc UI_CONNECTION_STATUS_FAILED",
"$else": "$loc UI_DIALOG_ERROR"
}
},
"description": {
"$if $arg _isonline": {
"$then": "$formatstring {$loc UI_CONNECTION_ERROR_ENETWORK_UNKNOWN}<br>{$loc UI_DIALOG_DEFAULT_LOADOUT_SAVE_FAILED}",
"$else": "$loc UI_DIALOG_DEFAULT_LOADOUT_SAVE_FAILED"
}
}
}
},
"onbutton": []
}
}
}
}
}
},
"on-selected-in-group": {
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
}
},
"select": {
"hide-node": [
"objectivepage",
"playpage"
],
"show-node": [
"planningpage",
"escalation_level_headline_container"
],
"set-selectable": {
"planningpage": true,
"objectivepage": false,
"playpage": false
},
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
},
"replace-children": {
"target": "headline_container",
"children": [
{
"$use $.UserCentric": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"title": "$loc UI_CONTRACT_NO_ACCESS_UGC_DESCRIPTION",
"typeicon": "contract"
}
},
"$else": {
"$setup": {
"$set Tags": {
"$sm:createtags": {
"id": "$.Contract.Metadata.Id",
"tags": "$.Data.MatchingTags"
}
},
"$in": {
"view": {
"$if $($arraysize $.Tags)": {
"$then": "menu3.basic.HeadlineWithTags",
"$else": "menu3.basic.HeadlineElement"
}
},
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$($user $.Contract.Metadata.CreatorUserId).name",
"publicid": "$formatpublicid $.Contract.Metadata.PublicId",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type",
"tags": "$.Tags"
},
"stateproviders": [
{
"type": "userresolution",
"target": "creatorname",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
]
}
}
}
}
}
},
{
"case": "featured",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc UI_MENU_PAGE_HUB_FEATURED",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type"
}
}
},
{
"case": "tutorial",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City} "
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "mission",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "flashback",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": {
"$if $not $.Data.IsFreeDLC": {
"$then": "$loc UI_CONTRACT_HEADER_SEASONAL",
"$else": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}"
}
},
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "campaign",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $.Contract.Metadata.GroupTitle",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "sniper",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set GameModeName": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.GameMode,singleplayer)",
"$eqs ($.GameMode,multiplayer)"
]
},
"$then": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "$formatstring / {$loc UI_MENU_GAME_MODE_MULTIPLAYER}",
"$else": "$formatstring / {$loc UI_MENU_GAME_MODE_SINGLE_PLAYER}"
}
},
"$else": ""
}
},
"$in": "$formatstring {$.City}{$.GameModeName}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"default": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
}
]
}
}
]
}
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
}
}
}
}
},
{
"$if": {
"$condition": {
"$and": [
"$arg multiplayer",
"$eqs ($.Contract.Metadata.Type,sniper)"
]
},
"$then": {
"id": "PLANNING_BUTTON_PLAY",
"view": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": "menu3.basic.ButtonTileLarge"
},
{
"case": "sniper",
"return": "menu3.basic.ButtonTileSmall"
},
{
"case": "escalation",
"return": {
"$if $arg _isingame": {
"$then": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileXSmall"
},
{
"default": "menu3.basic.ButtonTileSmall"
}
]
},
"$else": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
}
},
{
"default": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
]
},
"data": {
"showningame": {
"$if $arg _isingame": {
"$then": true,
"$else": false
}
},
"title": "$loc UI_MENU_LOBBY_STATE_IDLE",
"buttonnumber": 3,
"icon": "play",
"substate": "default"
},
"stateproviders": [
{
"type": "multiplayerlobby",
"playerNameTarget": "infoPlayer"
}
],
"actions": {
"$mergeobjects": [
{
"lobby-state-changed": {
"$notransform": {
"$switch $.state": [
{
"case": "lobby-state-idle",
"return": [
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "substate",
"value": "default"
}
}
},
{
"remove-buttons": {
"target": "PLANNING_BUTTON_PLAY",
"buttons": [
"action-y"
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc UI_MENU_LOBBY_STATE_IDLE"
}
},
"alter-actions": {
"path": "accept",
"value": {
"invite-friend-to-lobby-session": {}
}
},
"set-selectable": {
"target": "PLANNING_BUTTON_PLAY",
"value": true
},
"set-pressable": {
"target": "PLANNING_BUTTON_PLAY",
"value": true
}
},
{
"alter-actions": {
"path": "on-playbutton-select",
"value": {
"hide-node": [
"playpagecontent"
]
}
},
"hide-node": [
"playpagecontent"
]
}
]
},
{
"case": "lobby-state-awaiting-players",
"return": [
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "substate",
"value": "default"
}
}
},
{
"remove-buttons": {
"target": "PLANNING_BUTTON_PLAY",
"buttons": [
"action-y"
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc UI_MENU_LOBBY_STATE_AWAITING_PLAYERS"
}
},
"set-selectable": {
"target": "PLANNING_BUTTON_PLAY",
"value": true
},
"set-pressable": {
"target": "PLANNING_BUTTON_PLAY",
"value": false
}
},
{
"alter-actions": {
"path": "on-playbutton-select",
"value": {
"hide-node": [
"playpagecontent"
]
}
},
"hide-node": [
"playpagecontent"
]
}
]
},
{
"case": "lobby-state-awaiting-player-ready",
"return": [
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "infoTitle",
"value": "$loc UI_MENU_LOBBY_JOINED_TITLE"
}
}
},
{
"add-buttons": {
"target": "PLANNING_BUTTON_PLAY",
"buttons": [
{
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$if": {
"$condition": {
"$if $not $isnull $.ProfileId2": {
"$then": {
"$if": {
"$condition": {
"$or": [
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": true,
"$else": false
}
},
"$else": "$($user $.ProfileId1).isresolved"
}
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"case": "durango",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO"
}
},
{
"default": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
}
]
}
}
}
}
}
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "substate",
"value": "inprogress"
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc UI_MENU_LOBBY_STATE_AWAITING_PLAYER_SELECTION"
}
},
"alter-actions": {
"path": "accept",
"value": {}
},
"set-selectable": {
"target": "PLANNING_BUTTON_PLAY",
"value": true
},
"set-pressable": {
"target": "PLANNING_BUTTON_PLAY",
"value": false
}
},
{
"alter-actions": {
"path": "on-playbutton-select",
"value": {
"show-node": [
"playpagecontent"
]
}
},
"show-node": [
"playpagecontent"
]
}
]
},
{
"case": "lobby-state-player-ready",
"return": [
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "infoTitle",
"value": "$loc UI_MENU_LOBBY_JOINED_TITLE"
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "substate",
"value": "inprogress"
}
}
},
{
"add-buttons": {
"target": "PLANNING_BUTTON_PLAY",
"buttons": [
{
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$if": {
"$condition": {
"$if $not $isnull $.ProfileId2": {
"$then": {
"$if": {
"$condition": {
"$or": [
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": true,
"$else": false
}
},
"$else": "$($user $.ProfileId1).isresolved"
}
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"case": "durango",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO"
}
},
{
"default": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
}
]
}
}
}
}
}
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc UI_MENU_LOBBY_STATE_AWAITING_OTHER_PLAYER_SELECTION"
}
},
"alter-actions": {
"path": "accept",
"value": {}
},
"set-selectable": {
"target": "PLANNING_BUTTON_PLAY",
"value": true
},
"set-pressable": {
"target": "PLANNING_BUTTON_PLAY",
"value": false
}
},
{
"alter-actions": {
"path": "on-playbutton-select",
"value": {
"show-node": [
"playpagecontent"
]
}
},
"show-node": [
"playpagecontent"
]
}
]
},
{
"case": "lobby-awaiting-game-start",
"return": [
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "infoTitle",
"value": "$loc UI_MENU_LOBBY_JOINED_TITLE"
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "substate",
"value": "done"
}
}
},
{
"add-buttons": {
"target": "PLANNING_BUTTON_PLAY",
"buttons": [
{
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$if": {
"$condition": {
"$if $not $isnull $.ProfileId2": {
"$then": {
"$if": {
"$condition": {
"$or": [
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": true,
"$else": false
}
},
"$else": "$($user $.ProfileId1).isresolved"
}
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"case": "durango",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO"
}
},
{
"default": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
}
]
}
}
}
}
}
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"set-data-property": {
"target": "PLANNING_BUTTON_PLAY",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc UI_DIALOG_LOADING"
}
},
"alter-actions": {
"path": "accept",
"value": {}
},
"set-selectable": {
"target": "PLANNING_BUTTON_PLAY",
"value": true
},
"set-pressable": {
"target": "PLANNING_BUTTON_PLAY",
"value": false
}
},
{
"alter-actions": {
"path": "on-playbutton-select",
"value": {
"show-node": [
"playpagecontent"
]
}
},
"show-node": [
"playpagecontent"
]
}
]
}
]
}
}
},
{
"select": {
"hide-node": [
"planningpage",
"objectivepage"
],
"show-node": [
"escalation_level_headline_container",
"playpage"
],
"trigger-action": {
"name": "on-playbutton-select"
},
"on-playbutton-select": {
"hide-node": [
"playpage"
]
},
"set-selectable": {
"planningpage": false,
"objectivepage": false,
"playpage": true
},
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
},
"replace-children": {
"target": "headline_container",
"children": [
{
"$use $.UserCentric": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"title": "$loc UI_CONTRACT_NO_ACCESS_UGC_DESCRIPTION",
"typeicon": "contract"
}
},
"$else": {
"$setup": {
"$set Tags": {
"$sm:createtags": {
"id": "$.Contract.Metadata.Id",
"tags": "$.Data.MatchingTags"
}
},
"$in": {
"view": {
"$if $($arraysize $.Tags)": {
"$then": "menu3.basic.HeadlineWithTags",
"$else": "menu3.basic.HeadlineElement"
}
},
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$($user $.Contract.Metadata.CreatorUserId).name",
"publicid": "$formatpublicid $.Contract.Metadata.PublicId",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type",
"tags": "$.Tags"
},
"stateproviders": [
{
"type": "userresolution",
"target": "creatorname",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
]
}
}
}
}
}
},
{
"case": "featured",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc UI_MENU_PAGE_HUB_FEATURED",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type"
}
}
},
{
"case": "tutorial",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City} "
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "mission",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "flashback",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": {
"$if $not $.Data.IsFreeDLC": {
"$then": "$loc UI_CONTRACT_HEADER_SEASONAL",
"$else": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}"
}
},
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "campaign",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $.Contract.Metadata.GroupTitle",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "sniper",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set GameModeName": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.GameMode,singleplayer)",
"$eqs ($.GameMode,multiplayer)"
]
},
"$then": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "$formatstring / {$loc UI_MENU_GAME_MODE_MULTIPLAYER}",
"$else": "$formatstring / {$loc UI_MENU_GAME_MODE_SINGLE_PLAYER}"
}
},
"$else": ""
}
},
"$in": "$formatstring {$.City}{$.GameModeName}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"default": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
}
]
}
}
]
}
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
},
"action-y": {}
}
]
}
},
"$else": {
"id": "PLANNING_BUTTON_PLAY",
"view": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": "menu3.basic.ButtonTileLarge"
},
{
"case": "sniper",
"return": "menu3.basic.ButtonTileSmall"
},
{
"case": "escalation",
"return": {
"$if $arg _isingame": {
"$then": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileXSmall"
},
{
"default": "menu3.basic.ButtonTileSmall"
}
]
},
"$else": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
}
},
{
"default": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
]
},
"data": {
"showningame": {
"$if $arg _isingame": {
"$then": true,
"$else": false
}
},
"title": "$loc UI_BRIEFING_PLAY",
"buttonnumber": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.Contract.Metadata.Type,tutorial)",
{
"$if": {
"$condition": {
"$and": [
"$not $isnull $.Contract.Data.MandatoryLoadout",
"$not $eqs ($.Contract.Metadata.Type,sniper)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": 2,
"$else": 3
}
},
"icon": "play"
},
"stateproviders": [
{
"type": "contractavailability",
"contract": "$.Contract"
}
],
"actions": {
"on-selected-in-group": {
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
}
},
"select": {
"hide-node": [
"planningpage",
"objectivepage"
],
"show-node": [
"playpage",
"escalation_level_headline_container"
],
"set-selectable": {
"planningpage": false,
"objectivepage": false,
"playpage": true
},
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
},
"replace-children": {
"target": "headline_container",
"children": [
{
"$use $.UserCentric": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"title": "$loc UI_CONTRACT_NO_ACCESS_UGC_DESCRIPTION",
"typeicon": "contract"
}
},
"$else": {
"$setup": {
"$set Tags": {
"$sm:createtags": {
"id": "$.Contract.Metadata.Id",
"tags": "$.Data.MatchingTags"
}
},
"$in": {
"view": {
"$if $($arraysize $.Tags)": {
"$then": "menu3.basic.HeadlineWithTags",
"$else": "menu3.basic.HeadlineElement"
}
},
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$($user $.Contract.Metadata.CreatorUserId).name",
"publicid": "$formatpublicid $.Contract.Metadata.PublicId",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type",
"tags": "$.Tags"
},
"stateproviders": [
{
"type": "userresolution",
"target": "creatorname",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
]
}
}
}
}
}
},
{
"case": "featured",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc UI_MENU_PAGE_HUB_FEATURED",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"creatorname": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY",
"title": "$.Contract.Metadata.Title",
"typeicon": "$.Contract.Metadata.Type"
}
}
},
{
"case": "tutorial",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City} "
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "mission",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "flashback",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": {
"$if $not $.Data.IsFreeDLC": {
"$then": "$loc UI_CONTRACT_HEADER_SEASONAL",
"$else": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}"
}
},
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "campaign",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $.Contract.Metadata.GroupTitle",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": "$formatstring {$.Type} / {$.City}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"case": "sniper",
"return": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set GameModeName": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.GameMode,singleplayer)",
"$eqs ($.GameMode,multiplayer)"
]
},
"$then": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "$formatstring / {$loc UI_MENU_GAME_MODE_MULTIPLAYER}",
"$else": "$formatstring / {$loc UI_MENU_GAME_MODE_SINGLE_PLAYER}"
}
},
"$else": ""
}
},
"$in": "$formatstring {$.City}{$.GameModeName}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
},
{
"default": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": {
"$setup": {
"$set Type": "$loc $formatstring UI_CONTRACT_HEADER_{$.Contract.Metadata.Type}",
"$set City": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$set Mission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$in": "$formatstring {$.Type} / {$.City} / {$.Mission}"
}
},
"title": "$loc $.Contract.Metadata.Title",
"typeicon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
}
}
}
}
]
}
}
]
}
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
},
"accept": {
"$switch $.Contract.Metadata.Type": [
{
"case": "elusive",
"return": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"typeoverride": "information",
"title": "$loc UI_CONTRACT_HEADER_ELUSIVE",
"information": [
{
"description": "$loc UI_MENU_PAGE_PLANNING_ELUSIVE_PLAY_WARNING"
}
]
}
},
"onbutton": [
{
"start-contract": {}
}
]
}
}
},
{
"default": {
"start-contract": {}
}
}
]
},
"on-contract-unavailable": {
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": {
"$loc": "UI_CONTRACT_LOAD_ERROR_CONTENT_MISSING"
}
}
},
"onbutton": []
}
}
}
},
"on-contract-available": {
"alter-actions": {
"path": "accept",
"value": {
"$switch $.Contract.Metadata.Type": [
{
"case": "elusive",
"return": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"typeoverride": "information",
"title": "$loc UI_CONTRACT_HEADER_ELUSIVE",
"information": [
{
"description": "$loc UI_MENU_PAGE_PLANNING_ELUSIVE_PLAY_WARNING"
}
]
}
},
"onbutton": [
{
"start-contract": {}
}
]
}
}
},
{
"default": {
"start-contract": {}
}
}
]
}
}
}
}
}
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"$if $.IsFirstInGroup": {
"$then": {
"$if $arg _isingame": {
"$then": {
"view": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": "menu3.basic.ButtonTileLarge"
},
{
"case": "sniper",
"return": "menu3.basic.ButtonTileSmall"
},
{
"case": "escalation",
"return": {
"$if $arg _isingame": {
"$then": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileXSmall"
},
{
"default": "menu3.basic.ButtonTileSmall"
}
]
},
"$else": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
}
},
{
"default": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
]
},
"data": {
"showningame": {
"$if $arg _isingame": {
"$then": true,
"$else": false
}
},
"title": "$loc UI_DIALOG_ACTION_EXIT_TO_MAIN_MENU_TITLE",
"icon": "exit"
},
"actions": {
"on-selected-in-group": {
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
}
},
"select": {
"hide-node": [
"planningpage",
"objectivepage",
"playpage",
"escalation_level_headline_container"
],
"set-selectable": {
"planningpage": false,
"objectivepage": false,
"playpage": false
},
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
},
"replace-children": [
{
"target": "headline_container",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": "$loc UI_DIALOG_ACTION_EXIT_TO_MAIN_MENU_TITLE",
"typeicon": "exit"
}
}
]
}
]
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
},
"accept": {
"exit-to-main-menu": {}
}
}
},
"$else": {
"pressable": false,
"selectable": false
}
}
},
"$else": {
"$if $arg _isingame": {
"$then": {
"view": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": "menu3.basic.ButtonTileLarge"
},
{
"case": "sniper",
"return": "menu3.basic.ButtonTileSmall"
},
{
"case": "escalation",
"return": {
"$if $arg _isingame": {
"$then": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileXSmall"
},
{
"default": "menu3.basic.ButtonTileSmall"
}
]
},
"$else": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
}
},
{
"default": {
"$switch $.Contract.Data.MandatoryLoadout": [
{
"case": null,
"return": "menu3.basic.ButtonTileSmall"
},
{
"default": "menu3.basic.ButtonTileLarge"
}
]
}
}
]
},
"data": {
"showningame": {
"$if $arg _isingame": {
"$then": true,
"$else": false
}
},
"title": "$loc UI_DIALOG_ACTION_EXIT_TO_MAIN_MENU_TITLE",
"icon": "exit"
},
"actions": {
"on-selected-in-group": {
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
}
},
"select": {
"hide-node": [
"planningpage",
"objectivepage",
"playpage",
"escalation_level_headline_container"
],
"set-selectable": {
"planningpage": false,
"objectivepage": false,
"playpage": false
},
"call": {
"target": "planning_scroll_container",
"method": "updateScrollBar"
},
"replace-children": [
{
"target": "headline_container",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": "$loc UI_DIALOG_ACTION_EXIT_TO_MAIN_MENU_TITLE",
"typeicon": "exit"
}
}
]
}
]
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
},
"accept": {
"exit-to-main-menu": {}
}
}
},
"$else": {
"pressable": false,
"selectable": false
}
}
}
}
}
},
{
"default": {
"selectable": false,
"pressable": false
}
}
]
}
]
},
"$else": null
}
},
{
"controller": "list",
"id": "planning_content_group",
"__comment": "use BaseContainer to get zero size for this element, if the children are invisible",
"view": "menu3.containers.BaseContainer",
"actions": {
"on-direction-input-select": {
"set-child-selected": {
"target": "planning_content_group",
"selectdirection": 1
}
}
},
"children": [
{
"id": "objectivepage",
"controller": "list",
"view": "menu3.containers.NewItemsContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal",
"itemNewFlagPropertyName": "isnew"
},
"children": {
"$merge": [
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Contract.Metadata.Type,escalation)",
"$eqs ($.Contract.Metadata.Id,03ed20c0-5e98-48ad-ada5-a695077313fe)"
]
},
"$then": {
"selectable": false,
"pressable": false
},
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": {
"view": "menu3.basic.MenuTileLarge",
"id": "briefing-tile",
"pressable": false,
"data": {
"title": "$loc $.Contract.Metadata.Title",
"icon": "tutorial",
"image": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"video": false,
"pressable": false,
"barcodeHeader": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"barcodeTitle": "$loc $formatstring UI_{$.Contract.Metadata.Location}_COUNTRY"
},
"actions": {
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
]
},
"hide-node": [
"planningpage",
"playpage"
],
"update-content": {
"target": "headline_element"
},
"set-group-selection": {
"target": "briefing_button"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
}
},
{
"case": "usercreated",
"return": {
"view": "menu3.basic.MenuTileLarge",
"id": "briefing-tile",
"data": {
"header": "$loc UI_MISSION_BRIEFING",
"title": "$.Contract.Metadata.Title",
"image": "$res images/ui/tiles/contractbriefingtile.jpg",
"briefingheader": "$loc UI_BRIEFING_TITLE",
"briefing": "$.Contract.Metadata.Description",
"icon": "background",
"video": false,
"barcodeHeader": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"barcodeTitle": "$loc $formatstring UI_{$.Contract.Metadata.Location}_COUNTRY"
},
"actions": {
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline_element",
"view": "menu3.basic.HeadlineElement",
"data": {
"icon": "background",
"header": "$loc UI_MISSION_BRIEFING",
"title": "$.Contract.Metadata.Title",
"creatorname": "$($user $.Contract.Metadata.CreatorUserId).name",
"publicid": "$formatpublicid $.Contract.Metadata.PublicId"
},
"stateproviders": [
{
"type": "userresolution",
"target": "creatorname",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
]
}
]
},
"hide-node": [
"planningpage",
"playpage"
],
"set-group-selection": {
"target": "briefing_button"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
},
"accept": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM"
],
"data": {
"typeoverride": "information",
"title": "$loc UI_MISSION_BRIEFING",
"information": [
{
"description": "$.Contract.Metadata.Description"
}
]
}
}
}
}
}
}
},
{
"case": "creation",
"return": {
"view": "menu3.basic.MenuTileLarge",
"id": "briefing-tile",
"data": {
"header": "$loc UI_MISSION_BRIEFING",
"title": "$loc $.Contract.Metadata.Title",
"image": "$res images/ui/tiles/contractbriefingtile.jpg",
"briefingheader": "$loc UI_BRIEFING_TITLE",
"briefing": "$loc $.Contract.Metadata.Description",
"icon": "background",
"video": false,
"barcodeHeader": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"barcodeTitle": "$loc $formatstring UI_{$.Contract.Metadata.Location}_COUNTRY"
},
"actions": {
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
]
},
"hide-node": [
"planningpage",
"playpage"
],
"update-content": {
"target": "headline_element"
},
"set-group-selection": {
"target": "briefing_button"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
},
"accept": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM"
],
"data": {
"typeoverride": "information",
"title": "$loc UI_MISSION_BRIEFING",
"information": [
{
"description": "$loc $.Contract.Metadata.Description"
}
]
}
}
}
}
}
}
},
{
"case": "elusive",
"return": {
"view": "menu3.basic.MenuTileLarge",
"id": "briefing-tile",
"stateproviders": {
"$if $not $.HideState": {
"$then": [
{
"type": "contractavailability",
"contract": "$.UserCentricContract.Contract"
}
]
}
},
"data": {
"header": "$loc UI_MISSION_BRIEFING",
"title": "$loc $.Contract.Metadata.Title",
"icon": {
"$if": {
"$condition": "$hasbriefingvideo $.Contract.Metadata.BriefingVideo",
"$then": "cutscene",
"$else": "background"
}
},
"image": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"elusivecontractstate": "$.ElusiveContractState",
"playableUntil": "$as3date $.Contract.Metadata.PlayableUntil",
"video": "$hasbriefingvideo $.Contract.Metadata.BriefingVideo",
"pressable": {
"$if $hasbriefingvideo $.Contract.Metadata.BriefingVideo": {
"$then": true,
"$else": "$stringvalid $.Contract.Metadata.Description"
}
},
"barcodeHeader": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"barcodeTitle": "$loc $formatstring UI_{$.Contract.Metadata.Location}_COUNTRY"
},
"actions": {
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
]
},
"hide-node": [
"planningpage",
"playpage"
],
"update-content": {
"target": "headline_element"
},
"set-group-selection": {
"target": "briefing_button"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
},
"accept": {
"$if": {
"$condition": "$hasbriefingvideo $.Contract.Metadata.BriefingVideo",
"$then": {
"set-post-open-actions": {
"actions": [
{
"set-selected": {
"target": "objectivepage"
}
},
{
"set-selected": {
"target": "briefing-tile"
}
}
]
},
"link": {
"page": "video",
"clearcurrentpagecontext": false,
"args": {
"skipifshown": false,
"videoid": "$.Contract.Metadata.BriefingVideo",
"GameMode": {
"$if $not $isnull $arg GameMode": {
"$then": "$arg GameMode",
"$else": {
"$if $arg multiplayer": {
"$then": "multiplayer",
"$else": "singleplayer"
}
}
}
},
"mountrootresources": "$formatstring [{$.Contract.Metadata.ScenePath}].entitytemplate"
}
}
},
"$else": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM"
],
"data": {
"typeoverride": "information",
"title": "$loc UI_MISSION_BRIEFING",
"information": [
{
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": "$.Contract.Metadata.Description"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
}
}
]
}
}
}
}
}
}
}
}
},
{
"default": {
"view": "menu3.basic.MenuTileLarge",
"id": "briefing-tile",
"data": {
"header": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"__return": "$formatstring {$loc UI_AUTHOR_BY} {$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY}",
"return": "$loc UI_MISSION_BRIEFING"
},
{
"default": "$loc UI_MISSION_BRIEFING"
}
]
},
"title": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"icon": {
"$if $hasbriefingvideo $.Contract.Metadata.BriefingVideo": {
"$then": "cutscene",
"$else": "background"
}
},
"image": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"video": "$hasbriefingvideo $.Contract.Metadata.BriefingVideo",
"pressable": {
"$if $hasbriefingvideo $.Contract.Metadata.BriefingVideo": {
"$then": true,
"$else": "$stringvalid $.Contract.Metadata.Description"
}
},
"barcodeHeader": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"barcodeTitle": "$loc $formatstring UI_{$.Contract.Metadata.Location}_COUNTRY"
},
"actions": {
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
]
},
"hide-node": [
"planningpage",
"playpage"
],
"update-content": {
"target": "headline_element"
},
"set-group-selection": {
"target": "briefing_button"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
},
"accept": {
"$switch $hasbriefingvideo $.Contract.Metadata.BriefingVideo": [
{
"case": false,
"return": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM"
],
"data": {
"typeoverride": "information",
"title": "$loc UI_MISSION_BRIEFING",
"information": [
{
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": "$.Contract.Metadata.Description"
},
{
"case": "featured",
"return": "$.Contract.Metadata.Description"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
}
}
]
}
}
}
}
},
{
"default": {
"set-post-open-actions": {
"actions": [
{
"set-selected": {
"target": "objectivepage"
}
},
{
"set-selected": {
"target": "briefing-tile"
}
}
]
},
"link": {
"page": "video",
"clearcurrentpagecontext": false,
"args": {
"skipifshown": false,
"videoid": "$.Contract.Metadata.BriefingVideo",
"GameMode": {
"$if $not $isnull $arg GameMode": {
"$then": "$arg GameMode",
"$else": {
"$if $arg multiplayer": {
"$then": "multiplayer",
"$else": "singleplayer"
}
}
}
},
"mountrootresources": "$formatstring [{$.Contract.Metadata.ScenePath}].entitytemplate"
}
}
}
}
]
}
}
}
}
]
}
}
},
{
"$merge": [
{
"$each $arg Objectives": {
"view": "menu3.basic.ObjectiveTile",
"nrows": 3,
"ncols": 2,
"id": "$formatstring OBJECTIVE_TARGET_{$.Properties.Id}",
"data": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"contracttype": "$arg ContractType",
"conditions": {
"$setup": {
"$set Conditions": "$.Properties.Conditions",
"$in": {
"$each $.Conditions": {
"$mergeobjects": [
{
"type": "kill"
},
{
"$switch $.Type": [
{
"case": "weapontype",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": "$loc $formatstring UI_ITEM_ONLINETRAITS_{$.KillItemCategoryOnlineTrait}"
}
},
"image": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": {
"$switch $.KillItemCategoryOnlineTrait": [
{
"case": "melee_nonlethal",
"return": "$res $formatstring images/contractconditions/condition_killmethod_melee_lethal.jpg"
},
{
"default": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillItemCategoryOnlineTrait}.jpg"
}
]
}
}
}
}
},
{
"case": "weapon",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $($repository $.RepositoryId).Name_LOC",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "hitmansuit",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc UI_BRIEFING_CONDITION_HITMANSUIT",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "disguise",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc $($repository $.RepositoryId).Name",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "killmethod",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"image": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillMethod}.jpg"
}
},
{
"case": "killmethod_specificitem",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set KillItemLocalisedName": "$loc $($repository $.RepositoryId).Name_LOC",
"$set KillMethodLocalisedName": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"$in": "$formatstring {$.KillMethodLocalisedName}: {$.KillItemLocalisedName}"
}
},
"image": "$res $($repository $.RepositoryId).Image"
}
}
]
}
]
}
}
}
}
}
},
{
"case": "customkill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "customkill",
"icon": "difficulty",
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "setpiece",
"return": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": {
"$if $.Properties.BriefingName": {
"$then": "$expand $.Properties.BriefingName",
"$else": "$($repository $.Properties.Id).Name"
}
},
"image": {
"$if $stringlength $.Properties.Image": {
"$then": "$res $.Properties.Image",
"$else": "$res $($repository $.Properties.Id).Image"
}
},
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"image": "$res images/ui/tiles/kill_with_something_else.jpg",
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "custom",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$expand $.Properties.BriefingName",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.Image",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "Unknown",
"$else": "$.Properties.State"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": false,
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": "arrowright",
"summary": "$expand $.Properties.BriefingText"
}
]
},
"$else": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": "$expand $.Properties.BriefingName",
"image": "$res $.Properties.Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.State,Completed)": {
"$then": "Completed",
"$else": "Unknown"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
}
}
},
{
"case": "gamechanger",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$loc $.Properties.Name",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.TileImage",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"briefingfocus": true,
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
},
"$else": {
"header": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"title": "$loc $.Properties.Name",
"image": "$res $.Properties.TileImage",
"icon": "complication",
"isnew": "$.Properties.IsNew",
"briefingfocus": true,
"state": "",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
}
}
}
}
]
},
"buttons": [
{
"$if $eqs ($arg ContractType,creation)": {
"$then": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_UNMARK_TARGET"
}
}
]
}
}
}
],
"actions": {
"on-page-opened": {
"$if $eqs ($arg ContractType,creation)": {
"$then": {
"$switch $.Type": [
{
"case": "gamechanger",
"return": {
"initialise-contract-condition-tiles": {
"Id": "$.Properties.Id"
}
}
},
{
"case": "custom",
"return": {
"initialise-contract-condition-tiles": {
"Id": "$.Properties.Id"
}
}
}
]
}
}
},
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"id": "headline_element"
}
]
},
"update-content": {
"target": "headline_element"
},
"hide-node": [
"planningpage",
"playpage"
],
"set-group-selection": {
"target": "briefing_button"
}
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $arg ContractType": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
},
"accept": {
"show-modal": {
"config": {
"type": "objective",
"view": "menu3.modal.ModalDialogTargetObjectives",
"buttons": [
"$loc UI_DIALOG_OK",
{
"type": "cancel"
}
],
"data": {
"type": "$.Type",
"infotitle": "$loc UI_MENU_PAGE_PAUSE_INTEL",
"infoicon": "intel",
"conditionstitle": "$loc UI_CONTRACT_KILL_CONDITIONS",
"conditionsicon": "difficulty",
"useconditions": true,
"description": "$loc $($repository $.Properties.Id).Description_LOC",
"objective": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"contracttype": "$arg ContractType",
"conditions": {
"$setup": {
"$set Conditions": "$.Properties.Conditions",
"$in": {
"$each $.Conditions": {
"$mergeobjects": [
{
"type": "kill"
},
{
"$switch $.Type": [
{
"case": "weapontype",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": "$loc $formatstring UI_ITEM_ONLINETRAITS_{$.KillItemCategoryOnlineTrait}"
}
},
"image": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": {
"$switch $.KillItemCategoryOnlineTrait": [
{
"case": "melee_nonlethal",
"return": "$res $formatstring images/contractconditions/condition_killmethod_melee_lethal.jpg"
},
{
"default": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillItemCategoryOnlineTrait}.jpg"
}
]
}
}
}
}
},
{
"case": "weapon",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $($repository $.RepositoryId).Name_LOC",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "hitmansuit",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc UI_BRIEFING_CONDITION_HITMANSUIT",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "disguise",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc $($repository $.RepositoryId).Name",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "killmethod",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"image": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillMethod}.jpg"
}
},
{
"case": "killmethod_specificitem",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set KillItemLocalisedName": "$loc $($repository $.RepositoryId).Name_LOC",
"$set KillMethodLocalisedName": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"$in": "$formatstring {$.KillMethodLocalisedName}: {$.KillItemLocalisedName}"
}
},
"image": "$res $($repository $.RepositoryId).Image"
}
}
]
}
]
}
}
}
}
}
},
{
"case": "customkill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "customkill",
"icon": "difficulty",
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "setpiece",
"return": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": {
"$if $.Properties.BriefingName": {
"$then": "$expand $.Properties.BriefingName",
"$else": "$($repository $.Properties.Id).Name"
}
},
"image": {
"$if $stringlength $.Properties.Image": {
"$then": "$res $.Properties.Image",
"$else": "$res $($repository $.Properties.Id).Image"
}
},
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"image": "$res images/ui/tiles/kill_with_something_else.jpg",
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "custom",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$expand $.Properties.BriefingName",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.Image",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "Unknown",
"$else": "$.Properties.State"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": false,
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": "arrowright",
"summary": "$expand $.Properties.BriefingText"
}
]
},
"$else": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": "$expand $.Properties.BriefingName",
"image": "$res $.Properties.Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.State,Completed)": {
"$then": "Completed",
"$else": "Unknown"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
}
}
},
{
"case": "gamechanger",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$loc $.Properties.Name",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.TileImage",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"briefingfocus": true,
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
},
"$else": {
"header": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"title": "$loc $.Properties.Name",
"image": "$res $.Properties.TileImage",
"icon": "complication",
"isnew": "$.Properties.IsNew",
"briefingfocus": true,
"state": "",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
}
}
}
}
]
},
"displaybuttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SWITCH_OBJECTIVE_INFORMATION",
"hideIndicator": true
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK",
"hideIndicator": true
}
]
}
}
}
},
"action-y": {
"$switch $arg ContractType": [
{
"case": "creation",
"return": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_OK",
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_UNMARK_TARGET_TITLE",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"description": "$loc UI_DIALOG_UNMARK_TARGET_TEXT"
}
},
"onbutton": [
{
"untag-actor": {
"repoID": "$.Properties.Id"
},
"remove-children": {
"target": "logbook_objectives_container",
"children": [
"$formatstring OBJECTIVE_TARGET_{$.Properties.Id}"
]
}
}
]
}
}
},
{
"case": "gamechanger",
"return": {
"cycle-contract-condition-state-pressed": {
"Id": "$.Properties.Id"
}
}
},
{
"case": "custom",
"return": {
"cycle-contract-condition-state-pressed": {
"Id": "$.Properties.Id"
}
}
}
]
}
}
]
}
}
}
},
{
"$each $.Objectives": {
"view": "menu3.basic.ObjectiveTile",
"nrows": 3,
"ncols": 2,
"id": "$formatstring OBJECTIVE_TARGET_{$.Properties.Id}",
"data": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"contracttype": "$arg ContractType",
"conditions": {
"$setup": {
"$set Conditions": "$.Properties.Conditions",
"$in": {
"$each $.Conditions": {
"$mergeobjects": [
{
"type": "kill"
},
{
"$switch $.Type": [
{
"case": "weapontype",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": "$loc $formatstring UI_ITEM_ONLINETRAITS_{$.KillItemCategoryOnlineTrait}"
}
},
"image": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": {
"$switch $.KillItemCategoryOnlineTrait": [
{
"case": "melee_nonlethal",
"return": "$res $formatstring images/contractconditions/condition_killmethod_melee_lethal.jpg"
},
{
"default": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillItemCategoryOnlineTrait}.jpg"
}
]
}
}
}
}
},
{
"case": "weapon",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $($repository $.RepositoryId).Name_LOC",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "hitmansuit",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc UI_BRIEFING_CONDITION_HITMANSUIT",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "disguise",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc $($repository $.RepositoryId).Name",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "killmethod",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"image": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillMethod}.jpg"
}
},
{
"case": "killmethod_specificitem",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set KillItemLocalisedName": "$loc $($repository $.RepositoryId).Name_LOC",
"$set KillMethodLocalisedName": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"$in": "$formatstring {$.KillMethodLocalisedName}: {$.KillItemLocalisedName}"
}
},
"image": "$res $($repository $.RepositoryId).Image"
}
}
]
}
]
}
}
}
}
}
},
{
"case": "customkill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "customkill",
"icon": "difficulty",
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "setpiece",
"return": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": {
"$if $.Properties.BriefingName": {
"$then": "$expand $.Properties.BriefingName",
"$else": "$($repository $.Properties.Id).Name"
}
},
"image": {
"$if $stringlength $.Properties.Image": {
"$then": "$res $.Properties.Image",
"$else": "$res $($repository $.Properties.Id).Image"
}
},
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"image": "$res images/ui/tiles/kill_with_something_else.jpg",
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "custom",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$expand $.Properties.BriefingName",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.Image",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "Unknown",
"$else": "$.Properties.State"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": false,
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": "arrowright",
"summary": "$expand $.Properties.BriefingText"
}
]
},
"$else": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": "$expand $.Properties.BriefingName",
"image": "$res $.Properties.Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.State,Completed)": {
"$then": "Completed",
"$else": "Unknown"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
}
}
},
{
"case": "gamechanger",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$loc $.Properties.Name",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.TileImage",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"briefingfocus": true,
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
},
"$else": {
"header": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"title": "$loc $.Properties.Name",
"image": "$res $.Properties.TileImage",
"icon": "complication",
"isnew": "$.Properties.IsNew",
"briefingfocus": true,
"state": "",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
}
}
}
}
]
},
"buttons": [
{
"$if $eqs ($arg ContractType,creation)": {
"$then": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_UNMARK_TARGET"
}
}
]
}
}
}
],
"actions": {
"on-page-opened": {
"$if $eqs ($arg ContractType,creation)": {
"$then": {
"$switch $.Type": [
{
"case": "gamechanger",
"return": {
"initialise-contract-condition-tiles": {
"Id": "$.Properties.Id"
}
}
},
{
"case": "custom",
"return": {
"initialise-contract-condition-tiles": {
"Id": "$.Properties.Id"
}
}
}
]
}
}
},
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"id": "headline_element"
}
]
},
"update-content": {
"target": "headline_element"
},
"hide-node": [
"planningpage",
"playpage"
],
"set-group-selection": {
"target": "briefing_button"
}
},
"deselect": {
"$mergeobjects": [
{
"replace-children": {
"target": "headline_container",
"children": []
}
},
{
"$switch $arg ContractType": [
{
"case": "escalation",
"return": {
"hide-node": "escalation_level_headline_container"
}
},
{
"default": null
}
]
}
]
},
"accept": {
"show-modal": {
"config": {
"type": "objective",
"view": "menu3.modal.ModalDialogTargetObjectives",
"buttons": [
"$loc UI_DIALOG_OK",
{
"type": "cancel"
}
],
"data": {
"type": "$.Type",
"infotitle": "$loc UI_MENU_PAGE_PAUSE_INTEL",
"infoicon": "intel",
"conditionstitle": "$loc UI_CONTRACT_KILL_CONDITIONS",
"conditionsicon": "difficulty",
"useconditions": true,
"description": "$loc $($repository $.Properties.Id).Description_LOC",
"objective": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"contracttype": "$arg ContractType",
"conditions": {
"$setup": {
"$set Conditions": "$.Properties.Conditions",
"$in": {
"$each $.Conditions": {
"$mergeobjects": [
{
"type": "kill"
},
{
"$switch $.Type": [
{
"case": "weapontype",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": "$loc $formatstring UI_ITEM_ONLINETRAITS_{$.KillItemCategoryOnlineTrait}"
}
},
"image": {
"$setup": {
"$set OnlineTraits": "$($repository $.RepositoryId).OnlineTraits",
"$set KillItemCategoryOnlineTraitsIndex": "$($repository $.RepositoryId).KillItemCategoryOnlineTraitsIndex",
"$set KillItemCategoryOnlineTrait": "$.OnlineTraits[$.KillItemCategoryOnlineTraitsIndex]",
"$in": {
"$switch $.KillItemCategoryOnlineTrait": [
{
"case": "melee_nonlethal",
"return": "$res $formatstring images/contractconditions/condition_killmethod_melee_lethal.jpg"
},
{
"default": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillItemCategoryOnlineTrait}.jpg"
}
]
}
}
}
}
},
{
"case": "weapon",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $($repository $.RepositoryId).Name_LOC",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "hitmansuit",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc UI_BRIEFING_CONDITION_HITMANSUIT",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "disguise",
"return": {
"icon": "disguise",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_DISGUISE",
"title": "$loc $($repository $.RepositoryId).Name",
"image": "$res $($repository $.RepositoryId).Image"
}
},
{
"case": "killmethod",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"image": "$res $formatstring images/contractconditions/condition_killmethod_{$.KillMethod}.jpg"
}
},
{
"case": "killmethod_specificitem",
"return": {
"icon": "difficulty",
"satisfied": "$.Satisfied",
"hardcondition": "$.HardCondition",
"header": "$loc UI_BRIEFING_CONDITION_ELIMINATE_WITH",
"title": {
"$setup": {
"$set KillItemLocalisedName": "$loc $($repository $.RepositoryId).Name_LOC",
"$set KillMethodLocalisedName": "$loc $formatstring UI_KILL_METHOD_{$.KillMethod}",
"$in": "$formatstring {$.KillMethodLocalisedName}: {$.KillItemLocalisedName}"
}
},
"image": "$res $($repository $.RepositoryId).Image"
}
}
]
}
]
}
}
}
}
}
},
{
"case": "customkill",
"return": {
"header": "$loc UI_OBJECTIVES_TARG_HEADER",
"title": "$($repository $.Properties.Id).Name",
"image": "$res $($repository $.Properties.Id).Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"icon": "target",
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "customkill",
"icon": "difficulty",
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "setpiece",
"return": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": {
"$if $.Properties.BriefingName": {
"$then": "$expand $.Properties.BriefingName",
"$else": "$($repository $.Properties.Id).Name"
}
},
"image": {
"$if $stringlength $.Properties.Image": {
"$then": "$res $.Properties.Image",
"$else": "$res $($repository $.Properties.Id).Image"
}
},
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"image": "$res images/ui/tiles/kill_with_something_else.jpg",
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
},
{
"case": "custom",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$expand $.Properties.BriefingName",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.Image",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "Unknown",
"$else": "$.Properties.State"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": false,
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": "arrowright",
"summary": "$expand $.Properties.BriefingText"
}
]
},
"$else": {
"header": {
"$if $.Properties.DisplayAsKill": {
"$then": "$loc UI_OBJECTIVES_TARG_HEADER",
"$else": "$loc UI_OBJECTIVES_TARG_ITEM"
}
},
"title": "$expand $.Properties.BriefingName",
"image": "$res $.Properties.Image",
"killwithanything": "$res images/ui/tiles/kill_with_something_else.jpg",
"anydisguise": "$res images/ui/tiles/any_disguise.jpg",
"anyweapon": "$res images/ui/tiles/any_weapon.jpg",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "target",
"$else": "objective"
}
},
"isnew": "$.Properties.IsNew",
"state": {
"$if $eqs ($.Properties.State,Completed)": {
"$then": "Completed",
"$else": "Unknown"
}
},
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$expand $.Properties.LongBriefingText",
"displayaskill": "$.Properties.DisplayAsKill",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": {
"$if $.Properties.DisplayAsKill": {
"$then": "difficulty",
"$else": "arrowright"
}
},
"summary": "$expand $.Properties.BriefingText"
}
]
}
}
}
},
{
"case": "gamechanger",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg ContractType,creation)",
"$eqs ($arg ContractType,usercreated)",
"$eqs ($arg ContractType,featured)"
]
},
"$then": {
"header": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"$else": "$formatstring {$loc UI_DIALOG_OPTIONAL} {$loc UI_OBJECTIVES_TARG_GAMECHANGER}"
}
},
"title": "$loc $.Properties.Name",
"markedforremoval": {
"$if $.Properties.IsMarkedForRemoval": {
"$then": true,
"$else": false
}
},
"image": "$res $.Properties.TileImage",
"icon": {
"$if $eqs ($.Properties.ObjectivesCategory,primary)": {
"$then": "complication",
"$else": "complication_optional"
}
},
"briefingfocus": true,
"state": "$.Properties.State",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
},
"$else": {
"header": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"title": "$loc $.Properties.Name",
"image": "$res $.Properties.TileImage",
"icon": "complication",
"isnew": "$.Properties.IsNew",
"briefingfocus": true,
"state": "",
"category": "$.Properties.ObjectivesCategory",
"longdescription": "$loc $.Properties.LongDescription",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "gamechanger",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
}
}
}
}
]
},
"displaybuttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SWITCH_OBJECTIVE_INFORMATION",
"hideIndicator": true
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK",
"hideIndicator": true
}
]
}
}
}
},
"action-y": {
"$switch $arg ContractType": [
{
"case": "creation",
"return": {
"$switch $.Type": [
{
"case": "kill",
"return": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_OK",
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_UNMARK_TARGET_TITLE",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"description": "$loc UI_DIALOG_UNMARK_TARGET_TEXT"
}
},
"onbutton": [
{
"untag-actor": {
"repoID": "$.Properties.Id"
},
"remove-children": {
"target": "logbook_objectives_container",
"children": [
"$formatstring OBJECTIVE_TARGET_{$.Properties.Id}"
]
}
}
]
}
}
},
{
"case": "gamechanger",
"return": {
"cycle-contract-condition-state-pressed": {
"Id": "$.Properties.Id"
}
}
},
{
"case": "custom",
"return": {
"cycle-contract-condition-state-pressed": {
"Id": "$.Properties.Id"
}
}
}
]
}
}
]
}
}
}
}
]
}
]
}
},
{
"id": "planningpage",
"controller": "list",
"view": "menu3.containers.ListContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal"
},
"children": {
"$if $.show": {
"$then": {
"$if $eqs ($.Contract.Metadata.Type,sniper)": {
"$then": {
"$each $arg Characters": {
"$setup": {
"$set LocalizedAgentName": "$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}",
"$set LocalizedAgentDesc": "$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}_DESCRIPTION",
"$set Size": "tall",
"$set Image": "$formatstring images/ui/sc/{$.Name}.jpg",
"$set WeaponImage": "$formatstring images/ui/sc/sniper_{$.Name}.jpg",
"$set WeaponRepoId": "$($item $.LoadoutData[0].Recommended.item.Unlockable).repositoryid",
"$set WeaponName": "$loc $($repository $.WeaponRepoId).Name_LOC",
"$set WeaponItem": "$item $.LoadoutData[0].Recommended.item.Unlockable",
"$set WeaponId": "$.MandatoryLoadout[0]",
"$in": {
"controller": "list",
"view": "menu3.containers.ListContainerWithHeader",
"id": "$formatstring loadout_{$.Name}_container",
"ncols": 4,
"direction": "horizontal",
"data": {
"direction": "horizontal",
"headlinetitle": "$.LocalizedAgentName"
},
"children": [
{
"view": {
"$if $eqs ($.Size,large)": {
"$then": "menu3.basic.MenuTileLarge",
"$else": "menu3.basic.MenuTileTall"
}
},
"id": "$formatstring loadout_agent_{$.Name}_biography_id",
"pressable": true,
"data": {
"header": "$loc UI_MENU_BIOGRAPHY_TITLE",
"title": "$.LocalizedAgentName",
"icon": "npc",
"image": "$res $.Image"
},
"actions": {
"accept": {
"show-modal": {
"config": {
"type": "objective",
"view": "menu3.modal.ModalDialogTargetObjectives",
"buttons": [
"$loc UI_DIALOG_OK",
{
"type": "cancel"
}
],
"data": {
"type": "cutom",
"infotitle": "$loc UI_MENU_BIOGRAPHY_TITLE",
"infoicon": "intel",
"conditionstitle": "$loc UI_CONTRACT_KILL_CONDITIONS",
"conditionsicon": "difficulty",
"useconditions": true,
"objective": {
"header": "$loc UI_OBJECTIVES_TARG_GAMECHANGER",
"title": "$.LocalizedAgentName",
"image": "$res $.Image",
"icon": "npc",
"isnew": null,
"state": "Unknown",
"category": "primary",
"displayaskill": false,
"longdescription": "$.LocalizedAgentDesc",
"contracttype": "$arg ContractType",
"conditions": [
{
"type": "setpiece",
"icon": "arrowright",
"summary": "$loc $.Properties.Description"
}
]
},
"displaybuttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SWITCH_OBJECTIVE_INFORMATION",
"hideIndicator": true
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK",
"hideIndicator": true
}
]
}
}
}
},
"select": [
{
"replace-children": {
"target": "headline_container",
"id": "headline-element",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"id": "headline-element",
"selectable": false,
"pressable": false
}
]
},
"update-content": {
"target": "headline-element"
},
"hide-node": [
"objectivepage",
"playpage"
],
"set-group-selection": {
"target": "planning_button"
}
},
{
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
],
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
},
"set-mastery-data": {}
}
}
},
{
"view": "menu3.basic.MenuTileTall",
"id": "$formatstring loadout_agent_mastery_{$.Name}_id",
"pressable": true,
"data": {
"hidebarcode": true,
"header": "$loc UI_MENU_PAGE_MASTERY_TITLE",
"title": "$.WeaponName",
"icon": "sniperrifle",
"image": "$res $.WeaponImage",
"levelcount": {
"$if $arg _isonline": {
"$then": "$.CompletionData.Level",
"$else": 1
}
},
"levelcounttotal": {
"$if $arg _isonline": {
"$then": "$.CompletionData.MaxLevel",
"$else": 20
}
},
"availability": {
"available": true
}
},
"actions": {
"accept": {
"set-post-open-actions": {
"actions": [
{
"set-selected": {
"target": "planning_button"
}
},
{
"set-selected": {
"target": "$formatstring loadout_agent_mastery_{$.Name}_id"
}
}
]
},
"link": {
"page": "masteryunlockable",
"clearcurrentpagecontext": false,
"args": {
"url": "masteryunlockable",
"args": {
"unlockableId": "$.WeaponId"
}
}
}
},
"select": [
{
"replace-children": {
"target": "headline_container",
"id": "headline-element",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"id": "headline-element",
"selectable": false,
"pressable": false
}
]
},
"update-content": {
"target": "headline-element"
},
"hide-node": [
"objectivepage",
"playpage"
],
"set-group-selection": {
"target": "planning_button"
}
},
{
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
],
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
},
"set-mastery-data": {}
}
}
}
]
}
}
}
},
"$else": {
"controller": "group",
"pages": true,
"nrows": 3,
"ncols": 8,
"children": {
"$merge": [
{
"view": "menu3.basic.MenuTileSmall",
"id": "selectagencypickup",
"col": 0,
"data": {
"hidebarcode": true,
"header": {
"$if $stringvalid $($repository $arg SelectedAgencyPickup).Name_LOC": {
"$then": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_SMUGGLED_ITEM",
"$else": ""
}
},
"title": {
"$if $stringvalid $($repository $arg SelectedAgencyPickup).Name_LOC": {
"$then": "$loc $($repository $arg SelectedAgencyPickup).Name_LOC",
"$else": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_SMUGGLED_ITEM"
}
},
"icon": "stashpointempty",
"image": {
"$if $stringvalid $arg SelectedAgencyPickup": {
"$then": "$res $($repository $arg SelectedAgencyPickup).Image",
"$else": "$res images/ui/tiles/loadout_slot_smuggleditem.jpg"
}
},
"agencypickup": {
"$if $stringvalid $($arg currentloadout).$($formatstring slot_6).item.name": {
"$then": {
"header": "$loc UI_MENU_PAGE_LOADOUT_CONTENT",
"title": "$($arg currentloadout).$($formatstring slot_6).item.name",
"icon": {
"$setup": {
"$set repoID": "$($arg currentloadout).$($formatstring slot_6).item.repositoryid",
"$in": "$($repository $.repoID).InventoryCategoryIcon"
}
},
"rarity": "$($arg currentloadout).$($formatstring slot_6).item.rarity",
"itemcount": "$($arg currentloadout).$($formatstring slot_6).item.itemcount"
},
"$else": null
}
}
},
"buttons": {
"$if $($arg currentloadout).$($formatstring slot_6).equipped": {
"$then": [
{
"actiontype": "r",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_LOADOUT_UNEQUIP"
}
]
}
},
"actions": {
"$mergeobjects": [
{
"$if $($arg currentloadout).$($formatstring slot_6).equipped": {
"$then": {
"action-right-stick": {
"loadout_unequip": {
"slotid": "6"
}
}
}
}
},
{
"on_unequipped": {
"remove-buttons": {
"target": "selectagencypickup",
"buttons": [
"r"
]
},
"alter-actions": {
"path": "action-right-stick",
"value": {
"$notransform": null
}
},
"set-data-property": [
{
"target": "selectagencypickup",
"property": {
"name": "header",
"value": ""
}
},
{
"target": "selectagencypickup",
"property": {
"name": "title",
"value": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_SMUGGLED_ITEM"
}
},
{
"target": "selectagencypickup",
"property": {
"name": "image",
"value": "$res images/ui/tiles/loadout_slot_smuggleditem.jpg"
}
},
{
"target": "selectagencypickup",
"property": {
"name": "rarity",
"value": ""
}
},
{
"target": "selectagencypickup",
"property": {
"name": "perks",
"value": null
}
},
{
"target": "selectagencypickup",
"property": {
"name": "agencypickup",
"value": null
}
}
]
},
"accept": {
"set-post-open-actions": {
"actions": [
{
"set-selected": {
"target": "planning_button"
}
},
{
"set-selected": {
"target": "selectagencypickup"
}
}
]
},
"link": {
"page": "selectagencypickup",
"args": {
"url": "selectagencypickup",
"args": {
"gatemode": "",
"contractId": "$arg contractid"
},
"gatemode": "",
"contractId": "$arg contractid",
"selectedagencypickup": "$arg SelectedAgencyPickup",
"selecteditem": "$($arg currentloadout).$($formatstring slot_6).item.name"
}
}
},
"select": {
"replace-children": {
"target": "headline_container",
"id": "headline-element",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"id": "headline-element",
"selectable": false,
"pressable": false
}
]
},
"update-content": {
"target": "headline-element"
},
"hide-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-group-selection": {
"target": "planning_button"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
]
}
},
{
"view": "menu3.basic.MenuTileSmall",
"id": "selectentrance",
"col": 0,
"row": 1.5,
"data": {
"hidebarcode": true,
"header": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_ENTRANCE",
"title": "$loc $($repository $arg SelectedEntrance).Name_LOC",
"icon": "starting",
"image": "$res $($repository $arg SelectedEntrance).Image"
},
"actions": {
"accept": {
"set-post-open-actions": {
"actions": [
{
"set-selected": {
"target": "planning_button"
}
},
{
"set-selected": {
"target": "selectentrance"
}
}
]
},
"link": {
"page": "selectentrance",
"args": {
"url": "selectentrance",
"args": {
"gatemode": "",
"contractId": "$arg contractid"
},
"gatemode": "",
"contractId": "$arg contractid",
"selectedentrance": "$arg SelectedEntrance"
}
}
},
"select": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
]
},
"update-content": {
"target": "headline_element"
},
"hide-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-group-selection": {
"target": "planning_button"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
},
{
"$if $eq ($arraysize $.LoadoutData,4)": {
"$then": {
"$merge": [
{
"$each $.LoadoutData": {
"$switch $.SlotId": [
{
"case": "0",
"return": {
"selectable": false,
"pressable": false
}
},
{
"case": "1",
"return": {
"selectable": false,
"pressable": false
}
},
{
"case": "6",
"return": {
"selectable": false,
"pressable": false
}
},
{
"default": {
"id": "$formatstring loadout_overview_tile_{$.SlotId}",
"view": "menu3.basic.ItemTileSmall",
"pressable": {
"$switch $.SlotId": [
{
"case": "3",
"return": "$not $arg suitoverride"
},
{
"default": true
}
]
},
"row": {
"$switch $.SlotId": [
{
"case": "0",
"return": 0
},
{
"case": "1",
"return": 0
},
{
"case": "2",
"return": 0
},
{
"case": "3",
"return": 0
},
{
"case": "4",
"return": 1.5
},
{
"case": "5",
"return": 1.5
}
]
},
"col": {
"$switch $.SlotId": [
{
"case": "0",
"return": 2
},
{
"case": "1",
"return": 6
},
{
"case": "2",
"return": 2
},
{
"case": "3",
"return": 4
},
{
"case": "4",
"return": 2
},
{
"case": "5",
"return": 4
}
]
},
"buttons": {
"$if $($arg currentloadout).$($formatstring slot_{$.SlotId}).equipped": {
"$then": [
{
"$switch $.SlotId": [
{
"case": "3",
"return": {
"$if": {
"$condition": {
"$and": [
"$not $arg suitoverride",
"$not $eqs ($arg locationsuiteid,$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.repositoryid)"
]
},
"$then": {
"actiontype": "r",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_LOADOUT_UNEQUIP"
}
}
}
},
{
"default": {
"actiontype": "r",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_LOADOUT_UNEQUIP"
}
}
]
}
]
}
},
"data": {
"$switch $($arg currentloadout).$($formatstring slot_{$.SlotId}).equipped": [
{
"case": true,
"return": {
"$setup": {
"$set Header": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}",
"$set Title": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.name",
"$set Image": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.image",
"$set Icon": {
"$setup": {
"$set repoID": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.repositoryid",
"$in": "$($repository $.repoID).InventoryCategoryIcon"
}
},
"$set Rarity": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.rarity",
"$set Perks": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.perks",
"$set ItemCount": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.itemcount",
"$in": {
"$mergeobjects": [
{
"$switch $.SlotName": [
{
"case": "disguise",
"return": {
"$mergeobjects": [
{
"$if $arg suitoverride": {
"$then": {
"header": "$loc UI_PLAYTHROUGH_DISGUISE_HEADER",
"title": "$loc $($repository $arg suitoverrideid).Name",
"image": "$res $($repository $arg suitoverrideid).Image",
"suitoverride": true
},
"$else": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"suitoverride": false
}
}
},
{
"_comment": "common fields if slot is disguise",
"icon": "$.SlotName",
"specialsuitcrop": true
}
]
}
},
{
"default": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"icon": "$.Icon",
"suitoverride": false
}
}
]
},
{
"_comment": "common data fields",
"rarity": "$.Rarity",
"perks": "$.Perks",
"itemcount": "$.ItemCount"
}
]
}
}
}
},
{
"default": {
"$setup": {
"$set Header": "",
"$set Title": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}",
"$set Image": "$res $formatstring images/ui/tiles/loadout_slot_{$.SlotName}.jpg",
"$set Icon": "$.SlotName",
"$set Rarity": "",
"$set Perks": null,
"$set ItemCount": 0,
"$in": {
"$mergeobjects": [
{
"$switch $.SlotName": [
{
"case": "disguise",
"return": {
"$mergeobjects": [
{
"$if $arg suitoverride": {
"$then": {
"header": "$loc UI_PLAYTHROUGH_DISGUISE_HEADER",
"title": "$loc $($repository $arg suitoverrideid).Name",
"image": "$res $($repository $arg suitoverrideid).Image",
"suitoverride": true
},
"$else": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"suitoverride": false
}
}
},
{
"_comment": "common fields if slot is disguise",
"icon": "$.SlotName",
"specialsuitcrop": true
}
]
}
},
{
"default": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"icon": "$.Icon",
"suitoverride": false
}
}
]
},
{
"_comment": "common data fields",
"rarity": "$.Rarity",
"perks": "$.Perks",
"itemcount": "$.ItemCount"
}
]
}
}
}
}
]
},
"actions": {
"$mergeobjects": [
{
"$if $($arg currentloadout).$($formatstring slot_{$.SlotId}).equipped": {
"$then": {
"action-right-stick": {
"$switch $.SlotId": [
{
"case": "3",
"return": {
"$if": {
"$condition": {
"$and": [
"$not $arg suitoverride",
"$not $eqs ($arg locationsuiteid,$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.repositoryid)"
]
},
"$then": {
"loadout_unequip": {
"slotid": "$.SlotId"
}
}
}
}
},
{
"default": {
"loadout_unequip": {
"slotid": "$.SlotId"
}
}
}
]
}
}
}
},
{
"on_unequipped": {
"$mergeobjects": [
{
"remove-buttons": {
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"buttons": [
"r"
]
},
"alter-actions": {
"path": "action-right-stick",
"value": {
"$notransform": null
}
}
},
{
"$switch $.SlotId": [
{
"case": "3",
"return": {
"set-default-location-suit": {
"slotid": "$.SlotId"
},
"set-data-property": [
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "header",
"value": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "title",
"value": "$loc $($repository $arg locationsuiteid).Name"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "image",
"value": "$res $($repository $arg locationsuiteid).Image"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "icon",
"value": "$.SlotName"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "specialsuitcrop",
"value": true
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "rarity",
"value": ""
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "perks",
"value": null
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "itemcount",
"value": 0
}
}
]
}
},
{
"default": {
"set-data-property": [
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "header",
"value": ""
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "title",
"value": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "image",
"value": "$res $formatstring images/ui/tiles/loadout_slot_{$.SlotName}.jpg"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "specialsuitcrop",
"value": false
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "rarity",
"value": ""
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "perks",
"value": null
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "itemcount",
"value": 0
}
}
]
}
}
]
}
]
},
"accept": {
"set-post-open-actions": {
"actions": [
{
"set-selected": {
"target": "planning_button"
}
},
{
"set-selected": {
"target": "$formatstring loadout_overview_tile_{$.SlotId}"
}
}
]
},
"link": {
"page": "stashpoint",
"args": {
"url": "stashpoint",
"args": {
"gatemode": "",
"contractid": "$arg contractid",
"stashpoint": "",
"allowlargeitems": true,
"slotname": "$formatstring {$.SlotName}{$.SlotId}"
},
"gatemode": "",
"contractid": "$arg contractid",
"stashpoint": "",
"allowlargeitems": true,
"slotname": "$formatstring {$.SlotName}{$.SlotId}",
"icon": "$.SlotName",
"selecteditem": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.id",
"usetalltile": {
"$switch $.SlotName": [
{
"case": "disguise",
"return": true
},
{
"default": false
}
]
},
"usewhitelineheader": {
"$switch $.SlotName": [
{
"case": "disguise",
"return": false
},
{
"default": true
}
]
}
}
}
},
"select": {
"trigger-action": {
"name": "updateheadline"
},
"hide-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-group-selection": {
"target": "planning_button"
}
},
"updateheadline": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline-element",
"view": "menu3.basic.ItemHeadlineElement"
}
]
},
"update-content": {
"target": "headline-element"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
]
}
}
}
]
}
},
{
"$setup": {
"$set SlotId": "2",
"$set SlotName": "concealedweapon",
"$in": {
"id": "$formatstring loadout_overview_tile_{$.SlotId}",
"view": "menu3.basic.ItemTileSmall",
"pressable": false,
"row": {
"$switch $.SlotId": [
{
"case": "0",
"return": 0
},
{
"case": "1",
"return": 0
},
{
"case": "2",
"return": 0
},
{
"case": "3",
"return": 0
},
{
"case": "4",
"return": 1.5
},
{
"case": "5",
"return": 1.5
}
]
},
"col": {
"$switch $.SlotId": [
{
"case": "0",
"return": 2
},
{
"case": "1",
"return": 6
},
{
"case": "2",
"return": 2
},
{
"case": "3",
"return": 4
},
{
"case": "4",
"return": 2
},
{
"case": "5",
"return": 4
}
]
},
"data": {
"header": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}",
"title": "$loc UI_MENU_ELEMENT_NO_CONTENT",
"rarity": "",
"icon": "$.SlotName",
"iconstate": "disabled",
"perks": null,
"image": "$res images/ui/tiles/disabledmenutilesmall.jpg",
"disabledreason": {
"icon": "security",
"description": "$loc UI_MENU_PAGE_PLANNING_RESTRICTED_LOADOUT"
}
},
"actions": {
"select": {
"trigger-action": {
"name": "updateheadline"
},
"hide-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-group-selection": {
"target": "planning_button"
}
},
"updateheadline": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline-element",
"view": "menu3.basic.ItemHeadlineElement"
}
]
},
"update-content": {
"target": "headline-element"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
}
}
},
{
"$setup": {
"$set SlotId": "4",
"$set SlotName": "gear",
"$in": {
"id": "$formatstring loadout_overview_tile_{$.SlotId}",
"view": "menu3.basic.ItemTileSmall",
"pressable": false,
"row": {
"$switch $.SlotId": [
{
"case": "0",
"return": 0
},
{
"case": "1",
"return": 0
},
{
"case": "2",
"return": 0
},
{
"case": "3",
"return": 0
},
{
"case": "4",
"return": 1.5
},
{
"case": "5",
"return": 1.5
}
]
},
"col": {
"$switch $.SlotId": [
{
"case": "0",
"return": 2
},
{
"case": "1",
"return": 6
},
{
"case": "2",
"return": 2
},
{
"case": "3",
"return": 4
},
{
"case": "4",
"return": 2
},
{
"case": "5",
"return": 4
}
]
},
"data": {
"header": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}",
"title": "$loc UI_MENU_ELEMENT_NO_CONTENT",
"rarity": "",
"icon": "$.SlotName",
"iconstate": "disabled",
"perks": null,
"image": "$res images/ui/tiles/disabledmenutilesmall.jpg",
"disabledreason": {
"icon": "security",
"description": "$loc UI_MENU_PAGE_PLANNING_RESTRICTED_LOADOUT"
}
},
"actions": {
"select": {
"trigger-action": {
"name": "updateheadline"
},
"hide-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-group-selection": {
"target": "planning_button"
}
},
"updateheadline": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline-element",
"view": "menu3.basic.ItemHeadlineElement"
}
]
},
"update-content": {
"target": "headline-element"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
}
}
},
{
"$setup": {
"$set SlotId": "5",
"$set SlotName": "gear",
"$in": {
"id": "$formatstring loadout_overview_tile_{$.SlotId}",
"view": "menu3.basic.ItemTileSmall",
"pressable": false,
"row": {
"$switch $.SlotId": [
{
"case": "0",
"return": 0
},
{
"case": "1",
"return": 0
},
{
"case": "2",
"return": 0
},
{
"case": "3",
"return": 0
},
{
"case": "4",
"return": 1.5
},
{
"case": "5",
"return": 1.5
}
]
},
"col": {
"$switch $.SlotId": [
{
"case": "0",
"return": 2
},
{
"case": "1",
"return": 6
},
{
"case": "2",
"return": 2
},
{
"case": "3",
"return": 4
},
{
"case": "4",
"return": 2
},
{
"case": "5",
"return": 4
}
]
},
"data": {
"header": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}",
"title": "$loc UI_MENU_ELEMENT_NO_CONTENT",
"rarity": "",
"icon": "$.SlotName",
"iconstate": "disabled",
"perks": null,
"image": "$res images/ui/tiles/disabledmenutilesmall.jpg",
"disabledreason": {
"icon": "security",
"description": "$loc UI_MENU_PAGE_PLANNING_RESTRICTED_LOADOUT"
}
},
"actions": {
"select": {
"trigger-action": {
"name": "updateheadline"
},
"hide-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-group-selection": {
"target": "planning_button"
}
},
"updateheadline": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline-element",
"view": "menu3.basic.ItemHeadlineElement"
}
]
},
"update-content": {
"target": "headline-element"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
}
}
}
]
},
"$else": {
"$each $.LoadoutData": {
"$switch $.SlotId": [
{
"case": "0",
"return": {
"selectable": false,
"pressable": false
}
},
{
"case": "1",
"return": {
"selectable": false,
"pressable": false
}
},
{
"case": "6",
"return": {
"selectable": false,
"pressable": false
}
},
{
"default": {
"id": "$formatstring loadout_overview_tile_{$.SlotId}",
"view": "menu3.basic.ItemTileSmall",
"pressable": {
"$switch $.SlotId": [
{
"case": "3",
"return": "$not $arg suitoverride"
},
{
"default": true
}
]
},
"row": {
"$switch $.SlotId": [
{
"case": "0",
"return": 0
},
{
"case": "1",
"return": 0
},
{
"case": "2",
"return": 0
},
{
"case": "3",
"return": 0
},
{
"case": "4",
"return": 1.5
},
{
"case": "5",
"return": 1.5
}
]
},
"col": {
"$switch $.SlotId": [
{
"case": "0",
"return": 2
},
{
"case": "1",
"return": 6
},
{
"case": "2",
"return": 2
},
{
"case": "3",
"return": 4
},
{
"case": "4",
"return": 2
},
{
"case": "5",
"return": 4
}
]
},
"buttons": {
"$if $($arg currentloadout).$($formatstring slot_{$.SlotId}).equipped": {
"$then": [
{
"$switch $.SlotId": [
{
"case": "3",
"return": {
"$if": {
"$condition": {
"$and": [
"$not $arg suitoverride",
"$not $eqs ($arg locationsuiteid,$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.repositoryid)"
]
},
"$then": {
"actiontype": "r",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_LOADOUT_UNEQUIP"
}
}
}
},
{
"default": {
"actiontype": "r",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_LOADOUT_UNEQUIP"
}
}
]
}
]
}
},
"data": {
"$switch $($arg currentloadout).$($formatstring slot_{$.SlotId}).equipped": [
{
"case": true,
"return": {
"$setup": {
"$set Header": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}",
"$set Title": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.name",
"$set Image": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.image",
"$set Icon": {
"$setup": {
"$set repoID": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.repositoryid",
"$in": "$($repository $.repoID).InventoryCategoryIcon"
}
},
"$set Rarity": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.rarity",
"$set Perks": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.perks",
"$set ItemCount": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.itemcount",
"$in": {
"$mergeobjects": [
{
"$switch $.SlotName": [
{
"case": "disguise",
"return": {
"$mergeobjects": [
{
"$if $arg suitoverride": {
"$then": {
"header": "$loc UI_PLAYTHROUGH_DISGUISE_HEADER",
"title": "$loc $($repository $arg suitoverrideid).Name",
"image": "$res $($repository $arg suitoverrideid).Image",
"suitoverride": true
},
"$else": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"suitoverride": false
}
}
},
{
"_comment": "common fields if slot is disguise",
"icon": "$.SlotName",
"specialsuitcrop": true
}
]
}
},
{
"default": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"icon": "$.Icon",
"suitoverride": false
}
}
]
},
{
"_comment": "common data fields",
"rarity": "$.Rarity",
"perks": "$.Perks",
"itemcount": "$.ItemCount"
}
]
}
}
}
},
{
"default": {
"$setup": {
"$set Header": "",
"$set Title": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}",
"$set Image": "$res $formatstring images/ui/tiles/loadout_slot_{$.SlotName}.jpg",
"$set Icon": "$.SlotName",
"$set Rarity": "",
"$set Perks": null,
"$set ItemCount": 0,
"$in": {
"$mergeobjects": [
{
"$switch $.SlotName": [
{
"case": "disguise",
"return": {
"$mergeobjects": [
{
"$if $arg suitoverride": {
"$then": {
"header": "$loc UI_PLAYTHROUGH_DISGUISE_HEADER",
"title": "$loc $($repository $arg suitoverrideid).Name",
"image": "$res $($repository $arg suitoverrideid).Image",
"suitoverride": true
},
"$else": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"suitoverride": false
}
}
},
{
"_comment": "common fields if slot is disguise",
"icon": "$.SlotName",
"specialsuitcrop": true
}
]
}
},
{
"default": {
"header": "$.Header",
"title": "$.Title",
"image": "$.Image",
"icon": "$.Icon",
"suitoverride": false
}
}
]
},
{
"_comment": "common data fields",
"rarity": "$.Rarity",
"perks": "$.Perks",
"itemcount": "$.ItemCount"
}
]
}
}
}
}
]
},
"actions": {
"$mergeobjects": [
{
"$if $($arg currentloadout).$($formatstring slot_{$.SlotId}).equipped": {
"$then": {
"action-right-stick": {
"$switch $.SlotId": [
{
"case": "3",
"return": {
"$if": {
"$condition": {
"$and": [
"$not $arg suitoverride",
"$not $eqs ($arg locationsuiteid,$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.repositoryid)"
]
},
"$then": {
"loadout_unequip": {
"slotid": "$.SlotId"
}
}
}
}
},
{
"default": {
"loadout_unequip": {
"slotid": "$.SlotId"
}
}
}
]
}
}
}
},
{
"on_unequipped": {
"$mergeobjects": [
{
"remove-buttons": {
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"buttons": [
"r"
]
},
"alter-actions": {
"path": "action-right-stick",
"value": {
"$notransform": null
}
}
},
{
"$switch $.SlotId": [
{
"case": "3",
"return": {
"set-default-location-suit": {
"slotid": "$.SlotId"
},
"set-data-property": [
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "header",
"value": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "title",
"value": "$loc $($repository $arg locationsuiteid).Name"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "image",
"value": "$res $($repository $arg locationsuiteid).Image"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "icon",
"value": "$.SlotName"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "specialsuitcrop",
"value": true
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "rarity",
"value": ""
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "perks",
"value": null
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "itemcount",
"value": 0
}
}
]
}
},
{
"default": {
"set-data-property": [
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "header",
"value": ""
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "title",
"value": "$loc $formatstring UI_MENU_PAGE_LOADOUT_ELEMENT_SLOT_{$.SlotName}"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "image",
"value": "$res $formatstring images/ui/tiles/loadout_slot_{$.SlotName}.jpg"
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "specialsuitcrop",
"value": false
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "rarity",
"value": ""
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "perks",
"value": null
}
},
{
"target": "$formatstring loadout_overview_tile_{$.SlotId}",
"property": {
"name": "itemcount",
"value": 0
}
}
]
}
}
]
}
]
},
"accept": {
"set-post-open-actions": {
"actions": [
{
"set-selected": {
"target": "planning_button"
}
},
{
"set-selected": {
"target": "$formatstring loadout_overview_tile_{$.SlotId}"
}
}
]
},
"link": {
"page": "stashpoint",
"args": {
"url": "stashpoint",
"args": {
"gatemode": "",
"contractid": "$arg contractid",
"stashpoint": "",
"allowlargeitems": true,
"slotname": "$formatstring {$.SlotName}{$.SlotId}"
},
"gatemode": "",
"contractid": "$arg contractid",
"stashpoint": "",
"allowlargeitems": true,
"slotname": "$formatstring {$.SlotName}{$.SlotId}",
"icon": "$.SlotName",
"selecteditem": "$($arg currentloadout).$($formatstring slot_{$.SlotId}).item.id",
"usetalltile": {
"$switch $.SlotName": [
{
"case": "disguise",
"return": true
},
{
"default": false
}
]
},
"usewhitelineheader": {
"$switch $.SlotName": [
{
"case": "disguise",
"return": false
},
{
"default": true
}
]
}
}
}
},
"select": {
"trigger-action": {
"name": "updateheadline"
},
"hide-node": [
"objectivepage",
"escalation_level_headline_container"
],
"set-group-selection": {
"target": "planning_button"
}
},
"updateheadline": {
"replace-children": {
"target": "headline_container",
"children": [
{
"id": "headline-element",
"view": "menu3.basic.ItemHeadlineElement"
}
]
},
"update-content": {
"target": "headline-element"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
]
}
}
}
]
}
}
}
}
]
}
}
}
},
"$else": null
}
}
},
{
"id": "playpage",
"controller": "list",
"view": "menu3.containers.ListContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal"
},
"children": {
"$if": {
"$condition": {
"$and": [
"$.show",
"$arg multiplayer",
"$eqs ($.Contract.Metadata.Type,sniper)"
]
},
"$then": {
"id": "playpagecontent",
"controller": "list",
"view": "menu3.containers.ListContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal"
},
"children": {
"$each $arg Characters": {
"$setup": {
"$set Image": "$formatstring images/ui/sc/{$.Name}.jpg",
"$set Stateproviders": [
{
"type": "contractavailability",
"contract": "$arg Contract"
},
{
"type": "multiplayercharacterselection",
"contract": "$arg Contract",
"agent": "$.Name",
"characterId": "$.Id",
"selectionId": "$.SelectionId",
"loadoutData": "$.LoadoutData",
"playerNameTarget": "header"
}
],
"$set Actions": {
"accept": {
"trigger-action": {
"name": "on-accept"
}
},
"on-contract-unavailable": {
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": {
"$loc": "UI_CONTRACT_LOAD_ERROR_CONTENT_MISSING"
}
}
},
"onbutton": []
}
}
}
},
"on-contract-available": {
"alter-actions": {
"path": "accept",
"value": {
"trigger-action": {
"name": "on-accept"
}
}
}
},
"on-accept": {
"set-player-ready": {
"agent": "$.Name",
"characterId": "$.Id",
"selectionId": "$.SelectionId",
"loadoutData": "$.LoadoutData",
"isReady": true
}
},
"action-y": {},
"on-character-selection-state-changed": {
"$notransform": {
"$switch $.state": [
{
"case": "character-selection-disabled",
"return": [
{
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "title",
"value": {
"$loc": {
"key": "UI_MENU_PAGE_PLANNING_ELEMENT_PLAY_AS",
"data": [
"$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}"
]
}
}
}
}
},
{
"remove-buttons": {
"target": "$formatstring agent_{$.Name}_id",
"buttons": [
"action-y"
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"alter-actions": {
"path": "on-accept",
"value": {}
},
"set-selectable": {
"target": "$formatstring agent_{$.Name}_id",
"value": false
},
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "icon",
"value": "locked"
}
}
}
]
},
{
"case": "character-available",
"return": [
{
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "title",
"value": {
"$loc": {
"key": "UI_MENU_PAGE_PLANNING_ELEMENT_PLAY_AS",
"data": [
"$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}"
]
}
}
}
}
},
{
"remove-buttons": {
"target": "$formatstring agent_{$.Name}_id",
"buttons": [
"action-y"
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"alter-actions": {
"path": "on-accept",
"value": {
"set-player-ready": {
"agent": "$.Name",
"selectionId": "$.SelectionId",
"characterId": "$.Id",
"loadoutData": "$.LoadoutData",
"isReady": true
}
}
},
"set-pressable": {
"target": "$formatstring agent_{$.Name}_id",
"value": true
},
"set-selectable": {
"target": "$formatstring agent_{$.Name}_id",
"value": true
},
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "icon",
"value": "play"
}
}
}
]
},
{
"case": "character-taken",
"return": [
{
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}"
}
}
},
{
"add-buttons": {
"target": "$formatstring agent_{$.Name}_id",
"buttons": [
{
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$if": {
"$condition": {
"$if $not $isnull $.ProfileId2": {
"$then": {
"$if": {
"$condition": {
"$or": [
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": true,
"$else": false
}
},
"$else": "$($user $.ProfileId1).isresolved"
}
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"case": "durango",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO"
}
},
{
"default": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
}
]
}
}
}
}
}
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"alter-actions": {
"path": "on-accept",
"value": {}
},
"set-pressable": {
"target": "$formatstring agent_{$.Name}_id",
"value": false
},
"set-selectable": {
"target": "$formatstring agent_{$.Name}_id",
"value": true
},
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "icon",
"value": "locked"
}
}
}
]
},
{
"case": "character-chosen",
"return": [
{
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}"
}
}
},
{
"add-buttons": {
"target": "$formatstring agent_{$.Name}_id",
"buttons": [
{
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$if": {
"$condition": {
"$if $not $isnull $.ProfileId2": {
"$then": {
"$if": {
"$condition": {
"$or": [
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": true,
"$else": false
}
},
"$else": "$($user $.ProfileId1).isresolved"
}
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"case": "durango",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO"
}
},
{
"default": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
}
]
}
}
}
}
}
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"alter-actions": {
"path": "on-accept",
"value": {
"set-player-ready": {
"agent": "$.Name",
"selectionId": "$.SelectionId",
"characterId": "$.Id",
"loadoutData": "$.LoadoutData",
"isReady": false
}
}
},
"set-pressable": {
"target": "$formatstring agent_{$.Name}_id",
"value": true
},
"set-selectable": {
"target": "$formatstring agent_{$.Name}_id",
"value": true
},
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "icon",
"value": "check"
}
}
}
]
},
{
"case": "character-done",
"return": [
{
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "title",
"value": "$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}"
}
}
},
{
"add-buttons": {
"target": "$formatstring agent_{$.Name}_id",
"buttons": [
{
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$if": {
"$condition": {
"$if $not $isnull $.ProfileId2": {
"$then": {
"$if": {
"$condition": {
"$or": [
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": true,
"$else": false
}
},
"$else": "$($user $.ProfileId1).isresolved"
}
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"case": "durango",
"return": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO"
}
},
{
"default": {
"actiontype": "action-y",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
}
]
}
}
}
}
}
]
},
"alter-actions": {
"path": "action-y",
"value": {
"$setup": {
"$set ProfileId1": {
"$if $not $isnull $.ProfileId": {
"$then": "$.ProfileId",
"$else": "$.ProfileId1"
}
},
"$set Platform": {
"$if $not $isnull $arg _platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": {}
},
{
"default": {
"$if": {
"$condition": {
"$and": [
"$not $isnull $.ProfileId2",
"$($user $.ProfileId1).isresolved",
"$($user $.ProfileId2).isresolved"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$($user $.ProfileId1).name",
"$($user $.ProfileId2).name",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE_DURANGO",
"$else": "$loc UI_BUTTON_PROMPTS_ACTION_PLATFORM_PROFILE"
}
},
"description": {
"$if $eqs ($arg _platform,durango)": {
"$then": "$loc UI_DIALOG_PLATFORM_PROFILE_DURANGO_SELECT_DESC",
"$else": "$loc UI_DIALOG_PLATFORM_PROFILE_SELECT_DESC"
}
},
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
},
"onbutton": [
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId1"
}
},
{
"show-player-profile-dialog": {
"profileId": "$.ProfileId2"
}
}
]
}
},
"$else": {
"show-player-profile-dialog": {
"profileId": {
"$if $($user $.ProfileId1).isresolved": {
"$then": "$.ProfileId1",
"$else": "$.ProfileId2"
}
}
}
}
}
}
}
]
}
}
}
}
},
{
"alter-actions": {
"path": "on-accept",
"value": {}
},
"set-pressable": {
"target": "$formatstring agent_{$.Name}_id",
"value": false
},
"set-selectable": {
"target": "$formatstring agent_{$.Name}_id",
"value": true
},
"set-data-property": {
"target": "$formatstring agent_{$.Name}_id",
"reload-node": false,
"property": {
"name": "icon",
"value": "locked"
}
}
}
]
}
]
}
}
},
"$in": {
"view": "menu3.basic.MenuTileLarge",
"id": "$formatstring agent_{$.Name}_id",
"pressable": true,
"ncols": 4,
"data": {
"header": "",
"title": {
"$loc": {
"key": "UI_MENU_PAGE_PLANNING_ELEMENT_PLAY_AS",
"data": [
"$loc $formatstring ACTOR_HERO_CHARACTER_{$.Name}"
]
}
},
"icon": "play",
"image": "$res $.Image"
},
"stateproviders": "$.Stateproviders",
"actions": {
"$mergeobjects": [
"$.Actions",
{
"select": {
"replace-children": {
"target": "headline_container",
"id": "headline-element",
"children": [
{
"view": "menu3.basic.HeadlineElement",
"id": "headline-element",
"selectable": false,
"pressable": false
}
]
},
"update-content": {
"target": "headline-element"
},
"hide-node": [
"objectivepage",
"planningpage"
],
"set-group-selection": {
"target": "PLANNING_BUTTON_PLAY"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
]
}
}
}
}
}
},
"$else": null
}
}
}
]
}
]
}
}
}
}
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "creation",
"return": {
"pressable": false,
"selectable": false
}
},
{
"default": {
"$if $($arg _isonline)": {
"$then": {
"view": "menu3.basic.CategoryElement",
"id": "challenges_tab",
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_CHALLENGES",
"icon": "challenge"
},
"children": {
"$use $.ChallengeData": {
"$if $eq ($arraysize $.Children,0)": {
"$then": {
"$setup": {
"$set Title": "$loc UI_MENU_PAGE_NO_CHALLENGES_AVAILABLE",
"$in": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "$.Header",
"title": "$.Title",
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
},
"$else": [
{
"controller": "list",
"id": "sub_category_container",
"row": 0.1,
"col": 0,
"_comment": "enable analog handling to allow the submenu to handle LT/RT",
"handleanalog": true
},
{
"$setpageargs": {
"ShowPrevNextButtonPrompt": "$gt ($arraysize $.Children,1)"
},
"controller": "category",
"id": "sub_category_controller",
"container": "sub_category_container",
"view": "menu3.containers.ScrollingTabsContainer",
"direction": "horizontal",
"submenu-navigation": true,
"prevnextnav": true,
"data": {
"direction": "horizontal",
"submenu": true
},
"children": {
"$each $.Children": {
"id": "$formatstring challenge_category_{$.Name}",
"view": "menu3.basic.SubCategoryElement",
"data": {
"$setup": {
"$set totalcompleted": "$formatstring {$.CompletedChallengesCount, .f}",
"$set totalcount": "$formatstring {$.ChallengesCount, .f}",
"$in": {
"title": "$formatstring {$loc $.Name} {$.totalcompleted} / {$.totalcount}"
}
}
},
"buttons": [
{
"$if $arg ShowPrevNextButtonPrompt": {
"$then": {
"actiontype": "lt_rt",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PREVNEXT_CATEGORY",
"customplatform": {
"platform": "key",
"hide": true,
"actiontype": "mouse_lmb"
}
}
}
}
],
"children": {
"$use $.SwitchData.Data": {
"$if $eq ($arraysize $.Challenges,0)": {
"$then": {
"$setup": {
"$set Title": "$loc UI_MENU_PAGE_NO_CHALLENGES_AVAILABLE",
"$in": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "$.Header",
"title": "$.Title",
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
},
"$else": {
"$merge": [
{
"controller": "list",
"col": 3,
"row": 3,
"selectable": false,
"pressable": false,
"id": "detail_view_container",
"children": []
},
{
"controller": "context-selector",
"id": "context_selector_container",
"context-activation-input": "down",
"target": "$formatstring challenge_list_{$.CategoryData.Name}",
"target-context": "challenge_action_container",
"children": [
{
"controller": "filter",
"id": "$formatstring challenge_list_{$.CategoryData.Name}",
"view": "menu3.containers.ThumbnailScrollingListContainer",
"row": 1.0,
"nrows": 1,
"ncols": 10,
"height": 660,
"direction": "horizontal",
"data": {
"direction": "horizontal",
"hidescrollbar": true,
"masktopoffset": 70,
"maskleftoffset": 250,
"isleaf": true,
"treenav": true,
"hasprevious": "$.HasPrevious",
"hasnext": "$.HasNext",
"previousicon": "$.PreviousCategoryIcon",
"nexticon": "$.NextCategoryIcon",
"containeremptydata": {
"title": "$loc $.CategoryData.Name",
"totalcompleted": "$formatstring {$.CategoryData.CompletedChallengesCount, .0f}",
"totalcount": "$formatstring {$.CategoryData.ChallengesCount, .0f}",
"icon": "$.CategoryData.Icon",
"image": "$res $.CategoryData.Image"
}
},
"actions": {
"on-filtered-list-empty": [
{
"replace-children": {
"target": "detail_view_container",
"children": {}
}
},
{
"replace-children": {
"target": "challenge_action_container",
"children": null
}
}
],
"on-filtered-list-not-empty": [
{
"replace-children": {
"target": "headline_container",
"children": {}
}
},
{
"$if $not $arg DisableChallengesMasteryHandling": {
"$then": {
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
}
}
],
"on-remove-child": {
"save-ui-options": "",
"replace-children": {
"target": "headline_container",
"children": []
}
},
"on-page-closed": {
"save-ui-options": ""
}
},
"filter-option-id": "UI_OPTION_GAME_CHALLENGES_FILTER",
"filter-toggle-action": "action-y",
"filter-definitions": [
{
"_comment": "no filter",
"toggle-button-title": "$loc UI_MENU_PAGE_CHALLENGES_NOT_COMPLETED",
"predicate": true,
"default-filter": true
},
{
"_comment": "show unfinished challenges",
"toggle-button-title": "$loc UI_MENU_PAGE_CHALLENGES_COMPLETED",
"predicate": {
"$notransform": {
"$if $.data.completed": {
"$then": false,
"$else": true
}
}
},
"actions": {
"$setup": {
"$set HeadlineTitle": "UI_MENU_PAGE_NO_UNCOMPLETED_CHALLENGES_AVAILABLE",
"$in": {
"select": [
{
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": {
"$loc": {
"key": "$.HeadlineTitle",
"data": "$loc $.CategoryData.Name"
}
},
"typeicon": "$.CategoryData.Icon",
"multilinetitle": true
}
}
}
},
{
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
],
"on-filtered-list-empty": [
{
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": {
"$loc": {
"key": "$.HeadlineTitle",
"data": "$loc $.CategoryData.Name"
}
},
"typeicon": "$.CategoryData.Icon",
"multilinetitle": true
}
}
}
},
{
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
]
}
}
}
},
{
"_comment": "show completed challenges",
"toggle-button-title": "$loc UI_MENU_PAGE_NO_FILTER",
"predicate": {
"$notransform": {
"$if $.data.completed": {
"$then": true,
"$else": false
}
}
},
"actions": {
"$setup": {
"$set HeadlineTitle": "UI_MENU_PAGE_NO_COMPLETED_CHALLENGES_AVAILABLE",
"$in": {
"select": [
{
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": {
"$loc": {
"key": "$.HeadlineTitle",
"data": "$loc $.CategoryData.Name"
}
},
"typeicon": "$.CategoryData.Icon",
"multilinetitle": true
}
}
}
},
{
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
],
"on-filtered-list-empty": [
{
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.HeadlineElement",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": {
"$loc": {
"key": "$.HeadlineTitle",
"data": "$loc $.CategoryData.Name"
}
},
"typeicon": "$.CategoryData.Icon",
"multilinetitle": true
}
}
}
},
{
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
]
}
}
}
}
],
"children": {
"$each $.Challenges": {
"view": "menu3.basic.ThumbnailItemTile",
"id": "$formatstring challengeItem_{$.Name}",
"nrows": 1,
"ncols": 1,
"pressable": false,
"data": {
"ondemand": true,
"showningame": {
"$if $arg _isingame": {
"$then": true,
"$else": false
}
},
"image": "$res $.ImageName",
"completed": "$.Completed",
"desaturateNotComplete": true,
"icon": {
"$if $.Completed": {
"$then": "check"
}
}
},
"actions": {
"select": [
{
"replace-children": {
"target": "detail_view_container",
"children": {
"selectable": false,
"children": {
"$if $.Completed": {
"$then": {
"view": "menu3.ChallengeDetailTile",
"selectable": false,
"pressable": false,
"data": {
"header": "$loc $.CategoryName",
"title": "$loc $.Name",
"icon": "$.Icon",
"description": "$loc $.Description",
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
"unlocks": {
"$each $.Drops": {
"$setup": {
"$set Item": "$item $.",
"$in": {
"name": "$.Item.name",
"image": "$.Item.image",
"rarity": "$.Item.rarity",
"perks": "$($repository $.Item.repositoryid).Perks",
"multiplier": "$.Item.multiplier"
}
}
}
},
"isnew": "$.IsNew",
"status": {
"$if $.Completed": {
"$then": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_ACCOMPLISHED",
"$else": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED"
}
},
"completed": "$.Completed",
"statusdate": "",
"disablerewards": "$.HideProgression",
"rewards": [
{
"$setup": {
"$set CityName": "$loc $formatstring UI_{$.LocationId}_CITY",
"$in": {
"name": "$formatstring {$loc UI_MENU_PAGE_PROFILE_CHALLENGES_MASTERY} {$.CityName}",
"amount": "$.Rewards.MasteryXP"
}
}
}
]
}
},
"$else": {
"$if $eq ($queryoption UI_OPTION_GAME_AID_CHALLENGEDESCRIPTION,2)": {
"$then": {
"view": "menu3.ChallengeDetailTile",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": "",
"description": "$loc UI_MENU_PAGE_CHALLENGES_VERBOSITY_WARNING",
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
"unlocks": {
"$each $.Drops": {
"$setup": {
"$set Item": "$item $.",
"$in": {
"name": "$.Item.name",
"image": "$.Item.image",
"rarity": "$.Item.rarity",
"perks": "$($repository $.Item.repositoryid).Perks",
"multiplier": "$.Item.multiplier"
}
}
}
},
"isnew": "$.IsNew",
"status": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED",
"completed": false,
"statusdate": "",
"disablerewards": "$.HideProgression",
"rewards": [
{
"$setup": {
"$set CityName": "$loc $formatstring UI_{$.LocationId}_CITY",
"$in": {
"name": "$formatstring {$loc UI_MENU_PAGE_PROFILE_CHALLENGES_MASTERY} {$.CityName}",
"amount": "$.Rewards.MasteryXP"
}
}
}
]
}
},
"$else": {
"$if $eq ($queryoption UI_OPTION_GAME_AID_CHALLENGEDESCRIPTION,1)": {
"$then": {
"view": "menu3.ChallengeDetailTile",
"selectable": false,
"pressable": false,
"data": {
"header": "$loc $.CategoryName",
"title": "$loc $.Name",
"icon": "$.Icon",
"description": "$loc UI_MENU_PAGE_CHALLENGES_VERBOSITY_WARNING",
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
"unlocks": {
"$each $.Drops": {
"$setup": {
"$set Item": "$item $.",
"$in": {
"name": "$.Item.name",
"image": "$.Item.image",
"rarity": "$.Item.rarity",
"perks": "$($repository $.Item.repositoryid).Perks",
"multiplier": "$.Item.multiplier"
}
}
}
},
"isnew": "$.IsNew",
"status": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED",
"completed": false,
"statusdate": "",
"disablerewards": "$.HideProgression",
"rewards": [
{
"$setup": {
"$set CityName": "$loc $formatstring UI_{$.LocationId}_CITY",
"$in": {
"name": "$formatstring {$loc UI_MENU_PAGE_PROFILE_CHALLENGES_MASTERY} {$.CityName}",
"amount": "$.Rewards.MasteryXP"
}
}
}
]
}
},
"$else": {
"view": "menu3.ChallengeDetailTile",
"selectable": false,
"pressable": false,
"data": {
"header": "$loc $.CategoryName",
"title": "$loc $.Name",
"icon": "$.Icon",
"description": "$loc $.Description",
"rewardsTitle": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES_DETAILS_REWARDS",
"unlocks": {
"$each $.Drops": {
"$setup": {
"$set Item": "$item $.",
"$in": {
"name": "$.Item.name",
"image": "$.Item.image",
"rarity": "$.Item.rarity",
"perks": "$($repository $.Item.repositoryid).Perks",
"multiplier": "$.Item.multiplier"
}
}
}
},
"isnew": "$.IsNew",
"status": {
"$if $.Completed": {
"$then": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_ACCOMPLISHED",
"$else": "$loc UI_MENU_PAGE_PROFILE_CHALLENGE_NOT_ACCOMPLISHED"
}
},
"completed": "$.Completed",
"statusdate": "",
"disablerewards": "$.HideProgression",
"rewards": [
{
"$setup": {
"$set CityName": "$loc $formatstring UI_{$.LocationId}_CITY",
"$in": {
"name": "$formatstring {$loc UI_MENU_PAGE_PROFILE_CHALLENGES_MASTERY} {$.CityName}",
"amount": "$.Rewards.MasteryXP"
}
}
}
]
}
}
}
}
}
}
}
}
}
}
},
{
"$if $not $arg DisableChallengesMasteryHandling": {
"$then": {
"set-mastery-data": {
"$setup": {
"$set ValidContractType": {
"$if $isnull $.Contract": {
"$then": true,
"$else": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": false
},
{
"case": "featured",
"return": false
},
{
"default": true
}
]
}
}
},
"$set HideProgression": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationHideProgression",
"$else": "$.CompletionData.HideProgression"
}
},
"$set MasteryTitle": {
"$if $isnull $.CompletionData": {
"$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}",
"$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}"
}
},
"$set MasteryCompletion": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationCompletion",
"$else": "$.CompletionData.Completion"
}
},
"$set MasteryXpLeft": {
"$if $isnull $.CompletionData": {
"$then": "$.Data.LocationXpLeft",
"$else": "$.CompletionData.XpLeft"
}
},
"$set CityName": {
"$if $isnull $.CompletionData": {
"$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY"
}
},
"$set NameLocalized": {
"$if $isnull $.CompletionData.Name": {
"$then": "$.CityName",
"$else": "$loc $.CompletionData.Name"
}
},
"$set ShowUnit": {
"$if $.CompletionData.IsLocationProgression": {
"$then": true,
"$else": false
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$if $.CompletionData.IsLocationProgression": {
"$then": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.NameLocalized"
]
}
},
"$else": "$.NameLocalized"
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft",
"showUnit": "$.ShowUnit"
},
"$else": {}
}
}
}
}
}
}
}
],
"select-changed": {
"replace-children": {
"target": "challenge_action_container",
"children": {
"$if": {
"$condition": {
"$and": [
"$.IsPlayable",
{
"$if": {
"$condition": {
"$and": [
"$timeexpired $.UserCentricContract.Contract.Metadata.PlayableUntil",
{
"$equal": [
"elusive",
"$.UserCentricContract.Contract.Metadata.Type"
]
}
]
},
"$then": false,
"$else": true
}
}
]
},
"$then": {
"view": "menu3.basic.ChallengeActionButton",
"pressable": {
"$if $not $arg DifficultyLevelUnlocked": {
"$then": false,
"$else": {
"$switch $.TypeHeader": [
{
"case": "UI_MENU_PAGE_CHALLENGE_HEADER_GLOBAL",
"return": false
},
{
"default": {
"$use $.UserCentricContract": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": false,
"$else": true
}
}
},
{
"default": true
}
]
}
}
}
]
}
}
},
"data": {
"header": {
"$if $not $arg DifficultyLevelUnlocked": {
"$then": "$loc UI_DIFFICULTY_NOT_AVAILABLE_PRO1_HEADER",
"$else": {
"$if": {
"$condition": {
"$and": [
"$eqs ($.UserCentricContract.Contract.Metadata.Type,flashback)",
"$not $.UserCentricContract.Data.IsFreeDLC"
]
},
"$then": "$loc UI_CONTRACT_HEADER_SEASONAL",
"$else": {
"$if $eqs ($.UserCentricContract.Contract.Metadata.Type,campaign)": {
"$then": "$loc $.UserCentricContract.Contract.Metadata.GroupTitle",
"$else": "$loc $.TypeHeader"
}
}
}
}
}
},
"title": {
"$if $not $arg DifficultyLevelUnlocked": {
"$then": "$loc UI_DIFFICULTY_NOT_AVAILABLE_PRO1_TITLE",
"$else": "$loc $.TypeTitle"
}
},
"icon": {
"$if $not $arg DifficultyLevelUnlocked": {
"$then": "locked",
"$else": {
"$switch $.TypeHeader": [
{
"case": "UI_MENU_PAGE_CHALLENGE_HEADER_GLOBAL",
"return": "challenge"
},
{
"default": "$.TypeIcon"
}
]
}
}
}
},
"stateproviders": [
{
"type": "contractavailability",
"contract": "$.UserCentricContract.Contract"
}
],
"actions": {
"$if $not $arg DifficultyLevelUnlocked": {
"$then": null,
"$else": {
"$switch $.TypeHeader": [
{
"case": "UI_MENU_PAGE_CHALLENGE_HEADER_GLOBAL",
"return": {}
},
{
"case": "UI_MENU_PAGE_CHALLENGE_HEADER_LOCATION",
"return": {
"accept": {
"$switch $arg _pagename": [
{
"case": "destination",
"return": {
"set-selected": {
"target": "destination_mission_tab"
}
}
},
{
"default": {
"link": {
"page": "destination",
"args": {
"url": "destination",
"args": {
"locationId": "$.ParentLocationId"
}
}
}
}
}
]
}
}
},
{
"default": {
"$use $.UserCentricContract": {
"$mergeobjects": [
{
"on-free-prologue-user": {
"_comment": "We have a free prologue user and the content is not owned",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": {
"$setup": {
"$set Store": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "UI_MENU_GO_TO_STORE"
},
{
"case": "orbis",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
}
]
},
"$in": "$formatstring {$loc UI_MENU_PAGE_FEATURED_GOTO_HEADER} {$loc $.Store}"
}
},
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_PAGE_FREE_PROLOGUE_THANKYOU_TITLE",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"information": [
{
"$if": {
"$condition": {
"$or": [
{
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,durango)",
"$eqs ($arg _region,jp)",
{
"$isfreeprologueuser": ""
}
]
}
}
},
{
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,orbis)",
"$eqs ($arg _storeregion,CUSA08340)",
{
"$isfreeprologueuser": ""
}
]
}
}
}
]
},
"$then": {
"imagetext": {
"description": "$loc GAME_STORE_METADATA_GAME_SHORT",
"image": "$res images/livetile/dlc/tile_fullxp.jpg"
}
},
"$else": {
"imagetext": {
"description": "$loc UI_MENU_PAGE_FREE_PROLOGUE_THANKYOU_DESCRIPTION",
"image": "$res images/livetile/dlc/tile_goty.jpg"
}
}
}
}
]
}
},
"onbutton": [
{
"$switch $arg _platform": [
{
"case": "pc",
"return": {
"$if $arg _isonline": {
"$then": {
"open-store-fullxp": {
"_comment": "In online mode, go to the GOTY bundle.",
"storeid": "http://store.steampowered.com/bundle/4854"
}
},
"$else": {
"open-store-fullxp": {
"_comment": "In offline mode, go to the HITMAN app (which will redirect to the dlc page).",
"_comment2": "We can't update this link over our server. So we keep it save and go to the app ID.",
"storeid": "http://store.steampowered.com/app/236870"
}
}
}
}
},
{
"default": {
"show-store-item-detail": {
"serviceLabel": {
"$switch $arg _platform": [
{
"case": "orbis",
"return": {
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _storeregion,CUSA10514)",
"$eqs ($arg _storeregion,CUSA11532)"
]
},
"$then": 1,
"$else": null
}
}
},
{
"default": {
"return": null
}
}
]
},
"itemId": {
"$if": {
"$condition": {
"$or": [
{
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,durango)",
"$eqs ($arg _region,jp)",
{
"$isfreeprologueuser": ""
}
]
}
}
},
{
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,orbis)",
"$eqs ($arg _storeregion,CUSA08340)",
{
"$isfreeprologueuser": ""
}
]
}
}
}
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Storeregion": {
"$if $isnull $.Storeregion": {
"$then": "$arg _storeregion",
"$else": "$.Storeregion"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$if": {
"$condition": {
"$isintropackuser": ""
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"case": "CUSA08340",
"return": "FULLEXPERIENCE00"
},
{
"default": "HITMANUPGRADEPAC"
}
]
}
},
{
"case": "durango",
"$switch $.Region": [
{
"case": "jp",
"return": "1266e616-cef5-4a39-9e35-98694a51f7c8"
},
{
"default": "73307168-13f3-472c-9ab2-2a51308bae25"
}
]
}
]
},
"$else": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": {
"$switch $.Region": [
{
"case": "jp",
"return": "1266e616-cef5-4a39-9e35-98694a51f7c8"
},
{
"default": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
}
}
]
}
}
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Storeregion": {
"$if $isnull $.Storeregion": {
"$then": "$arg _storeregion",
"$else": "$.Storeregion"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,orbis)",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _storeregion,CUSA02976)",
"$eqs ($arg _storeregion,CUSA06535)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": false,
"$else": true
}
}
}
}
]
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"case": "CUSA06508",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA06535",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA07680",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA08340",
"return": "0000S1GOTYFULLXP"
},
{
"default": "00000S1GOTYINTRO"
}
]
}
},
{
"case": "durango",
"return": "721958f5-9ddb-4b9e-8ae3-3e07cdaf4843"
}
]
},
"$else": {
"$if": {
"$condition": {
"$isfullexperienceuser": ""
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"case": "CUSA06508",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA06535",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA07680",
"return": "000000S1GOTYDISC"
},
{
"default": "0000S1GOTYFULLXP"
}
]
}
},
{
"case": "durango",
"return": "253a5f74-b320-4ace-9f8b-94919faa21d3"
}
]
},
"$else": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"case": "CUSA06508",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA06535",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA07680",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA08340",
"return": "0000S1GOTYFULLXP"
},
{
"default": "000000S1GOTYFULL"
}
]
}
},
{
"case": "durango",
"return": "407d4c8a-6c6e-44a8-a81c-7594a791ae67"
}
]
}
}
}
}
}
}
}
}
}
}
}
}
]
}
]
}
}
}
},
"on-content-unknown": {
"_comment": "No DLC could be found containing contract",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
},
"on-content-not-owned": {
"_comment": "DLC is not owned",
"alter-actions": {
"path": "accept",
"value": {
"$if": {
"$condition": {
"$and": [
"$timeexpired $.Contract.Metadata.PlayableUntil",
{
"$equal": [
"elusive",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTRACT_HEADER_ELUSIVE",
"description": "$loc UI_DIALOG_SHOP_ELUSIVE_TARGET"
}
},
"onbutton": [
{
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": {
"$setup": {
"$set Store": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "UI_MENU_GO_TO_STORE"
},
{
"case": "orbis",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
}
]
},
"$in": "$formatstring {$loc UI_MENU_PAGE_FEATURED_GOTO_HEADER} {$loc $.Store}"
}
},
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_OWNED_TITLE",
"$set Description": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_OWNED_DESCRIPTION",
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
},
"onbutton": [
{
"$if $not $arg _isonline": {
"$then": {
"open-package-store": {
"packageid": "$.packageid",
"skipdialog": true
}
},
"$else": {
"show-store-item-detail": {
"itemId": {
"$setup": {
"$set LocationId": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": {
"$if $not $($isnull $.Contract)": {
"$then": "$.Contract.Metadata.Location",
"$else": null
}
},
"$else": "$.Location.Id"
}
},
"$else": "$.SubLocation.Id"
}
},
"$in": {
"$if $isnull $.LocationId": {
"$then": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
},
"$else": {
"$switch $.LocationId": [
{
"case": "LOCATION_PARENT_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_PARENT_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARENT_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_MOVIESET",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_EBOLA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_PARENT_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_PARENT_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK_ZIKA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_PARENT_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO_RABIES",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_PARENT_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO_FLU",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"default": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
}
}
]
}
}
}
}
}
}
}
}
}
]
}
}
]
}
},
"$else": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": {
"$setup": {
"$set Store": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "UI_MENU_GO_TO_STORE"
},
{
"case": "orbis",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
}
]
},
"$in": "$formatstring {$loc UI_MENU_PAGE_FEATURED_GOTO_HEADER} {$loc $.Store}"
}
},
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_OWNED_TITLE",
"$set Description": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_OWNED_DESCRIPTION",
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
},
"onbutton": [
{
"$if $not $arg _isonline": {
"$then": {
"open-package-store": {
"packageid": "$.packageid",
"skipdialog": true
}
},
"$else": {
"show-store-item-detail": {
"itemId": {
"$setup": {
"$set LocationId": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": {
"$if $not $($isnull $.Contract)": {
"$then": "$.Contract.Metadata.Location",
"$else": null
}
},
"$else": "$.Location.Id"
}
},
"$else": "$.SubLocation.Id"
}
},
"$in": {
"$if $isnull $.LocationId": {
"$then": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
},
"$else": {
"$switch $.LocationId": [
{
"case": "LOCATION_PARENT_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_PARENT_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARENT_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_MOVIESET",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_EBOLA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_PARENT_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_PARENT_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK_ZIKA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_PARENT_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO_RABIES",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_PARENT_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO_FLU",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"default": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
}
}
]
}
}
}
}
}
}
}
}
}
]
}
}
}
}
}
},
"on-content-not-installed": {
"_comment": "DLC owned but not installed",
"alter-actions": {
"path": "accept",
"value": {
"$if": {
"$condition": {
"$and": [
"$timeexpired $.Contract.Metadata.PlayableUntil",
{
"$equal": [
"elusive",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTRACT_HEADER_ELUSIVE",
"description": "$loc UI_DIALOG_SHOP_ELUSIVE_TARGET_DOWNLOAD"
}
},
"onbutton": [
{
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": {
"$setup": {
"$set Store": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "UI_MENU_GO_TO_STORE"
},
{
"case": "orbis",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
}
]
},
"$in": "$formatstring {$loc UI_MENU_PAGE_FEATURED_GOTO_HEADER} {$loc $.Store}"
}
},
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_INSTALLED_TITLE",
"_comment": "using the NOT_OWNED string here as well is intentional",
"$set Description": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_INSTALLED_DESCRIPTION",
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
},
"onbutton": [
{
"$if $not $arg _isonline": {
"$then": {
"open-package-store": {
"packageid": "$.packageid",
"skipdialog": true
}
},
"$else": {
"show-store-item-detail": {
"itemId": {
"$setup": {
"$set LocationId": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": {
"$if $not $($isnull $.Contract)": {
"$then": "$.Contract.Metadata.Location",
"$else": null
}
},
"$else": "$.Location.Id"
}
},
"$else": "$.SubLocation.Id"
}
},
"$in": {
"$if $isnull $.LocationId": {
"$then": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
},
"$else": {
"$switch $.LocationId": [
{
"case": "LOCATION_PARENT_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_PARENT_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARENT_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_MOVIESET",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_EBOLA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_PARENT_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_PARENT_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK_ZIKA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_PARENT_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO_RABIES",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_PARENT_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO_FLU",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"default": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
}
}
]
}
}
}
}
}
}
}
}
}
]
}
}
]
}
},
"$else": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": {
"$setup": {
"$set Store": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "UI_MENU_GO_TO_STORE"
},
{
"case": "orbis",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
}
]
},
"$in": "$formatstring {$loc UI_MENU_PAGE_FEATURED_GOTO_HEADER} {$loc $.Store}"
}
},
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_INSTALLED_TITLE",
"_comment": "using the NOT_OWNED string here as well is intentional",
"$set Description": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_INSTALLED_DESCRIPTION",
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
},
"onbutton": [
{
"$if $not $arg _isonline": {
"$then": {
"open-package-store": {
"packageid": "$.packageid",
"skipdialog": true
}
},
"$else": {
"show-store-item-detail": {
"itemId": {
"$setup": {
"$set LocationId": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": {
"$if $not $($isnull $.Contract)": {
"$then": "$.Contract.Metadata.Location",
"$else": null
}
},
"$else": "$.Location.Id"
}
},
"$else": "$.SubLocation.Id"
}
},
"$in": {
"$if $isnull $.LocationId": {
"$then": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
},
"$else": {
"$switch $.LocationId": [
{
"case": "LOCATION_PARENT_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_ICA_FACILITY",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"default": "HITMANGAME000001"
}
]
}
},
{
"case": "durango",
"return": "7b51fef8-8cdc-456b-8170-285e7388815b"
}
]
}
},
{
"case": "LOCATION_PARENT_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARIS",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000001"
},
{
"default": "000000000000DLC0"
}
]
}
},
{
"case": "durango",
"return": "ddbfb905-1db6-4f8d-a195-f4c618090158"
}
]
}
},
{
"case": "LOCATION_PARENT_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_MOVIESET",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_COASTALTOWN_EBOLA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "439890"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000002"
},
{
"default": "000000000000DLC1"
}
]
}
},
{
"case": "durango",
"return": "7259af16-3c9b-4669-bcd9-1a5e3420e82e"
}
]
}
},
{
"case": "LOCATION_PARENT_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440930"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000003"
},
{
"default": "000000000000DLC2"
}
]
}
},
{
"case": "durango",
"return": "4ab5a553-0620-427c-8dc3-792ff3edfa93"
}
]
}
},
{
"case": "LOCATION_MARRAKECH_NIGHT",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440940"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000004"
},
{
"default": "000000000000DLC3"
}
]
}
},
{
"case": "durango",
"return": "69bb2429-7101-482e-a7d8-c21d9bd7b9aa"
}
]
}
},
{
"case": "LOCATION_PARENT_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_BANGKOK_ZIKA",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440960"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000005"
},
{
"default": "000000000000DLC4"
}
]
}
},
{
"case": "durango",
"return": "af20b77b-2abd-4d14-8d46-49a3cefc2f24"
}
]
}
},
{
"case": "LOCATION_PARENT_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_COLORADO_RABIES",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440961"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000006"
},
{
"default": "000000000000DLC5"
}
]
}
},
{
"case": "durango",
"return": "788565e6-8c1f-4715-ab42-591d0ec7f400"
}
]
}
},
{
"case": "LOCATION_PARENT_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"case": "LOCATION_HOKKAIDO_FLU",
"return": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "440962"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA02369",
"return": "DLC0000000000007"
},
{
"default": "000000000000DLC6"
}
]
}
},
{
"case": "durango",
"return": "f897e25f-7661-40db-a854-272f5858b1cd"
}
]
}
},
{
"default": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $arg _storeregion": [
{
"case": "CUSA06508",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA06535",
"return": "HITMANCOMPLETE01"
},
{
"case": "CUSA07680",
"return": "HITMANCOMPLETE01"
},
{
"default": "FULLEXPERIENCE00"
}
]
}
},
{
"case": "durango",
"return": "5c49c5fd-2c07-4840-8d24-1188318dc50a"
}
]
}
}
]
}
}
}
}
}
}
}
}
}
]
}
}
}
}
}
},
"on-content-downloading": {
"_comment": "DLC owned and currently downloading",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": "UI_DIALOG_CONTRACT_SEARCH_DLC_DOWNLOADING_TITLE",
"$set Description": "UI_DIALOG_CONTRACT_SEARCH_DLC_DOWNLOADING_DESCRIPTION",
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
}
}
}
}
},
"on-content-update-required": {
"_comment": "DLC owned and update is required",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": "UI_DIALOG_DLC_DOWNLOAD",
"$set Description": "UI_DIALOG_CONTENT_REQUIRES_UPDATE_DESCRIPTION",
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
}
}
}
}
},
"on-content-installing": {
"_comment": "DLC owned and currently installing",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": "UI_DIALOG_CONTRACT_INSTALLING_TITLE",
"$set Description": "UI_DIALOG_CONTRACT_INSTALLING_DESCRIPTION",
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
}
}
}
}
},
"on-entitlement-missing": {
"_comment": "Entitlement missing",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": {
"$setup": {
"$set Store": {
"$switch $arg _platform": [
{
"case": "pc",
"return": "UI_MENU_GO_TO_STORE"
},
{
"case": "orbis",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
}
]
},
"$in": "$formatstring {$loc UI_MENU_PAGE_FEATURED_GOTO_HEADER} {$loc $.Store}"
}
},
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set DlcName": {
"$notransform": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.MissingEntitlements[0].Id,GOTY_PATIENT_ZERO)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_PARIS_CLOWN)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_MARRAKESH_DARK_SNIPER)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_HOKKAIDO_COWBOY)"
]
},
"$then": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,orbis)",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _storeregion,CUSA02976)",
"$eqs ($arg _storeregion,CUSA06535)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": false,
"$else": true
}
}
}
}
]
},
"$then": "$loc GAME_STORE_METADATA_PACKAGE_GOTY_UPGRADE_INTRO_TITLE",
"$else": {
"$if": {
"$condition": {
"$isfullexperienceuser": ""
},
"$then": "$loc GAME_STORE_METADATA_PACKAGE_GOTY_UPGRADE_CFS_TITLE",
"$else": "$loc GAME_STORE_METADATA_PACKAGE_GOTY_TITLE"
}
}
}
}
}
}
},
"$set DlcImage": {
"$notransform": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.MissingEntitlements[0].Id,GOTY_PATIENT_ZERO)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_PARIS_CLOWN)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_MARRAKESH_DARK_SNIPER)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_HOKKAIDO_COWBOY)"
]
},
"$then": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,orbis)",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _storeregion,CUSA02976)",
"$eqs ($arg _storeregion,CUSA06535)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": false,
"$else": true
}
}
}
}
]
},
"$then": "$res images/livetile/dlc/tile_goty_intro.jpg",
"$else": {
"$if": {
"$condition": {
"$isfullexperienceuser": ""
},
"$then": "$res images/livetile/dlc/tile_goty_cfs.jpg",
"$else": "$res images/livetile/dlc/tile_goty.jpg"
}
}
}
}
}
}
},
"$set Title": "UI_DIALOG_CONTRACT_ENTITLEMENT_MISSING_TITLE",
"$set DescriptionExpanded": {
"$notransform": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_ENTITLEMENT_MISSING_DESCRIPTION",
"data": [
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.MissingEntitlements[0].Id,GOTY_PATIENT_ZERO)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_PARIS_CLOWN)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_MARRAKESH_DARK_SNIPER)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_HOKKAIDO_COWBOY)"
]
},
"$then": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,orbis)",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _storeregion,CUSA02976)",
"$eqs ($arg _storeregion,CUSA06535)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": false,
"$else": true
}
}
}
}
]
},
"$then": "$loc GAME_STORE_METADATA_PACKAGE_GOTY_UPGRADE_INTRO_TITLE",
"$else": {
"$if": {
"$condition": {
"$isfullexperienceuser": ""
},
"$then": "$loc GAME_STORE_METADATA_PACKAGE_GOTY_UPGRADE_CFS_TITLE",
"$else": "$loc GAME_STORE_METADATA_PACKAGE_GOTY_TITLE"
}
}
}
}
}
}
]
}
}
},
"$in": {
"title": "$loc $.Title",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online",
"frameheightmax": 850,
"information": [
{
"$if $not $($isnull $.Contract)": {
"$then": {
"contract": {
"type": "$.Contract.Metadata.Type",
"name": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $($arg _ugcrestricted)": {
"$then": "$loc UI_CONTRACT_NO_ACCESS_UGC",
"$else": "$.Contract.Metadata.Title"
}
}
},
{
"case": "featured",
"return": "$.Contract.Metadata.Title"
},
{
"default": "$loc $.Contract.Metadata.Title"
}
]
},
"creator": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": "$loc UI_CATEGORY_MESSAGE_CENTER_COMMUNITY"
},
{
"default": "$($user $.Contract.Metadata.CreatorUserId).name"
}
]
},
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": {
"$if $stringvalid $loc $.Contract.Metadata.Description": {
"$then": "$loc $.Contract.Metadata.Description",
"$else": "$.Contract.Metadata.Description"
}
}
},
{
"case": "creation",
"return": "$loc UI_MENU_PAGE_CREATE_CONTRACT_NO_ACCESS_DESCRIPTION"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set GameMode": {
"$if $isnull $.GameMode": {
"$then": {
"$if $isnull $arg GameMode": {
"$then": "singleplayer",
"$else": "$arg GameMode"
}
},
"$else": "$.GameMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.GameMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": "$.Contract.Metadata.Type"
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$loc $.Data.DlcName",
"$else": "$loc $.Location.Properties.DlcName"
}
},
"$else": "$loc $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImage": {
"$if $isnull $.DlcImage": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$res $.Data.DlcImage",
"$else": "$res $.Location.Properties.DlcImage"
}
},
"$else": "$res $.SubLocation.Properties.DlcImage"
}
},
"$else": "$.DlcImage"
}
},
"$set CreatedInMission": "$loc $formatstring UI_{$.Contract.Metadata.Location}_TITLE",
"$set CreatedInLocation": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY",
"$in": {
"showcreatedin": {
"$switch $.Contract.Metadata.Type": [
{
"case": "featured",
"return": true
},
{
"case": "usercreated",
"return": true
},
{
"default": false
}
]
},
"episode": "$.DlcName",
"location": {
"$loc": {
"key": "UI_DIALOG_CONTRACT_SEARCH_CREATED_IN",
"data": [
"$formatstring {$.CreatedInMission}, {$.CreatedInLocation}"
]
}
},
"description": {
"$if $isnull $.DescriptionExpanded": {
"$then": {
"$loc": {
"key": "$.Description",
"data": [
"$.DlcName"
]
}
},
"$else": "$.DescriptionExpanded"
}
},
"image": "$.DlcImage"
}
}
}
}
],
"userresolution": {
"$if": {
"$condition": {
"$and": [
"$not $($isnull $.Contract)",
{
"$equal": [
"usercreated",
"$.Contract.Metadata.Type"
]
}
]
},
"$then": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
}
}
}
}
},
"onbutton": [
{
"$switch $arg _platform": [
{
"case": "pc",
"return": {
"$if $arg _isonline": {
"$then": {
"open-store-fullxp": {
"_comment": "In online mode, go to the GOTY bundle.",
"storeid": "http://store.steampowered.com/bundle/4854"
}
},
"$else": {
"open-store-fullxp": {
"_comment": "In offline mode, go to the HITMAN app (which will redirect to the dlc page).",
"_comment2": "We can't update this link over our server. So we keep it save and go to the app ID.",
"storeid": "http://store.steampowered.com/app/236870"
}
}
}
}
},
{
"default": {
"$notransform": {
"show-store-item-detail": {
"itemId": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.MissingEntitlements[0].Id,GOTY_PATIENT_ZERO)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_PARIS_CLOWN)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_MARRAKESH_DARK_SNIPER)",
"$eqs ($.MissingEntitlements[0].Id,TOKEN_OUTFIT_HOKKAIDO_COWBOY)"
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Storeregion": {
"$if $isnull $.Storeregion": {
"$then": "$arg _storeregion",
"$else": "$.Storeregion"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$if": {
"$condition": {
"$and": [
"$eqs ($arg _platform,orbis)",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _storeregion,CUSA02976)",
"$eqs ($arg _storeregion,CUSA06535)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": false,
"$else": true
}
}
}
}
]
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"case": "CUSA06508",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA06535",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA07680",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA08340",
"return": "0000S1GOTYFULLXP"
},
{
"default": "00000S1GOTYINTRO"
}
]
}
},
{
"case": "durango",
"return": "721958f5-9ddb-4b9e-8ae3-3e07cdaf4843"
}
]
},
"$else": {
"$if": {
"$condition": {
"$isfullexperienceuser": ""
},
"$then": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"case": "CUSA06508",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA06535",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA07680",
"return": "000000S1GOTYDISC"
},
{
"default": "0000S1GOTYFULLXP"
}
]
}
},
{
"case": "durango",
"return": "253a5f74-b320-4ace-9f8b-94919faa21d3"
}
]
},
"$else": {
"$switch $.Platform": [
{
"case": "pc",
"return": "236870"
},
{
"case": "orbis",
"return": {
"$switch $.Storeregion": [
{
"case": "CUSA06508",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA06535",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA07680",
"return": "000000S1GOTYDISC"
},
{
"case": "CUSA08340",
"return": "0000S1GOTYFULLXP"
},
{
"default": "000000S1GOTYFULL"
}
]
}
},
{
"case": "durango",
"return": "407d4c8a-6c6e-44a8-a81c-7594a791ae67"
}
]
}
}
}
}
}
}
},
"$else": "$.MissingEntitlements[0].StoreId"
}
}
}
}
}
}
]
}
]
}
}
}
}
},
{
"on-content-available": {
"_comment": "Contract is ready to be played",
"alter-actions": {
"path": "accept",
"value": {
"$if": {
"$condition": {
"$and": [
"$.Data.IsLocked",
{
"$or": [
"$isnull $.lockoverride",
"$.lockoverride"
]
}
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_LOCKED_CONTENT_DIALOGUE_TITLE",
"description": {
"$switch $.Contract.Metadata.Type": [
{
"case": "orbis",
"return": "$loc UI_LOCKED_CONTENT_DIALOGUE_TEXT_SARAJEVO6"
},
{
"default": "$loc UI_LOCKED_CONTENT_DIALOGUE_TEXT"
}
]
}
}
},
"onbutton": [
{
"trigger-action": {
"name": "on-goto-planning"
}
}
]
}
},
"$else": {
"trigger-action": {
"name": "on-goto-planning"
}
}
}
}
}
},
"on-goto-planning": {
"$switch $.Contract.Metadata.Type": [
{
"case": "creation",
"return": {
"link": {
"page": "contractcreation_planning",
"args": {
"url": "contractcreation/planning",
"args": {
"location": "$.Contract.Metadata.Location",
"contractCreationIdOverwrite": "$.Contract.Metadata.Id"
},
"contractid": "$.Contract.Metadata.Id"
}
}
}
},
{
"default": {
"$if": {
"$condition": {
"$isfreeprologueuser": ""
},
"$then": {
"$if $.fspdashboardcontract": {
"$then": {
"clear-contract-menu-context": {},
"set-contract-loading-screen-data": {
"contract": "$.Contract"
},
"start-contract": {
"contractid": "$.fspdashboardcontract.contractid"
}
},
"$else": {
"is-playable": {
"playableSince": "$.Contract.Metadata.PlayableSince",
"on-success": {
"$switch $.Contract.Metadata.BriefingVideo": [
{
"case": null,
"return": {
"link": {
"page": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "planning_multiplayer",
"$else": "planning"
}
},
"isMultiplayer": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": true,
"$else": false
}
},
"args": {
"url": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id"
},
"contractid": "$.Contract.Metadata.Id"
}
}
}
},
{
"default": {
"link": {
"page": "video",
"addtohistory": false,
"args": {
"videoid": "$.Contract.Metadata.BriefingVideo",
"mountrootresources": "$formatstring [{$.Contract.Metadata.ScenePath}].entitytemplate",
"skipifshown": true,
"GameMode": "$.GameMode",
"link": {
"page": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "planning_multiplayer",
"$else": "planning"
}
},
"isMultiplayer": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": true,
"$else": false
}
},
"args": {
"url": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id"
},
"contractid": "$.Contract.Metadata.Id"
}
}
}
}
}
}
]
},
"on-failure": {
"return": {}
}
}
}
}
},
"$else": {
"is-playable": {
"playableSince": "$.Contract.Metadata.PlayableSince",
"on-success": {
"$switch $.Contract.Metadata.BriefingVideo": [
{
"case": null,
"return": {
"link": {
"page": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "planning_multiplayer",
"$else": "planning"
}
},
"isMultiplayer": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": true,
"$else": false
}
},
"args": {
"url": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id"
},
"contractid": "$.Contract.Metadata.Id"
}
}
}
},
{
"default": {
"link": {
"page": "video",
"addtohistory": false,
"args": {
"videoid": "$.Contract.Metadata.BriefingVideo",
"mountrootresources": "$formatstring [{$.Contract.Metadata.ScenePath}].entitytemplate",
"skipifshown": true,
"GameMode": "$.GameMode",
"link": {
"page": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": "planning_multiplayer",
"$else": "planning"
}
},
"isMultiplayer": {
"$if $eqs ($.GameMode,multiplayer)": {
"$then": true,
"$else": false
}
},
"args": {
"url": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id"
},
"contractid": "$.Contract.Metadata.Id"
}
}
}
}
}
}
]
},
"on-failure": {
"return": {}
}
}
}
}
}
}
]
}
}
]
}
}
}
]
}
}
}
},
"$else": null
}
}
}
},
"deselect": {
"$if $not $arg DisableChallengesMasteryHandling": {
"$then": {
"set-mastery-data": {}
}
}
}
},
"buttons": [
{
"$if $arg ShowPrevNextButtonPrompt": {
"$then": {
"actiontype": "lt_rt",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_PREVNEXT_CATEGORY",
"customplatform": {
"platform": "key",
"hide": true,
"actiontype": "mouse_lmb"
}
}
}
}
]
}
}
},
{
"controller": "group",
"id": "challenge_action_container",
"_comment": "contains the action button if available for selected element",
"row": 4.05,
"nrows": "0.5",
"ncols": "1",
"children": []
}
]
}
]
}
}
}
}
}
}
}
]
}
}
}
},
"$else": {
"view": "menu3.basic.CategoryElement",
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_CHALLENGES",
"icon": "challenge"
},
"children": {
"selectable": true,
"pressable": false,
"actions": {
"select": {
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": "$loc UI_MENU_PAGE_CONNECTION_REQUIRED",
"multilinetitle": true,
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
}
}
}
}
}
]
},
{
"$switch $.Contract.Metadata.Type": [
{
"case": "creation",
"return": {
"pressable": false,
"selectable": false
}
},
{
"default": {
"view": "menu3.basic.CategoryElement",
"id": "category_leaderboard",
"data": {
"title": "$loc UI_MENU_PAGE_LEADERBOARDS_TITLE",
"icon": "leaderboard"
},
"children": {
"$switch $.Contract.Metadata.Type": [
{
"case": "tutorial",
"return": {
"$setup": {
"$set Title": "$loc UI_MENU_PAGE_NO_LEADERBOARDS_AVAILABLE",
"$in": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "$.Header",
"title": "$.Title",
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
}
},
{
"case": "creation",
"return": {
"$setup": {
"$set Title": "$loc UI_MENU_PAGE_NO_LEADERBOARDS_AVAILABLE",
"$in": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "$.Header",
"title": "$.Title",
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
}
},
{
"default": {
"$if $arg IsMultiplayerContract": {
"$then": [
{
"controller": "list",
"id": "sub_category_container",
"row": 0.125,
"col": 0,
"_comment": "enable analog handling to allow the submenu to handle LT/RT",
"handleanalog": true
},
{
"controller": "category",
"id": "sub_category_controller",
"container": "sub_category_container",
"view": "menu3.containers.ScrollingTabsContainer",
"direction": "horizontal",
"submenu-navigation": true,
"prevnextnav": false,
"data": {
"direction": "horizontal",
"submenu": true
},
"children": [
{
"id": "planning_leaderboard_singleplayer",
"view": "menu3.basic.SubCategoryElement",
"data": {
"title": "$loc UI_MENU_GAME_MODE_SINGLE_PLAYER"
},
"buttons": [
{
"actiontype": "rt",
"actionlabel": "$loc UI_MENU_GAME_MODE_MULTIPLAYER",
"customplatform": {
"platform": "key",
"hide": true,
"actiontype": "mouse_lmb"
}
}
],
"children": {
"$setup": {
"$set InContractId": "$arg contractid",
"$set LeaderboardType": "singleplayer",
"$in": {
"controller": "list",
"id": "leaderboard",
"pressable": false,
"children": {
"id": "selectable_invisible_element",
"nrows": 0,
"ncols": 0,
"pressable": false,
"actions": {
"select": {
"$if $arg _isonline": {
"$then": {
"load-async": {
"showloadingindicator": true,
"from": {
"$if $.ContractSessionId": {
"$then": {
"url": "debriefingleaderboards",
"args": {
"contractsessionid": "$.ContractSessionId",
"contractid": "$.InContractId",
"type": "$.LeaderboardType"
}
},
"$else": {
"url": "leaderboardsview",
"args": {
"contractid": "$.InContractId",
"type": "$.LeaderboardType"
}
}
}
},
"target": "leaderboard",
"post-load-action": {
"replace-children": {
"target": "headline_container",
"children": []
},
"set-selected": {
"target": "leaderboard"
}
}
}
},
"$else": {
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": "$loc UI_MENU_PAGE_CONNECTION_REQUIRED",
"multilinetitle": true,
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
{
"id": "planning_leaderboard_multiplayer",
"view": "menu3.basic.SubCategoryElement",
"data": {
"title": "$loc UI_MENU_GAME_MODE_MULTIPLAYER"
},
"buttons": [
{
"actiontype": "lt",
"actionlabel": "$loc UI_MENU_GAME_MODE_SINGLE_PLAYER",
"customplatform": {
"platform": "key",
"hide": true,
"actiontype": "mouse_lmb"
}
}
],
"children": {
"$setup": {
"$set InContractId": "$arg contractid",
"$set LeaderboardType": "multiplayer",
"$in": {
"controller": "list",
"id": "leaderboard",
"pressable": false,
"children": {
"id": "selectable_invisible_element",
"nrows": 0,
"ncols": 0,
"pressable": false,
"actions": {
"select": {
"$if $arg _isonline": {
"$then": {
"load-async": {
"showloadingindicator": true,
"from": {
"$if $.ContractSessionId": {
"$then": {
"url": "debriefingleaderboards",
"args": {
"contractsessionid": "$.ContractSessionId",
"contractid": "$.InContractId",
"type": "$.LeaderboardType"
}
},
"$else": {
"url": "leaderboardsview",
"args": {
"contractid": "$.InContractId",
"type": "$.LeaderboardType"
}
}
}
},
"target": "leaderboard",
"post-load-action": {
"replace-children": {
"target": "headline_container",
"children": []
},
"set-selected": {
"target": "leaderboard"
}
}
}
},
"$else": {
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": "$loc UI_MENU_PAGE_CONNECTION_REQUIRED",
"multilinetitle": true,
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
]
}
],
"$else": {
"$setup": {
"$set InContractId": "$arg contractid",
"$in": {
"controller": "list",
"id": "leaderboard",
"pressable": false,
"children": {
"id": "selectable_invisible_element",
"nrows": 0,
"ncols": 0,
"pressable": false,
"actions": {
"select": {
"$if $arg _isonline": {
"$then": {
"load-async": {
"showloadingindicator": true,
"from": {
"$if $.ContractSessionId": {
"$then": {
"url": "debriefingleaderboards",
"args": {
"contractsessionid": "$.ContractSessionId",
"contractid": "$.InContractId",
"type": "$.LeaderboardType"
}
},
"$else": {
"url": "leaderboardsview",
"args": {
"contractid": "$.InContractId",
"type": "$.LeaderboardType"
}
}
}
},
"target": "leaderboard",
"post-load-action": {
"replace-children": {
"target": "headline_container",
"children": []
},
"set-selected": {
"target": "leaderboard"
}
}
}
},
"$else": {
"replace-children": {
"target": "headline_container",
"children": {
"view": "menu3.basic.DefaultNoContentHeader",
"selectable": false,
"pressable": false,
"data": {
"header": "",
"title": "$loc UI_MENU_PAGE_CONNECTION_REQUIRED",
"multilinetitle": true,
"typeicon": {
"$if $.Icon": {
"$then": "$.Icon",
"$else": "info"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
]
},
"actions": {
"_comment": "Reset the view when switching tabs",
"select": {
"set-selected": {
"target": "leaderboard_toplist_button"
}
}
}
}
}
]
}
]
}
]
}
}