Giter VIP home page Giter VIP logo

gloomycompanion's Introduction

Gloomy Companion

This is a web-app for managing the monster ability decks in the board game Gloomhaven

You can run it from the web directly on https://johreh.github.io/gloomycompanion/.

You can also download it and run it locally without internet connection. Click Clone or download above, then Download ZIP. Unpack the ZIP and start the app by opening index.html.

If you want to add new cards, you need to update cards.js. The decks has the following syntax:

{ name: "Name of monster"
, cards:
  [ [false, "42", "* First line", "** sub-line 1", "** sub-line 2", "* Second line"]
  , [true,  "55", "* Card text"]
  ]
}

The value in the first column is true if the deck shall be reshuffled after that card, false otherwise. The second colum is card initiative value. The following values is the card text, one row per column.

A single * means a top-level action. Double asterisk ** means it modifies the previous action. Commonly used text snippets can be expanded using macros. E.g. %move% expands to the text Move followed by the move icon, %immobilize% expands to IMMOBILIZE followed by the immobilization icon. The list of available macros can be seen in macros.js.

Development

  • Clone the repository
  • Run the gen-manifest.sh script (Linux and MacOS only; you'll have to make the app.manifest by hand if you are running Windows)

Any time a source/asset file is added or removed, re-run the above manifest generation script. Or manually make the appropriate change to the manifest instead.

gloomycompanion's People

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

Watchers

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

gloomycompanion's Issues

Chrome on Android - can not scroll down to apply button.

If I use the app on Android (Chrome browser) I can't scroll down far enough to reach then "Apply" button and therefore can't add card decks.

Maybe adding a bit of margin add the bottom? Or put the button at the top?

(Love the app)

Cheers,
Nils

Scenario #21, 3 Players - Boss Action Issue

In scenario 21, when playing with 3 players, boss specials 1 and 2 have different effects (special 1 summons an elite and special 2 summons a normal).

There does not appear to be a way to distinguish between the two at the moment.

Missing range on Flame Demon card

I think this Flame Demon card is missing a range value:
[true, "30", "* <table align='center'><tr> <td> %fire%%use_element%: </td> <td> <span class='small'>All adjacent enemies<br/>suffer 2 damage.</span> </td> </tr> </table>", "* %move% +0", "* %attack% -2", "** %wound%","** %target% 2"]
There is no gray hex on the card, so it should use the Flame Demon's default range, shouldn't it?

Feature request for modifier deck

May I suggest that when a reshuffle card has been drawn from the monster attack deck,
the reshuffle icon changes color (red?) as a reminder that the deck needs to be reshuffled at the end of round.

Would be a big help for those such as myself with a terrible memory.

Include monster stats and scenario level

If this app also included monster stats, then we wouldn't need to use the big monster cards at all (just the sleeves for damage tracking)

Ideally the stats would appear on the left or right of the monster deck.

There would also need to be a scenario level drop down when selecting the scenario or cards list (in the left frame / pop-up menu)

Thanks so much for making this!

Stretch goal: if the app knows the monster stats, then it may also be viable to replace all instances of "Attack +0" with the actual attack/move/range value (i.e. The card would just say, "Move 3, Attack 4, Range 5")

Feature: New round button.

A new round button, that draws next card for all monsters and reshuffles any cards with shuffle at end of round would be very nice.

Scenarios with special rules to be considered

There are some scenarios with special rules (for example, extra levels on certain monsters), that are specified in scenario.js but there are not taken into account.

We should mind them when we implement a "Select monster level" solution.

Introduced on #34

End_of_round button is not drawing active ability decks

End of round button should draw a card on every active (something on discard) ability deck. This way, when you're done, you just click it and it will reshuffle (if needed) the modifier deck, and draw a card everywhere.

Scenario #92 has wrong enemies

Scenerio #92 looks like:
{ name: "#92 Back Alley Brawl"
, decks:
[ {"name": "Bandit Guard"}
, {"name": "City Guard"}
, {"name": "Inox Guard"}
, {"name": "Bandit Archer"}
, {"name": "City Archer"}
, {"name": "Savvas Icestorm"}
, {"name": "Frost Demon"}
, {"name": "Wind Demon"}
]
},

It should read:
{ name: "#92 Back Alley Brawl"
, decks:
[ {"name": "Bandit Guard"}
, {"name": "City Guard"}
, {"name": "Inox Guard"}
, {"name": "Bandit Archer"}
, {"name": "City Archer"}
, {"name": "Savvas Lavaflow"}
, {"name": "Flame Demon"}
, {"name": "Earth Demon"}
]
},

Shuffle algorithm is biased

Current implementation of shuffle algorithm does

for (var i = 0; i < l.length; i++) {
    var switch_index = Math.floor(Math.random() * l.length);

This unfortunately results in biased shuffle. Please read https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Implementation_errors for details. Proper shuffle will be something like

for (var i = 0; i < l.length-1; i++) {
    var switch_index = i + Math.floor(Math.random() * (l.length-i));

Please doublecheck proposed solution - I might be off by one here (wikipedia uses ranges instead of arithmetics).

Feature: Monster Starting HP

It would be nice if the starting monster HP were shown. That way I don't need to get out the monster stat cards at all! Thanks.

Minimize scrolling between decks when running app on small screens

I run the app on a small Android phone whose screen only has enough room for two decks to be visible at once. When a scenario has many types of monsters, it sometimes happens that the two decks I need (for monsters actually on the board) are spread out quite a bit in the app so I have to scroll between them each time I draw or want to view the active monster abilities. It would be nice to have a way to group the currently-active decks together to avoid scrolling.

I think the size of the cards is about perfect; I certainly don't want to make them any smaller to fit more decks on screen.

One idea is to introduce a swipe mechanism so that I can swipe a deck off screen and have it automatically moved to the bottom. Then by swiping away decks for monsters not presently on the map, I can keep the active ones (mostly) on the same screen.

Any change in behavior here should only affect phone-size screens, as I suspect this is a non-issue on a larger tablet.

Monster status tracking

Hey all,
I am embarrassed to say this seemed the best way to contact the contributors here >.<
This is less of an issue, more of an open question. Do you guys have any plans to expand this into more of a game-running assistant? I am currently working on a project that allows multiple users to enter a session on their phones and from there they can keep track of initiative and monster HP. The cool part is each player can edit hp from their own phones, and everyone else will be able to see the change in real time. My playgroup has been having a lot of issues with this aspect of the game, so I was trying to automate it for us.

I am wondering whether you guys are planning on doing any of this, to make sure we are not duplicating efforts :-)

single-click reveal

there's no need for separately clicking each monster's card, they can all be revealed at the same time with a single click.

adding a single button [Next Round] could take care of lots of mouse-movements and mouse-clicks in one shot (including the shuffling clicks)

the whole point of gloomycompanion is to remove much of the fiddliness of goomhaven, so this would definitely serve to aid with that goal, especially when there are many monster types.

Undo

We're using this on a touchy touchscreen or sensitive mouse and too often accidentally get an extra click. It would be great to have an undo button to roll back the actions.

HP counters

adding HP counters would remove the need for sleeve sheets altogether and speed up the game.
(i'm happy to help. let me know if i can help code it up)

when an HP counter appears, it should include a monster ID (input), current health (max HP), and up/down arrow buttons.
every time down-arrow is clicked, the health meter goes down, until it reaches 0, then it disappears

step 1:
ability to add HP counters for each monster type

step 2 (maybe?):
automatically add as many HP counters as the scenario requires for each monster type when scenario loads

Style: AOE icons overlap with other elemens

Win demon 37 initiative has overlapping AOE skill (wasn't like that in my branch, so I assume it's about the new css layout). It's the only one with 2 AOE icons.

(the other icons look DOPE with this new css)

Session Storage bug

When the session storage is reloaded (on the current master branch) the modifier deck is always drawn up to the next reshuffle card.

Example:
click through the deck until you hit the first reshuffle card.
draw two more cards.
refresh the page
load the session state
--> the last reshuffle card is on top.

(edit: don't know if this is intended, but it feels odd.)

Hide/Unhide decks on Deck Selection mode

After #68 you can Hide/Unhide decks when you select the scenario.

That's not happening if you select different decks from the Deck tab. I don't know if many people are using that workflow, but it might be nice to make it consistent.

It would be also nice if we hide the Attack modifier deck as well. Right now, in order to hide it, the user has to untick "Show Modifier deck" on the deck tab, we could add the option on the top of the page like the rest.

Don't reshuffle decks when adding or removing monster groups

This may be hard to implement, I haven't looked at the code yet.

If someone opens a door mid-round, and you add a new monster in the app, the existing revealed monster cards are reset.

Ideally it would be possible to add/remove monster decks (to save on screen real estate) during a round without disrupting gameplay.

Missing Attack Modifier Decks in Scenario 35; Imp Heal Range

Scenario 35 is missing the attack modifier decks for City Archers, City Guards and the Boss (Captain of the Guard).

Also, the same issue I recently reported for Shamans is also there for imps: they're missing the range value on their non-self heals.

Cheers

Save state between sessions

App forgets deck setup between sessions. Need to add offline storage for saving the state of the app between uses.

Support multibrowser synchronized state

My friends and I have been playing for a bit, but one of us moved out of town. We wanted to still be able to play, so we've been trying to make it easier to share the game state over the internet. We found your webapp and really liked the idea, but sharing it with screen-sharing wasn't quite as good of an experience as we would like.

We looked into adding support for synchronizing the state based off of the existing localStorage support, but ran into issues. The code architecture didn't lend itself to the asynchronous nature of server-side state management. It was difficult to fix this without rather invasive changes, since a lot of the data flows needed to be inverted. If you're interested in taking a look at our changes, please take a look at https://github.com/drakedevel/gloomycompanion/tree/modernize. We'd be happy to work with you to merge the changes upstream.

Thank you for putting this app together, it's been invaluable for our play!

Implement ServiceWorkers

Cache manifest files are deprecated for HTML5 and should be implemented with ServiceWorkers (for non-iOS devices).

License?

Out of curiosity, what is the licensing of this project? I am interested in working on it to make some changes that would benefit my group. This is just very hypothetical as who knows if I will have time, and anything I do I would prefer to contribute upstream.

For the record, I am trying to add:

  1. Option to auto-sort decks by initiative.
  2. Option to add player icons and sort them by initiative.

I think Gloomy Companion provides just the right balance of not replacing entire portions of the physical game board, while eliminating the monster rules grit that plagues 4 player games and makes it very difficult to read the game state. (Vs. Gloomhaven Companion, it does a much better job of fitting all the monster decks on the screen in a readable fashion.)

Hiding decks can cause rendering problems.

We've seen this a few times while using an Android tablet running Chrome. When hiding decks, sometimes the app will get in a state where it stops rendering the text on the ability cards. They will just have the blank background. I have to reload the app to fix the issue. I just tried to reproduce this on my PC with Chrome and was unable to do so.

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.