Skip to content

Releases: itb-community/ITB-ModUtils

v1.22

04 Jan 00:50
bade2e4
Compare
Choose a tag to compare

What's Changed

Added pawnIsBoosted hook
Updated readme to match it being a modloader extension

Full Changelog: v1.21...v1.22

v1.21

22 Apr 19:49
0ca8d03
Compare
Choose a tag to compare

What's Changed

Add protection to skilleffect and targetarea hooks in case of nil Point arguments.

Full Changelog: v1.20...v1.21

v1.20

10 Apr 14:34
Compare
Choose a tag to compare

What's Changed

  • Fix skill events passing the correct arguments be0f21c

Full Changelog: v1.19...v1.20

v1.19

07 Mar 01:20
Compare
Choose a tag to compare

MIsc

  • Removed code that attempts to update the global Pawn when using weapons. As a result of this, the global Pawn will only be set by the vanilla game, and will not be usable in queued attacks. This fixes weapons that use Pawn and have movement as part of their attack from erroring in test mech scenario.
  • Fixed an error in SecondTargetAreaBuildHook.

Full Changelog: v1.18...v1.19

v1.18

05 Mar 18:02
Compare
Choose a tag to compare

v1.17

21 Nov 20:13
Compare
Choose a tag to compare

Added the ability to load modApiExt as a mod loader extension. ModApiExt should still be loadable as a library like before, so old mods should work as they used to.

Added event variants of every modApiExt hook.

  • If a hook is modApiExt:addResetTurnHook(func)
  • The event is modApiExt.events.onResetTurn:subscribe(func)

Fixed modApiExt skill events passing the wrong Pawn to their subscribers.

v1.15

09 Oct 16:13
Compare
Choose a tag to compare

Download

Download the latest version here: modApiExt-1.15.zip

Changelog:

  • Removed the following functions, since they're now provided by the mod loader
    • mouseTile
    • mouseTileAndEdge
    • getScreenRefs
    • screenPointToTile
  • modApiExt no longer adds an additional parentSkill argument to GetSkillEffect
  • Fix nested GetSkillEffect functions not working. You should now be able to do the following in your skill effects, and it should work as expected (further nesting should also work):
    NestedSkill = Skill:new()
    function NestedSkill:GetSkillEffect(p1, p2)
        -- your real skill effect logic here
    end
    
    RealWeaponAddedToPawn = Skill:new()
    function RealWeaponAddedToPawn:GetSkillEffect(p1, p2)
        return NestedSkill.GetSkillEffect(self, p1, p2)
    end
  • Added new hooks for Skill-related functions: GetFinalEffect, GetTargetArea, GetSecondTargetArea

v1.14

19 Jul 22:04
Compare
Choose a tag to compare
  • Fix a crash when viewing some weapon/unit tooltips (#4)

v1.13

15 Jan 18:46
Compare
Choose a tag to compare
  • GetSkillEffect now checks the third argument used internally by modApiExt to verify that it's actually a skill table
  • GetSkillEffect no longer eats extra arguments after p1, p2, and parentSkill
  • Fixed a hard crash which happened sometimes when entering test mech scenario (thanks Lemonymous)
  • Fixed a bug with safeDamage, where the damaged pawn could sometimes be affected by ACID, if there was an ACID tile on the map, and modApiExt happened to use it to apply the damage. Also fixed a bug where damaging a pawn that was about to drown played the splash animation twice (thanks Lemonymous)
  • Fixed getTileHealth failing for tiles that do not have an entry in the savefile.
  • Fixed further issues with Ramming Speed achievement (thanks Lemonymous)
    • This also fixes an issue with modApiExt causing the game to update the tile a pawn is standing on, whenever that pawn fired a weapon, which caused insonsistencies in behaviour compared to the vanilla game -- most notably Unstable Tank setting itself on fire when firing its weapon while standing on a forest (thanks narD)
  • Fixed a bug with weapon upgrade recognition, where it'd return false for upgrades activated via temporary power, such as Mafan or pilot skill (thanks krjuggling)
  • Fixed a bug with weapon upgrade recognition, where it'd crash for upgrades that require 0 power (thanks Djinn and Lemonymous)
  • Fixed a bug with mechs not firing pawnKilled hooks when killed more than once during the same mission (thanks Lemonymous)
  • Added pawnRevived hook
  • Added vekMoveStart and vekMoveEnd hooks
    • There's no way to predict where enemies are going to move, therefore vekMoveStart does not provide information about new/old locations
  • Merged #3 - fixed a bug with undo move detection

v1.12

31 Aug 01:30
Compare
Choose a tag to compare
  • Fixed some issues with resetTurn and gameLoaded hooks
  • Fixed pawn:getWeapons() not accounting for upgrades
  • Fixed a bug granting the Ramming Speed achievement

 

  • Each modApiExt instance (from this version onward) now holds basic information about the mod that created it in the owner field
  • Errors in skillBuildHook should now be a little more informative (can point to the mod in which the error occurred)
  • Added p2idx
  • Added idx2p
  • Added board.getTileHealth
  • Added board.getTileMaxHealth
  • Added a debug display drawing the lines used to detect which tile the mouse is hovering over (used by tileHighlight/tileUnhighlight hooks). Can only be enabled when running modApiExt as standalone mod.
  • Added mostRecentResolvedHook, fired when the most recent available version of modApiExt has been resolved
  • Added modApiExt:forkMostRecent, which allows your mod to seamlessly use the most recent available version of modApiExt