Skip to content

Releases: itb-community/ITB-ModLoader

v2.2.5

22 Aug 23:19
Compare
Choose a tag to compare

General

  • Repair replacement icons now are only drawn when the pawn is selected, and the icon no longer obscures the pilot tooltip.
  • Added support for mod descriptions in mod configuration dialog via description = "Some cool description" mod table field.
  • Added support for mods specifying minimum required version of the mod loader via modApiVersion = "2.2.5" mod table field.
  • The mod loader will show a special dialog for mods that could not be loaded, because their mod loader version requirement was not satisfied.
  • Fixed DecoAnimSheet not being loaded
  • Fixed an issue with queued spawn detection, where it could potentially miss some spawns (thanks Lemonymous)

API

v2.2.4

06 Jul 12:49
Compare
Choose a tag to compare

General:

  • Modded UI dialogs with buttons now play highlight/click sounds
    • Due to the game's quirks, these sounds can only be played while in game (ie. not in main menu/hangar)
  • Minor fixes to main menu button decoration style.

API:

Field Description
location location of the spawn point
type pawn type of the vek that will be spawned
id id of the pawn that will be spawned (pretty useless at the moment, neither Board nor Game are aware of the pawn before it is spawned)
turns how long the spawn point has been on the board

v2.2.3

13 Jun 20:31
Compare
Choose a tag to compare

Requires Into the Breach version 1.0.22

Reuploaded with a fix for a crash when selecting islands

General:

  • Tooltips can now optionally stick to UI elements that spawned them, imitating the behaviour of game's own tooltips.
  • Fixed scroll areas not updating their offset when collapsing large expandable UI elements.
  • Fixed difficulty selection buttons in the hangar showing up when clicking on locked pilot slots, or on last pilot button when no time-travelling pilot is available.
  • Fixed leap movement with game's default Move:GetSkillEffect
  • Dropdowns can now be closed with Escape and opened with Enter (when focused)
  • Fixed custom difficulty levels reusing SectorSpawner tables from vanilla difficulties without copying them.

API:

  • Fixed missionEndHook not working for missions overriding MissionEnd function (eg. final mission)
  • Added sdlext.showButtonDialog, which allows setting tooltips for the dialog's buttons.
  • Tables serialized to GAME can now optionally define OnSerializationStart and OnSerializationEnd functions, to temporarily remove unserializable fields.
    • These functions provide a table in the argument, which allows for storage and later retrieval of removed fields
  • Added simple support for dragging in base Ui class
  • Added UiDraggable, which provides utility functions for installing common mouse dragging operations (currently move and resize)
  • UiWrappedText can now optionally wrap text based on its actual screen width instead of character count (off by default, because it's pretty expensive).
    • To enable this behaviour, set pixelWrap field to true on your instance of UiWrappedText
    • To re-wrap the text, you will need to update the element's width, and then force it to rebuild its text by calling rebuild()
  • Added RegisterRepairIconReplacement function

v2.2.2

15 May 18:23
Compare
Choose a tag to compare
  • Fixed modApi:runLater() causing errors due to a typo
  • Fixed resource error dialog not appearing
  • (Hopefully) Fixed being able to bug out difficulty selection UI by dragging the mouse rapidly
  • Added preIslandSelectionHook and postIslandSelectionHook

v2.2.1

14 May 16:00
Compare
Choose a tag to compare

General

  • Fixed custom difficulty not being correctly set after quitting a game in progress
  • Fixed custom difficulty and vanilla difficulty being able to go out-of-sync, which could happen when switching profiles. Last selected custom difficulty is now stored in a global data file.
  • (Hopefully) Fixed custom difficulty selection UI sometimes being drawn at an incorrect offset.
  • Visual polish to modded UI:
    • Wrapped text computes its size correctly now
    • Modded windows now match game's own UI more closely
    • Fixed some alignment issues (general text, pilot arrange window, tooltips)
    • Opening a dialog window now fades in the black background, similar to opening the Options menu
  • Scrollbars in modded UI no longer react to mouse clicks and dragging when there's not enough content to scroll through
  • Added an information dialog that pops up when the modloader failed to load game resources.

API:

  • Added modApi:writeModData and modApi:readModData
    • Used to store data that affects the entire game install / all profiles
  • Changed GetScreenCenter to simply return center of the screen
  • Added GetHangarOrigin, which returns a reference point for modded UI in the hangar, which includes the offset that was previously accounted for in GetScreenCenter
  • Added modApi:splitStringEmpty, which includes empty strings in the returned table
  • Added sdlext.showAlertDialog, which allows creating dialogs with buttons
    • These dialogs cannot be dismissed by clicking outside of them or pressing Escape, only by clicking one of the buttons
    • Shorthand sdlext.showInfoDialog, which creates an alert dialog with OK button.
    • Shorthand sdlext.showConfirmDialog, which creates an alert dialog with YES and NO buttons.

v2.2.0

11 May 21:28
Compare
Choose a tag to compare

This version includes moderate behind-the-scenes changes. I tried to keep things working, but I may have inadvertently broken compatibility with some mods.

General:

  • Reorganized directory and file structure of the mod loader. Recommend doing a clean reinstall of the game to remove old mod loader files.
  • Disabled mods no longer incorrectly report installed = true
  • Toggling mods in mod configuration window now shows a dialog reminding the user that game restart is required in order to apply the changes
  • Mod content button now repositions itself to stay visible when the game window is resized
  • Added a custom difficulty level system. Added Very Hard and Impossible difficulties.
    • Important: this is merely a system defining difficulties and allowing for their selection in the hangar. Selecting these custom difficulty levels won't do anything without mods providing content for that difficulty.
    • Very Hard: Intended for veteran Commanders looking for a challenge.
    • Impossible: A punishing difficulty allowing no mistakes.
    • SetDifficulty
    • AddDifficulty
    • GetDifficultyId
    • GetBaselineDifficulty
    • IsVanillaDifficultyLevel

API:

  • Added modApi:conditionalHook
    • Can schedule a function to run when a condition is fulfilled (checked once every frame)
  • Added modApi:loadIntoEnv
    • Loads the specified file, but any global variables it defines will be stored in the returned table instead of _G, allowing finer control over what goes into the global table.
    • Mostly useful to the mod loader to implement the following functions, but maybe some mod finds this useful in the future
  • Exposed modApi:loadSettings()
    • Reloads the settings file, and returns a table containing all game settings, allowing to access stuff like colorblind status, and currently selected profile name.
    • Generally you shouldn't ever need to call this, the globally accessible Settings table is now updated frequently enough to hold up-to-date data
    • If your code needs to be notified as soon as settings are changed, use settingsChangedHook
  • Added modApi:loadProfile()
    • Loads profile data of the currently selected profile, and returns the table holding the data
    • Similarily to modApi:loadSettings(), the mod loader calls this function and stores its result in Profile table
  • Added modApi:writeProfileData and modApi:readProfileData
    • Allows mods to store persistent profile-specific data (useful for stuff like unlocks or stuff that persists across multiple playthroughs)
  • The local Global_Texts table from text.lua is now made global by the mod loader. It can be directly modified to change texts in-game. Useful when modApi:overwriteText() is insufficient.
  • Added compare_tables() global function, which returns true if both tables passed into it hold the same data.
    • Nested tables are also compared using this function
    • Userdata fields can't be compared, and are ignored
  • Added modApi:writeAsset and modApi:readAsset
  • Added modApi:copyAsset
    • Copies an existing asset inside resource.dat to another path in resource.dat

UI:

v2.1.5

30 Apr 20:37
Compare
Choose a tag to compare
  • Mod configuration window now also displays version string in addition to each mod's name.
  • Mod loader no longer attempts to load mods which have failed initialization phase, or were not initialized in the first place.
  • LOG now prints empty lines for every newline in the original message, to prevent overlapping when a new message is printed after a message containing newlines. Empty lines are slightly taller than a newline in the console, so the gap becomes bigger than necessary for messages with a lot of newlines.
  • printCallerInfo setting now also affects logging to files.
  • Altered CreatePilot() function to try to prevent duplicate pilots.
  • Renamed missionAvailableHook to postMissionAvailableHook for consistency with other hooks (retained the old function for compatibility).
  • Added missionNextPhaseCreatedHook
  • Added string operations to modApi:
  • Added modApi:runLater
  • Added modApi:addMap
    • Prevents vanilla maps from being overwritten (since the modloader has no way of restoring them to unmodded state at this time).
    • Non-vanilla maps are removed at startup.

v2.1.4

19 Apr 19:05
Compare
Choose a tag to compare
  • Voice event hooks now take a third argument indicating whether the voice event has been handled by another hook already. Voice event hooks should now return either true or false depending on whether they want other hooks to display their dialogs.
  • Fixed startMissionHook not firing when the player entered the Test Mech scenario before selecting a mission.
  • Tooltip and data arguments to addGenerationOption() are now optional

v2.1.3

17 Apr 18:25
Compare
Choose a tag to compare
  • Fixed an issue with UiBoxLayout not taking padding into account when laying out children.
  • Fixed an issue which caused the error frame to not actually show the error that occurred.
  • Mods now have an additional initialized field. This is useless to mod makers, but allows the modloader to be aware of mods which have not been initialized.
  • Improved ScrollArea scrolling behaviour: scrolling with mouse scroll is faster, and holding and moving the scroll thumb now works outside of the scroll area.
  • Added voiceEventHook
  • Fixed a bug with infinite console scrolling when reloading scripts and getting a script error

v2.1.2

11 Apr 23:05
Compare
Choose a tag to compare
  • Fixed logging to file crashing the game and generally not being set up correctly
  • Fixed dropdowns lingering after being dismissed and continuing to intercept mouse clicks