Monster Hunter: World
0 of 0

File information

Last updated

Original upload

Created by

Alcedo

Uploaded by

HalcyonAlcedo

Virus scan

Safe to use

Tags for this mod

About this mod

LuaEngine is a Lua script platform engine for Monster Hunter World, which allows you to automate the game data control by writing Lua scripts. It also has a built-in ImGui function, which can visualize and modify the data. For the usage methods, please refer to the contents in the left menu.

Requirements
Permissions and credits
About LuaEngineLuaEngine is a Lua script platform engine for Monster Hunter World, which allows you to automate the game data control by writing Lua scripts. It also has a built-in ImGui function, which can visualize and modify the data. For the usage methods, please refer to the contents in the left menu.

LuaEngine is a mod that enhances your gaming experience by giving you more control and customization over the game data. You can use Lua scripts to manipulate various aspects of the game, such as your character's attributes, position, weapon, inventory, and more. You can also create your own user interface with ImGui, which can display and edit the data in real time. LuaEngine is a powerful and flexible tool that lets you unleash your creativity and imagination.

Mod Installation
To install the mod, simply unzip the files in the archive to the game root directory. To uninstall the mod, just delete the nativePC\plugins\LuaEngine.dll file.

The Lua script files are stored in the Lua folder. The Engine.lua and modules files are the core files of the engine, please do not delete or modify them easily. The optional scripts should be installed in the Lua folder.


Engine Usage
The game data parsing engine currently implements some of the game data reading and modification. After completing the initialization, you can easily access these data. The following will explain the game data that has been parsed and the usage of the engine. The relevant code can be found in the data window script of the optional script.

Engine Initialization
When initializing the player, world, and mission, it is very simple. You can directly load the engine into the variable through the new() method.
local Data_Player = engine.Player:new()
When initializing the monster and entity, you need to pass the address of the corresponding entity to the new(entityPtr) function. Usually these entity addresses can be obtained through the built-in functions of the mod, and there is no need to manually find them.
local monsterList = GetAllMonster()
for monster, monsterData in pairs(monsterList) do
local Data_Monster = engine.Monster:new(monster)
end

Get and Modify Data in the Engine
After initialization, the engine will be stored in the variable as a table, and you can directly access the data in the table. These data will also respond to assignment operations and directly modify the game data, but note that not all data support modification. The engine currently only provides data binding that can be modified, and other data modifications will not take effect.

Get player health
local health = Data_Player.Characteristic.health.health_current
Modify player health
Data_Player.Characteristic.health.health_current = 100

Directly modifying the player's weapon id through the engine will not take effect, the player's weapon id is protected data
Data_Player.Weapon.id = 214 --Will not take effect

It is worth noting that some structure-type data cannot be changed by modifying only one value in the structure through the engine, but can be changed by modifying the entire structure.

Modify player's coordinates
Data_Player.Position.position = {x = 100, y = 20, z = 100}
If you only modify one value in the player's coordinates, it will not take effect
Data_Player.Position.position.x = 100 --Will not take effect

Engine Data Currently Accessible
Since there is a lot of engine data, it is recommended to directly check the engine source code under Lua\modules. The first table in the source code contains all the accessible data for that item. The content that can be modified directly through the engine can be seen in the creation listener below the new() method of that item. The new method is usually at the bottom of the source code.

Preset Functions
The engine also preset some convenient functions. The functions of the relevant items can be seen in the method written in the header comment of the corresponding item source code. Currently, the main engine only provides keypad for judging whether the key is pressed.
if engine.keypad({'ctrl','a'}) then
...
end

Here it is recommended to use the timer function together to add a key judgment delay. The usage method can be found in the on_time function of the example file.

Git Repository and Related Dependencies Description
GitHub: https://github.com/HalcyonAlcedo/LuaEngine
Gitee: https://gitee.com/HalcyonAlcedo/LuaEngine
Lua version: 5.4.4
ImGui version: v1.89.2

Discord: https://discord.gg/nX6uwwK7vt
QQ: 736747654