Line 1,519: |
Line 1,519: |
| |} | | |} |
| | | |
− | | + | For example, this content pack adds two rewards (one mail and one item): |
− | For example, this content pack adds two rewards, one in form of a mail, the other a machine : | |
− | | |
| {{#tag:syntaxhighlight|<nowiki> | | {{#tag:syntaxhighlight|<nowiki> |
| { | | { |
− | "Format": "1.28.0", | + | "Format": "</nowiki>{{Content Patcher version}}<nowiki>", |
− | "Changes": [
| + | "Changes": [ |
− | {
| + | { |
− | "Action": "EditData",
| + | "Action": "EditData", |
− | "Target": "Data/MuseumRewards",
| + | "Target": "Data/MuseumRewards", |
− | "Entries": {
| + | "Entries": { |
− | //Send a mail when a specific item is donated
| + | // send a letter when a specific item is donated |
− | "Example.ModId_ShinyArtifact": {
| + | "{{ModId}}_ShinyArtifact": { |
− | "TargetContextTags": [
| + | "TargetContextTags": [ |
− | {
| + | { |
− | "Tag": "id_example.modid_shinyartifact",//The unique context tag identifying the item
| + | "Tag": "id_{{ModId}}_ShinyArtifact", // unique context tag identifying the item by ID |
− | "Count": 1
| + | "Count": 1 |
− | },
| + | }, |
− | ],
| + | ], |
− | "FlagOnCompletion": true,
| + | "FlagOnCompletion": true, |
− | "RewardMail": "Example.ModId_ShinyArtifact"
| + | "RewardActions": [ "AddMail Current {{ModId}}_ShinyArtifact" ] |
− | },
| + | }, |
− | //Gives a machine as reward when 18 minerals are donated.
| + | |
− | "Example.ModId_18MineralItems": {
| + | // give item when 18 minerals are donated |
− | "TargetContextTags": [
| + | "{{ModId}}_18MineralItems": { |
− | {
| + | "TargetContextTags": [ |
− | "Tag": "item_type_minerals",
| + | { |
− | "Count": 18
| + | "Tag": "item_type_minerals", |
− | },
| + | "Count": 18 |
− | ],
| + | }, |
− | "RewardItemId": "(BC)Example.ModId_SuperMachine",
| + | ], |
− | "RewardItemCount": 1,
| + | "RewardItemId": "(BC){{ModId}}_SuperMachine", |
− | "FlagOnCompletion": true,
| + | "RewardItemCount": 1, |
− |
| + | "FlagOnCompletion": true |
− | },
| + | } |
− | },
| + | } |
− | }
| + | } |
− | ]
| + | ] |
| }</nowiki>|lang=javascript}} | | }</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.
| + | See also [[Modding:Mail data|mail data]], [[#Custom items|custom items]], and [[#custom machines|custom machines]] to add the custom mail and items. |
| | | |
| ====Achievements==== | | ====Achievements==== |