Giter Site home page Giter Site logo

mhwitemboxtracker's Introduction

Monster Hunter World Item Box Tracker

A plugin for hunter pie that lets players track the items they are farming.

Reducing cognitive overhead by allowing the player to stop looking at the box after every quest to find out that they still need 5 more tickets, 1 less than the last time they checked, and stop asking "how many did I need again?"

Overlay

The numbers displayed are pouch | box (+craftable) / wanted

Craftable items are counted from box items if Track items in box is enabled and from pouch if Track items in pouch is enabled. The number shown is their sum.

Changelog

The changlog is auto generated on the project's wiki from commit messages. Only releases with notable changes (i.e. that impact the user) are noted in the changelog. Here's the Changelog.

Install

Requirements

Setup

  1. Open HunterPie and navigate to Plugins and search for ItemBoxTracker. Download and restart.
    • Alternatively you can extract ItemBoxTracker.zip to the HunterPie directory, but why would you?
  2. In HunterPie, navigate to Settings->Plugins->ItemBoxTracker. Should be intuitive.
    • Add an item by typing its name in the search box and selecting it.
    • Amount is disabled until there is an item selected.
    • Hit Add another to... add another.

Note: the switches don't do anything yet and only the Always tab is used (only in the village 🤦‍♂️). These features will be implemented by label: enhancements #24, #25, and #26

Build

TODO: Update NuGet source when main HP pushes libs to NuGet with CI

You'll need to add ForksKnivesAndSpoons to your NuGet sources one time:

nuget sources add -name FKnS -source https://nuget.pkg.github.com/ForksKnivesAndSpoons/index.json -UserName $GITHUB_USERNAME -Password $GITHUB_PASSWORD

If you built HunterPie locally, you can also copy HunterPie.Core.dll and HunterPie.UI.dll to the root of this project and change the PackageReferences for the commented out References in ItemBoxTracker/ItemBoxTracker.csproj.

Then to build it:

msbuild -m /t:Restore
msbuild -m /p:Configuration=Release

mhwitemboxtracker's People

Contributors

actions-user avatar dependabot-preview[bot] avatar dependabot[bot] avatar devilpepper avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

amadare42

mhwitemboxtracker's Issues

Add configurable tracking modes

Feature Request

Context

I want to be able to track items either in my pouch or in my item box or both. This should be configurable for in quest and in village separately. Proposed enum looks like:

enum TrackMode {
  Auto,
  Box,
  Pouch,
  Both,
  Off
}

Auto would track Item box in village and pouch in quest.

Alternatives

Up for debate.

Has the feature been requested before?

In the Discord.

If the feature request is approved, would you be willing to submit a PR?

  • Yes
  • No (Help can be provided if you need assistance submitting a PR)

Additional context

Can't resize widget

Bug Report

What are the steps to reproduce this issue?

  1. Enter Design Mode
  2. Scroll up/down

Expected behaviour

Widget resizes.

Actual behaviour

Widget doesn't resize.

Hash changes for DLL when there were no code changes

Bug Report

What are the steps to reproduce this issue?

  1. Push not a code change

Expected behaviour

Release hashes should remain unchanged. This way HunterPie does not need to download a new binary if nothing has changed.

Actual behaviour

Release hash for dll changes. HunterPie downloads the new dll as if it's changed, but only the version was bumped up.

Relevant code

https://github.com/SupaStuff/MHWItemBoxTracker/blob/cf20c3e05c7843be3b10143a96859a4d7dba6808/.github/workflows/build-release-ci.yml#L65-L71

Possible Solution

Release needs to check for code change and use the previous version if none found. i.e. If no changes:

  1. Download the latest module.json
  2. Bump up build number (M.m.p.(b++)) and use this for new module.json
  3. Make build number 0 and use this version to build

Result would be unchanged assembly version when there are no code changes and therefore unchanged hash.

Any logs, error output, screenshots, etc?

v0.0.8...v0.0.9

A CI change generated a new hash for the dll:

- "Version": "0.0.8.0",
+ "Version": "0.0.9.0",
  "Dependencies": [],
  "Update": {
    "UpdateUrl": "https://github.com/SupaStuff/MHWItemBoxTracker/releases/latest/download/",
    "MinimumVersion": "1.0.4.0",
    "FileHashes": {
-     "MHWItemBoxTracker.dll": "d5778c294fbd8c1c37ec91e52d5e4fa4e76b9fc57d93af79b9512125e5eabbdb",
+     "MHWItemBoxTracker.dll": "e5f7e259980254933284235456c41dd26338ea1348da9324bbd36f9cef21ac53",

Null tracker in settings crashes HunterPie

Bug Report

What are the steps to reproduce this issue?

  1. In plugin.settings.json put this:
{
  "tracker": null,
  "IsEnabled": false
}
  1. Run HunterPie

Expected behaviour

HunterPie loads fine and Item Box Tracker is empty.

Actual behaviour

HunterPie crashes because you can use LINQ.Select on null.

Relevant code

https://github.com/SupaStuff/MHWItemBoxTracker/blob/7b5144a04d2194e380e6469e541272735ac1b4d0/MHWItemBoxTracker/helper/ItemBoxTracker.cs#L27-L33

Possible Solution

Could probably fix this with optional/maybe accessors.

Any logs, error output, screenshots, etc?

System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at MHWItemBoxTracker.helper.ItemBoxTracker.loadItemBox(Object source, EventArgs e)
   at HunterPie.Core.Player.Dispatch(PlayerEvents e, EventArgs args)
   at HunterPie.Core.Player.set_ZoneID(Int32 value)
   at HunterPie.Core.Player.GetZoneId()
   at HunterPie.Core.Player.GetPlayerInfo()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Add craftable items to progress bar

Feature Request

Context

For example, say you have 2 Max Potions, but can craft 4 more from available items, it would be useful to be able to see this.

Alternatives

Nope.

Has the feature been requested before?

In the Discord.

If the feature request is approved, would you be willing to submit a PR?

  • Yes (I approve lol)
  • No (Help can be provided if you need assistance submitting a PR)

Additional context

image

Display is empty if plugin is toggled on/off

Bug Report

What are the steps to reproduce this issue?

  1. HunterPie Menu->Plugins -> toggle MHWItemBoxTracker switch off and on again
  2. Behold

Expected behaviour

The plugin should load the same as it did initially

Actual behaviour

Even though there are items in my config, the plugin displays as if it has 0 items on it's list.

Relevant code

// TODO

Possible Solution

It's probably caused by the plugin load and unload handlers. Maybe something wasn't cleaned up on toggle off, or something wasn't initialized correctly on toggle on.

Any logs, error output, screenshots, etc?

N/A

Add a settings screen

Feature Request

Context

It's quite a bit of work adding items to the tracker. Ideally, a settings page could be generated from the settings object, but for now, lets just make a rough GUI specific to this plugin's settings. It needs an item search to be useful. Probably use a db for item look up.

Alternatives

See above ideal solution. It just may be time consuming.

Has the feature been requested before?

In the Discord.

If the feature request is approved, would you be willing to submit a PR?

Yes.

Additional context

Step 3 here is really exhausting.

Use themes

Feature Request

Context

The overlay is kind of bootleg. It would be nice if it would match with the currently set theme.

Alternatives

Could just live with it. I'm widdit!

Has the feature been requested before?

No.

If the feature request is approved, would you be willing to submit a PR?

  • Yes
  • No (Help can be provided if you need assistance submitting a PR)

Additional context

image

Annotated tags don't work as expected

GIT_TAG=$(git describe --first-parent --abbrev=0)
REV_COUNT=$(git rev-list $GIT_TAG..HEAD --count)
echo $GIT_TAG.REV_COUNT

Looks like if I push a new tag, this will give the last version... I wonder if the next commit will start building with the new tag as the base.

Overlay doesn't display if loaded after InHarvestZone

Bug Report

What are the steps to reproduce this issue?

  1. Get to the village
  2. Have Item Box Tracker enabled
  3. Run HunterPie

Expected behaviour

Item Box Tracker is displayed.

Actual behaviour

Item Box Tracker is not displayed until you either leave the village and come back or toggle Design Mode on and off.

Relevant code

¯\_(ツ)_/¯

Possible Solution

Maybe it's a race condition... Use a lock?

Any logs, error output, screenshots, etc?

Add appropriate details to module.json

Feature Request

Context

HunterPie uses module.json to keep plugins updated. Currently, HunterPie doesn't like something about this plugin. It could be due to #3, but it's likely the module.json. Might need to add the version to module.json during the release. (Might also have to submit a PR on HunterPie to allow updates from Github releases)

Alternatives

This is not optional.

Has the feature been requested before?

No.

If the feature request is approved, would you be willing to submit a PR?

  • Yes
  • No (Help can be provided if you need assistance submitting a PR)

Additional context

image

Add tracking lists for in quest, in village, and everywhere

Feature Request

Context

With #25 it may not make sense to track the same items in quest and in village, so there should be separate lists for them. But to make everyone happy, there should be a 3rd list for "track everywhere"

Has the feature been requested before?

No.

If the feature request is approved, would you be willing to submit a PR?

  • Yes
  • No (Help can be provided if you need assistance submitting a PR)

Additional context

Add settings.json to FileHashes

Feature Request

Context

When HunterPie starts deleting crud that's not needed by plugins, we're gonna be in for a big surprise when the settings get erased. So we need to add settings.json to FileHashes like so:

hashes.Add("settings.json", "InstallOnly");

But we'll need some sort of UI for configuring the plugin.

Alternatives

Hold back HunterPie from implementing clean up. LOL

Has the feature been requested before?

In the Discord.

If the feature request is approved, would you be willing to submit a PR?

  • Yes
  • No (Help can be provided if you need assistance submitting a PR)

Additional context

Your .dependabot/config.yml contained invalid details

Dependabot encountered the following error when parsing your .dependabot/config.yml:

The property '#/' did not contain a required property of 'update_configs'
The property '#/' contains additional properties ["updates"] outside of the schema when none are allowed
The property '#/version' value 2 did not match one of the following values: 1

Please update the config file to conform with Dependabot's specification using our docs and online validator.

Toggling plugin off deletes settings...

Bug Report

What are the steps to reproduce this issue?

  1. HunterPie Menu -> Plugins -> Toggle MHWItemBoxTracker off.
  2. Open plugin.settings.json
  3. wtf?

Expected behaviour

plugin.settings.json should not loose all it's settings.

Actual behaviour

Seems HunterPie loads these settings as HuntePie.Plugins.PluginSettings and write to file accordingly.

Relevant code

// TODO

Possible Solution

Use a different setting file... Or fix this in HunterPie and submit a PR.

Any logs, error output, screenshots, etc?

This is caused by having a null array in the settings. HunterPie crashes at start up loading this plugin:

System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at MHWItemBoxTracker.helper.ItemBoxTracker.loadItemBox(Object source, EventArgs e)
   at HunterPie.Core.Player.Dispatch(PlayerEvents e, EventArgs args)
   at HunterPie.Core.Player.set_ZoneID(Int32 value)
   at HunterPie.Core.Player.GetZoneId()
   at HunterPie.Core.Player.GetPlayerInfo()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Include Json schema for settings

Feature Request

Context

Add json schema so users can edit json easy with an existing json schema gui generator.

Alternatives

Build a settings menu? No way!

Has the feature been requested before?

No

If the feature request is approved, would you be willing to submit a PR?

  • Yes
  • No (Help can be provided if you need assistance submitting a PR)

Additional context

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.