When a Lua script fails in an REFramework-based game such as Monster Hunter Wilds, the issue usually occurs before the game interface even loads. Since Lua is an interpreted language, REFramework records error details in a log file so you can identify exactly where the script failed.
Below is a complete guide to finding and understanding these errors.
Main Log File: re2_framework_log.txt
This is the most important file for debugging. Each time the game starts, REFramework creates or updates this log.
Location:
The file is located in the main game installation folder.
Example:
C:\Program Files (x86)\Steam\steamapps\common\MonsterHunterWilds\
How to check errors:
Open the file using Notepad or any text editor. Use Ctrl + F and search for terms like Lua or Error.
Example error:
[2026-03-19 11:53] [REFramework] [Error] Lua script error: autorun/my_mod.lua:45: attempt to index a nil value
What it means:
File: my_mod.lua
Line: 45
Reason: The script tried to use a variable that has no value or does not exist
REFramework In-Game Console
If the game loads to the main menu, you can view errors directly inside the game.
Steps:
Press Insert or Home to open the REFramework menu
Go to Script Runner or Scripting
Open the Console or Log section
Any script errors will appear instantly here. This is useful when a script works during startup but crashes later during gameplay.
Common Startup Error Types
If errors appear immediately after launching the game, they usually fall into one of these categories.
A. Syntax Errors
Cause: Missing brackets, parentheses, or keywords like end
Common messages: unexpected symbol near or expected ‘end’ to close ‘if’
B. Path Errors (require issues)
Cause: The script is trying to load another file that cannot be found in folders like reframework/autorun or reframework/modules
Common message: module ‘file_name’ not found
C. Version or API Errors
Cause: The script is calling a function that changed after a game update
Common message: pointer is null or similar runtime errors
Developer Console Tip
If you are creating or testing scripts, enabling the developer console can make debugging faster.
Steps:
Open the REFramework menu
Go to Developer Tools
Enable Show Console
This opens a command window that displays logs instantly, so you do not need to reopen the log file repeatedly.
Summary
Source: re2_framework_log.txt
Best use: Startup crashes and full error logs
Format: Text file
Source: In-game console
Best use: Errors during gameplay
Format: On-screen menu
Source: Developer console
Best use: Real-time debugging while scripting
Format: Command window
Official Download: REFramework Download
Comprehensive Guide and Documentation: REFramework Documentation GitHub page for REFramework