Code Monkey home page Code Monkey logo

smarthunter's Introduction

SmartHunter - Overlay

SmartHunter

A complete overlay for Monster Hunter: World on PC. Distributed on Nexus Mods. See the mod page for up-to-date details.

Contributors

  • Pull requests are welcome. Please submit to the dev branch.
  • Give your pull request sufficient context so I don't have to guess what it does.
  • Keep your code in line with the project's style conventions.
  • Bug fixes: if you're unsure, open an issue with your intent to fix and I will verify the bug.
  • New data: always looking to extend data for supported features if you can find it in memory. E.g. new buffs, status effects, etc.
  • New features: open an issue with your intent so we can scope it, because I'm not likely to accept a random pull request if it's a bit... "out there".

smarthunter's People

Contributors

ljn917 avatar lyuha avatar r00telement avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smarthunter's Issues

InvalidOperationException: Collection was modified; enumeration operation may not execute.

Saw this traceback, probably related to the new client version.

[2020-02-06 04:08:21] InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at SmartHunter.Game.Helpers.MhwHelper.UpdateMonsterStatusEffects(Process process, Monster monster)
   at SmartHunter.Game.Helpers.MhwHelper.UpdateAndGetMonster(Process process, UInt64 monsterAddress)
   at SmartHunter.Game.Helpers.MhwHelper.UpdateMonsterWidget(Process process, UInt64 monsterBaseList)
   at SmartHunter.Game.MhwMemoryUpdater.UpdateMemory()
   at SmartHunter.Core.MemoryUpdater.<>c__DisplayClass19_0.<CreateStateMachine>b__23()
[2020-02-06 04:08:23] InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at SmartHunter.Game.Helpers.MhwHelper.UpdateMonsterStatusEffects(Process process, Monster monster)
   at SmartHunter.Game.Helpers.MhwHelper.UpdateAndGetMonster(Process process, UInt64 monsterAddress)
   at SmartHunter.Game.Helpers.MhwHelper.UpdateMonsterWidget(Process process, UInt64 monsterBaseList)
   at SmartHunter.Game.MhwMemoryUpdater.UpdateMemory()
   at SmartHunter.Core.MemoryUpdater.<>c__DisplayClass19_0.<CreateStateMachine>b__23()

Prefer 32-bit

Hi, wonderful work on this tool.

When I run SmartHunter, it fails at boot, the reason is because pointers beyond 32 bits can't be cast from ulong to IntPtr. The fix is very simple, uncheck the Prefer 32-bit option is project settings.

image

Monter Hunter World is built fro 64-bit CPUs anyway so I don't think it makes sense to prefer 32-bit. Is there a reason for that or was it just the default you never changed ?

where is the .exe?

so i have downloaded this file before and it worked fine but i had deleted it and came back to get it again since the main file on nexus isnt updated, when i download it theres no exe to run. i dont know anything about coding or stuff like that so sorry if this is stupid, attached pictures show subfolders etc

Screenshot_93

Screenshot_94

Screenshot_95

Screenshot_96

Showing up with trojan horse

Hey there,

I've been using Smarthunter for a short while now and after the last update, the smarthunter.exe gets detected as a Trojan Horse by Bullguard Antivirus and gets put away in quarantaine without me being able to do anything about it.

Iceborne Compatability

SmartHunter does not currently support Iceborne. Application appears to fail during pattern scan. See attached screenshot.
SmartHunter_BYmM6PmI8G

SIlver Rathalos shows up as gold rathan HERE IS A FIX

In SmartHunter-master\SmartHunter\bin\x64\Debug\MonsterData.json is missing this.
Just copy and paste it into MonsterData.json

    "em002_02": {
  "NameStringId": "LOC_MONSTER_SILVER_RATHALOS",
  "Parts": [
    {
      "GroupId": "Removable",
      "StringId": "LOC_REMOVABLE_PART_TAIL",
      "IsRemovable": true
    },
    {
      "GroupId": "Part",
      "StringId": "LOC_PART_HEAD",
      "IsRemovable": false
    },
    {
      "GroupId": "Part",
      "StringId": "LOC_PART_BODY",
      "IsRemovable": false
    },
    {
      "GroupId": "Part",
      "StringId": "LOC_PART_WING_LEFT",
      "IsRemovable": false
    },
    {
      "GroupId": "Part",
      "StringId": "LOC_PART_WING_RIGHT",
      "IsRemovable": false
    },
    {
      "GroupId": "Part",
      "StringId": "LOC_PART_LEG_LEFT",
      "IsRemovable": false
    },
    {
      "GroupId": "Part",
      "StringId": "LOC_PART_LEG_RIGHT",
      "IsRemovable": false
    },
    {
      "GroupId": "Part",
      "StringId": "LOC_PART_TAIL",
      "IsRemovable": false
    }
  ],
  "BaseSize": 1704.22,
  "ScaleModifier": 1,
  "Crowns": {
    "Mini": 0.9,
    "Silver": 1.15,
    "Gold": 1.23
  }
},

No Status effects

Anyone else having no Status effects displayed, or is it just me?

How to Discover New Memory Locations

Hi team,

I'd like to know a bit more about your process for discovering new memory elements. I'd like to do a pull request with some additional UI elements for party health, but am having trouble discovering where HP for the party is in memory reliably.

Currently my process is using Cheat Engine to find the memory addresses for health. But those memory addresses change per instance of the game process.

@r00telement, do you use some other tools to discover memory locations or patterns, and then when you do discover those, how do you include them in the MemoryConfig.cs?

Thanks,
Jordan

09.04 Patch

The new Patch messed up some Values.
For example in the Lobby the HotDrink(34028230000...) (many zeros) is shown.
MonsterData.json is also missing the new monsters

Latest patch (Apr 4) not showing monster widget

Since the Apr 4th patch (167353), the Monster Widget does not display. The player widget and team widget appear as normal. Tried hiding then showing the widget with no success. Reports are that it's happening regardless of whether or not the high res texture pack is being used.

Inaccurate crown due to floating point precision

Hi,

I found that some edge cases for crown are not determined correctly due to floating point precision. The following is an example I had just a moment ago. The default size of Anjanath is 1646.46. The smallest gold crown in game is 120%, 1975.75. However, the current criteria in SmartHunter is 1646.46*1.2=1975.752, which means it reports this gold crown as silver crown.

I feel a better way would be Actual_Size/Base_Size*100, round it to the closest integer, and compare this integer with 120. (or 100*whatever from the data file)

I was hoping to submit a pr but still struggle to find the condition.

Thanks

Allow toggling between DMG and DPS in team widget

Needs:

  • A config option to set the team widget's mode
  • A config option to set the DPS period in seconds
  • A hotkey to toggle between modes
  • An indicator for the team widget's current mode, e.g. DMG or DPS - may need localization

Exception: System.ArgumentException

exception occurred in windows 7 with dotnet runtime 4.8:
em System.IO.FileSystemWatcher.set_Path(System.String)
em SmartHunter.Core.FileContainer.WatchFile(Boolean)
em SmartHunter.Core.Config.ConfigContainer`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.String)
em SmartHunter.Game.Helpers.ConfigHelper.get_Main()
em SmartHunter.Game.Helpers.ConfigHelper.EnsureConfigs()
em SmartHunter.App.OnStartup(System.Windows.StartupEventArgs)
em System.Windows.Application.<.ctor>b__1_0(System.Object)
em System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
em System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
em System.Windows.Threading.DispatcherOperation.InvokeImpl()
em MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
em System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
em System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
em System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
em MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
em System.Windows.Threading.DispatcherOperation.Invoke()
em System.Windows.Threading.Dispatcher.ProcessQueue()
em System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
em MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
em MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
em System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
em System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
em System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
em MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
em MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
em System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
em System.Windows.Application.RunDispatcher(System.Object)
em System.Windows.Application.RunInternal(System.Windows.Window)
em SmartHunter.App.Main()

Proper code for Gold Rathian bar

In SmartHunter-master\SmartHunter\bin\x64\Debug\MonsterData.json is missing this.
Just copy and paste it into MonsterData.json

"em001_02": {
"NameStringId": "LOC_MONSTER_GOLD_RATHIAN",
"Parts": [
{
"GroupId": "Removable",
"StringId": "LOC_REMOVABLE_PART_TAIL",
"IsRemovable": true
},
{
"GroupId": "Part",
"StringId": "LOC_PART_HEAD",
"IsRemovable": false
},
{
"GroupId": "Part",
"StringId": "LOC_PART_BODY",
"IsRemovable": false
},
{
"GroupId": "Part",
"StringId": "LOC_PART_WING_LEFT",
"IsRemovable": false
},
{
"GroupId": "Part",
"StringId": "LOC_PART_WING_RIGHT",
"IsRemovable": false
},
{
"GroupId": "Part",
"StringId": "LOC_PART_LEG_LEFT",
"IsRemovable": false
},
{
"GroupId": "Part",
"StringId": "LOC_PART_LEG_RIGHT",
"IsRemovable": false
},
{
"GroupId": "Part",
"StringId": "LOC_PART_TAIL",
"IsRemovable": false
}
],
"BaseSize": 1754.37,
"ScaleModifier": 1,
"Crowns": {
"Mini": 0.9,
"Silver": 1.15,
"Gold": 1.23
}
},

After you paste this
goto your en-US.json and replace "LOC_MONSTER_UKNOWN" with "LOC_MONSTER_GOLD_RATHIAN"

Monster parts non-functional.

Currently the monster parts display of the latest available build on NexusMods isn't functional, "ShowUnchangedParts" setting in false seems to only occasionally display parts that have been broken, setting it to true however has nothing shown at all.

My config file is entirely stock and untouched apart from the X/Y positions of the widgets.

Quick edit: seems to only completely break in multiplayer, functions fine in singleplayer. Rarely ever play solo so I didn't notice.

[New feature request] Auto close feature

Hi, r00telement.

I'm using external mod that known as 'EXE' for running SmartHunter with MHW automatically.

It's good, but I want closing SmartHunter automatically when I closed MHW.

I couldn't find any option for auto close feature.

Is it possible to add this feature?

I'll wait for your response :)

Option to disable monster parts and effects?

hey,

how do I disable/hide the monster parts and status effects?
I tried setting HidePartsAfterSeconds HideStatusEffectsAfterSeconds to 0 and also removing the regex but it did still show them.

Problem optimization.

In game.

Accumulation Errors.
There's no cleaning ram.
Processor heating.

(Min. 800 MB ram between 1200 MB.

Cap2ture
Capture

Set origin/pivot of the monster bars to be the center

Right now when there's multiple monsters, the bars will continue being added to the right. It would be great if the origin/pivot of the widget would be centered. This way the widget will take up the same amount of space on each side of the screen instead of only growing towards the right.

OverflowException after self compiling

What is happening
  • When I try to run a (fresh) self compiled version of this, I get several OverflowException in the console.
When is it happening
  • The Error occurs after the State Machine: ProcessFound (50 ms) > PatternScanning step is logged.
Logs

I hope the German in it does not make it impossible to solve, if yes, I'll search the proper translations for it.

Additional Info
  • A friend of mine had the same Error with the .exe downloaded from nexus. After a game restart it worked for him however.

-Dj

Update

Game updated recently and we require new offsets/byte patterns, anyone cares to find them?

[New Feature Request] UI Map Timer

It would be nice to have a timer of the quest, but instead of a countdown like in the map, a timer that started at 00:00. Since sometimes it's impossible to check while in a fight and the MHW clock isn't as accurate as I would like.

Pattern Scan Failed

I get this error when I try to run it...

[2020-04-15 21:13:36] Started 1.1.7410.25451
[2020-04-15 21:13:36] Config.json loaded
[2020-04-15 21:13:36] Config.json saved
[2020-04-15 21:13:36] en-US.json loaded
[2020-04-15 21:13:36] en-US.json saved
[2020-04-15 21:13:36] MonsterData.json loaded
[2020-04-15 21:13:36] MonsterData.json saved
[2020-04-15 21:13:36] PlayerData.json loaded
[2020-04-15 21:13:36] PlayerData.json saved
[2020-04-15 21:13:36] Memory.json loaded
[2020-04-15 21:13:36] Memory.json saved
[2020-04-15 21:13:36] Default.xaml loaded
[2020-04-15 21:13:38] State Machine: None (574 ms) > WaitingForProcess
[2020-04-15 21:13:38] State Machine: WaitingForProcess (70 ms) > ProcessFound
[2020-04-15 21:13:38] Attached to MONSTER HUNTER: WORLD(410013)
[2020-04-15 21:13:38] State Machine: ProcessFound (60 ms) > PatternScanning
[2020-04-15 21:13:40] State Machine: PatternScanning (2524 ms) > PatternScanFailed
[2020-04-15 21:13:40] Failed Patterns:
48 8B 0D ?? ?? ?? ?? 48 8D 54 24 38 C6 44 24 20 00 4D 8B 40 08 E8 ?? ?? ?? ?? 48 8B 5C 24 60 48 83 C4 50 5F C3
48 8B 05 ?? ?? ?? ?? 8B 48 ?? 89 8F ?? ?? ?? ??
48 8B 8B ?? ?? ?? ?? 48 8B 01 FF 50 ?? 48 8B 8B ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 8B ?? ?? ?? ?? B2 01 E8 ?? ?? ?? ??
48 8B 05 ?? ?? ?? ?? 41 8B 94 00 ?? ?? ?? ?? 89 51 ??

zorah magdaros have missing parts

Zorah have parts, but miss data in MonsterData.json.

[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '0' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '1' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '2' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '3' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '4' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '5' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '6' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '7' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '8' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '9' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '10' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '11' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '12' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '13' not found in MonsterData.json
[2019-03-23 08:34:35] Localization: Monster 'em106_00' part '14' not found in MonsterData.json
[2019-03-23 08:37:14] Localization: Monster 'em106_00' part '11' not found in MonsterData.json
[2019-03-23 08:38:47] Localization: Monster 'em106_00' part '12' not found in MonsterData.json
[2019-03-23 08:39:11] Localization: Monster 'em106_00' part '8' not found in MonsterData.json
[2019-03-23 08:39:50] Localization: Monster 'em106_00' part '1' not found in MonsterData.json
[2019-03-23 08:57:43] Localization: Monster 'em106_00' part '0' not found in MonsterData.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.