Potato Patch Utils

v1.0.16·Updated 2026-08-31

A util library for mods created by the Potato Patch

About this mod Author’s original text

Potato-Patch-Utils

A util library for mods created by the Potato Patch with the explicit intent of being used for events run by the group

What functionality does this mod add?

Automatic File Loading

PotatoPatchUtils.load_files(path, blacklist)

Will automatically load all.lua files within the passed in path (will typically be SMODS.current_mod.path)

  • path (string) [REQUIRED] - The file path the file loader will start at. Will automatically open folders and load files within them as well
  • blacklist (table) - A table of strings of file names that should be ignored on file loading (file extension, i.e..lua must be included)

Developer and Team objects

These objects are used for credits and calculating contexts outside of a traditional game object

PotatoPatchUtils.Team(args)

args is a table of the following values:

  • name (string) [REQUIRED] - The name of the Team
  • colour (colour/gradient) - The Team name's text fill colour
  • loc (string/boolean) - Assigns the Team's display name to a localization key of your choosing from descriptions.PotatoPatch. Will be assigned to 'PotatoPatchTeam_'.. args.name if a boolean is passed
  • calculate (function(self, context)) - A traditional calculate function, much like global mod calculate from Steamodded
  • credit_rows (table) - How many developer objects to display on each row (credit screen has 2 rows, a table of 1 number will center the row in the page)
  • short_credit (boolean) - Setting this to true will change the team credit template text from 'Created by team ' to 'Created by '

PotatoPatchUtils.Team {

name = 'Example Team',

colour = HEX(ffffff),

loc = true, -- Can also be loc = 'k_exampleteam_name' where the string is an arbitrary localization dictionary entry

}

PotatoPatchUtils.Developer(args)

args is a table of the following values:

  • name (string) [REQUIRED] - The name of the Developer
  • colour (colour/gradient) - The Developer name's text fill colour
  • loc (string/boolean) - Assigns the Developer's display name to a localization key of your choosing from descriptions.PotatoPatch. Will be assigned to 'PotatoPatchDev_'.. args.name if a boolean is passed
  • calculate (function(self, context)) - A traditional calculate function, much like global mod calculate from Steamodded
  • team (string) - The name of the Team the Developer is a part of
  • atlas (string) - The key of the atlas your credit art will be pulled from
  • pos (table) - A coordinate table for the position of your credit art
  • soul_pos (table) - A coordinate table for the position of your credit art's soul sprite

PotatoPatchUtils.Developer {

name = 'doofus',

colour = HEX(000000),

loc = true, -- Can also be loc = 'k_doofus_name' where the string is an arbitrary localization dictionary entry

team = 'Example Team' -- Must match an already existing Team name

atlas = 'modprefix_atlas',

pos = {x = 0, y = 0}

}

Credits

Adding these values to a game object will automatically add Credits to whoever is specified in the object's description box. The format should look something like this: ppu_artist = {'Artist1', 'Artist2'}

If the name of a Developer or Team object are used, the text will use the specified colour of the associated object. For example, if Developer 'Eremel' exists with a colour property and a Joker contains ppu_coder = {'Eremel'}, the text will be coloured in with Eremel's defined colour property

  • ppu_artist (table) - The artist(s) of the Game Object
  • ppu_coder (table) - The coders(s) of the Game Object
  • ppu_team (table) - The team the Game Object was created for

If you wish to add a credit page for each Team present in your mod, add SMODS.current_mod.extra_tabs = PotatoPatchUtils.CREDITS.register_page(SMODS.current_mod) to your mod.

Localization Loading

This feature allows for multiple localization.lua files to be used in one project. This allows for much easier handling of localization files in collaborative efforts

PotatoPatchUtils.LOC.process_loc_text(locPath)

  • locPath (string) [REQUIRED] - A string

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide. These mods need a community loader first — the bundled readme usually points to its download.

Dependencies

Install these first, or the mod will not work:

Steamodded-Steamodded

File & checksum

Filename
Potato_Patch_Utils-1.0.16.zip
File size
20.2 KiB
SHA-256
98b860c06b23392203213b634459cb5c758359c9c5156b629fcd0675b2ad71a9
Stored at
2026-10-06 19:07