1
mirror of https://github.com/thepeacockproject/Peacock synced 2024-11-22 22:12:45 +01:00
Peacock/static/LegacyChallengeLocationTemplate.json
moonysolari 5fff1c89ae
Fix challenges for H2 and H2016 (#152)
* Add location templates for older game versions

* Fix challenge data extraction script for h1

* Add challenge location templates

* unfinished game version support

* Fix challenge data extraction script for H2

* Conform function calls to new signature

* Add a game version for all maps

* Improve comments

* Try to add difficulty support

* fix type error

* fix GetActiveChallengesAndProgression difficulty

* Add difficulty for GetChallengeTreeFor

* Fix up difficulty in other places

* Add challenges data jsons for all three games

* Add H2 global TC challenges

* Fix H1 challenge typeheader

* Fix Type fields in SavedChallenge

* Fix imports

* Delete backup file

* Reduce hard-coding of difficulty number

* Support versioned global challenges

* remove H2GlobalChallenges

* Add missing global Challenges

* Make versions a global variable

* run prettier

* Use Drop Ids instead of unlockables

---------

Co-authored-by: Reece Dunham <me@rdil.rocks>
2023-04-05 20:02:25 +01:00

4018 lines
754 KiB
JSON

{
"buttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT"
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK"
}
],
"background": { "url": "$res $.Location.Properties.Icon" },
"onpageclosed": { "set-mastery-data": {} },
"body": {
"$setupcomponents": {
"difficulty-manager": { "always-reload-setup": false }
},
"controller": "list",
"data": { "direction": "vertical" },
"children": [
{
"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"
}
},
{ "controller": "list", "id": "category_container" },
{
"controller": "category",
"container": "category_container",
"view": "menu3.containers.ScrollingTabsContainer",
"direction": "horizontal",
"ncols": 10,
"data": {
"direction": "horizontal",
"buttonprompts": [
{
"actiontype": ["lb", "rb"],
"actionlabel": "$loc UI_BUTTON_PROMPTS_BROWSE_CATEGORIES"
}
],
"topnavigation": {
"header": "$loc UI_MENU_PAGE_PROFILE_CHALLENGES",
"title": {
"$if $.Location": {
"$then": "$loc $formatstring UI_{$.Location.Id}_TITLE",
"$else": "$loc $.Name"
}
},
"icon": "challenge"
}
},
"children": {
"$each $.DifficultyLevelData": {
"$setpageargs": {
"DifficultyLevelUnlocked": "$.Available"
},
"view": "menu3.basic.CategoryElement",
"id": "$formatstring challengelocation_difficulty_{$.Name}_tab",
"data": {
"title": "$loc $formatstring UI_DIFFICULTY_{$.Name}_TITLE",
"icon": {
"$if $not $.Available": {
"$then": "locked",
"$else": "difficultylevel"
}
}
},
"actions": {
"select": {
"dm:set-menu-frame": "$.Name",
"emit-sound-signal": {
"signal-name": "$formatstring SET_DIFFICULTY_{$.Name}"
}
}
},
"children": {
"$use $.Data": {
"$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"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.CityName"
]
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft"
},
"$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"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.CityName"
]
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft"
},
"$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"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.CityName"
]
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft"
},
"$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"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.CityName"
]
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft"
},
"$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"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.CityName"
]
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft"
},
"$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"
}
}
}
},
"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"
}
}
}
},
"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"
}
}
}
},
"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"
}
}
}
},
"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"
}
},
"$in": {
"$if": {
"$condition": {
"$and": [
"$arg _isonline",
"$not $.HideProgression",
"$.ValidContractType"
]
},
"$then": {
"masteryheader": {
"$loc": {
"key": "UI_MENU_LOCATION_PROGRESSION_HEADER",
"data": [
"$.CityName"
]
}
},
"masterytitle": "$.MasteryTitle",
"masterycompletion": "$.MasteryCompletion",
"masteryxpleft": "$.MasteryXpLeft"
},
"$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": "$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": {
"$if": {
"$condition": {
"$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": {
"$and": [
"$eqs ($.Platform,orbis)",
"$eqs ($.Region,en)"
]
},
"$then": false,
"$else": false
}
}
}
},
"$then": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$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 $eq (0,0)": {
"$then": false,
"$else": false
}
}
}
}
}
}
]
},
"$then": "$res images/livetile/dlc/tile_goty_intro_sale.jpg",
"$else": {
"$if": {
"$condition": {
"$isfullexperienceuser": ""
},
"$then": "$res images/livetile/dlc/tile_goty_cfs_sale.jpg",
"$else": "$res images/livetile/dlc/tile_goty_sale.jpg"
}
}
}
},
"$else": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$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 $eq (0,0)": {
"$then": false,
"$else": false
}
}
}
}
}
}
]
},
"$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"
}
}
}
}
}
}
}
}
}
}
]
}
},
"onbutton": []
}
}
}
},
"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": "$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": "$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"
},
{
"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": []
}
}
]
}
},
"$else": {
"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_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": "$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"
},
{
"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": []
}
}
}
}
}
},
"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": "$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": "$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"
},
{
"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": []
}
}
]
}
},
"$else": {
"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_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": "$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"
},
{
"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": []
}
}
}
}
}
},
"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": "$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"
},
{
"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": "$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"
},
{
"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": "$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"
},
{
"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": "$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": {
"$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 $eq (0,0)": {
"$then": false,
"$else": false
}
}
}
}
}
}
]
},
"$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": {
"$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": {
"$and": [
"$eqs ($.Platform,orbis)",
"$eqs ($.Region,en)"
]
},
"$then": false,
"$else": false
}
}
}
},
"$then": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$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 $eq (0,0)": {
"$then": false,
"$else": false
}
}
}
}
}
}
]
},
"$then": "$res images/livetile/dlc/tile_goty_intro_sale.jpg",
"$else": {
"$if": {
"$condition": {
"$isfullexperienceuser": ""
},
"$then": "$res images/livetile/dlc/tile_goty_cfs_sale.jpg",
"$else": "$res images/livetile/dlc/tile_goty_sale.jpg"
}
}
}
},
"$else": {
"$if": {
"$condition": {
"$and": [
{
"$isintropackuser": ""
},
{
"$if": {
"$condition": {
"$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 $eq (0,0)": {
"$then": false,
"$else": false
}
}
}
}
}
}
]
},
"$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": {
"$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 $eq (0,0)": {
"$then": false,
"$else": false
}
}
}
}
}
}
]
},
"$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": "$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"
},
{
"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": []
}
}
}
}
},
{
"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": "planning",
"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,
"link": {
"page": "planning",
"args": {
"url": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id"
},
"contractid": "$.Contract.Metadata.Id"
}
}
}
}
}
}
]
},
"on-failure-too-early": {
"$if": {
"$condition": {
"$and": [
"$eqs ($.Contract.Metadata.Type,elusive)",
"$stringvalid $.Data.ElusiveContractState",
"$stringvalid $.Data.LastPlayedAt",
"$lt ($converttimetonumber $.Data.LastPlayedAt,$converttimetonumber $.Contract.Metadata.PlayableSince)"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": "$loc UI_MENU_ERROR_STARTING_ELUSIVE_CONTRACT_NOT_PLAYABLE_YET_PREVIOUSLY_PLAYED_DESCRIPTION",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
}
}
},
"$else": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_YET_DESCRIPTION",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
}
}
}
}
},
"on-failure-too-late": {
"_comment": "this is never reached, because we don't set playabelUntil above - by design",
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_ANYMORE_DESCRIPTION",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
}
}
}
}
}
}
},
"$else": {
"is-playable": {
"playableSince": "$.Contract.Metadata.PlayableSince",
"on-success": {
"$switch $.Contract.Metadata.BriefingVideo": [
{
"case": null,
"return": {
"link": {
"page": "planning",
"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,
"link": {
"page": "planning",
"args": {
"url": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id"
},
"contractid": "$.Contract.Metadata.Id"
}
}
}
}
}
}
]
},
"on-failure-too-early": {
"$if": {
"$condition": {
"$and": [
"$eqs ($.Contract.Metadata.Type,elusive)",
"$stringvalid $.Data.ElusiveContractState",
"$stringvalid $.Data.LastPlayedAt",
"$lt ($converttimetonumber $.Data.LastPlayedAt,$converttimetonumber $.Contract.Metadata.PlayableSince)"
]
},
"$then": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": "$loc UI_MENU_ERROR_STARTING_ELUSIVE_CONTRACT_NOT_PLAYABLE_YET_PREVIOUSLY_PLAYED_DESCRIPTION",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
}
}
},
"$else": {
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_YET_DESCRIPTION",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
}
}
}
}
},
"on-failure-too-late": {
"_comment": "this is never reached, because we don't set playabelUntil above - by design",
"show-modal": {
"config": {
"type": "online",
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_CONFIRM_TITLE",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT",
"description": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_LOADOUT_ERROR_STARTING_CONTRACT_NOT_PLAYABLE_ANYMORE_DESCRIPTION",
"_comment": "HACK: use typeoverride to make the buttons work",
"typeoverride": "online"
}
}
}
}
}
}
}
}
}
]
}
}
]
}
}
}
]
}
}
}
},
"$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": []
}
]
}
]
}
}
}
}
}
}
}
]
}
}
}
}
}
}
]
}
}