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;
Download the latest version and install it.
https://git-scm.com/download/linux
- SKIP these steps if you are going to setup Visual Studio Code. See specific instructions below.
- Download and install latest version of Node Version Manager(NVM): https://github.com/coreybutler/nvm-windows/releases
- 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.
- Run
nvm install latest
to install the latest version of node.js - Run
nvm list available
and note the version you want to use. The latest version should be fine. - Run
nvm use node <version#>
include the proper version number as noted above.
- Run
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
- Close and reopen your terminal
- Run
nvm install 6.9.5
- Run
nvm alias default 6.9.5
- Run
nvm use 6.9.5
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.
Curl allows us to download The Arron Sheet (https://github.com/shdwjk/TheAaronSheet), instead of maintaining our own copy.
- Go to https://curl.haxx.se/dlwiz/?type=bin and pick the correct version.
- Unzip and save to a directory on your computer
- Add the Curl install directory to your windows environment PATH variable.
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.
- 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.
- 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
- Download and install Visual Studio Code
- 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.)
- Required: In VS Code Extensions, download the "Egamma NPM" extension for VSC: https://marketplace.visualstudio.com/items?itemName=eg2.vscode-npm-script
- Optional: "NPM Intellisense" extension: https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense
- Optional: "VS Code JSHint extension" for VSC: https://marketplace.visualstudio.com/items?itemName=dbaeumer.jshint
- Optional: "GetLens" extension for VSC: https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens
Curl is still required. See above.
- fork project if you haven't already.
- 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/
- Error: Cannot find module 'webpack': you may need link globally installed package to your project using
npm link webpack-cli
.
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.
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