Compare commits

...

2 Commits

Author SHA1 Message Date
Bryce Allen 58183d8791 mhr: fix planner weapons stats display
3 years ago
Bryce Allen ff29b205bd update datasources in index, readme
3 years ago

@ -18,6 +18,8 @@ link:https://github.com/kamegami13/MonsterHunter4UDatabase[MonsterHunter4UDataba
Android app by DavianCorp, which is also MIT licensed. See
link:db/COPYING.mh4udb[] for license details.
Rise data is from link:https://mhrise.mhrice.info/about.html[MHRice].
== Example usage
For a list of quests and hunts providing the specified monster part:

@ -88,7 +88,8 @@
(<a href="mh4u/weaponlist.html">MH4U</a>,
<a href="mhx/weaponlist.html">MHX</a>,
<a href="mhgen/weaponlist.html">MHGen</a>,
<a href="mhgu/weaponlist.html">MHGU</a>)</td></tr>
<a href="mhgu/weaponlist.html">MHGU</a>,
<a href="mhr/weaponlist.html">MHRise</a>)</td></tr>
</table>
</fieldset>
</form>
@ -103,10 +104,12 @@
</fieldset>
<h2>Acknowledgements</h2>
Data is primary from the excellent 4U and Gen android apps:
Data is primarily from the 4U, Gen, and World android apps and from mhrice for Rise:
<ul>
<li><a href="https://github.com/kamegami13/MonsterHunter4UDatabase">MonsterHunter4UDatabase</a></li>
<li><a href="https://github.com/gatheringhallstudios/MHGenDatabase">MHGenDatabase</a></li>
<li><a href="https://github.com/gatheringhallstudios/MHWorldDatabase">MHWorldDatabase</a></li>
<li><a href="https://github.com/wwylele/mhrice">mhrice</a></li>
</ul>
Also sourced for MHX translation and weapon data:

@ -88,7 +88,7 @@
var DATA_PATH = "/jsonapi/mhr/";
var template_path = new EJS({ url: "/templates/weaponpath.ejs" });
var template_stats = new EJS({ url: "/templates/weaponstats.ejs" });
var template_stats = new EJS({ url: "/templates/weaponstats-rise.ejs" });
$(document).ready(function(){
setup_weapon_autocomplete("#weapon", autocomplete_predicate,

@ -0,0 +1,115 @@
<table>
<tr title="<%= id %>">
<td><%= name %></td>
<td>(<%= wtype %>)</td>
<td><% if (phial) {
%>&lt;<%= phial %> Phial&gt;<%
} else if (shelling_type) {
%>&lt;<%= shelling_type %>&nbsp;<%= shelling_level %>&gt;<%
} else if (horn_notes) {
%><span title="<%= horn_melodies_title %>"
>[<%= horn_notes %>]<%
} %></td>
<td>[<%= slots %>]</td>
</tr>
</table>
<table>
<tr>
<td>Atk: <%= attack %></td>
<td style="text-align:right"><% if (affinity) { %><%= affinity %>%<% } %></td>
<td>
<% if (awaken) { %>
(<img style="height:.8em" title="Awaken <%= awaken %>"
src="/img/<%= awaken %>.png" /><%= awaken_attack %> <%= awaken %>)
<% } else if (element) { %>
<img style="height:.8em" title="<%= element %>"
src="/img/<%= element %>.png" /> <%= element_attack %>
<%= element %>
<% if (element_2) { %>
<img style="height:.8em" title="<%= element_2 %>"
src="/img/<%= element_2 %>.png" /> <%= element_2_attack %>
<%= element_2 %>
<% } %>
<% } %>
</td>
<td id="sharpness_td"
data-sharpness="<%= sharpness_all_title %>"
data-id="<%= id %>">
<% if (sharpness) { %>
<div class="sharpness-bar" title="<%= sharpness_all_title %>">
<span style="width:<%= sharpness[0] * sharpness_width %>px" class="red"></span>
<span style="width:<%= sharpness[1] * sharpness_width %>px" class="orange"></span>
<span style="width:<%= sharpness[2] * sharpness_width %>px" class="yellow"></span>
<span style="width:<%= sharpness[3] * sharpness_width %>px" class="green"></span>
<span style="width:<%= sharpness[4] * sharpness_width %>px" class="blue"></span>
<span style="width:<%= sharpness[5] * sharpness_width %>px" class="white"></span>
<% if (sharpness.length > 6) { %>
<span style="width:<%= sharpness[6] * sharpness_width %>px" class="purple"></span>
<% } %>
</div>
<div class="sharpness-bar" title="<%= sharpness_all_title %>">
<span style="width:<%= sharpness_plus[0] * sharpness_width %>px" class="red"></span>
<span style="width:<%= sharpness_plus[1] * sharpness_width %>px" class="orange"></span>
<span style="width:<%= sharpness_plus[2] * sharpness_width %>px" class="yellow"></span>
<span style="width:<%= sharpness_plus[3] * sharpness_width %>px" class="green"></span>
<span style="width:<%= sharpness_plus[4] * sharpness_width %>px" class="blue"></span>
<span style="width:<%= sharpness_plus[5] * sharpness_width %>px" class="white"></span>
<% if (sharpness.length > 6) { %>
<span style="width:<%= sharpness_plus[6] * sharpness_width %>px" class="purple"></span>
<% } %>
</div>
<% if (sharpness_plus2) { %>
<div class="sharpness-bar" title="<%= sharpness_all_title %>">
<span style="width:<%= sharpness_plus2[0] * sharpness_width %>px" class="red"></span>
<span style="width:<%= sharpness_plus2[1] * sharpness_width %>px" class="orange"></span>
<span style="width:<%= sharpness_plus2[2] * sharpness_width %>px" class="yellow"></span>
<span style="width:<%= sharpness_plus2[3] * sharpness_width %>px" class="green"></span>
<span style="width:<%= sharpness_plus2[4] * sharpness_width %>px" class="blue"></span>
<span style="width:<%= sharpness_plus2[5] * sharpness_width %>px" class="white"></span>
<% if (sharpness.length > 6) { %>
<span style="width:<%= sharpness_plus2[6] * sharpness_width %>px" class="purple"></span>
<% } %>
</div>
<% } %>
<% } %>
</td>
<td style="text-align:right"><% if (defense) { %>+<%= defense %> Def<% } %>
<% if (parent_name) { %>
<a href="weaponplanner.html?weapon=<%= encodeURIComponent(parent_name) %>"
title="<%= parent_name %>">(parent)</a>
<% } %>
</td>
<% if (village_stars) { %>
<td>
Village <%= village_stars %>
</td>
<% } %>
<% if (guild_stars) { %>
<td>
Guild <%= guild_stars %>
</td>
<% } %>
<% if (rarity) { %>
<td>
Rarity <%= rarity %>
</td>
<% } %>
</tr>
</table>
<% if (children.length) { %>
<table>
<tr><td colspan="5"> -&gt;
<% for(var i=0; i<children.length; i++) { %>
<a href="weaponplanner.html?weapon=<%= encodeURIComponent(children[i]['name']) %>"
><%= children[i]["name"] %></a>
<% if (i != children.length - 1) { %>|<% } %>
<% } %>
</td></tr>
</table>
<% } %>
Loading…
Cancel
Save