Coder Social home page Coder Social logo

pathfinder-discord-bot's People

Contributors

mattdeal avatar thecraiggers 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pathfinder-discord-bot's Issues

Rework OmniTracker pinned messages

Problem: Even though trackers are pinned, they get buried and nobody looks at them.

Instead of a single pinned message, always display the current tracker after each command and delete all previous trackers. This way you can always tell at a glance what the game state is and there's not a ton of spam.

This also solves the problem of people typing commands in multiple (perhaps wrong) channels, and people getting confused about the gamestate because of the out-of-date non-pinned messages sent in response to commands.

Need some automated tests

Omnitracker has gotten big enough that regression bugs are popping up. Time for automated tests!

Considering the reliance on Discord for storing state, I'm not actually sure how to go about this, or if I can get even close to 100% test coverage. This may end up being a whole separate project in itself. :/

Make dice rolls results more informative

After moving to mathjs, all the math that is done is "hidden" to the player. They see their dice roll, and then a message saying what their skill was set to. But no mention of how it arrived at that number without looking up all their character's dynamic stats and doing the math themselves.

It should say something like:
!roll perception
Perception: {1d20}+Level+Trained = {14}+2+4 = 20

Names not found in all commands

Currently there appears to be a bug parsing/addressing some names (ones with spaces it seems) in some commands (Damage and Remove for example)

Duplication
!omni add enemy 'War Boss' AC:40 HP:300/300 Init:{1d20+10}
!damage 'War Boss' 5
!omni remove enemy 'War Boss'

Initial setup (Windows)

I saw the previous issue (#55) on setting up the bot, but still having some trouble.

I installed GitHub, cloned the repo, installed node.js, created an application, created a bot, got the bot credential, set a Windows environment variable of DISCORD_TOKEN = to it (all of this took quite a while to figure out, although not complicated).

So now I can run the code and it logs in to my application, stupidbot1, on my server. Yay. But when I try to add a player, I get told to run !omni setup first. (I don't see that in !omni help) When I try running that, I get permission errors (50013) in /roles and /channels.

I've tried to pick what I think are the right permissions for the application: Role = Bot, View Channels, Send Messages, Read Message History (plus a bunch of others that seem unlikely but possible). Can you specify what permissions are needed? Or is that not the problem?

You also say that a hidden bot-data channel is needed in which the bot can save state. I created a #bot-data channel that is private to myself and stupidbot1, but still get the permissions error. Does it need some special name?

Thanks for any help! BTW, I'm going to use this to run Runners in the Shadows, a mod of Blades in the Dark for the Shadowrun setting.

Rewrite omni code to better handle %groups

Each handler function currently has to implement its own detection and iteration of characters when commands with %groups are used. This is silly and could be better implemented.

Bot gets confused if an enemy dies on its turn

When an enemydies, all info is removed from the data. However, that data is how the bot knows what imitative it should be on when going to the next turn, as the current turn is simply a reference to a character.

Perhaps not removing dead enemies would be better, and also allow for things like Trolls and other enemies that can come back from the dead. Better %groups handling to remove %enemies would help with this too, as the GM wouldn't need to remove them all by hand then.

Custom Properties Do Not Allow Multiplication or Division

Consider changing the propertiesRegex to the line below to allow for multiplication and division when adding properties as well as parentheses. This would allow automatic rolling for critical hits i.e. criticalbowdamage:=2*({1d6}+{1d6})+{1d10}

In the example below, I added "|*|/|(|)" to the existing regex to allow the other characters that math.js should be able to handle.

propertiesRegex = /(?!)?(?\w+):((?\d+)(/|\)(?\d+)|(?(=?(\w|[|]|{|}|+|-|*|/|(|))+)))/g;

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.