Skip to content

MekuCube/NoMoreHeroesModLua

Repository files navigation

Integrating Lua modding support into No More Heroes 1 + 2.

nmh nmh

A work-in-progress.

How to use

  • Build as .DLL then inject into NMH.exe / NMH2.exe
  • Currently injection has to be done manually, I use Cheat Engine
  • Afterwards, the game will load all .lua files in the /Mods/ folder of the game's install folder (so SteamApps/Common/No More Heroes/Mods/)

Included mods

I've included some sample mods by default in the /Mods/ folder.

  • VisitAnyMap.lua: Press X on the map screen in No More Heroes 2 to expand the menu to include every map in the game.
  • SprintOutOfCombat.lua: Hold RB while moving to sprint (when not in combat).
  • RainbowKatana.lua: Makes Travis' beam katanas turn rainbow.

Complete

  • Execute Lua in NMH2
  • Read/write to NMH2 variables
  • Execute functions (static / overloaded / object instance)
  • Documentation via json
  • Extending classes via json
  • Loading multiple Lua scripts
  • Common iterators
    • AllCharacters / AllZako / AllCommonObj global lists
  • Function hooks (both pre/post hook, via FunctionName_RegisterHook(CallbackName, bPostHook))

Not started:

  • Hook parameters
  • Launching on game startup
  • Sharing C and Lua namespaces
  • Subclass game classes

Known issues

  • Some function calls / hooks are unstable and result in crashing.

About

Runtime Lua modding for No More Heroes 1 & 2

Resources

License

Stars

Watchers

Forks

Packages

No packages published