Nature In The Valley Documentation
  • Nature In The Valley As A Framework
  • Adding a creature
    • Picking Your Format
    • Using Content Patcher
    • Using a Content Pack
    • The Creature Model
  • Making Creature Sprite
    • Making Creature Sprites 101
  • New Game-State-Queries and Trigger Actions
    • New Game State Queries
  • Making Rewards
    • Adding Custom Rewards
Powered by GitBook
On this page
  1. Adding a creature

Using Content Patcher

PreviousPicking Your FormatNextUsing a Content Pack

Last updated 3 months ago

The structure of a NITV Content Patcher mod generally consists of a [CP] content patcher mod alongside whatever assets related to the creatures you are adding you want to load.

Your manifest.json should look something like this.

{
    "Name": "ExamplePackContent",
    "Author": "Nature",
    "Version": "1.0.0",
    "Description": "",
    "UniqueID": "Nature.ExamplePackContent",
    "UpdateKeys": [""],
    "ContentPackFor": {
        "UniqueID": "Pathoschild.ContentPatcher"
    },
    "Dependencies": [
    {
       "UniqueID": "Nature.NatureInTheValley"
    }
    ]
}

And your content file will look something like this, where you first load the assets required for your creature(s) and then target "Nature.NITV/Creatures" to edit in your creatures.

{
   "Format": "2.0.6",
   "Changes": [
        {
            "Action": "Load",
            "Target": "Mods/NITVExample/Fly, Mods/NITVExample/FlyItem",
            "FromFile": "PNGs/{{TargetWithoutPath}}.png"
        },
        {
            "Action": "EditData",
            "Target": "Nature.NITV/Creatures",
            "Entries": {
                "CommonButterfly": {
                    "grounded": false,
                    "speed": 0.004,
                    "scale": 1.1,
                    "range": 0,
                    "locations": [
                        "0",
                        "SeedShop"
                    ],
                    "minTime": 1200,
                    "spritePath": "Mods\\NITVExample\\FlyItem",
                    "xDef": 30,
                    "yDef": 11,
                    "Price": 40,
                    "displayName": "Fly",
                    "displayDescription": "A simple fly"
                }            
            }
        }
   ]
}

Note that when using content patcher, you only need to include the variables which are *not* equal to their default values.

Check Out The Creature Model For What Each Piece Of Data Means