Changes

Line 1,135: Line 1,135:  
| ''(Optional)'' A [[Modding:Mail data|mail ID]] to add to the player's mailbox tomorrow.
 
| ''(Optional)'' A [[Modding:Mail data|mail ID]] to add to the player's mailbox tomorrow.
 
|}
 
|}
 +
 +
 +
For example, this content pack adds two rewards, one in form of a mail, the other a machine :
 +
 +
{{#tag:syntaxhighlight|<nowiki>
 +
{
 +
    "Format": "1.28.0",
 +
"Changes": [
 +
{
 +
"Action": "EditData",
 +
"Target": "Data/MuseumRewards",
 +
"Entries": {
 +
//Send a mail when a specific item is donated
 +
"Example.ModId_ShinyArtifact": {
 +
"TargetContextTags": [
 +
{
 +
"Tag": "id_example.modid_shinyartifact",//The unique context tag identifying the item
 +
"Count": 1
 +
},
 +
],
 +
"FlagOnCompletion": true,
 +
"RewardMail": "Example.ModId_ShinyArtifact"
 +
},
 +
//Gives a machine as reward when 18 minerals are donated.
 +
"Example.ModId_18MineralItems": {
 +
"TargetContextTags": [
 +
{
 +
"Tag": "item_type_minerals",
 +
"Count": 18
 +
},
 +
],
 +
"RewardItemId": "(BC)Example.ModId_SuperMachine",
 +
"RewardItemCount": 1,
 +
"FlagOnCompletion": true,
 +
 +
},
 +
},
 +
}
 +
]
 +
}</nowiki>|lang=javascript}}
 +
 +
The mail entry would then be added to [[Modding:Mail_data|mail data]] using the same key. See [[#Custom_items|Custom Items]] and [[#Custom_machines|Custom Machines]] to add the items themselves.
    
====Achievements====
 
====Achievements====
38

edits