All Projects → Yinfei → rpg_tools

Yinfei / rpg_tools

Licence: MIT license
rpg_tools is a toolbox for tabletop games and RPGs

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to rpg tools

rollem-telegram-bot
🎲 An RPG dice rolling bot for Telegram.
Stars: ✭ 26 (-50.94%)
Mutual labels:  dice, rpg, tabletop-gaming
vigilante
🦇 2D pixel-art side-scrolling single-player ARPG
Stars: ✭ 63 (+18.87%)
Mutual labels:  rpg, role-playing-game
pandt
A tabletop role-playing game system
Stars: ✭ 17 (-67.92%)
Mutual labels:  rpg, tabletop-gaming
PolyDiceGenerator
A customizable Polyhedral Dice Generator for OpenSCAD.
Stars: ✭ 63 (+18.87%)
Mutual labels:  dice, rpg
vscode-dmbinder
Visual Studio Code extension for managing campaign documents.
Stars: ✭ 53 (+0%)
Mutual labels:  rpg, tabletop-gaming
DiceRoller
Extensible and well-documented dice roller with a robust set of features. Excellent for play-by-post forums, virtual tabletops, or for integrating into character sheets or encounter managers.
Stars: ✭ 22 (-58.49%)
Mutual labels:  dice, rpg
world
This is a fantasy world generation API and set of Go packages for the same.
Stars: ✭ 42 (-20.75%)
Mutual labels:  tabletop-gaming
rfyl
An RPG dice roller.
Stars: ✭ 11 (-79.25%)
Mutual labels:  rpg
d20datascience
Data science investigations into the mechanics of the world's greatest role playing game
Stars: ✭ 50 (-5.66%)
Mutual labels:  role-playing-game
eureka
Old-school CRPG engine, editor and game
Stars: ✭ 41 (-22.64%)
Mutual labels:  rpg
Freedom-Hunter
Monster Hunter like action RPG game
Stars: ✭ 71 (+33.96%)
Mutual labels:  rpg
dice-roller
a dice roller generator in PHP
Stars: ✭ 13 (-75.47%)
Mutual labels:  dice
mirai-rulateday-dice
利用Mirai框架的Mirai-Console开发TRPG骰子插件模板。目前集成了大部分的常用指令,并在此基础上实现更多的跑团体系优化指令。例如COC7技能详细查询、DND5e技能列表查询、DND5e怪物图鉴等。目前处于测试阶段。
Stars: ✭ 55 (+3.77%)
Mutual labels:  dice
VisualNovelKit
Combo of addons + template to create narrative games in Godot inspired by Ren'Py
Stars: ✭ 78 (+47.17%)
Mutual labels:  rpg
Idle-RPG-Bot
An Idle-RPG bot for Discord
Stars: ✭ 47 (-11.32%)
Mutual labels:  rpg
MythicDrops
Action RPG drops for Spigot.
Stars: ✭ 28 (-47.17%)
Mutual labels:  rpg
EMF
Extended Mechanics & Flavor
Stars: ✭ 33 (-37.74%)
Mutual labels:  role-playing-game
flare
A Simple Browser Based Game.
Stars: ✭ 85 (+60.38%)
Mutual labels:  rpg
fari-games
The Ultimate Collection of Open Content for TTRPGs
Stars: ✭ 16 (-69.81%)
Mutual labels:  rpg
dicefont
Scalable vector graphics for dice in icon font format
Stars: ✭ 20 (-62.26%)
Mutual labels:  dice

rpg_tools Dependency Status

A gem that gives you tools for your RPGs : dices, coins and playing cards !

Usage

Coins

RpgTools::Coin.new

  • The flip method set its value to a heads or tails string.

Dices

RpgTools.roll_dice(arg) (arg is case insensitive).

This returns a plain integer result based on the arg parameter.

  • It can be a stardard dice like "1dX" for a X sided dice.

  • It can be a fudge dice "df" : a three sided dice (-1, 0, +1).

  • It can also be a percentile dice "d%" : a ten sided dice (from 10 to 100).

You can also add multiple chained modifiers like "+X", "-X", "*X" or "/X", to alter the roll result. RpgTools.roll_dice("4d6+2") will create 4 6-sided dices, roll them and add 2 to the sum of the roll result.

You can also manipulate all those dice types as objects :

  • RpgTools::Dice::Numerical
  • RpgTools::Dice::Fudge
  • RpgTools::Dice::Percentile

All those classes take two args: a mandatory side number and an optional modifier. They respond to the .roll or .roll! methods to update their value to the result of the roll.

RpgTools::Dice::Numerical.new(6, '+4').roll will roll a six sided dice and add 4 to the roll result.

Dice Bags

RpgTools::Dice::Bag.new(arg) (arg is case insensitive).

  • It works the same way RpgTools.roll_dice does but will give you a RpgTools::Dice::Bag object instead of a plain integer. RpgTools::Dice::Bag.new("4d6-2") will create a bag of four 6 sided dices with a -2 modifier to the sum of all rolls.

Playing card deck

RpgTools::PlayingCardDeck.new(arg) (arg can only be 32 or 52).

  • The card method returns a card of a 32 or 52 cards deck + 2 jokers, depending of arg value.
  • The hand method return an array of 5 card calls.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].