Skip to content

Installation

ESTONlA edited this page Sep 8, 2026 · 5 revisions

Installation

  1. Install BepInEx 5 into the How to Fish game folder.
  2. Copy HowToLua.dll and MoonSharp.Interpreter.dll to BepInEx/plugins/HowToLua/.
  3. Place each Lua mod in its own folder inside BepInEx/plugins/HowToLua/mods/.
  4. Launch the game. Pause and open Lua Mods to inspect the load state or reload scripts.

The host needs How to Lua for host-owned events, player actions and commands. Client-only support remains deliberately limited in 0.3.0.

Lua mod data is stored as BepInEx/config/HowToLua.<mod-id>.cfg.

Folder Layout

Use the game directory containing How to Fish.exe. For the default Steam installation, that is often:

C:\Program Files (x86)\Steam\steamapps\common\How to Fish\How to Fish

The final layout should be:

How to Fish/
  How to Fish.exe
  BepInEx/
    plugins/
      HowToLua/
        HowToLua.dll
        MoonSharp.Interpreter.dll
        mods/
          welcome-example/
            manifest.json
            main.lua

Lua folders must be directly inside mods. An extra folder such as mods/downloaded-archive/welcome-example/ will prevent discovery. The loader looks for mods next to HowToLua.dll.

Try the Bundled Example

  1. Extract the framework package into the game directory so its BepInEx folder merges with the existing one.
  2. Copy the package's examples/welcome folder into BepInEx/plugins/HowToLua/mods/. The example is optional and is not enabled merely by extracting the package.
  3. Launch the game and host a session.
  4. Open Pause > Lua Mods and check that Welcome Example is loaded.
  5. Return to gameplay and enter /bonus in chat. This example awards $25 to the shared balance each time the host runs it.
  6. Under Mods / Actions, use Welcome Example: Show catch count to broadcast the stored catch count.

The example tracks fish hooked after its handler loads. It does not import previous catches or identify the player who hooked a fish.

The optional examples/crew-tools folder demonstrates the new APIs. Copy it separately into mods to enable sale logging, persistent per-player death counts, Heal crew and Feed crew action buttons, /luacrew for crew/balance information and /luareturn steam_id for a return-to-spawn teleport. Healing/feeding only affects living players. Installing the framework alone does not enable these example actions.

Updating and Removing Mods

The optional examples/world-tools folder requires 0.3.0. Copy it directly under mods to enable Show boat status, Save world, /luacatalog, /luaspawn definition_id, and boat/quest logging. It makes no gameplay changes on load. Spawn/save commands change your world when used: try them on a spare save. Examples are separate mods, not required framework components.

Restart the game after replacing either DLL. Lua-only edits can be applied with Reload Lua Mods. Reload affects every Lua mod, including its timers and local variables; saved data remains.

Use both DLLs from the 0.3.0 package when updating. Its MoonSharp DLL retains the net40-client compatibility fix from 0.1.1; the old 0.1.0 netstandard1.6 DLL triggers a missing System.Collections 4.0.10.0 error. A full game restart is required to unload old assemblies. No Lua scripts or data need to be deleted.

The original event arguments remain compatible. 0.2.0 queues events instead of delivering them inside the native game call; callbacks cannot cancel the underlying operation. See Events before writing timing-sensitive logic.

To remove a Lua mod, move its folder outside mods, then reload. Its saved .cfg file remains until you remove it separately. Back up that file before resetting data.

Who Needs It?

For host-side events, commands, player actions, chat messages and shared rewards, the host installs the framework and scripts. Other players receive normal game network updates. They do not gain the Lua Mods page unless they install the framework themselves. hostOnly: false permits local timers/actions on clients, but does not distribute scripts, synchronize Lua data, or let clients execute host actions/commands.

See Troubleshooting if the menu, script, or dependency does not load.

Clone this wiki locally