Giter VIP home page Giter VIP logo

monster-avengers's Introduction

monster-avengers - The MH4G/MH4U/MHX Armor Set Search Tool

Introduction

This is a hobby project of mine, which impelements an algorithm and a web based UI that finds armor sets to satisfy certain requirements in the game Monster Hunter 4 Ultimate (Japanese Version: Monster Hunter 4G).

Monster Hunter has an unique skill system, and in order to active a certain skill, we need to craft a combination of armors including a weapon, a helmet, a body armor, a waist armor, an arm armor, a legs armor and an amulet, whose total contribution to the desired skill exceeds a skill points level. Finding the right set of armor pieces that activates the required skills is difficult, as there are ~ 150 different skill trees, ~ 600 candidate armors for each of the pieces, and each armor contributes to several skills, positively or negatively. What makes the problem more interesting is that armors may have slots, where different decorations contributing to different skills can be plugged in.

monster-avengers is such a tool to efficiently find the right armor combinations given the desired set of skills. With a carefully designed algorithm, it

  1. supports fast search from all 3,000+ different armors in the databse.
  2. outputs armor combinations with decorations.
  3. consideres Torso up armors.
  4. supports adding custom amulets in the query.
  5. considers the number of slots on the weapon.
  6. supports filtering on the search result to exclude certain armor pieces.
  7. communicates with a simple lisp-based query language.
  8. suggests skills that are still achievable based the current selected skills.

It also comes with a web based UI.

Supported Interfaces

Web App

There is currently one instance of this tool running on a server with very limited computational resource. You can find it at http://mh4u.breakds.org.

C# API

Located in csharp/winbind_wrapper. A C# wrapper class implemented via DLLImport.

RESTful API

Work in progress.

Algorithm

I am working on a series of posts discussing the algorithm behind this project on my blog. Take a look if you are curious and interested.

Codebase

For those who is interested in either the algorithm or the implementaion, you can find a brief description below. Note that the code is still not very well documented yet, and I am working on adding the comments and documentations to the code as much as possible with the limited time budget.

The code is mainly divided into 2 parts:

  1. cpp/ A C++ implementation of the search algorithm, where we have
  • lisp/ provides the parser and reader of lisp objects, in which format query and database entries are stored.
  • data/ defines the data structs that are involved, e.g. the skills, the armors, the jewels ,etc.
  • core/ implements the search algorithm, where you can find the member method ArmorUp::Search is the main entry point to the algorithm.
  1. lisp/ui/ implements the web based UI for this armor search tool. This webapp is written in Common Lisp based on the web framework reaLispic. Specifically,
  • widgets/ contains the definitions of all the widgets in the web. The code should be very straightforward if you are familiar with React.js.
  • backend.lisp defines the RPC that talks to the C++ backend to handle queries. This is a super naive implementation that does the message passing via files on disk.

Build and Run

The C++ code is managed by CMake. To build the C++ binary:

cd cpp/
mkdir build
cd build
cmake ..

Now, you can either run make to build the binary serve_query, or ccmake . to configure the Makefile generation. You can toggle the build type to be RELEASE to build a much more efficient binary.

To run the web server that serves the UI, you need a lisp implementation (e.g. SBCL), and quicklisp. After having them configured, you can place the project folder (or a symbolic link to the folder) under quicklisp/local-projects, and start sbcl. At the Common Lisp top-level, run

(ql:quickload 'monster-avengers)
(monster-avengers.simple-web:armor-tools :start)

to start the web server. You should now be able to access the web app locally at localhost:16384/app?lang=en. Note that this project depends on several of other projects, which should be downloaded at placed at quicklisp/local-projects:

Limitations and Futrue Work

There are currently some limitations in the current implementations, and I will work on improve over them. Those that I am aware of are:

  1. The webapp does not support custom guild armors.
  • The algorithm supports guild armors, of course.
  • I am a terribly bad designer and I cannot think of a way to add such options to the page, without making it look very complicated.
  • This functionality will be added soon.
  1. The communication between backend and web server are file-based
  • This is going to be replaced by a real RPC framework.
  1. The webapp does not store any information to personalization features, such as personal armor sets library, personal amulets library, etc.
  • To be honest, I am not experienced enough to implement this efficiently and securely. Will add those features in the future, but with no promise.
  1. Hunter progress options.
  • I think it is a good idea to filter out armors based the player's progress. I am lacking the data to implement this feature.
  1. JSON and Lisp parser/composer should go into other packages (or not?).

Acknowledgement

  1. Credit to Ping An, the author of Ping's Dex. His effort on composing the data are source to many other related projects.
  2. Credit to the project MonsterHunter4UDatabase, where all the data (armors, skills and decorations) are from their database. Completing the database requires a lot of work and without their effort, I would not have accomplished this.
  3. Credit to Cassandra Qi, my wife and my Monster Hunter game partner, for working on the art and design of the UI.
  4. Thanks to my friends who inspired me, encouraged me, disccussed the ideas with me and helped with the tests:
  • Frank Xiao Lin
  • Zommie Dev
  • Hui Guo
  • KIRANICO
  • Epona Yunlu Guo
  • Wybaby

License

All the codes in this project are under the MIT License.

monster-avengers's People

Contributors

breakds 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

monster-avengers's Issues

Easier way to filter out gear.

Currently it's difficult to exclude any gear pieces. We have to perform a search then individually click on each piece and exclude it. This can be pretty tedious. A practical usecase is that the user might not want to see Japanese DLC not easily accessible in 4U, at least not yet.

This filtering is not persistent either which makes it similar to #5.

Charm list import

We can add charms/amulets but if we refresh, they're all gone. Ideally we'd be able to store and edit a file locally then import it in the web UI when doing searches.

Relic gear

It'd be great if there was an option to allow relic gear or to even prefer relic gear skills instead for fashionhunting.

Search through all possible charms

Currently to do any kind of search involving charms/talismans, we have to add the ones we want to check by hand. It'd be great if there was an option that assumed we have access to every charm in the game to see what charms would be needed to reach certain skills.

From reading the blog, I'm not sure how well that would scale considering the number of charms in the game, would probably have to tweak the existing algorithm.

网页版配装器发动技能选择错误

选择发动技能会有偏差
例子:
我想发动“耳栓”,我必须选择“盾持”添加。
一般上下有一两个位置的随机偏移。

使用osx10.10 + chrome 40.0

MH4U Support

I am working on getting armor data for Monster Hunter 4 Ultimate and have MH4U supported for US players. Will update on this thread!

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.