Menu

Tree [059460] master 1.9.4 /
 History

HTTPS access


File Date Author Commit
 icons 2011-04-25 Michael Daffin Michael Daffin [fa8c00] Changed the way icons are stored
 src 2011-06-27 Michael Daffin Michael Daffin [059460] Removed unneeded debug info
 .gitignore 2011-04-26 Michael Daffin Michael Daffin [989169] Added release/ to gitignore
 CMakeLists.txt 2011-06-10 Michael Daffin Michael Daffin [ff06de] Fixed scriptloader
 LICENCE 2011-04-25 Michael Daffin Michael Daffin [625daa] Added a LICENCE file containing the gpl v2 licence
 README 2011-04-26 Michael Daffin Michael Daffin [0ba39d] Added a description of what functions are avaib...
 kdicegen.desktop 2011-04-26 Michael Daffin Michael Daffin [b9c8b1] Added mime data to the project
 kdicegen.qrc 2011-06-19 Michael Daffin Michael Daffin [62502a] Added the attack ui to the resources file
 kdicegen.xml 2011-04-26 Michael Daffin Michael Daffin [b9c8b1] Added mime data to the project

Read Me

KDiceGen
==============

An advanced scriptable dungeon and dragons style dice roller.


Features
==============
- Functionaly can be extended by writing simple scripts
- Easily store and roll any number of different dice/configurations


Notes
==============
This is an alpha release version and is missing a lot of the functionalty that 
is planned for the final release.


Install
==============
mkdir build
cd build
cmake .. 
make
sudo make install

Dice
==============
The dice are simple javascripts defined as follows:

The script must have an object where all the values are set
The object must contain the following properties:
- name
    the default name/label of the dice 
- version
    the version of the dice (not currently used)
- type
    the type of the dice (used to identify the script)
- values
    an array containing the default values for the dice
- run
    a function to be called when the script is run and returns a string
    containing a textual reprensation fo the result (that will be displayed to 
    the user)
- description
    a function that returns a scring describing the dice (it should present the 
    currently stored values in a useful way to the user)
Any other functions or varibles can also be used.

The scripts are supplied a varible called dice that contains an instance of the
dice to which the script is attached. Using this the script has access to the
propertites of the dice including:
- dice.name
    the name of the dice set by the user
- dice.type
    the type of the dice (should be the same as the type set by the script)
- dice.values
    the current values of the dice
- dice.roll(sides)
    rolls a dice with sides faces, logs and returns the result
- dice.roll(sides, number)
    rolls number amount of dices with sides faces and return a list of the 
    results
- dice.formatRolls(rolllist, mod, format)
    returns a string format with placeholders replaces by values
    %t indicates the total of the rolllist + the mod
    %l is replaced by a + seperated list of the rolls
    %m is replaced by either '+ mod' or '- mod' or nothing if mod is 0

Example scripts can be found in src/dice/

Scripts are loaded from two places, either compiled into the executable or in
the applications data directory for each user (located at
$HOME/.local/data/KDiceGen/dice on unix).
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.