GithubHelp home page GithubHelp logo

roll20-pathfinder-character-sheet / roll20-pathfinder-character-sheet Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 21.0 15.11 MB

Used for on-going development of the Pathfinder Community Sheet for Roll20.

JavaScript 30.55% HTML 63.58% CSS 5.86%

roll20-pathfinder-character-sheet's Introduction

Pathfinder Character Sheet for Roll20.net

Editing

Unlike most character sheets found on Roll20's repo, the Pathfinder Community sheet must be edited/developed within a specific environment. Sheetworkers have been separated into various modules of js based on their specific sheet sections or by function(s). It is necessary to minimally install git, node.js, and npm. In order to edit the sheet locally, complete the following sections;

Install Git (If you don't have it already)

Download the latest version and install it.

Windows

https://gitforwindows.org/

Linux

https://git-scm.com/download/linux

Install Node.js using NVM

  • SKIP these steps if you are going to setup Visual Studio Code. See specific instructions below.

Windows

  1. Download and install latest version of Node Version Manager(NVM): https://github.com/coreybutler/nvm-windows/releases
  2. Open a NEW shell (Right click -> Open Git Bash Here/Git GUI Here) You can not use one which was opened before NVM is installed.
  3. Run nvm install latest to install the latest version of node.js
  4. Run nvm list available and note the version you want to use. The latest version should be fine.
  5. Run nvm use node <version#> include the proper version number as noted above.

Linux/Mac (adjust node version as needed)

  1. Run curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
  2. Close and reopen your terminal
  3. Run nvm install 6.9.5
  4. Run nvm alias default 6.9.5
  5. Run nvm use 6.9.5

Dependencies

NPM (https://www.npmjs.com/get-npm) is distributed with Node.js - which means that when you download Node.js, you automatically get npm installed on your computer.

Install Curl executable (If you don't have it already)

Curl allows us to download The Arron Sheet (https://github.com/shdwjk/TheAaronSheet), instead of maintaining our own copy.

  1. Go to https://curl.haxx.se/dlwiz/?type=bin and pick the correct version.
  2. Unzip and save to a directory on your computer
  3. Add the Curl install directory to your windows environment PATH variable.

Build/Compile Commands

Run npm run build - Builds the project's index.html Use Case: development/testing. Output to "dist" folder.

Run npm run prod - Turns debug off automatically. Builds the project's index.html Use Case: roll20 production. Output to "prod" folder.

Use css, translation.json, and sheet.json included in the "src" folder.


Specific instructions for setting up with Visual Studio Code

Install git

  1. If you already have Github for Windows, you do not need to install git separately. If you do not have it, you must download/install it or else download git as noted above. You may also have both side-by-side.
  2. Add the Github for Windows install directory to your windows environment PATH variable.More specific instructions; (note: there is only a 'cmd' directory. Not a bin directory, contrary to the directions.): https://www.answerlookup.com/how-add-git-windows-path-environment-variable

Visual Studio Code and Node.js integration

  1. Download and install Visual Studio Code
  2. Install Node for your platform: https://code.visualstudio.com/Docs/runtimes/nodejs (note: if you need nvm then you probably already know what you are doing and don't need these instructions. see nvm instructions above.)

Extensions

  1. Required: In VS Code Extensions, download the "Egamma NPM" extension for VSC: https://marketplace.visualstudio.com/items?itemName=eg2.vscode-npm-script
  2. Optional: "NPM Intellisense" extension: https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense
  3. Optional: "VS Code JSHint extension" for VSC: https://marketplace.visualstudio.com/items?itemName=dbaeumer.jshint
  4. Optional: "GetLens" extension for VSC: https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens

curl

Curl is still required. See above.

Opening Project.

  1. fork project if you haven't already.
  2. clone project from within VSC or Github Desktop

CTRL-Shift-P opens a terminal prompt at top it also has better intellisense than the terminal window due to the picklist it generates as you type. Much easier to fork from github's web interface first. Then use the URL of your fork as the url of the repository. I think this can be done using the git clone command some help: https://www.theregister.co.uk/2015/12/07/visual_studio_code_git_integration/

Errors/Issues

  • Error: Cannot find module 'webpack': you may need link globally installed package to your project using npm link webpack-cli.

Module Breakdown

Each "page" or section of the Pathfinder sheet has one or more modules associated with it. For instance, the core page has PFAbilityScores, PFInitiative, PFClassRaceGrid etc. The Defense page has PFDefense, PFSaves. The Attacks page has PFAttacks, spells page PFSpells, etc.

Repeating sections

Pages with repeating sections will have a module for the repeating list, another module for the page-level variables (usually above it on the page), and a 3rd module for "roll options" the user has selected. For the attacks page it is :

  • PFAttacks: the repeating_weapon list
  • PFAttackGrid: the melee,ranged,cmb grid at the top
  • **PFAttackOptions: ** the options checkboxes and how they affect macros

spells:

  • PFSpells: the repeating_spells list
  • PFSpellCasterClasses: The spell caster section, spells per day, spell points, etc
  • PFSpellOptions: the spell options and updating of macros

roll20-pathfinder-character-sheet's People

Contributors

benwa avatar dependabot[bot] avatar etiennelamoureux avatar plutosdad avatar scpredmage avatar shdwjk avatar tranquwil avatar vince-roll20 avatar waterfoul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

roll20-pathfinder-character-sheet's Issues

Feature Request: AONPRD import

Since the roll20 compendium is incomplete, I would like to be able to import monster stat blocks by URL from aonprd.com

Question : Building/Testing build in roll20

I apologize if the answer is obvious, but I'm not sure how to actually deploy this and test it.
I built the latest master commit, then put the resulting index.html in the "HTML Layout" of a custom sheet on a Roll20 campaign, but I'm clearly missing something, the resulting character sheet is one long broken page. Seems like my build is missing things, but I get no errors and I followed the README guide to make sure I wasn't missing something obvious.

Is there a specific way to build/deploy this? Is it required to build this with Visual Studio Code (I'm on Webstorm, but I don't see why webpack would build it differently)?

Wrong HD and HP when importing NPCs with class level.

I was trying to import some human npcs with the parse tool and i notice when i do declare the class and level of the NPC
the end result after parse has a wrong HP and HD.

When you go into the Core tab, you will see the HDs for both the class and the race (it treat all hd informed as race), so the total HD is double the proper amount, and since the actual dice is not informed for the class it does not count any extra HP it seem to count bonus HP from Constitution and talents for the extra added HDs.

Parse Data:
image

Parsed NPC:
image

Core tab information:
image

NPC Data (Manually removing the cavalier levels)
image
image

@{armor3-max-dex} not taken into account when Carrying Capacity is set to "ignore"

Problem

When an equipped armor with less @{armor3-max-dex} than @{DEX-mod} is equipped, DEX to AC is not reduced

Reproduction steps

  1. Create a new character
  2. Have 12 DEX
  3. Go to the equipment tab
  4. Create an armor with 0 AC and 0 max dex
  5. Click the @{set-as-armor} button
  6. Go to the defence tab
  7. Validate that the equipped armour allows 0 max dex (@{armor3-max-dex} = 0)
  8. @{AC} will be 11, should be 10

Power Attack common buff

I find myself continuously having to re-enter buffs like Power Attack for every fifth NPC. I realize most of the common buffs are spells and supernatural abilities, but I think it's worth expanding that a bit.

		case 'powerattack':
			setter[prefix+'name']=SWUtils.getTranslated('buff-power-attack');
			setter[prefix+'bufftype']='other';
			setter[prefix+'tabcat']='other';
			setter[prefix+'b1-show']=1;
			setter[prefix+'b1_bonus']='melee';
			setter[prefix+'b1_bonustype']='untyped';
			setter[prefix+'b1_macro-text']='-1-floor(@{bab}/4)';
			tempint=1;
			if(calc) {
				//This requires retrieving `v['bab']` at the start of the function.
				tempint=1+Math.floor(bab/4);
			}
			setter[prefix+'b1_val']=-tempint;
			setter[prefix+'b2-show']=1;
			setter[prefix+'b2_bonus']='dmg_melee';
			setter[prefix+'b2_bonustype']='untyped';
			setter[prefix+'b2_macro-text']='2+2*floor(@{bab}/4)';
			setter[prefix+'b2_val']=2*tempint;
			setter[prefix+'notes']=SWUtils.getTranslated('buff-power-attack-note');
			break;

I haven't tested this, partially due to time constraints and partially because I realized it fails to account for two-handed and off-hand attacks. I can think of a few general approaches to this:

  1. Ignore it. Use this code as-is and let the user add adjust as needed. Downside: what if the user forgets to adjust, or doesn't know how?
  2. Hard code it. Instead of using the buff system, add a checkbox under "misc." If checked, the sheet will calculate and apply Power Attack to that one attack, multiplying by the same amount that strength gets multiplied by. Downside: what if the user checks the box for some attacks and forgets others?
  3. Add a buff option named "Power Attack Damage" or "Scaling Melee Damage" or something. This buff would act like melee damage, except it'd be multiplied by each attack's damage_ability_mult value. Downside: it takes up extra space in the buff list.

I'd say option 3 has the smallest downside, followed by option 1.

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.