#RL2.API

1 messages · Page 1 of 1 (latest)

magic canyon
#

A moddin' API for Rogue Legacy 2.
This project was split from RL2.ModLoader to be served as a separate mod.
It still requires RL2.ModLoader installed to work, however it's not needed to use the mod loader itself.

Installation guide:

  • Install RL2.ModLoader
  • Run the game once
  • Download RL2.API.zip from the link below and unpack it into Game_Installation_Path/Rogue Legacy 2_Data/Mods

Download link: Latest release

magic canyon
#

Released RL2.API v0.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)
magic canyon
#

What's next for RL2.API?

Currently I am slowly workin' on another rewrite of the API.
It will transform the current inheritable ModX.Y methods into events to which modders will be able to subscribe to. This will give them greater power over the structure of their code.

magic canyon
#

The rewrite is now complete

magic canyon
#

Released RL2.API v1.0.0

  • 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, they should subscribe to events such as Player.OnKill where their code will be executed

Example change:

// Old
public class EnemyKillEffects : GlobalEnemy {
  public override void OnKill(EnemyController enemy, GameObject killer) {
    // Code here
  }
}

// New 
public class EnemyKillEffects : IRegistrable {
  void IRegistrable.Register() {  
    Enemy.OnKill += (EnemyController enemy, GameObject killer) => {
      // Code here
    };
  }
}```**NOTE:** This change was made to allow modders for more free organisation of projects.
## Changelog can be found [here](https://github.com/RL2-API/RL2.API/blob/main/CHANGELOG.md)
GitHub

A work in progreess Rogue Legacy 2 modding API. Contribute to RL2-API/RL2.API development by creating an account on GitHub.

magic canyon
#

Important note

RL2.API v1.1.0, which is curently under development, will require RL2.ModLoader v1.0.3

magic canyon
#

RL2.API v1.1.1 Released

magic canyon
#

RL2.API v1.1.2 Released

  • Enemy.ModifyBehaviour works properly now
magic canyon
#

RL2.API v2.0.0 released!

What changed?

This is a big step in RL2 modding, as we can finally offer modders the possibility of adding content to the game.
This update introduces:

  • Adding Relics
  • Adding Traits, and
  • Modifying sets of Summon Rules for Scar Challenges.
    We hope modders have fun using the new API.
    Unfortunately, all mods which were made for RL2.API v1.1.2 and below, are incompatible with the new version.

Porting notes

The fix in most cases is very simple, only requiring modders to add .Event to every subscription to the event they use. Example:

// Old
Player.Ability.ModifyData += method;
Enemy.ModifyBehaviour += method;
// New
Player.Ability.ModifyData.Event += method;
Enemy.ModifyBehaviour.Event += method;

Changelog can be found here

Release available on GitHub

GitHub

A work in progress Rogue Legacy 2 modding API. Contribute to RL2-API/RL2.API development by creating an account on GitHub.

magic canyon
#

Future™ update plans:

  • Enemy replacement
  • Custom Burdens
  • Custom Classes
magic canyon