1
mirror of https://github.com/thepeacockproject/Peacock synced 2024-11-29 09:15:11 +01:00
Peacock/static/LookupContractByIdTemplate.json
Reece Dunham 6245e91624 Initial commit
Co-authored-by: Tino Roivanen <tino.roivanen98@gmail.com>
Co-authored-by: Govert de Gans <grappigegovert@hotmail.com>
Co-authored-by: Gray Olson <gray@grayolson.com>
Co-authored-by: Alexandre Sanchez <alex73630@gmail.com>
Co-authored-by: Anthony Fuller <24512050+anthonyfuller@users.noreply.github.com>
Co-authored-by: atampy25 <24306974+atampy25@users.noreply.github.com>
Co-authored-by: David <davidstulemeijer@gmail.com>
Co-authored-by: c0derMo <c0dermo@users.noreply.github.com>
Co-authored-by: Jeevat Singh <jeevatt.singh@gmail.com>
Signed-off-by: Reece Dunham <me@rdil.rocks>
2022-10-19 21:33:45 -04:00

4286 lines
406 KiB
JSON

{
"pageisclosable": true,
"body": {
"controller": "list",
"direction": "horizontal",
"children": {
"id": "dataNode",
"data": {
"creatorname": "$($user $($arg Contract).Metadata.CreatorUserId).name"
},
"stateproviders": [
{
"type": "lazycontractavailability",
"contract": "$.Contract"
},
{
"type": "userresolution",
"target": "creatorname",
"profileid": "$($arg Contract).Metadata.CreatorUserId"
}
],
"actions": {
"on-entitlement-missing": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-modal": {
"config": {
"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": "ps5",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
},
{
"case": "scarlett",
"return": "UI_MENU_GO_TO_STORE_XBOX"
},
{
"case": "stadia",
"return": "UI_MENU_GO_TO_STORE_STADIA"
}
]
},
"$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 $eqs ($arg _platform,stadia)": {
"$then": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_GOTY_TITLE",
"$else": {
"$if": {
"$condition": {
"$or": [
"$isuser h1legacystandard"
]
},
"$then": "$loc GAME_STORE_METADATA_LEGACY_PACKAGE_LEGACY_GOTY_UPGRADE_TITLE",
"$else": "$loc GAME_STORE_METADATA_LEGACY_PACKAGE_LEGACY_GOTY_BUNDLE_TITLE"
}
}
}
},
"$else": {
"$if $eqs ($.MissingEntitlements[0].Id,LOCATION_NEWZEALAND)": {
"$then": "$loc GAME_STORE_METADATA_S2_DLC07_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 $eqs ($arg _platform,stadia)": {
"$then": "$res images/livetile/dlc/tile_goty.jpg",
"$else": {
"$if": {
"$condition": {
"$or": [
"$isuser h1legacystandard"
]
},
"$then": "$res images/livetile/dlc/tile_goty_cfs_legacy.jpg",
"$else": "$res images/livetile/dlc/tile_goty_legacy.jpg"
}
}
}
},
"$else": {
"$if $eqs ($.MissingEntitlements[0].Id,LOCATION_NEWZEALAND)": {
"$then": "$res images/livetile/dlc/newzealand_wide_logo.png"
}
}
}
}
},
"$set Title": {
"$if $eqs ($arg _platform,stadia)": {
"$then": "UI_DIALOG_CONTENT_NOT_OWNED_TITLE",
"$else": "UI_DIALOG_CONTRACT_ENTITLEMENT_MISSING_TITLE"
}
},
"$set DescriptionExpanded": {
"$notransform": {
"$loc": {
"key": {
"$if $eqs ($arg _platform,stadia)": {
"$then": "UI_DIALOG_CONTENT_NOT_OWNED_TITLE",
"$else": "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 $eqs ($arg _platform,stadia)": {
"$then": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_GOTY_TITLE",
"$else": {
"$if": {
"$condition": {
"$or": [
"$isuser h1legacystandard"
]
},
"$then": "$loc GAME_STORE_METADATA_LEGACY_PACKAGE_LEGACY_GOTY_UPGRADE_TITLE",
"$else": "$loc GAME_STORE_METADATA_LEGACY_PACKAGE_LEGACY_GOTY_BUNDLE_TITLE"
}
}
}
},
"$else": {
"$if $eqs ($.MissingEntitlements[0].Id,LOCATION_NEWZEALAND)": {
"$then": "$loc GAME_STORE_METADATA_S2_DLC07_TITLE"
}
}
}
}
]
}
}
},
"$in": {
"title": "$loc $.Title",
"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"
},
{
"case": "elusive",
"return": "$loc UI_CONTRACT_HEADER_ELUSIVE"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set EngineMode": {
"$if $isnull $.EngineMode": {
"$then": {
"$if $isnull $arg EngineMode": {
"$then": "singleplayer",
"$else": "$arg EngineMode"
}
},
"$else": "$.EngineMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.EngineMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "dummy",
"return": {
"_dynamicPackerOverride": [
"SniperChallenge"
]
}
},
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": {
"$if $.Contract.Metadata.IsVersus": {
"$then": "versus",
"$else": "$.Contract.Metadata.Type"
}
}
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcNameLocaKey": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$.Data.DlcName",
"$else": "$.Location.Properties.DlcName"
}
},
"$else": " $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcNameLocaKey"
}
},
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"default": "$loc $.DlcNameLocaKey"
}
]
},
"$else": "$loc $.DlcNameLocaKey"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImageOriginal": {
"$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 DlcImage": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$if $isnull $.DlcImage": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"default": "$.DlcImageOriginal"
}
]
},
"$else": "$.DlcImageOriginal"
}
},
"$else": "$.DlcImageOriginal"
}
},
"$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": [
{
"$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": {
"$if": {
"$condition": {
"$and": [
"$not $isuser h2legacystandard",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _platform,orbis)",
"$eqs ($.Platform,orbis)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "STARTPACK0000000"
},
{
"case": "jp",
"return": "HITMANSTANDARD00"
},
{
"default": "STARTPACK0000000"
}
]
}
},
{
"case": "durango",
"return": "dbbf8074-f8e5-48c6-8162-f4af3cdcdcb8"
},
{
"case": "stadia",
"return": "H2_Standard_Bundle"
}
]
}
}
},
"$else": {
"$if": {
"$condition": {
"$or": [
"$not $eqs ($arg _platform,stadia)",
"$isuser h1legacystandard"
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "960832"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "S1GOTYUPASIA0000"
},
{
"case": "jp",
"return": "S1GOTYUPASIA0000"
},
{
"default": "S1GOTYUPGRADE000"
}
]
}
},
{
"case": "durango",
"return": "fdb4873a-b559-4cbd-addc-625f833de81b"
}
]
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "960831"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "S1GOTYASIA000000"
},
{
"default": "S1GOTY0000000000"
}
]
}
},
{
"case": "durango",
"return": {
"$if $isuser h2legacystandard": {
"$then": "a8b30989-98b0-484f-ada0-71dd5117ed58",
"$else": "452917d6-f81e-435b-9da4-6891e22326a6"
}
}
},
{
"case": "stadia",
"return": "H1_GOTY_Bundle"
}
]
}
}
}
}
}
}
},
"$else": "$.MissingEntitlements[0].StoreId"
}
}
}
}
}
]
}
}
},
"request-back": {}
},
"on-content-unknown": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": ["$loc UI_DIALOG_OK"],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
},
"request-back": {}
},
"on-content-not-owned": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-modal": {
"config": {
"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": "ps5",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
},
{
"case": "scarlett",
"return": "UI_MENU_GO_TO_STORE_XBOX"
},
{
"case": "stadia",
"return": "UI_MENU_GO_TO_STORE_STADIA"
}
]
},
"$in": "$formatstring {$loc UI_MENU_PAGE_FEATURED_GOTO_HEADER} {$loc $.Store}"
}
},
"icon": "arrowright"
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"$setup": {
"$set Title": {
"$if $eqs ($arg _platform,stadia)": {
"$then": "UI_DIALOG_CONTENT_NOT_OWNED_TITLE",
"$else": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_OWNED_TITLE"
}
},
"$set Description": {
"$if $eqs ($arg _platform,stadia)": {
"$then": "UI_DIALOG_CONTENT_NOT_OWNED_DESCRIPTION",
"$else": "UI_DIALOG_CONTRACT_SEARCH_DLC_NOT_OWNED_DESCRIPTION"
}
},
"$in": {
"title": "$loc $.Title",
"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"
},
{
"case": "elusive",
"return": "$loc UI_CONTRACT_HEADER_ELUSIVE"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set EngineMode": {
"$if $isnull $.EngineMode": {
"$then": {
"$if $isnull $arg EngineMode": {
"$then": "singleplayer",
"$else": "$arg EngineMode"
}
},
"$else": "$.EngineMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.EngineMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "dummy",
"return": {
"_dynamicPackerOverride": [
"SniperChallenge"
]
}
},
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": {
"$if $.Contract.Metadata.IsVersus": {
"$then": "versus",
"$else": "$.Contract.Metadata.Type"
}
}
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcNameLocaKey": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$.Data.DlcName",
"$else": "$.Location.Properties.DlcName"
}
},
"$else": " $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcNameLocaKey"
}
},
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"default": "$loc $.DlcNameLocaKey"
}
]
},
"$else": "$loc $.DlcNameLocaKey"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImageOriginal": {
"$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 DlcImage": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$if $isnull $.DlcImage": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"default": "$.DlcImageOriginal"
}
]
},
"$else": "$.DlcImageOriginal"
}
},
"$else": "$.DlcImageOriginal"
}
},
"$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": {
"$condition": {
"$or": [
"$eqs ($.LocationId,LOCATION_PARENT_PARIS)",
"$eqs ($.LocationId,LOCATION_PARIS)",
"$eqs ($.LocationId,LOCATION_PARENT_COASTALTOWN)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN_NIGHT)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN_MOVIESET)",
"$eqs ($.LocationId,LOCATION_PARENT_MARRAKECH)",
"$eqs ($.LocationId,LOCATION_MARRAKECH)",
"$eqs ($.LocationId,LOCATION_MARRAKECH_NIGHT)",
"$eqs ($.LocationId,LOCATION_PARENT_BANGKOK)",
"$eqs ($.LocationId,LOCATION_BANGKOK)",
"$eqs ($.LocationId,LOCATION_PARENT_COLORADO)",
"$eqs ($.LocationId,LOCATION_COLORADO)",
"$eqs ($.LocationId,LOCATION_PARENT_HOKKAIDO)",
"$eqs ($.LocationId,LOCATION_HOKKAIDO)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN_EBOLA)",
"$eqs ($.LocationId,LOCATION_BANGKOK_ZIKA)",
"$eqs ($.LocationId,LOCATION_COLORADO_RABIES)",
"$eqs ($.LocationId,LOCATION_HOKKAIDO_FLU)"
]
},
"$then": {
"$if": {
"$condition": {
"$and": [
"$not $isuser h2legacystandard",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _platform,orbis)",
"$eqs ($.Platform,orbis)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "STARTPACK0000000"
},
{
"case": "jp",
"return": "HITMANSTANDARD00"
},
{
"default": "STARTPACK0000000"
}
]
}
},
{
"case": "durango",
"return": "dbbf8074-f8e5-48c6-8162-f4af3cdcdcb8"
},
{
"case": "stadia",
"return": "H2_Standard_Bundle"
}
]
}
}
},
"$else": {
"$if": {
"$condition": {
"$or": [
"$not $eqs ($arg _platform,stadia)",
"$isuser h1legacystandard"
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "960832"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "S1GOTYUPASIA0000"
},
{
"case": "jp",
"return": "S1GOTYUPASIA0000"
},
{
"default": "S1GOTYUPGRADE000"
}
]
}
},
{
"case": "durango",
"return": "fdb4873a-b559-4cbd-addc-625f833de81b"
}
]
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "960831"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "S1GOTYASIA000000"
},
{
"default": "S1GOTY0000000000"
}
]
}
},
{
"case": "durango",
"return": {
"$if $isuser h2legacystandard": {
"$then": "a8b30989-98b0-484f-ada0-71dd5117ed58",
"$else": "452917d6-f81e-435b-9da4-6891e22326a6"
}
}
},
{
"case": "stadia",
"return": "H1_GOTY_Bundle"
}
]
}
}
}
}
}
}
},
"$else": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.LocationId,LOCATION_MIAMI_COTTONMOUTH)",
"$eqs ($.LocationId,LOCATION_COLOMBIA_ANACONDA)",
"$eqs ($.LocationId,LOCATION_MUMBAI_KINGCOBRA)",
"$eqs ($.LocationId,LOCATION_NORTHAMERICA_GARTERSNAKE)",
"$eqs ($.LocationId,LOCATION_PARENT_SALTY)",
"$eqs ($.LocationId,LOCATION_SALTY_SEAGULL)",
"$eqs ($.LocationId,LOCATION_PARENT_CAGED)",
"$eqs ($.LocationId,LOCATION_CAGED_FALCON)",
"$eqs ($.LocationId,LOCATION_PARENT_GREEDY)",
"$eqs ($.LocationId,LOCATION_GREEDY_RACCOON)",
"$eqs ($.LocationId,LOCATION_PARENT_OPULENT)",
"$eqs ($.LocationId,LOCATION_OPULENT_STINGRAY)"
]
},
"$then": {
"$if": {
"$condition": {
"$and": [
"$not $isuser h2legacystandard",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _platform,orbis)",
"$eqs ($.Platform,orbis)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "STARTPACK0000000"
},
{
"case": "jp",
"return": "HITMANSTANDARD00"
},
{
"default": "STARTPACK0000000"
}
]
}
},
{
"case": "durango",
"return": "dbbf8074-f8e5-48c6-8162-f4af3cdcdcb8"
},
{
"case": "stadia",
"return": "H2_Standard_Bundle"
}
]
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": "0000SEASONPASSH2"
},
{
"case": "durango",
"return": "6c057b75-e77b-4438-879e-6d563da92f32"
},
{
"case": "stadia",
"return": {
"$if $isuser h2legacystandard": {
"$then": "H2_ExpansionPass_DLC",
"$else": "H2_Gold_Bundle"
}
}
}
]
}
}
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "STARTPACK0000000"
},
{
"case": "jp",
"return": "HITMANSTANDARD00"
},
{
"default": "STARTPACK0000000"
}
]
}
},
{
"case": "durango",
"return": "dbbf8074-f8e5-48c6-8162-f4af3cdcdcb8"
},
{
"case": "stadia",
"return": "H2_Standard_Bundle"
}
]
}
}
}
}
}
}
}
}
}
}
}
}
}
]
}
}
},
"request-back": {}
},
"on-content-not-installed": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-modal": {
"config": {
"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": "ps5",
"return": "UI_MENU_GO_TO_STORE_PSN"
},
{
"case": "durango",
"return": "UI_MENU_GO_TO_STORE_XBOX"
},
{
"case": "scarlett",
"return": "UI_MENU_GO_TO_STORE_XBOX"
},
{
"case": "stadia",
"return": "UI_MENU_GO_TO_STORE_STADIA"
}
]
},
"$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",
"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"
},
{
"case": "elusive",
"return": "$loc UI_CONTRACT_HEADER_ELUSIVE"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set EngineMode": {
"$if $isnull $.EngineMode": {
"$then": {
"$if $isnull $arg EngineMode": {
"$then": "singleplayer",
"$else": "$arg EngineMode"
}
},
"$else": "$.EngineMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.EngineMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "dummy",
"return": {
"_dynamicPackerOverride": [
"SniperChallenge"
]
}
},
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": {
"$if $.Contract.Metadata.IsVersus": {
"$then": "versus",
"$else": "$.Contract.Metadata.Type"
}
}
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcNameLocaKey": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$.Data.DlcName",
"$else": "$.Location.Properties.DlcName"
}
},
"$else": " $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcNameLocaKey"
}
},
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"default": "$loc $.DlcNameLocaKey"
}
]
},
"$else": "$loc $.DlcNameLocaKey"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImageOriginal": {
"$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 DlcImage": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$if $isnull $.DlcImage": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"default": "$.DlcImageOriginal"
}
]
},
"$else": "$.DlcImageOriginal"
}
},
"$else": "$.DlcImageOriginal"
}
},
"$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": {
"$condition": {
"$or": [
"$eqs ($.LocationId,LOCATION_PARENT_PARIS)",
"$eqs ($.LocationId,LOCATION_PARIS)",
"$eqs ($.LocationId,LOCATION_PARENT_COASTALTOWN)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN_NIGHT)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN_MOVIESET)",
"$eqs ($.LocationId,LOCATION_PARENT_MARRAKECH)",
"$eqs ($.LocationId,LOCATION_MARRAKECH)",
"$eqs ($.LocationId,LOCATION_MARRAKECH_NIGHT)",
"$eqs ($.LocationId,LOCATION_PARENT_BANGKOK)",
"$eqs ($.LocationId,LOCATION_BANGKOK)",
"$eqs ($.LocationId,LOCATION_PARENT_COLORADO)",
"$eqs ($.LocationId,LOCATION_COLORADO)",
"$eqs ($.LocationId,LOCATION_PARENT_HOKKAIDO)",
"$eqs ($.LocationId,LOCATION_HOKKAIDO)",
"$eqs ($.LocationId,LOCATION_COASTALTOWN_EBOLA)",
"$eqs ($.LocationId,LOCATION_BANGKOK_ZIKA)",
"$eqs ($.LocationId,LOCATION_COLORADO_RABIES)",
"$eqs ($.LocationId,LOCATION_HOKKAIDO_FLU)"
]
},
"$then": {
"$if": {
"$condition": {
"$and": [
"$not $isuser h2legacystandard",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _platform,orbis)",
"$eqs ($.Platform,orbis)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "STARTPACK0000000"
},
{
"case": "jp",
"return": "HITMANSTANDARD00"
},
{
"default": "STARTPACK0000000"
}
]
}
},
{
"case": "durango",
"return": "dbbf8074-f8e5-48c6-8162-f4af3cdcdcb8"
},
{
"case": "stadia",
"return": "H2_Standard_Bundle"
}
]
}
}
},
"$else": {
"$if": {
"$condition": {
"$or": [
"$not $eqs ($arg _platform,stadia)",
"$isuser h1legacystandard"
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "960832"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "S1GOTYUPASIA0000"
},
{
"case": "jp",
"return": "S1GOTYUPASIA0000"
},
{
"default": "S1GOTYUPGRADE000"
}
]
}
},
{
"case": "durango",
"return": "fdb4873a-b559-4cbd-addc-625f833de81b"
}
]
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "960831"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "S1GOTYASIA000000"
},
{
"default": "S1GOTY0000000000"
}
]
}
},
{
"case": "durango",
"return": {
"$if $isuser h2legacystandard": {
"$then": "a8b30989-98b0-484f-ada0-71dd5117ed58",
"$else": "452917d6-f81e-435b-9da4-6891e22326a6"
}
}
},
{
"case": "stadia",
"return": "H1_GOTY_Bundle"
}
]
}
}
}
}
}
}
},
"$else": {
"$if": {
"$condition": {
"$or": [
"$eqs ($.LocationId,LOCATION_MIAMI_COTTONMOUTH)",
"$eqs ($.LocationId,LOCATION_COLOMBIA_ANACONDA)",
"$eqs ($.LocationId,LOCATION_MUMBAI_KINGCOBRA)",
"$eqs ($.LocationId,LOCATION_NORTHAMERICA_GARTERSNAKE)",
"$eqs ($.LocationId,LOCATION_PARENT_SALTY)",
"$eqs ($.LocationId,LOCATION_SALTY_SEAGULL)",
"$eqs ($.LocationId,LOCATION_PARENT_CAGED)",
"$eqs ($.LocationId,LOCATION_CAGED_FALCON)",
"$eqs ($.LocationId,LOCATION_PARENT_GREEDY)",
"$eqs ($.LocationId,LOCATION_GREEDY_RACCOON)",
"$eqs ($.LocationId,LOCATION_PARENT_OPULENT)",
"$eqs ($.LocationId,LOCATION_OPULENT_STINGRAY)"
]
},
"$then": {
"$if": {
"$condition": {
"$and": [
"$not $isuser h2legacystandard",
{
"$if": {
"$condition": {
"$or": [
"$eqs ($arg _platform,orbis)",
"$eqs ($.Platform,orbis)"
]
},
"$then": true,
"$else": false
}
}
]
},
"$then": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "STARTPACK0000000"
},
{
"case": "jp",
"return": "HITMANSTANDARD00"
},
{
"default": "STARTPACK0000000"
}
]
}
},
{
"case": "durango",
"return": "dbbf8074-f8e5-48c6-8162-f4af3cdcdcb8"
},
{
"case": "stadia",
"return": "H2_Standard_Bundle"
}
]
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": "0000SEASONPASSH2"
},
{
"case": "durango",
"return": "6c057b75-e77b-4438-879e-6d563da92f32"
},
{
"case": "stadia",
"return": {
"$if $isuser h2legacystandard": {
"$then": "H2_ExpansionPass_DLC",
"$else": "H2_Gold_Bundle"
}
}
}
]
}
}
}
}
},
"$else": {
"$setup": {
"$set Platform": {
"$if $isnull $.Platform": {
"$then": "$arg _platform",
"$else": "$.Platform"
}
},
"$set Region": {
"$if $isnull $.Region": {
"$then": "$arg _region",
"$else": "$.Region"
}
},
"$in": {
"$switch $.Platform": [
{
"case": "pc",
"return": "863550"
},
{
"case": "orbis",
"return": {
"$switch $.Region": [
{
"case": "asia",
"return": "STARTPACK0000000"
},
{
"case": "jp",
"return": "HITMANSTANDARD00"
},
{
"default": "STARTPACK0000000"
}
]
}
},
{
"case": "durango",
"return": "dbbf8074-f8e5-48c6-8162-f4af3cdcdcb8"
},
{
"case": "stadia",
"return": "H2_Standard_Bundle"
}
]
}
}
}
}
}
}
}
}
}
}
}
}
}
]
}
}
},
"request-back": {}
},
"on-content-downloading": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-modal": {
"config": {
"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",
"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"
},
{
"case": "elusive",
"return": "$loc UI_CONTRACT_HEADER_ELUSIVE"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set EngineMode": {
"$if $isnull $.EngineMode": {
"$then": {
"$if $isnull $arg EngineMode": {
"$then": "singleplayer",
"$else": "$arg EngineMode"
}
},
"$else": "$.EngineMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.EngineMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "dummy",
"return": {
"_dynamicPackerOverride": [
"SniperChallenge"
]
}
},
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": {
"$if $.Contract.Metadata.IsVersus": {
"$then": "versus",
"$else": "$.Contract.Metadata.Type"
}
}
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcNameLocaKey": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$.Data.DlcName",
"$else": "$.Location.Properties.DlcName"
}
},
"$else": " $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcNameLocaKey"
}
},
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"default": "$loc $.DlcNameLocaKey"
}
]
},
"$else": "$loc $.DlcNameLocaKey"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImageOriginal": {
"$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 DlcImage": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$if $isnull $.DlcImage": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"default": "$.DlcImageOriginal"
}
]
},
"$else": "$.DlcImageOriginal"
}
},
"$else": "$.DlcImageOriginal"
}
},
"$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"
}
}
}
}
}
}
}
}
}
},
"request-back": {}
},
"on-content-update-required": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-dlc-update-dialog": {
"$setup": {
"$set DlcId": {
"$notransform": {
"$if $isnull $.OutdatedDlcId": {
"$then": -1,
"$else": "$.OutdatedDlcId"
}
}
},
"$in": {
"OutdatedDlcId": "$.DlcId"
}
}
},
"show-modal": {
"config": {
"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",
"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"
},
{
"case": "elusive",
"return": "$loc UI_CONTRACT_HEADER_ELUSIVE"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set EngineMode": {
"$if $isnull $.EngineMode": {
"$then": {
"$if $isnull $arg EngineMode": {
"$then": "singleplayer",
"$else": "$arg EngineMode"
}
},
"$else": "$.EngineMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.EngineMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "dummy",
"return": {
"_dynamicPackerOverride": [
"SniperChallenge"
]
}
},
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": {
"$if $.Contract.Metadata.IsVersus": {
"$then": "versus",
"$else": "$.Contract.Metadata.Type"
}
}
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcNameLocaKey": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$.Data.DlcName",
"$else": "$.Location.Properties.DlcName"
}
},
"$else": " $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcNameLocaKey"
}
},
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"default": "$loc $.DlcNameLocaKey"
}
]
},
"$else": "$loc $.DlcNameLocaKey"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImageOriginal": {
"$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 DlcImage": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$if $isnull $.DlcImage": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"default": "$.DlcImageOriginal"
}
]
},
"$else": "$.DlcImageOriginal"
}
},
"$else": "$.DlcImageOriginal"
}
},
"$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"
}
}
}
}
}
}
}
}
}
},
"request-back": {}
},
"on-content-installing": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-modal": {
"config": {
"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",
"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"
},
{
"case": "elusive",
"return": "$loc UI_CONTRACT_HEADER_ELUSIVE"
},
{
"default": "$loc $.Contract.Metadata.Description"
}
]
},
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set EngineMode": {
"$if $isnull $.EngineMode": {
"$then": {
"$if $isnull $arg EngineMode": {
"$then": "singleplayer",
"$else": "$arg EngineMode"
}
},
"$else": "$.EngineMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.EngineMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": {
"$switch $.Contract.Metadata.Type": [
{
"case": "dummy",
"return": {
"_dynamicPackerOverride": [
"SniperChallenge"
]
}
},
{
"case": "orbis",
"return": "ica"
},
{
"case": "campaign",
"return": "mission"
},
{
"case": "sniper",
"return": "sniperrifle"
},
{
"default": {
"$if $.Contract.Metadata.IsVersus": {
"$then": "versus",
"$else": "$.Contract.Metadata.Type"
}
}
}
]
},
"locked": true
}
}
}
},
{
"dlcmissing": {
"$setup": {
"$set DlcNameLocaKey": {
"$if $isnull $.DlcName": {
"$then": {
"$if $isnull $.SubLocation": {
"$then": {
"$if $isnull $.Location": {
"$then": "$.Data.DlcName",
"$else": "$.Location.Properties.DlcName"
}
},
"$else": " $.SubLocation.Properties.DlcName"
}
},
"$else": "$.DlcNameLocaKey"
}
},
"$set DlcName": {
"$if $isnull $.DlcName": {
"$then": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S1_BUNDLE_FULLEXPERIENCE_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_STANDARD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$loc GAME_STORE_STADIA_METADATA_S2_BUNDLE_GOLD_TITLE"
},
{
"default": "$loc $.DlcNameLocaKey"
}
]
},
"$else": "$loc $.DlcNameLocaKey"
}
},
"$else": "$.DlcName"
}
},
"$set DlcImageOriginal": {
"$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 DlcImage": {
"$if $eqs ($arg _platform,stadia)": {
"$then": {
"$if $isnull $.DlcImage": {
"$then": {
"$switch $.DlcNameLocaKey": [
{
"case": "GAME_STORE_METADATA_LEGACY_DLC00_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC01_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC02_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC03_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC04_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC05_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_LEGACY_DLC06_TITLE",
"return": "$res images/livetile/dlc/tile_fullxp.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC07_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC08_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC09_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC10_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC11_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC12_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC13_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC14_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC15_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC16_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC17_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC18_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"case": "GAME_STORE_METADATA_S2_DLC19_TITLE",
"return": "$res images/livetile/dlc/tile_hitman2_gold.jpg"
},
{
"default": "$.DlcImageOriginal"
}
]
},
"$else": "$.DlcImageOriginal"
}
},
"$else": "$.DlcImageOriginal"
}
},
"$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"
}
}
}
}
}
}
}
}
}
},
"request-back": {}
},
"on-content-available": {
"set-persistent-context": {
"target": "gamemode_contracts",
"actions": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONTRACT_SEARCH_CONTRACT_FOUND_BUTTON",
{
"$if $.UserCentricContract.Data.PlaylistData.IsAdded": {
"$then": {
"label": "$loc UI_BUTTON_PROMPTS_ACTION_REMOVE_FROM_PLAYLIST",
"icon": "trashbin"
},
"$else": {
"label": "$loc UI_BUTTON_PROMPTS_ACTION_ADD_TO_PLAYLIST",
"icon": "addtolist"
}
}
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONTRACT_SEARCH_CONTRACT_FOUND_TITLE",
"information": [
{
"contract": {
"$mergeobjects": [
{
"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": "$($user $.Contract.Metadata.CreatorUserId).name",
"id": "$formatpublicid $.Contract.Metadata.PublicId",
"creationdate": "$.Contract.Metadata.CreationTimestamp",
"description": "$loc $.Contract.Metadata.Description",
"image": {
"$if $.Contract.Metadata.TileImage": {
"$then": {
"$if $gt ($arraysize $.Contract.Metadata.TileImage,0)": {
"$then": {
"$setup": {
"$set EngineMode": {
"$if $isnull $.EngineMode": {
"$then": {
"$if $isnull $arg EngineMode": {
"$then": "singleplayer",
"$else": "$arg EngineMode"
}
},
"$else": "$.EngineMode"
}
},
"$set TileImageOrdered": {
"$orderby": {
"from": "$expand $.Contract.Metadata.TileImage",
"by": "Mode",
"order": [
"$.EngineMode"
]
}
},
"$in": "$res $.TileImageOrdered[0].Image"
}
},
"$else": "$res $expand $.Contract.Metadata.TileImage"
}
},
"$else": "$res images/ui/tiles/defaultmenutilesmall.jpg"
}
},
"icon": "$.Contract.Metadata.Type",
"locked": false,
"addedSuccessfullyToPlaylist": "$.AddedSuccessfully",
"isInPlaylist": "$.UserCentricContract.Data.PlaylistData.IsAdded"
},
{
"completionstate": {
"$use $.UserCentricContract": {
"$switch $.Contract.Metadata.Type": [
{
"case": "usercreated",
"return": {
"$if $.Data.LastPlayedAt": {
"$then": {
"$if $.Data.Completed": {
"$then": "completed",
"$else": "failed"
}
}
}
}
},
{
"case": "featured",
"return": {
"$if $.Data.LastPlayedAt": {
"$then": {
"$if $.Data.Completed": {
"$then": "completed",
"$else": "failed"
}
}
}
}
},
{
"case": "escalation",
"return": {
"$if $.Data.LastPlayedAt": {
"$then": {
"$if $.Data.EscalationCompleted": {
"$then": "completed"
}
}
}
}
},
{
"case": "placeholder",
"return": {
"$if $.Data.LastPlayedAt": {
"$then": {
"$if $.Data.EscalationCompleted": {
"$then": "completed"
}
}
}
}
}
]
}
}
}
]
}
}
],
"userresolution": {
"informationtarget": "contract.creator",
"profileid": "$.Contract.Metadata.CreatorUserId"
}
}
},
"onbutton": [
{
"link": {
"page": "planning",
"args": {
"contractid": "$.Contract.Metadata.Id"
}
}
},
{
"link": {
"page": "lookupcontractdialogaddordeletefromplaylist",
"args": {
"url": "lookupcontractdialogaddordeletefromplaylist",
"args": {
"contractId": "$.Contract.Metadata.Id"
}
}
}
}
]
}
}
},
"request-back": {}
}
}
}
}
}