annotate orpg/dieroller/HOWTO.txt @ 156:3b6888bb53b5 beta

Traipse Beta 'OpenRPG' {091125-02} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Beta) Added Bookmarks Fix to Remote Admin Commands Minor fix to text based Server Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager default_manifest.xml renamed to default_upmana.xml Cleaner clode for saved repositories New TrueDebug Class in orpg_log (See documentation for usage) Mercurial's hgweb folder is ported to upmana Pretty important update that can help remove thousands of dead children from your gametree. Children, <forms />, <group_atts />, <horizontal />, <cols />, <rows />, <height />, etc... are all tags now. Check your gametree and look for dead children!! New Gametree Recursion method, mapping, and context sensitivity. !Infinite Loops return error instead of freezing the software! New Syntax added for custom PC sheets Tip of the Day added, from Core and community Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to prevent non updated clients from ruining the fix.
author sirebral
date Wed, 25 Nov 2009 12:34:04 -0600
parents 4385a7d0efd1
children
rev   line source
156
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
1 HOW TO CREATE A NEW DIE ROLLER
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
2
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
3 So you want a make a new roller or add a new option? here's a short guide.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
4
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
5
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
6 Step 1: Create a new die roller sub class.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
7
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
8 You need to derive a new die roller class from an existing die roller class.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
9 Most likely, this will be the std die roller class.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
10
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
11 The basics would look like this:
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
12
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
13 class new_roller(std):
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
14 def __init__(self,source=[]):
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
15 std.__init__(self,source)
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
16 .....
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
17
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
18 ....
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
19
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
20 Step 2: Implement new methods and/or override existing ones.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
21
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
22 Now, you just need to implement any new die options and override any
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
23 existing ones that you want to act differently. The most common options
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
24 to override are the sum and __str__ functions. Sum is used to determine
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
25 the result of the rolls and __str__ is used to display the results in
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
26 a user friendly string.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
27
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
28 For example:
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
29
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
30 class new_roller(std):
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
31 def __init__(self,source=[]):
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
32 std.__init__(self,source)
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
33 .....
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
34
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
35 def myoption(self,param):
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
36 ....
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
37
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
38 def sum(self):
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
39 ....
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
40
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
41 def __str__(self):
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
42 ....
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
43
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
44 REMEMBER!
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
45 Always return an instance of your die roller for each option expect str and sum.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
46
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
47
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
48 Step 3:
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
49
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
50 Modify Utils.py
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
51
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
52 You need to make some minor modifications to utils.py to facilitate
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
53 your new roller. You need to a) add an import call for your roller,
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
54 and b) add your roller to the list of available rollers.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
55
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
56 For example:
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
57
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
58 from die import *
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
59 # add addtional rollers here
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
60 from myroller import *
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
61 ....
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
62
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
63 rollers = ['std','wod','d20','myroller']
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
64
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
65 Step 4: You're done!
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
66
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
67 Test it and make sure it works. When you think its done, send it to
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
68 the openrpg developers and they might include it in future releases.
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
69
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
70 -Chris Davis
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
71
3b6888bb53b5 Traipse Beta 'OpenRPG' {091125-02}
sirebral
parents: 0
diff changeset
72