Skip to content

Latest commit

 

History

History
116 lines (84 loc) · 5.95 KB

File metadata and controls

116 lines (84 loc) · 5.95 KB

🌟 The Good Stuff

This method only supports 24 out of the 44 possible states!
Please help out mapping the remaining ones! See testing version on how you can help.

Overview

The goal is simple:
Prevent mods from unintentionally breaking multiplayer experiences or risking account bans.
As we all know they are carefully watching. No-one would wish modders to be conflated with cheaters. By identifying and understanding the player's context, your mods can behave more responsibly.


image
Don't let this be you. :[


🔎 How It Works

Give me the Short version

  • The game has an internal tracker of the player's situation.
  • This script reveals every single situation change.
  • Since only some situations are ban worthy (say, playing Arena Quests = High chance of Ban, Offline = Low Chance of ban), your mod can use that information to only activate itself in the situations that you have set as Safe. :)

I want the Long Version

This project hooks the ToArray() method of the internal List<app.cGUIMaskContentsManager.SITUATION> type in REFramework. When the situation list changes (i.e., the player's in-game situation updates), the hook intercepts the new data and compares it to the last known situations. This function is only called when a situation change arises, making it extra efficient.

Possible Situations

MH:Wilds tracks the changes in and out of these situations : 🔗 Possible Situations

So if your mod can benefit from detecting when the player is in a Multiplayer quest, Hosting an Arena, in the Training Area, or Playing Offline for example, this system is built for you!
Keep in mind that this list will most likely grow as they add more features to the game, so if you find a new situation or improve the logic, PRs are warmly welcome.


Installation & Usage

This repo contains two versions :

Lightweight, stripped of noise, and built for seamless integration into your mod! :)
Just drop the code into your mod's script and select the situations you want to monitor.
This method only supports 22 out of the 44 possible states!
Please help out mapping the remaining ones! See the testing version below for how you can help. :)


For debug usage and creating more human readable situations.
Includes debug prints, enum suggestions, and logs to help improve detection accuracy.

Step by step guide

  1. Put the files like this in your reframework folder :
MonsterHunterWilds
        │
        └── reframework/
                  │
                  └── autorun/
                          │
                          ├─ MultiDetect_Testing.lua
                          └── MultiDetect_TestingFiles/
                                          │
                                          ├─ MD_Known_Situations.lua
                                          └─ MD_Possible_Situations.lua     
  1. Open MH:Wilds and in REFramework Spawn Debug Console to see the logs it prints while you test in-game.

    image
    Here we can see that game does the transition Out
    of Suja and Into Grand Hub as 2 distinct events


3. When a new un-confirmed situation arises, the log will notify you and attempt to suggest possible candidates.
4. When you are pretty sure you can confirm the situation, add it in MD_Known_Situations.lua, and save.
5. In REFramework, Reset scripts and continue finding unconfirmed situations.


image
Location of the Reset Scripts and Spawn Debug Console buttons

Ideas for Improvements

• Manually confirm and reword all the remaining states.

• Add useful grouping. Example, grouping all arena states into a PlayerStituation.isinAnyArenaQuest.


🙏 Credits & Thanks

Special thanks to:

  • LordGregory – For dumping the RSZ.

  • Fexty – For being kind enough to point me in the right direction on one of his good days.

  • Daniel7400 – For the top notch polish in their work. (Check out Achievement Progress Tracker!) Inspiring the persistence and dedication to see this through. You reminded me why doing it right matters.


License & Community Use

  • 🆓 This project is free to use, fork, modify, and improve for any open-source or private mod that benefits from better situation state awareness.

  • 💡 If the mod is open-source, integration is extremely simple. I took extra care to make the code as readable as could be so that even beginners could lend a hand. :)


This exists as a labour of love for what Monster Hunter is and has become. Standing strong for so many years, and with such a creative community, let’s take care of it.

Light the Way
🌟