Skip to content

Instantly share code, notes, and snippets.

@KnightMiner
KnightMiner / TinkersLexicon.md
Created May 17, 2022 20:54
Tinkers Lexicon

Anything in italics represents a word from the lexicon

  • Attribute: Numerical value defined by Minecraft as part of an entity, examples include attack damage, health, and speed
  • Tool Stat: Base numerical value on the tool. Examples include attack damage, durability, and mining speed. Many stats are also attributes.
    • Base: A raw stat on the tool, value shown directly in the tooltip
    • Conditional: A stat applied based on a condition, such as elevation or the type of monster attacked. Order may matter for conditional boosts
      • Flat: Adds to the stat a flat value
      • Percentage: Multiplies stats by a percentage based on the condition
    • Multiplier: Multiplies stats by a value
  • Base Multiplier: Multiplies the base stat value, but not conditional stats
@KnightMiner
KnightMiner / Moved.md
Last active January 27, 2021 17:24
Whats New in Tinkers Construct 3?
@KnightMiner
KnightMiner / api.lua
Last active May 6, 2020 05:44
Shop API
--------------------------------------------------------------------------------
-- Shop Weapon Library
-- v0.1
--------------------------------------------------------------------------------
-- Contains helpers to add weapons to the shop and to create a shop UI
--------------------------------------------------------------------------------
-- Current library version, so we can ensure the latest library version is used
local VERSION = "0.1"
@KnightMiner
KnightMiner / 1.2.md
Last active August 20, 2022 04:13
Into the Breach Public Functions

Below is a mostly complete list of functions used in C in Into the Breach. Note that this is extracted from a section of the game binary, so some of these functions are simply defined in lua and and called in C.

Classes

  • Board
    • AddAlert
    • AddAnimation
    • AddBurst
    • AddEffect
    • AddPawn
  • AddTeleport
@KnightMiner
KnightMiner / Lua.md
Last active April 29, 2020 15:25
Into the Breach 1.2 Changes
  • localizations
    • Game now contains localizations for all English text to support other languages
    • Many other files were modified to replace localizations with localization keys
      • missions, corporations.lua, pawns.lua, pilots.lua, squads.lua, structures.lua, text_population.lua, weapons_deploy.lua
    • No one has determined yet if custom localizations can be added
  • animations.lua
    • Mech animations height is now GetMechColorsInTexture() instead of GetColorCount()
      • This means the two functions can be overridden sepearately to give a different color list for animations and the UI
    • New animations: Selected_Left, Selected_Up, Selected_Down, and Selected_Right
      • Appear to be gamepad resources
@KnightMiner
KnightMiner / strings.md
Last active April 20, 2020 18:18
Into the Breach list of strings that look like Lua
  • GetScripts
  • GetPawn
  • GetBoard
  • GetGame
  • PointList
    • index
    • push_back
    • back
    • erase
  • empty
@KnightMiner
KnightMiner / pilot_arrange.lua
Created March 11, 2020 22:07
Adds a default button to the Into the Breach Pilot list
--[[
Adds a new entry to the "Mod Content" menu, allowing to arrange
pilots in a specific order, changing which ones become available
for selection in the hangar.
--]]
local MAX_PILOTS = 13
local hangarBackdrop = sdlext.getSurface({ path = "resources/mods/ui/pilot-arrange-hangar.png" })
local pilotSurfaces = {}
-- copy of the list before we make any changes to it
@KnightMiner
KnightMiner / OrePreference.java
Created December 3, 2017 19:03
Example of how the ore preference getter would look
/*
* Ore preferences
*/
private static Map<String,ItemStack> preferenceCache = new HashMap<>();
public static ItemStack getPreference(String oreName, List<ItemStack> items) {
// just stop now if we have nothing
if(items.isEmpty()) {
return null;
}