Skip to content

Releases: itb-community/ITB-ModLoader

v2.7.0

22 Jul 00:41
Compare
Choose a tag to compare
v2.7.0 Pre-release
Pre-release

Update for compatibility with Into the Breach: Advanced Edition.

Pre Advanced Edition Changes

Config

  • Fix mod config not reloading when changing profiles
  • Fix modApi:getModOptions failing when called without a mod ID
  • Fix some bugs with hovered elements sometimes selecting the wrong element
  • Improve compatibility with Wine, potentially allowing the modloader to run on Mac

Advanced Edition Changes

Maintenance

  • Added constants file to keep track of number used in multiple places that may change in updates
  • Added a way to trace event creation
  • Update scripts list to Advanced Edition scripts
  • Modloader release now includes the readme, and renamed the uninstaller to be more obviously the modloader

Squads

  • Allow replacing any of the 14 squads (the 8 original squads, the secret squad, and the 5 advanced squads)
  • Mark new squads as vanilla squads
  • Fix various UI elements not working in the updated Hangar

Events

  • Added events for entering and leaving the mech color selector
  • Added events for identifying the page in the squad selector
  • Added events for entering and leaving the difficulty configuration

Pilots

  • Increase the max number of pilots allowed
  • Fix Advanced Edition pilots not showing properly in the pilot selector
  • Modders: if you wish your pilot to be Advanced Edition only, add them to the global New_PilotList

Weapons

  • Update weapon drops to work with the new version
  • Weapons can now be set to time pod only, shop only, along with Advanced Edition only or non-Advanced Edition only
  • Weapon presets are currently not updating the dropdown correctly
  • Fix modloader not starting due to weapon deck code
  • Modders: see here for info on using this functionality

Missions

  • Update mission hooks to fix vek egg missions not working
  • Note: in this build some custom mission hooks are broken, such as GetCurrentMission(), see #131

Palettes

  • Update code checking if a palette is unlocked
    • Supports squads 11-16 unlocking palettes 9-14
    • Supports extending the squads array in the profile to unlock additional palettes
  • Increase max number of palettes to 14, or more with extended squads array in profile

Difficulty

  • Removed custom difficulty hooks as they were mostly unused and Advanced Edition added a new difficulty level

Full Changelog: v2.6.4...v2.7.0

v2.6.4 for pre-Advanced Edition

07 Nov 13:09
Compare
Choose a tag to compare

Fixes

  • Potentially fixed the rare crash related to dismissing UI dialogs (#102)
  • Fixed issues with handling of UI input, which caused the difficulty UI to behave oddly, among others (#100, #108)
  • Fixed a crash when switching the mod loader to profile-specific configuration, when modcontent.lua is not present in the save game directory.
  • Fixed GetCurrentMission() sometimes returning nil in MissionStart hooks.

modApi

v2.6.3

21 Aug 15:49
3c80887
Compare
Choose a tag to compare
  • Fixed Pawn:GetPawnTable() to attempt to get the pawn's table in TestMech scenario, if it exists there.
  • Fixed PilotPersonality:AddMissionDialogTable() not taking the self parameter
  • Added modApi:onPawnSelected and modApi:onPawnDeselected hooks & events.
  • Added img/empty.png, a tiny invisible image which can be useful for when you don't want the game to show the nullResource.png
  • Added BoardPawn.GetAbility
  • Added BoardPawn:IsPilotSkill (alias for BoardPawn:IsAbility)
  • Added BoardPawn:GetPilotSkill (alias for BoardPawn:GetAbility)

v2.6.2

03 Aug 20:00
Compare
Choose a tag to compare

Fixes

  • Fixed Move:GetTargetArea allowing ground-based teleporting and leaping units to target chasms, leading to buggy behaviour.
  • Fixed mouseTile returning slightly incorrect results for board scales 4 and 5.
  • Fixed victory medals for modded squads being drawn on top of tooltips.
  • Fixed changes to palette order not being saved when profile-specific configuration is enabled.
  • Fixed one potential crash in mapedit, related to queued spawns.
  • Fixed crash when starting the game for the very first time with mod loader already installed, due to missing settings.lua (#95)

modApi

  • When defining achievements, you can now add global = "My Category" to have that achievement show up in the Global achievements section in mod loader's UI, grouped under My Category.
    • For example, this allows multiple mods to share a common Pilots Global achievements category.
    • If the achievement is part of a squad's achievements, the global attribute will override that and always place it under Global achievements.
  • When defining achievements, you can now add secret = true to have the unearned achievement's icon be replaced by a question mark, instead of the default grayed-out icon.
    • This doesn't hide the achievement's name or text, only the icon.
  • Added options argument to mod's init function - this is the same options table as the one that the load method receives.
    • Useful when you define mod options via the metadata function
  • Added support for custom ipairs/pairs overrides for tables and userdata. Custom handlers of these can be added by defining __ipairs/__pairs functions on the table or userdata.
  • Added ipairs override for BoardClass, allowing to iterate over all points in the game board.
  • Added Board:GetTiles
  • Added Board:GetTile
  • Added GetUiScale, which returns current UI scale. Returns (game window width) / ScreenSizeX() when Stretch Scaling is enabled, and 1 when not.
    • ScreenSizeX() with Stretch Scaling enabled appears to always return 1024 (depends on apsect ratio?).
  • Added onSettingsInitialized event, in relation to #95
  • modApi:addSquad now validates squads passed in argument - for now, only checks whether the referenced pawns actually exist, and that their Class is valid
  • Added onMapEditorTestEntered and onMapEditorTestExited events, fired when testing out a map created in the in-game map editor.

v2.6.1

22 Jul 20:36
Compare
Choose a tag to compare

Fixes

  • Fixed crash when hovering over achievement popup while it's about to disappear.
  • Fixed lock icon not showing up correctly in palette arrange screen.
  • Fixed tooltips showing up below dropdown options.
  • Fixed an issue where first achievement loaded by the mod loader would get reset on startup.

UI

  • Dropdown options can now have their own tooltips.
  • Updated mod loader's own dropdowns to have tooltips briefly describing each option.
  • Tweaked some mod loader screens to make use of tooltip title.
  • Achievement toasts now stay visible as long as you're hovering over them.
  • Added reminder to restart the game when changing the order of squad palettes.

modApi

  • Dropdowns in mod configuration added via modApi:addGenerationOption now also support tooltips - see the wiki for an updated example.
  • Updated onGameVictory event with missing parameters

v2.6.0

19 Jul 20:30
Compare
Choose a tag to compare

This release includes many new features, functionalities, and fixes - most of them contributed by @Lemonymous

TL;DR: modpacks, squad palette, and achievements integration. Some potentially breaking changes to UI. Multiple fixes.

New functionality

Mod sorting (#45)

Added various sorting options to the Mod Configuration screen - sort by name, id, load order, enabled status.

Modpacks (#57)

Added support for modpacks - mods that include other mods within themselves. These behave the same as regular mods do, and can execute init/load code, allowing for some custom logic to get the mods to play nice with each other, if need be. Modpacks are initialized and loaded before their nested mods.

For an example, see the ExampleNestedMods.zip file attached to this release.

Squad palettes (#61)

Added support for squad palettes. Mods utilizing palette libraries - such as FURL, KnightMiner's palette library, or Lemonymous' palette library - should work out-of-the-box.

Added Palette Arrange screen to Mod Content that allows you to change palettes available in the hangar. It works similarily to the existing Pilot Arrange screen - simply drag the palettes around to order them.

Keep in mind that palettes are tied to squads, so in order to be able to use the palette, you need to have the squad unlocked - palettes that cannot be used have a lock icon over them.

The Rift Walkers palette is locked and cannot be reordered, since all other palettes use it as a base for recoloring.

Achievements (#65)

Integrated Lemonymous' achievements library into the mod loader. This feature also implemented automated tracking of victory medals for modded squads, without requiring any changes to mods. Mods utilizing the original library should work out-of-the-box.

There's also a new Achievements screen in Mod Content where you can view the achievements you've earned.
If you're a mod creator, you may enable Development Mode in the mod loader's options - doing so will allow you to click on each achievement's icon, marking it as earned or not earned, making it easier to test achievements.

There are new features compared to the original library, such as rewards tied to achievements, and achievements tied to squads. Check out the linked pull request for a more comprehensive summary.

Fixes

  • Fixed a crash when resource.dat goes missing (#54)
  • Fixed a crash when resource.dat had size 0.
    • The mod loader will now attempt to recover from this, but mods that load resources immediately upon initialization may not work correctly, and will require you to restart the game. Mod creators: in order to fix this, load resources in a deferred way - follow this pattern:
      -- Create a forward declaration of the variables that will hold the resources
      local myResource1 = nil
      local myResource2 = nil
      
      -- Load the resources as you did before, but inside the onFtldatFinalized event callback
      modApi.events.onFtldatFinalized:subscribe(function()
          myResource1 = ... 
          myResource2 = ...
      end
  • Fixed an issue where tracked surfaces wouldn't get updated correctly (itb-community/DLL-Extensions#5)

UI

  • Improved behaviour of tooltips; should be more responsive and less flickery (#60)
  • Scrollable areas now scroll much more smoothly (#76)
  • Rewritten hangar and custom difficulty logic and UI, making it less janky and less prone to bugging out (#71)
  • Rewritten testing console to make selection of test to run less cumbersome (#51)
  • Added achievements screen (#65)
  • Added palette arrange screen (#61)
  • Updated mod content, pilot arrage, and weapon deck selection screens with some more modern tools available in the mod loader (#64)
  • Changed signature of sdlext.build___Dialog helper functions to allow more control over the built dialog. Old signatures should still work for existing mods (#64)
    • This included a fix to base Ui:relayout function, which might cause some UIs to break, if they happened to depend on the buggy behaviour

modApi

  • Added a global Assert table containing functions useful for making sure variables hold what they're expected to hold. In case of failed assertions, the error messages are more readable than regular lua assert, and should be easier to debug (#46)
  • Fleshed out mod loader's events system and reworked hooks to be based off of events. This is primarily useful for mod loader maintenance, but may be useful for mods that add custom UI. See the events wiki page for a list and documentation on events. (#56)
  • Added events for closing and opening various game windows - this allows to avoid the previous hacky approach of measuring window dimensions, and should support multiple windows open at once. (#68)
  • Added hooks for when bindable action hotkeys are pressed (#53)
  • Added PawnFocused and PawnUnfocused hooks - 'focused' here means when a pawn is either hovered or selected; and the game draws the ui for the pawn's pilot, traits and weapons at the bottom left of the screen, during a mission (including test mech scenario). (#55)
  • Added support for new SkillEffect.AddProjectile and SkillEffect.AddArtillery overloads added in 1.2 (#43)
  • Pawn type tables can now reference a Move skill as a string, instead of a direct table reference (#59)
  • Added an additionalSquadData entry to GAME containing additional squad data. This data will be stored in the save game, and can be used to create game logic requiring knowing the squad being used. (#71)
    Note: a Random or Custom squad will always have squad = nil
    GAME.additionalSquadData = {
        squad = "id_of_squad_used_this_run",
        mechs = {
            "id_of_mech_1",
            "id_of_mech_2",
            "id_of_mech_3"
        }
    }

Mod loader

  • Added Print Debug Logs option to mod loader configuration - enable this option to show more fine-grained log messages during startup for debugging.

v2.5.5

27 Mar 14:58
Compare
Choose a tag to compare

General

  • Globalized PilotPersonality
  • Added modApi:loadPersonalityCSV, which can be used to load .csv files with Pilot and Mission dialogs, so that mods no longer need to include the entire personalities.lua, which broke #corp and #squad replacements.
  • Fixed issues with tile and status tooltips not being set.
  • Fixed weapon names and descriptions not working when set via Weapon_Texts global table, or modApi:addWeapon_Texts
  • Fixed BufferedLogger not honoring log level settings

v2.5.4

29 Sep 19:24
Compare
Choose a tag to compare

IMPORTANT

If you've used either version 2.5.2 or version 2.5.3 of the mod loader previously, make sure to reinstall the game / verify integrity of game cache on Steam, before installing this version of the mod loader.

 

General

  • Fixed an egregiously stupid bug that would cause asset changes made by mods to stick around even after mods have been uninstalled / disabled.

UI

  • The mod loader no longer replaces the game's own cursor, since it's no longer necessary - the game draws its own pointer over modded UI.

API

  • Changed GetParentPath to correctly return parent directory when passed a path ending with /
  • Added IsText override, which might potentially help with some texts not appearing properly in some cases

v2.5.3

02 Jul 20:01
Compare
Choose a tag to compare

General

  • Fixed a recently introduced bug that prevented pilots not selectable in the hangar from being unlockable.
  • Mod content now includes a weapon selection screen, that allows you to pick which weapons will be available in the deck to drop in time pods / appear in shops / perfect island rewards. You can also save presets for future use. (thanks KnightMiner)
  • Pilot arrange can now be accessed even after entering the hangar. You'll have to restart the game for changes in pilot order to be applied (thanks KnightMiner)
  • In pilot arrange, pilots that haven't been unlocked yet now show up as black silhouettes (thanks KnightMiner)
  • Added a collapsible group for popups in mod loader's configuration, since there are quite a bit of them already.
  • Added a mod loader option to enable scrolling LOG messages in the console.
  • Fixed mod loader's Print Caller Info option not printing the correct caller function

API

  • Added sdl.multiply and sdl.grayscale that allow creating tinted and grayscaled surfaces, respectively. Supported by sdlext.getSurface
    • Reworked sdlext.getSurface to allow specifying transformations in any order, and repeating them
  • Several additions relating to the weapon selection screen:

v2.5.2

06 May 19:35
Compare
Choose a tag to compare

General

  • Improved loading times when starting the game
  • Fixed weapon upgrade texts not being resolved (thanks Lemonymous)

API

  • Added modApi:copyFileOS() which invokes operating system's command to handle copying of large files more efficiently - downside is, the command console might briefly appear.
  • Fix Pawn:IsArmor() returning true for Armor Psions (thanks narD)
  • Added functions to Event-related classes
    • Added Subscriber:addTeardown(), allowing to add cleanup functions for subscribers that get removed from an event
    • Added Event:isSubscribed()