Download the PHP package porthou/dicebag without Composer

On this page you can find all versions of the php package porthou/dicebag. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dicebag

DiceBag

Build Status

Create dice roll results from standard dice notation

A Simple Example

Installation

Prerequisites

DiceBag Requires PHP 7.1 or greater.

Installation Through Composer

Installation through composer is simple, just require it through the command line with the following command:

Using DiceBag

DiceBag is designed to allow you to create results with as little as possible configuration, whilst being as random as possible. By default it will use PHP7's default CSRNG generation using random_int.

If a custom RNG is desired then it can be passed in to the DiceBag::factory() method as the second parameter. This will be passed through to any instances needing the RNG.

Dice Types

There are 3 types of "Dice"

Standard Dice NdX

This rolls N standard Numeric dice with X sides per die. If N is not specified it is assumed to be 1

Examples

Fate Dice NdF

This rolls N Fate (also known as fudge) dice. If N is not specified it is assumed to be 1. Fate dies can roll -1, 0 or 1.

Examples

Fixed Modifiers X

Fixed modifiers are most useful when combined with other dice formats. They add (or subtract) a fixed value

Examples

Dice Pool Modifiers

Dice pool modifiers are used to change the results of a dice pool.

Keep Highest khX

This keeps the Highest X results from the dice pool.

Examples

Drop Lowest dlX

This drops the Lowest X results from the dice pool.

Examples

Keep Lowest klX

This Keeps the Lowest X results from the dice pool.

Examples

Drop Highest dhX

This Drops the Highest X results from the dice pool.

Examples

Exploding Dice !cN

Exploding Dice add an additional dice to the pool if the maximum is rolled. These additional dice may also explode.

If only N is specified then the dice will explode on the value specified.

c is a conditional, which can be either <, > or unspecified. When specified with N dice will explode when the value is either greater than or equal to, or less than or equal to, the value specified.

Examples

All versions of dicebag with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3 || ^8.0.0
ext-json Version *
symfony/console Version ^4.0|^5.0|^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package porthou/dicebag contains the following files

Loading the files please wait ....