You are viewing a potentially older version of this package. View all versions.
TeamDoodz-TDLib-1.1.0 icon

TDLib

An assortment of methods used by most of my Inscryption mods.

Date uploaded 2 years ago
Version 1.1.0
Download link TeamDoodz-TDLib-1.1.0.zip
Downloads 882
Dependency string TeamDoodz-TDLib-1.1.0

This mod requires the following mods to function

API_dev-API-2.0.2 icon
API_dev-API

The de-facto standard core API for all Inscryption mods. This lets you create new cards, abilities, challenges, map nodes, starter decks, and more.

Preferred version: 2.0.2

README

TDLib

TDLib is an assortment of methods used by most of my Inscryption mods. It contains helper methods for loading files from disk, plenty of card extension methods, and more. If you are a modder and would like to use TDLib, go ahead as long as you abide by the terms of the license.

What does this mod do?

On its own, nothing. However, other mods can hook into this one to gain more functionality without having to write reduntant code. Here is a list of all features, in no particular order:

String AsRegex

Turns a string array into a regular expression that can match any of the provided strings.
For example, an input of {"hello","world","123"} would give an output of "(hello)|(world)|(123)".

List GetRandom

Returns a random value from a list using the specified seed.

List Swap

Swaps two different entries on a list.

List Shuffle

Shuffles a list using the modernized Fisher-Yates shuffle algorithm.

Dictionary SafeSet/SafeGet

Allows you to get/set values in a Dictionary without worrying about IndexOutOfRangeExceptions.

CardInfo GetPortrait

Returns the portrait of a card. If the card is for GBC only, it will return an upscaled version of its GBC portrait.

CardInfo GetUpscaledGBCPortrait

Returns the GBC portrait of a card, upscaled to 114x94.

CardInfo IsGem

Returns true if given card has the Emerald, Ruby, or Sapphire mox sigils.

Ability SynergyWithGems

Returns true if this sigil would benefit the player more if there was a gem on the board (gem dependant, etc.)

Ability SynergyWithConduit

Returns true if this sigil has an effect if within a circuit.

BoardManager GemsOnBoard

Counts how many gem cards are on the board.

BoardManager ConduitsOnBoard

Counts how many conduit cards are on the board.

GetRandomGem

Returns a random gem card from the Nature temple.

AssetManager

General utility for getting files from disk. Supports PNG, TXT, CSV.

Changelog

1.1.0

  • Added Ability SynergyWithGems
  • Added Ability SynergyWithConduit
  • Added BoardManager GemsOnBoard
  • Added BoardManager ConduitsOnBoard
  • Added GetRandomGem

1.0.0

  • Initial Release