Jump to content

Template:Content Patcher example

From HourGlass: The Game Wiki
Revision as of 19:08, April 5, 2025 by PolyFox (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
{
    "Format": "2.5.0",{{{1}}}}

Description[edit]

This template outputs an example Content Patcher content.json structure with the latest Format version.

Usage[edit]

Just call the template with the top-level Content Patcher fields you want to display (except Format). These should be indented once with four spaces.

For example, this template usage:

{{Content Patcher example|<nowiki>
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/animationDescriptions",
            "Entries": {
                "pufferbob_sleep": "50/50/50"
            }
        }
    ]
</nowiki>}}

Will produce this code example:

{
    "Format": "2.5.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/animationDescriptions",
            "Entries": {
                "pufferbob_sleep": "50/50/50"
            }
        }
    ]
}

Escape MediaWiki syntax[edit]

Note that the example above includes <nowiki>. That just prevents MediaWiki from mangling the code if it has wiki syntax like {{ (which is common in Content Patcher examples).


de:Vorlage:Content Patcher example es:Plantilla:Content Patcher example fr:Modèle:Content Patcher example it:Template:Content Patcher example ja:テンプレート:Content Patcher example ko:틀:Content Patcher example hu:Sablon:Content Patcher example pt:Predefinição:Content Patcher example ru:Шаблон:Content Patcher example tr:Şablon:Content Patcher example zh:Template:Content Patcher example


Cookies help us deliver our services. By using our services, you agree to our use of cookies.