# HG changeset patch # User sirebral # Date 1264435396 21600 # Node ID 7c1a8b36b7293ca9a9bfb7c55eabd81053d90d19 # Parent 043ce9a25b209ca753a505538b6863c4135d890f Traipse Beta 'OpenRPG' {100125-00} 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) New Features: Added Bookmarks 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 New TrueDebug Class in orpg_log (See documentation for usage) Portable Mercurial Tip of the Day added, from Core and community New Reference Syntax added for custom PC sheets New Child Reference for gametree New Parent Reference for gametree New Gametree Recursion method, mapping, context sensitivity, and effeciency.. New Features node with bonus nodes and Node Referencing help added Dieroller structure from Core New DieRoller portability for odd Dice Added 7th Sea die roller; ie [7k3] = [7d10.takeHighest(3).open(10)] New 'Mythos' System die roller added Added new vs. die roller method for WoD; ie [3v3] = [3d10.vs(3)]. Included for Mythos roller also New Warhammer FRPG Die Roller (Special thanks to Puu-san for the support) New EZ_Tree Reference system. Push a button, Traipse the tree, get a reference (Beta!) Fixes: Fix to Text based Server Fix to Remote Admin Commands Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Fix to Map from gametree not showing to all clients Fix to gametree about menus Fix to Password Manager check on startup Fix to PC Sheets from tool nodes. They now use the tabber_panel Fix to Whiteboard ID to prevent random line or text deleting. Fixes to Server, Remote Server, and Server GUI Fix to Update Manager; cleaner clode for saved repositories Fixes made to Settings Panel and now reactive settings when Ok is pressed Fixes to Alternity roller's attack roll. Uses a simple Tuple instead of a Splice Fix to Use panel of Forms and Tabbers. Now longer enters design mode Fix made Image Fetching. New fetching image and new failed image Modified ID's to prevent non updated clients from ruining the fix. default_manifest.xml renamed to default_upmana.xml diff -r 043ce9a25b20 -r 7c1a8b36b729 orpg/dieroller/rollers/alternity.py --- a/orpg/dieroller/rollers/alternity.py Sat Jan 23 03:47:58 2010 -0600 +++ b/orpg/dieroller/rollers/alternity.py Mon Jan 25 10:03:16 2010 -0600 @@ -25,9 +25,12 @@ # between the source and the intrepretor. IF, ELIF statements have been replaced with dictionaries, # unused objects have been replace with re-usable objects, and the code has been condensed. # -# SEG: JAN 21 2010 - v.1.2 O'Flux Release: +# SEG: JAN 24 2010 - v.1.4 O'Flux Release: # Edits & Additions: fixed a few minor bugs; Damage roll & Display Issues. # Added Secondary Damage Calculation and Display. Fix all errors. +# Added proper results for Critcal Successes with failure ==> final Result Ordinary Success +# Removed reduntent Method to make parent class true with all others working as child. +# Made all special output same colour codes font size. Cleaned out old commented lines. # Tested for Traipse on Win 7 # # Skill Check Example: @@ -55,7 +58,7 @@ from time import time, clock from orpg.dieroller.base import di, die_base, die_rollers -## from orpg.tools.orpg_log import debug +##from orpg.tools.orpg_log import debug __version__ = "$Id: alternity.py,v 0.1 2003/01/02 12:00:00 cchriss Exp $" @@ -100,13 +103,17 @@ def getRolLStr(self): myStr = "[" + str(self.data[0]) self.d20 = self.sum() - amod = self.getMod(self.mod) - self.dieRoll = self.d20 + amod + self.amod = self.getMod(self.mod) + +## varN = "self.amod" +## debug(varN) +## debug(self.amod) ## seg added debug output + + self.dieRoll = self.d20 + self.amod for a in self.data[1:]: myStr += "," myStr += str(a) - myStr += "," + str(amod) + "] = (" + str(self.dieRoll) + ")" -## if ( self.d20 == 1 ): self.success = 'CS' # seg - removed - unneeded ** # + myStr += "," + str(self.amod) + "] = (" + str(self.dieRoll) + ")" if ( self.dieRoll <= self.score / 4 ): self.success = 'A' elif ( self.dieRoll <= self.score / 2 ): self.success = 'G' elif ( self.dieRoll <= self.score ): self.success = 'O' @@ -116,14 +123,23 @@ def __str__(self): myStr = self.getRolLStr() - successes = {'CS': " CRITICAL SUCCESS", - 'CF': " CRITICAL FAILURE", - 'A': " AMAZING Success", - 'G': " Good Success", - 'O': " Ordinary Success", - 'F': " failure"} + +## varN = "myStr" +## debug(varN) +## debug(myStr) ## seg added debug output + + successes = {'CS': " CRITICAL SUCCESS", + 'CF': " CRITICAL FAILURE", + 'A': " AMAZING Success", + 'G': " Good Success", + 'O': " Ordinary Success", + 'F': " failure"} + if ( self.d20 == 1 ): myStr += successes['CS'] # SEG Dec 19 2009 myStr += successes[self.success] + if ( self.d20 == 1 ) and (self.success == 'F') : + myStr += " final result ==> " + myStr += successes['O'] # SEG JAN 23 2010 return myStr class at(sk): @@ -146,7 +162,11 @@ droll = str(dmgroll[0]) xyz = droll.split('(') secD = (int(xyz[1][:-1])/2) ## SEG* Calculate Secondary Damage -## debug(secD) ## seg added debug output + +## varN = "secD" +## debug(varN) +## debug(secD) ## seg added debug output + dtype = dmgroll[1] astr += droll if dtype=="s": astr += " stun
" @@ -160,13 +180,25 @@ def __str__(self): myStr = self.getRolLStr() + +## varN = "myStr" +## debug(varN) +## debug(myStr) ## seg added debug output + successes = {'CS': " CRITICAL SUCCESS", 'CF': " CRITICAL FAILURE", 'A': " AMAZING HIT
", 'G': " Good HIT
", 'O': " Ordinary HIT
", 'F': " miss"} - if ( self.d20 == 1 ): myStr += successes['CS'] # SEG Dec 19 2009 + if ( self.d20 == 1 ): + myStr += successes['CS'] # SEG Dec 19 2009 + + if ( self.d20 == 1 ) and (self.success == 'F') : + myStr += successes['F'] # SEG JAN 23 2010 + myStr += " final result ==> " + self.success = 'O' + myStr += successes[self.success] if self.success == 'A': myStr += self.getdmg(self.dmga) elif self.success == 'G': myStr += self.getdmg(self.dmgg) @@ -177,33 +209,28 @@ def __init__(self,source=[],sc=10,mod=0): sk.__init__(self,source,sc,mod) - def GetRoLLStr(self): - myStr = "[" + str(self.data[0]) - self.d20 = self.sum() - amod = self.getMod(self.mod) - self.dieRoll = self.d20 + amod - for a in self.data[1:]: - myStr += "," - myStr += str(a) - myStr += "," + str(amod) + "] = (" + str(self.dieRoll) + ")" - if ( self.dieRoll <= self.score / 4 ): self.success = 'A' - elif ( self.dieRoll <= self.score / 2 ): self.success = 'G' - elif ( self.dieRoll <= self.score ): self.success = 'O' - else: self.success = 'F' - if ( self.d20 == 20 ): self.success = 'CF' - return myStr + def __str__(self): + myStr = self.getRolLStr() - def __str__(self): - myStr = self.GetRoLLStr() +## varN = "myStr" +## debug(varN) +## debug(myStr) ## seg added debug output + myStr = " ACTION CHECK : "+myStr - successes = {'CS': " CRITICAL SUCCESS", - 'CF': " CRITICAL FAILURE
-2 Step make up bonus next Action Check", - 'A': " AMAZING Success", - 'G': " Good Success", - 'O': " Ordinary Success", - 'F': " Marginal failure
-1 Step make up bonus next Action Check"} + successes = {'CS': " CRITICAL SUCCESS", + 'CF': " CRITICAL FAILURE
-2 Step make up bonus next Action Check", + 'A': " AMAZING Success", + 'G': " Good Success", + 'O': " Ordinary Success", + 'F': " Marginal failure"} if ( self.d20 == 1 ): myStr += successes['CS'] # SEG Dec 19 2009 myStr += successes[self.success] + if ( self.d20 == 1 ) and (self.success == 'F') : + myStr += " final result ==> " + myStr += successes['O'] # SEG JAN 23 2010 + if ( self.d20 != 1 ) and (self.success == 'F') : + myStr += "
-1 Step make up bonus next Action Check" + return myStr diff -r 043ce9a25b20 -r 7c1a8b36b729 orpg/gametree/nodehandlers/rpg_grid.py --- a/orpg/gametree/nodehandlers/rpg_grid.py Sat Jan 23 03:47:58 2010 -0600 +++ b/orpg/gametree/nodehandlers/rpg_grid.py Mon Jan 25 10:03:16 2010 -0600 @@ -30,6 +30,7 @@ from core import * from forms import * +from orpg.tools.orpg_log import debug class rpg_grid_handler(node_handler): """ Node handler for rpg grid tool @@ -87,16 +88,20 @@ html_str += "" text = c.text if text == None or text == '': text = '
' + s = component.get('chat').ParseMap(text, self.xml) + s = component.get('chat').NormalizeParse(s) + try: text = str(eval(s)) + except: text = s html_str += text + "" html_str += "" html_str += "" return html_str def get_design_panel(self,parent): - return rpg_grid_edit_panel(parent,self) + return rpg_grid_edit_panel(parent, self) def get_use_panel(self,parent): - return rpg_grid_panel(parent,self) + return rpg_grid_panel(parent, self) def get_size_constraint(self): return 1 @@ -194,7 +199,8 @@ to begin editing. Set the focus to the edit control. *Must Override* """ - self.startValue = grid.GetTable().GetValue(row, col) + #self.startValue = grid.GetTable().GetValue(row, col) + self.startValue = grid.get_value(row, col) self._tc.SetValue(self.startValue) self._tc.SetInsertionPointEnd() self._tc.SetFocus() @@ -213,7 +219,6 @@ if val != self.startValue: changed = True grid.GetTable().SetValue(row, col, val) # update the table - self.startValue = '' self._tc.SetValue('') return changed @@ -265,11 +270,11 @@ class rpg_grid(wx.grid.Grid): """grid for attacks""" - def __init__(self, parent, handler): + def __init__(self, parent, handler, mode): wx.grid.Grid.__init__(self, parent, -1, style=wx.SUNKEN_BORDER | wx.WANTS_CHARS) self.parent = parent self.handler = handler - + self.mode = mode self.RegisterDataType(wx.grid.GRID_VALUE_STRING, wx.grid.GridCellStringRenderer(),MyCellEditor()) self.rows = handler.grid.findall('row') @@ -286,7 +291,6 @@ self.Bind(wx.grid.EVT_GRID_COL_SIZE, self.on_col_size) self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.on_leftdclick) - def on_leftdclick(self,evt): if self.CanEnableCellControl(): self.EnableCellEditControl() @@ -304,6 +308,7 @@ cells = self.rows[row].findall('cell') cells[col].text = value if col == 0: self.handler.refresh_rows() + for i in range(0,len(self.rows)): self.refresh_row(i) def set_col_widths(self): cells = self.rows[0].findall('cell') @@ -313,13 +318,17 @@ self.SetColSize(i,size) except: continue - def refresh_row(self,rowi): + def refresh_row(self, rowi): cells = self.rows[rowi].findall('cell') for i in range(0,len(cells)): text = cells[i].text if text == None or text == '': text = '' cells[i].text = text + if self.mode == 0: + s = component.get('chat').ParseMap(text, self.handler.xml) + try: text = str(eval(s)) + except: text = s self.SetCellValue(rowi,i,text) def add_row(self,evt=None): @@ -359,6 +368,10 @@ self.DeleteCols(num-1,1) self.set_col_widths() + def get_value(self, row, col): + cells = self.rows[row].findall('cell') + return cells[col].text + G_TITLE = wx.NewId() GRID_BOR = wx.NewId() @@ -366,7 +379,7 @@ def __init__(self, parent, handler): wx.Panel.__init__(self, parent, -1) self.handler = handler - self.grid = rpg_grid(self, handler) + self.grid = rpg_grid(self, handler, mode=0) label = handler.xml.get('name') self.main_sizer = wx.BoxSizer(wx.VERTICAL) self.main_sizer.Add(wx.StaticText(self, -1, label+": "), 0, wx.EXPAND) @@ -388,7 +401,7 @@ wx.Panel.__init__(self, parent, -1) self.handler = handler self.parent = parent - self.grid = rpg_grid(self,handler) + self.grid = rpg_grid(self,handler, mode=1) self.main_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, "Grid"), wx.VERTICAL) self.title = wx.TextCtrl(self, G_TITLE, handler.xml.get('name')) @@ -462,6 +475,8 @@ complete = complete[:len(complete)-2] + '::'+'('+row+','+col+')'+complete[len(complete)-2:] col = self.grid.GetGridCursorCol() row = self.grid.GetGridCursorRow() + temp_value = self.grid.GetCellValue(row, col) + complete = temp_value + complete self.grid.SetCellValue(row, col, complete) cells = self.grid.rows[row].findall('cell') cells[col].text = complete @@ -505,6 +520,8 @@ else: col = self.grid.GetGridCursorCol() row = self.grid.GetGridCursorRow() + temp_value = self.grid.GetCellValue(row, col) + complete = temp_value + complete self.grid.SetCellValue(row, col, complete) cells = self.grid.rows[row].findall('cell') cells[col].text = complete @@ -527,3 +544,15 @@ if txt != "": self.handler.xml.set('name',txt) self.handler.rename(txt) + + def refresh_row(self,rowi): + cells = self.rows[rowi].findall('cell') + for i in range(0,len(cells)): + text = cells[i].text + #s = component.get('chat').ParseMap(s, self.handler.xml) + #try: text = str(eval(s)) + #except: text = s + if text == None or text == '': + text = '' + cells[i].text = text + self.SetCellValue(rowi,i,text) diff -r 043ce9a25b20 -r 7c1a8b36b729 orpg/orpg_version.py --- a/orpg/orpg_version.py Sat Jan 23 03:47:58 2010 -0600 +++ b/orpg/orpg_version.py Mon Jan 25 10:03:16 2010 -0600 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Beta" DIS_VER = "Ornery Orc" -BUILD = "100123-02" +BUILD = "100125-00" # This version is for network capability. PROTOCOL_VERSION = "1.2"