Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
tabletop-api
Advanced tools
Rest API for table top gaming, character creation, dice rolls. Currently Supporting AD&D 2.0 Roll MethodsI-IV, plus many other useful calls. Including a new addition of proficiency JSON files.
app.get('/languages', common.languages); app.get('/races', common.races); app.get('/alignment', common.alignment); app.get('/stats', common.stats); app.get('/playerClasses', common.playerClasses); app.get('/roll-hp/:pcClass', dice.hitpoints);
Providing simple REST API for Dice rolls.
Roll three six-sided dice (3d6); the total shown on the dice is your character’s Strength ability score.
Repeat this for Dexterity, Constitution, Intelligence, Wis- dom, and Charisma, in that order.
This method gives a range of scores from 3 to 18, with most results in the 9 to 12 range. Only a few characters
have high scores (15 and above).
/method1
Roll 3d6 twice, noting the total of each roll. Use whichever result you prefer for your character‘s Strength score. Repeat this for
Dexterity, Constitution, Intelligence, Wisdom, and Charisma. This al- lows you to pick the best score from
each pair, generally ensuring that your character does not have any really low ability scores
(but low ability scores are not all that bad anyway).
/method2
Roll for Hit Points. Options specific for class. Note appending max will automatically return the max HP value for the class in the call.
/roll-hp/mage
/roll-hp/
Max example:
/roll-hp/max
/player
Array of languages
'/languages'
Array of Races
'/races'
Alignment
'/alignment'
Stats
'/stats', common.stats);
Player Classes
'/playerClasses'
'/roll-hp/:pcClass' Options: fighter | rouge | wizard : max
Also running list of other that classes based on these 3main classes.
Once you have the project running you can hit the server with XHR request to get JSON response
Example Request
://Example
var xhReq = new XMLHttpRequest();
xhReq.open("GET", "http://localhost:2001/method1", false);
xhReq.send(null);
var serverResponse = xhReq.responseText;
console.log(serverResponse);
The MIT License (MIT)
Copyright (c)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Create D&D Characters
We found that tabletop-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.