Skip to content

Operations

jimmyl edited this page Mar 15, 2021 · 5 revisions

Overview

Operations select the operation the be used. (This didnt need to be explained.) Operations belong in the "Patch" table. Operation types are (no longer as of the newer versions) case-sensitive.

Append

The most commonly used one. Appends text to the end of the file specified in path.

{
      "operation": "append",
      "path": "Jest.txt",
      "item": "1.1.Yo momma fat!"
}

Remove Line

Removes the matching line. Errors if match not found,but doesnt terminate process.

{
      "operation": "removeline",
      "path": "Jest.txt",
      "item": "1.1.Yo momma fat!"
}

Replace Line

Replaces the matching line with a replacement. Errors if match not found,but doesnt terminate process.

{
      "operation": "replaceline",
      "path": "testfile.txt",
      "replaced": "2.1.Two Dwarves walk into a bar, and well... that's it",
      "replacement": "2.1.Two Dwarves walk into a bar, and uhhh... i forgot"
}

Log Output

Outputs to console.

{
      "operation": "log",
      "text": "pog"
}

Create File

Creates a new file at path,removes if it uninstalling

{
      "operation": "createfile",
      "path": "doodieman.txt"
}

Paths

The games root folder will be put at the start of your path when loading mod,so if you want Animals.txt from the Data folder you type Animals.txt If you want to advance a directory, use \\ due to json parsing limitations.

Clone this wiki locally