RL2.API

TacoConKvass

2.1.0

Additions

All content addition related APIs now expose a DeleteData hook (listed below), which is triggered on save file deletion

  • Modded Burdens!
    • Burdens.Register
    • Burdens.GetType
    • Burdens.SaveData
    • Burdens.DeleteData
    • Burdens.LoadData
    • Burdens.LoadContent
    • Burdens.ModifyData
    • Burdens.ExtendTypeArray
  • Modded Soul Shop upgrades!
    • SoulShop.Register
    • SoulShop.GetType
    • SoulShop.SaveData
    • SoulShop.LoadData
    • SoulShop.LoadContent
    • SoulShop.DeleteData
    • SoulShop.ModifyData
    • SoulShop.ModifyEntryArray
    • SoulShop.ModifyObj
    • SoulShop.OnOpen
    • SoulShop.OnClose
  • Player.HeirGeneration.ModifyCharacterData.Event_v2
    • Provides index of the Heir instead of lockedClass and lockedSpell booleans
  • Relics.DeleteData
  • Relics.SetSeen
    • Triggered when setting a Relic's seen status
  • Traits.DeleteData

Changes

  • RL2.API now attempts to load the mod's PDB (Portable DeBugging) file if present
    • This allows modders to use a debugger to set breakpoints in their mods, greatly enhancing their debugging capabilities

2.0.0

Changes

  • All API endpoints are now accessed via (Container/s).(Name).Event
    • Example Player.Ability.ModifyData -> Player.Ability.ModifyData.Event

Additions

  • Modded Relics!
    • Relics.Register
    • Relics.GetType
    • Relics.SaveData
    • Relics.LoadData
    • Relics.LoadContent
    • Relics.ModifyData
    • Relics.ExtendTypeArray
    • Relics.ApplyEffect
    • Relics.StopEffect
  • Modded Traits!
    • Traits.Register
    • Traits.GetType
    • Traits.SaveData
    • Traits.LoadData
    • Traits.LoadContent
    • Traits.ModifyData
    • Traits.ModifyTraitObj
    • Traits.ExtendTypeArray
    • Traits.ApplyEffect
    • Traits.StopEffect
  • Scars.ModifySummonRules
  • Scars.RegisterCustomRule

Deletions

  • Player.(StatName) endpoints.
    • For stat modification use Player.PostUpdateStats.Event
    • We are aware this disallows modifying Strength and Intelligence, but we are working on readding access to modifying those
    • Health can be modified via Vitality

1.1.2

Fixes:

  • Enemy.ModifyBehaviour now allows for completly replacing the values of aiScript and logicController_SO

1.1.1

Changes:

  • RL2.API now requires RL2.ModLoader v1.0.3
    • This is due to the fact that v1.0.3 introduced proper IDs for its Hook objects

Additions:

  • Mod.ModManifest property
    • Holds the ModManifest object related to the mod
  • RL2API.GetModInstance(string modName) method
    • Returns an instance of a mod with modName set as its name in its manifest, or null if not found
  • Mods can now specify which classes implementing IRegistrable belong to which mod
    • This is important in case one assembly contains multiple mods

1.0.0

Architecture rework:

  • Instead of subclassing ModX and GlobalX classes, modders should now create their own classes implementing the IRegistrable interface.
  • Inside the IRegistrable.Register() method of their classes, modders should subscribe to events such as Player.OnKill where their code will be executed

This is a shortened version of the changelog, you can see the full version here

Changes:

  • Player related APIs
Old New
ModPlayer.OnSpawn Player.OnSpawn
ModPlayer.PreKill Player.PreKill
ModPlayer.OnKill Player.OnKill
Player.StatBonuses.{StatName} Player.Stats.{StatName}Flat
Player.StatBonuses.{StatName} Player.Stats.{StatName}Multiplier
ModSystem.ModifyGeneratedCharacterData Player.HeirGeneration.ModifyCharacterData
ModSystem.ModifyGeneratedCharacterLook Player.HeirGeneration.ModifyCharacterLook
ModSystem.ModifyCharacterRandomization Player.HeirGeneration.ModifyCharacterRandomization
ModSystem.ModifyAbilityData Player.Ability.ModifyData
  • Enemy related APIs
Old New
GlobalEnemy.OnSpawn Enemy.OnSpawn
GlobalEnemy.PreKill Enemy.PreKill
GlobalEnemy.OnKill Enemy.OnKill
ModSystem.ModifyEnemyData Enemy.ModifyData
ModSystem.ModifyenemyBehaviour Enemy.ModifyBehaviour
  • Map related APIs
Old New
ModSystem.ModifyRoomIcon World.Map.ModifyRoomIcon

Deletions

  • ModClassData
    • Awaits new implemenataion, doesn't work at the moment

0.2.0

Bug fixes:

  • StatBonuses.(Strength|StrengthMultiplier|Intelligence|IntelligenceMultilplier) no longer apply to enemies
  • RL2.API no longer tries to load mods that don't specify being loaded after it

Changes:

  • new-mod command is now called via rl2.api:new-mod

Additions:

  • ModSystem.ModifyAbilityData:
    • Allows modifying AbilityData depending on the provided AbilityType
  • ModSystem.ModifyEnemyData:
    • Allows modifying EnemyData depending on the provided EnemyType and EnemyRank
  • ModSystem.ModifyEnemyBehaviour:
    • Allows modifying the enemy AI script and logic controller depending on the provided EnemyType and EnemyRank (needs detailed documentation)

0.1.0

Released alongside RL2.ModLoader.