Giter Club home page Giter Club logo

import5echar's Introduction

import5echar

Walter Kammerer's Fifth Edition Character Sheet app allows you to upload your character to google drive. This package parses that file and allows you to use character data for automation.

Installation

devtools::install_github('oganm/import5echar')

Basics

First thing that need to be done is to import yoour character. You can either use a regex or a google drive file id (acquirable using googledrive package). If a regex is used, last modified file that matches the regex is pulled which is probably your latest export. First time you run the line below, you'll have to authenticate with google drive.

char = importCharacter('Tim_Fighter')

If you don't want to authenticate with google drive, a local file can be used

characterFile <- system.file("Tim_Fighter5", package = "import5eChar")
char = import5eChar::importCharacter(file = characterFile)

Once a character is loaded convenience functions can be used

init() # initiative roll
## [1] "Rolls: [ 6 ]"

## [1] 10
skillCheck('medicine') # medicine skill check
## [1] "Rolls: [ 8 ]"

## [1] 9
weaponAttack(char$weapons$Dagger) # a weapon attack with a dagger
## [1] "Rolls: [ 12 ]"
## [1] "Rolls: [ *4* ]"
## [1] "Piercing damage"

## Attack Damage   crit 
##     19      8      0

All these conveninece functions require an imported character as an input. If you use the variable name char, providing this will not be necesarry. If you want to use a different name you can either do options(defaultCharacter='newVariableName') to continue using the functions as before, or specify the object.

myBestCharacter = importCharacter('Tim_Fighter')

init(char = myBestCharacter)
## [1] "Rolls: [ 5 ]"

## [1] 10

PDF character sheets

A rmarkdown template is available to print out pdf character sheets. To use it, create a new markdown document with CharacterSheet template. Replace the character import line with a character of your own. See example.pdf to see what it looks like. Alternatively use prettyPDF function to get a proper fillable character sheet.

Shiny character sheet

To run the interactive character sheet, just use shinySheet(). The interactive sheet is documented here

Use example

See tim.R for example usage. I keep a file like that open during session and ctrl+R the relevant lines as needed. If you are a caster see if you'd be interested in the wizaRd package. If you turn into animals a lot see monsteR package.

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.