GithubHelp home page GithubHelp logo

skewedaspect / rpgkeeper Goto Github PK

View Code? Open in Web Editor NEW
29.0 6.0 7.0 15.88 MB

A site for managing your digital character sheets.

Home Page: https://rpgkeeper.com

License: GNU Affero General Public License v3.0

JavaScript 7.24% HTML 0.12% Vue 52.81% Dockerfile 0.12% SCSS 1.16% TypeScript 38.54% Shell 0.01%
character rpg javascript dungeon character-sheet campaign player hacktoberfest character-sheets nodejs

rpgkeeper's People

Contributors

cprieger avatar dependabot[bot] avatar lordnull avatar morgul avatar piotrzakrzewski 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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rpgkeeper's Issues

Quality Support for EotE/Genesys

Quality Support:

  • Add new
  • Edit user added
  • Delete user added
  • Display abilities added to character
  • Add existing to character
  • Remove existing from character
  • Add Quality Support to:
    • Armor
    • Weapons

Questions

How do I build/use this?

Will this work for Legend of the Five Rings 4th edition?

Do you have any experience with implementing a dice roller into rocket.chat?

Genesys Talent "pyramid" display

In Genesys, talents are organized in a "pyramid", meaning that, for example, in order to add a Tier 3 talent, you must have two more Tier 2 talents than your current Tier 3 total. It needs to build a pyramid:

Tier 1:    | Talent | Talent | Talent | Talent |
Tier 2:         | Talent | Talent | Empty |
Tier 3:             | Talent | Empty |

In order to calculate the number of available spaces slots at a tier above 1, you must take the length of the tier below you (tier - 1) and subtract the length of the tier you're checking plus one.

The basic idea here is to visually show the open spaces where more talents could be slotted, while also making it obvious to the user if they can buy a particular tier, or not. At the same time, the talents needs to stay usable for reference.

Add Force Powers to EotE

If the character is force sensitive, we need to display the Force Powers UI. This should be based off the UI for Talents, as Force Powers are basically just MUCH MORE COMPLICATED talents.

  • Display Force Powers
  • Only show if character is force sensitive
  • Add new
  • Edit user added
  • Remove User added
  • Display abilities added to character
  • Add existing to character
  • Remove existing from character

Here is the old ui:

(Note: This is required for Beta to replace production.)

Character search does not seem to work

Steps to reproduce:

  • create two characters: test1 and fatetest1 (for instance)
  • type in fatetest1 in the search box
  • nothing changes in the character list (expected: only fatetest1 would be displayed)

Add permissions

We need to add permissions to RPGKeeper, so we can have users who can add or edit system level models. This seems like we can get away with this trivially:

  • admin - If the user is an admin, they can do anything.
  • can_edit - Is the user allowed to edit powers/abilities/other things?
  • can_add - Can the user add for all users?

This will allow us to mark some users as being able to add, edit, or as full site admins. As long as these permissions are put on the user, they can be read in both the client and server.

Move "Add Character" button

The Add Character button should move into the Panel's title. This will help keep the styling of the page and systems consistent, and be important when we add campaign support.

Convert to Typescript

I would like to convert to typescript, as a way of making the new user experience better, but also just to help squash some of the minor bugs that crop up every now and then.

One of the decisions that needs to be made, however, is how our validation looks after the conversion. There are, as I see it, two good ways forward:

Typescript JSON Decoder

enum SupplementScope {
    Public = 'public',
    User = 'user'
}

type EotEAbility = {
    id : integer;
    name : string;
    description : string;
    reference : string;
    owner ?: integer;
    scope : SupplementScope;
    official : boolean;
};

const eoteAbilityDecoder = JsonDecoder.object<EotEAbility>(
  {
    id = JsonDecoder.number;
    name = JsonDecoder.string;
    description = JsonDecoder.string;
    reference = JsonDecoder.string;
    owner = JsonDecoder.optional(JsonDecoder.number);
    scope = JsonDecoder.string;
    official = JsonDecoder.boolean;
  },
  'EotEAbility'
);

Pros

  • Explicit
  • Matches Elm's powerful decoder system
  • Infinitely composable

Cons

  • Doesn't support extra validations (integer, enum, string length)
  • Required coding the types twice

Typescript Class Validator/Transformer

class Post {
enum SupplementScope {
    Public = 'public',
    User = 'user'
}

type EotEAbility = {
    @IsInt()
    @IsPositive()
    id : integer;

    @Length(1, 255)
    name : string;

    @Length(1, 255)
    description : string;

    @Length(1, 255)
    reference : string;

    @IsInt()
    @IsPositive()
    owner ?: integer;

    @IsEnum(SupplementScope)
    scope : SupplementScope;

    official : boolean;
};

Pros

  • Works with normal typescript types
  • Idiomatic Typescript
  • Provides validation with 0 changes to the typescript classes, decorators are an improvement/edgecase handling.

Cons

  • Idiomatic Typescript
  • Lots of decoration for specifying options
  • More implicit; you're decorating your types with validation, not writing a validator
  • What's up with the enum decorator? Seems repetitive
  • Multiple libraries to make it work.

Add a status to systems indicating development state

We need to add a status to systems so that we can make it clear to the end user what state the system is in. This will allow people to be early adopters, without an expectation that a system is "Done" just because it is added to the list.

Proposal:

Add two statuses, "Early Development" for work in progress systems whose format and structure may change significantly over time, and "Public Beta" for ones where the system is very nearly complete, and the data model is solidified. This should allow us to easily explain the meaning of these, while also maintaining a meaningful distinction.

Additionally, this will allow us to adopt community provided systems faster, as we can have a lower bar to adding a system.

Gear support for EotE/Genesys

Gear Support:

  • Add new
  • Edit user added
  • Delete user added
  • Display abilities added to character
  • Add existing to character
  • Remove existing from character

(Note: Gear isn't that high a priority, as it can go under the "notes" section till added.)

[Bug Report] Cannot create a new fate character

server version: v2.0.0-beta.10

Fresh install and run using yarn:watch for client and yarn start for server. Signed in using google. Attempted to create a new fate core character. Client logs indicate 422 http error code. No error displayed on client.

Server output below:

POST 422 '/': AjvValidationError: ValidationError: /name: minLength should NOT be shorter than 1 characters.
    at validate (/Users/null/src/rpgkeeper/server/utils/ajvValidator.js:39:23)
    at /Users/null/src/rpgkeeper/server/routes/middleware/validation.js:59:13
    at /Users/null/src/rpgkeeper/server/routes/utils/router.js:222:9
    at Layer.handle [as handle_request] (/Users/null/src/rpgkeeper/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/null/src/rpgkeeper/node_modules/express/lib/router/route.js:137:13)
    at ensureAuthenticated (/Users/null/src/rpgkeeper/server/routes/utils/router.js:167:9)
    at Layer.handle [as handle_request] (/Users/null/src/rpgkeeper/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/null/src/rpgkeeper/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/Users/null/src/rpgkeeper/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/null/src/rpgkeeper/node_modules/express/lib/router/layer.js:95:5)
    at /Users/null/src/rpgkeeper/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/Users/null/src/rpgkeeper/node_modules/express/lib/router/index.js:335:12)
    at next (/Users/null/src/rpgkeeper/node_modules/express/lib/router/index.js:275:10)
    at Function.handle (/Users/null/src/rpgkeeper/node_modules/express/lib/router/index.js:174:3)
    at router (/Users/null/src/rpgkeeper/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/Users/null/src/rpgkeeper/node_modules/express/lib/router/layer.js:95:5)
    request: {
      "method": "POST",
      "url": "/",
      "body": {
        "system": "fate",
        "name": "",
        "description": "",
        "portrait": "",
        "thumbnail": "",
        "color": "#5a139a",
        "campaign": "",
        "details": {
          "aspects": [
            {
              "type": "high concept",
              "detail": ""
            },
            {
              "type": "trouble",
              "detail": ""
            }
          ],
          "extras": "",
          "fatePoints": {
            "current": 0,
            "refresh": 0
          },
          "mentalStress": [
            false,
            false,
            false,
            false
          ],
          "physicalStress": [
            false,
            false,
            false,
            false
          ],
          "skills": [],
          "stunts": []
        }
      },
      "query": {}
    }

Add Eote Weapon mod rules

Currently, EotE weapons are coded using Genesys mod rules; while we feel it's a much less broken system, that's not exactly up to us to decide for all users of the system. So, what we need to do, is to allow for users to "opt into" the Genesys rules for Eote, but we do need to code the painful original mod system. (Can you tell I'm thrilled about this? ๐Ÿ˜ )

  • Add EotE Mod system
  • Add ability to opt-in to Genesys style mods

Discord Integration

So, time for a little theory crafting.

When using RPGKeeper in a remote setting, voice and text chat is almost a requirement. Text chat is hard enough, but building an entire voice setup seems excessive. The obvious answer is: "Just use whatever, not our problem."

While true, what if we did integrate with Discord? Seems like we have some low-hanging fruit:

But, what if we went even deeper?

  • Automatic joining of audio channel? (not sure if possible)
  • Automatically building channels and setting permissions (definitely possible)
  • Text chat on RPGKeeper backed by discord (see https://github.com/reactiflux/discord-irc for possible implementation details)
  • Discord bot for doing rolls in RPGKeeper (two way: roll in RPGKeeper posted in Discord, roll requested in Discord, rolled in RPGKeeper)
  • Discord Go Live streaming of a window controlled by RPGKeeper
    • Could show session slash screen
    • Could play intro music
    • Could switch to battlemap once a fight breaks out

I think there's some deep value-added to be had, here. Thoughts, anyone?

UI should display error responses from server

As per #44:

Currently the UI doesn't pipe errors back to the client; it's on my todo list, but the console is the best we've got, atm. (I know, terrible user experience, but at the time I was converting that code, bootstrap-vue didn't have a built in way to pop an error, and I didn't feel like building one. Since that exists now, I can add it pretty easily.)

So, we need to fix this. We can either do this using BootstrapVue toasts, or we can write our own alert system using alters (basically stealing it from the one I wrote for work.)

Talent Support for Eote/Genesys

Talent Support:

  • Add new
  • Edit user added
  • Delete user added
  • Display abilities added to character
  • Add existing to character
  • Remove existing from character

(Note: Because Talents work differently in Genesys, while the EotE implementation will be a "basic" one for Genesys, more work will need to be done to take the Genesys "talent pyramid" into account.)

[Suggestion] "biography" makes little sense in the main character

Given that we have a notes section, and a "biography" is going to at least be a paragraph, if not multiple pages, why would we put that in the initial form?

As it stands now, most systems use that as a description of the character. We should split this up:

  • description - A simple (short) description of the character. (For use by systems.)
  • campaign - A text name for the campaign this is associated with. (Displays on the dashboard.)

Add a 'saving' indicator

The indicator should work like Google Docs; it should say 'Saving...' while it's saving, and 'Saved: Just Now' when it finishes saving. Then, keep using the approximate time for 'Saved: XXXXX' after that.

Change EotE dice roller to use spinner control

Currently, the EotE dice roller is using a button group, which while it works, takes some custom css to pull off correctly.

Instead, newer BootstrapVue supports a spinner component:

This will just keep things cleaner, and reusing existing components is always better.

Update Character Sheet for all clients when a player updates the sheet.

Currently, if you have a character up, and you update it on one client, the other client knows nothing about the change. While we don't have an intention on allowing players to modify the character from multiple clients at the same time, it would be very useful for them to be able to make changes, and have read-only versions of the sheet update, so a GM looking at them could be able to see, in real time, changes to the sheet.

Proposal

Use Socket.io to subscribe to updates for a character when the page is loaded, and unsubscribe once you navigate away. This will mean that we will get updates on the character as the player updates them, but the updates for all users won't be going to all clients.

New Build/Deploy System

We need a new build system, now that GitHub Actions is a thing. The new build system should work the following way:

  • Build
    • Run linting on every merge request
    • Run tests on every merge request
    • Run LGTM on every merge request
    • Bump package.json version (prerelease) on merge request (merged).
    • Add a new pre-release to the releases tab on merge request (merged).
    • Bump package.json version on release.
    • Build a docker on merge request (merged).
    • Build a docker on every release.
  • Deploy
    • Deploy to beta.rpgkeeper.com on every pre-release merge request (merged) docker build
    • Deploy to rpgkeeper.com on every release docker build.

The 'new character' form allows you to proceed with an invalid character

Per #44:

Clearly the form shouldn't let you proceed if you don't put in the required fields. I skipped over form validation when I converted to bootstrap-vue since I was lazy. That totally needs to be added, jeeze.

At a bare minimum, the form shouldn't let you proceed. But there should also be real validation on it.

Release for user testing?

Hi!

Amazing project, I always wanted to build a character inventory like this! I pulled the code and started it locally, but somehow I cannot get character creation working, it fails with
Failed to parse permissions for account 1: SyntaxError: Unexpected token * in JSON at position 1
could you recommend a tag/release/commit I could use to do some end user testing?

cheers!
PS: If I wrap my head around the code I might contribute WFRP 4ed support

New, Improved Generic Character System

Implement a new, improved Generic character system. It should support:

  • Counters
    • Add Counters
    • Edit Counters
    • Delete Counters
    • Reorder Counters
  • Rolls
    • Add Rolls
    • Edit Rolls
    • Delete Rolls
    • Reorder Rolls
  • Statblocks
    • "List" type
    • "Table" type
    • Add Statblocks
    • Edit Statblocks
    • Delete Statblocks
    • Reorder Statblocks
  • Notes
    • Add a notes page
    • Delete a notes page
    • Edit a notes page
  • Help documentation in modals

Add GoogleDrive as an image source

Right now, you can either "hot link" and image, or you can pick one from DropBox. As a way of expanding a user's choices, we should add the ability to choose files from GoogleDrive as well:

This should work much like the DropBox integration, however, we will have to figure out how to turn what it returns us into a hotlink that isn't going to expire after a while. This should just take some investigation; since it seems doable: https://stackoverflow.com/a/52067077

This would give users twice as many options for hosting, and I believe Drive is more popular.

Expand Archtypes/Races

Archetypes and Races are more than a simple specifier; they also tell you what your starting Wound/Strain Thresholds are, and list any abilities that come standard. So we need to make Archetypes/Races smarter, to include more

As far as I am aware, there's not any way to remove those abilities; so we should probably even update the abilities page to show them, and also not let them be removed.

Once we have this information, we can also give the user helpful text to suggest what their Wound/Strain Thresholds should be.

Move systems out into their own directory, combine server and client code

Currently, our code layout is:

.
โ”œโ”€โ”€ client
โ”‚ย ย  โ”œโ”€โ”€ components
โ”‚ย ย  โ”œโ”€โ”€ modals
โ”‚ย ย  โ”œโ”€โ”€ pages
โ”‚ย ย  โ”œโ”€โ”€ scss
โ”‚ย ย  โ”œโ”€โ”€ static
โ”‚ย ย  โ””โ”€โ”€ systems
โ”œโ”€โ”€ server
โ”‚ย ย  โ”œโ”€โ”€ auth
โ”‚ย ย  โ”œโ”€โ”€ news
โ”‚ย ย  โ”œโ”€โ”€ routes
โ”‚ย ย  โ””โ”€โ”€ systems
โ””โ”€โ”€ vendor

My proposal is to turn it into this:

.
โ”œโ”€โ”€ client
โ”‚ย ย  โ”œโ”€โ”€ components
โ”‚ย ย  โ”œโ”€โ”€ modals
โ”‚ย ย  โ”œโ”€โ”€ pages
โ”‚ย ย  โ”œโ”€โ”€ scss
โ”‚ย ย  โ””โ”€โ”€ static
โ”œโ”€โ”€ server
โ”‚ย ย  โ”œโ”€โ”€ auth
โ”‚ย ย  โ”œโ”€โ”€ news
โ”‚ย ย  โ””โ”€โ”€ routes
โ”œโ”€โ”€ systems
โ”‚ย ย  โ”œโ”€โ”€ generic
โ”‚ย ย  โ”‚   โ”œโ”€โ”€ client
โ”‚ย ย  โ”‚   โ””โ”€โ”€ server
โ”‚ย ย  โ””โ”€โ”€ eote
โ”‚ย ย      โ”œโ”€โ”€ client
โ”‚ย ย      โ””โ”€โ”€ server
โ””โ”€โ”€ vendor

This mostly just involves Gruntfile.js, and moving things around. (There will also be some require path changes on the client side, I think) I feel, however, that this will help keep things much cleaner, as well as keeping open the option in the future to split out the systems into their own repositories, and including them as submodules, or such.

/cc @cprieger, @Burstaholic: You guys have any thoughts on this?

Ability Support for EotE/Genesys

Ability Support:

  • Add new
  • Edit user added
  • Delete user added
  • Display abilities added to character
  • Add existing to character
  • Remove existing from character

Add full descriptions of "Staggered", "Immobilized", and "Dazed".

We need to add a popup like we have for qualities and critical injuries to the buttons for "staggered", "immobilized", and "dazed" to make it easier for players to know what that means.

This will just make player's lives easier, it isn't actually required to use the system.

Production Character Conversion script

In order to deploy the current beta, we need a script that can convert the current characters over to the new systems. Since the old system isn't even using sqlite, this is a bit of a challenge, and needs to, in essence, be a 'one off' script.

Good news, production only has EotE.

Redirect to the Dashboard on Login

We should redirect to the Dashboard when you log in. That being said, we probably shouldn't redirect to the dashboard when on a character.

Add EotE Armor Mod rules

Currently, EotE armor is coded using Genesys mod rules; while we feel it's a much less broken system, that's not exactly up to us to decide for all users of the system. So, what we need to do, is to allow for users to "opt into" the Genesys rules for Eote, but we do need to code the painful original mod system. (Can you tell I'm thrilled about this? ๐Ÿ˜ )

  • Add EotE Mod system
  • Add ability to opt-in to Genesys style mods

Computed fields stop the page from working if incorrect

If you make a mistake in a computed field, it kills the entire page, and the character will never load. This required manual database entry to fix.

Instead, it should simply return <i class="fa fa-exclamation-triangle"></i> Error computing value.

Add 'Read Only' support

If you are not currently logged in, you should see a read-only version of the character, suitable for GMs, or sharing with friends.

  • editing anything should not be allowed
  • controls for adding/editing should be hidden/disabled
  • text entry boxes should be disabled

Switch to TrivialModels

Switching to TrivialModels will give us a distinct advantage going forward. First, allows developers to work on the project without installing RethinkDB. Secondly, it means that should RethinkDB, or any future system not work, all we need to do is implement a driver, and we should be able to switch with very little issue.

Currently, I'm still developing TrivialModels, but it's pretty solid at the moment. It lacks features like relations, or schema'd sub-objects/arrays, but I don't feel those are show stoppers. What we do now is pretty trivial. (Heh.)

Add Force Pool

Add a Force Pool widget to EotE if the character is marked as force-sensitive.

Previous system, it looked like this:

However, since "Rating" and "Pool" are the same value, this can be simplified to just a "Committed/Rating" dialog.

  • Add Force Pool UI
  • Only show if character is force-sensitive
  • Add edit modal

Genesys skills mysteriously duplicate

Add a Genesys character, and modify the skills. They somehow, weirdly duplicate as you do other things with the character and save.

image

image

(Knowledge keeps coming back, too.)

Convert away from Persona for logins

According to Mozilla, they are shutting down Persona:

Persona is no longer actively developed by Mozilla. Mozilla has committed to operational and security support of the persona.org services until November 30th, 2016.

On November 30th, 2016, Mozilla will shut down the persona.org services. Persona.org and related domains will be taken offline.

If you run a website that relies on Persona, you need to implement an alternative login solution for your users before this date.

For more information, see this guide to migrating your site away from Persona:

https://wiki.mozilla.org/Identity/Persona_Shutdown_Guidelines_for_Reliers

(from https://developer.mozilla.org/en-US/Persona)

This means we need to move away from it. Now, here's the interesting part...

The Interesting Part

In the master branch, we are using Google Plus for login. I'd done this the last time I thought Persona was going away. This was changed in beta here. Unfortunately, we can't just revert that commit, as it contains more. So, we're going to have to roll those changes back by pulling in the code from master. But, the master code is angular, so we'll need to convert it to vue. Which is a little bit of a problem, as the directive we're using is angular.

Skill buy

Is it possible to add in a skill buy system?

So I want to go from skill 6 to 7 it would cost 7 exp?

Does rpgkeeper have a good way of handing out exp like 4-5 every sunday?

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.