float= The Red Rook (cover).png

Parallel Visions: City of Angels City of Demons ebook and trade paperback available on Amazon (or here).
The question of whether Vance was dead or not became more than academic when he found himself in a bathtub up to his chin in ice water like some forgotten cocktail garnish, a demonic woman standing over him, and no memory of how he got there.
Read free chapters of Parallel Visions: City of Angels City of Demons here
The Red Rook, sequel to Dispensing Justice and the second novel of Nova Genesis World is now available for Kindle or as a paperback at Amazon.
Read free chapters of Dispensing Justice here (or get it here).
Read free chapters of The Red Rook here (or get it here). -- Fritz Freiheit

Dispensing Justice (cover).png 20th Annual Writer's Digest Self-Published Book Awards - Honorable Mention.png

RandomFunctions Documentation

From FritzWiki
Jump to: navigation, search
http://fritzfreiheit.com/wiki/RandomFunctions_Documentation is best viewed with JavaScript turned on.
 
Article icon.svg
 v • d • e 

Examples

Randomly pick values from a table

Initialize the table:

<rTable name="rainbow color">
;1;red
;1;orange
;1;yellow
;1;green
;1;blue
;1;indigo
;1;violet
</rTable>


Pick a single value from the table:

{{#pickFrom:rainbow color}}

Results in: blue

To generate multiple (20) values:

{{#loop: index
| 1
| 20
| <nowiki/>
# {{#pickFrom:rainbow color}}
}}

Produces:

  1. orange
  2. blue
  3. orange
  4. violet
  5. green
  6. indigo
  7. blue
  8. orange
  9. violet
  10. violet
  11. green
  12. yellow
  13. blue
  14. yellow
  15. blue
  16. violet
  17. blue
  18. red
  19. yellow
  20. blue

Using templates

To create a pick table that can be used on multiple pages, create a template containing the table or tables as follows:'

(TODO)

Example Die Rolls

Old school Dungeons and Dragons character generation (i.e. 3D6 rolls):

* Strength: {{#d6:3}}
* Intelligence: {{#d6:3}}
* Wisdom: {{#d6:3}}
* Dexterity: {{#d6:3}}
* Constitution: {{#d6:3}}
* Charisma: {{#d6:3}}
  • Strength: 11
  • Intelligence: 12
  • Wisdom: 8
  • Dexterity: 10
  • Constitution: 9
  • Charisma: 5

Example generator topics

Some useful regular expressions


^(\d+),  -->  ;\1;

\[([^\]]+)\]  -->  {{#pickFrom:\1}}

^;([A-Za-z_][A-Za-z0-9_]*)$  -->  <rTable name="\1">

[[File:|right|thumbnail|50px]]

v • d • e