changeset 173:0dde29a41614 alpha

Traipse Alpha 'OpenRPG' {100107-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 (Keeping up with 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 Added 7th Sea die roller method; 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)]. Includes support for Mythos roller New EZ_Tree Reference system. Push a button, Traipse the tree, get a reference (Alpha!!) 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 Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to prevent non updated clients from ruining the fix. default_manifest.xml renamed to default_upmana.xml Fix to Update Manager; cleaner clode for saved repositories Fixes made to Settings Panel and no 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
author sirebral
date Thu, 07 Jan 2010 01:53:12 -0600
parents b7206781c254
children ff6cbd2b7620
files orpg/chat/chatwnd.py orpg/gametree/gametree.py orpg/gametree/nodehandlers/containers.py orpg/gametree/nodehandlers/core.py orpg/gametree/nodehandlers/forms.py orpg/gametree/nodehandlers/rpg_grid.py orpg/orpg_version.py orpg/tools/orpg_settings.py
diffstat 8 files changed, 267 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/chat/chatwnd.py	Thu Jan 07 01:53:12 2010 -0600
@@ -1971,12 +1971,12 @@
     def resolution(self, node):
         if self.passed == False:
             self.passed = True
-            if node.get('class') == 'textctrl_handler': self.data = str(node.find('text').text)
+            if node.get('class') == 'textctrl_handler': s = str(node.find('text').text)
             else: self.data = 'Nodehandler for '+ node.get('class') + ' not done!' or 'Invalid Reference!'
         else:
             self.data = ''
             pass
-        self.data = self.ParseMap(self.data, node)
+        self.data = self.ParseMap(s, node)
 
     def ParseMap(self, s, node):
         """Parses player input for embedded nodes rolls"""
@@ -2018,9 +2018,9 @@
         value = ""
         path = s.split('::')
         depth = len(path)
-        self.gametree = component.get('tree')
+        self.gametree = component.get('tree_back')
         try: node = self.gametree.tree_map[path[0]]['node']
-        except: return self.data
+        except Exception, e: return self.data
         if node.get('class') in ('dnd35char_handler', "SWd20char_handler", "d20char_handler", "dnd3echar_handler"): self.resolve_cust_loop(node, path, 1, depth)
         elif node.get('class') == 'rpg_grid_handler': self.resolve_grid(node, path, 1, depth)
         else: self.resolve_loop(node, path, 1, depth)
--- a/orpg/gametree/gametree.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/gametree/gametree.py	Thu Jan 07 01:53:12 2010 -0600
@@ -25,6 +25,15 @@
 #
 # Description: The file contains code fore the game tree shell
 #
+# Traipse EZ_Tree Reference System (TaS - Prof.Ebral):
+#
+# The new EZ_Tree Reference System being implemented takes full advantage of 
+# Python's OOP Language. The entire tree code is being reused, but a new ID is 
+# being created which 'shuts off' some of the features of the tree and adds new ones.
+# This new feature will allow users to quickly add a Reference button to new node
+# handlers. The button will show a faximile of the tree and users can then create a
+# node reference with ease!
+#
 
 from __future__ import with_statement
 
@@ -78,29 +87,32 @@
 TOP_SAVE_TREE_AS = wx.NewId()
 TOP_TREE_PROP = wx.NewId()
 TOP_FEATURES = wx.NewId()
+EZ_REF = wx.NewId()
 
 class game_tree(wx.TreeCtrl):
     
     def __init__(self, parent, id):
-        wx.TreeCtrl.__init__(self,parent,id,  wx.DefaultPosition, 
+        wx.TreeCtrl.__init__(self,parent,id, wx.DefaultPosition, 
                 wx.DefaultSize,style=wx.TR_EDIT_LABELS | wx.TR_HAS_BUTTONS)
         self.chat = component.get('chat')
         self.session = component.get('session')
         self.mainframe = component.get('frame')
+        self.ez_ref = True if id == EZ_REF else False
         self.build_img_list()
-        self.build_std_menu()
+        if not self.ez_ref: self.build_std_menu()
         self.nodehandlers = {}
         self.nodes = {}
         self.init_nodehandlers()
-        self.Bind(wx.EVT_LEFT_DCLICK, self.on_ldclick)
-        self.Bind(wx.EVT_RIGHT_DOWN, self.on_rclick)
-        self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.on_drag, id=id)
-        self.Bind(wx.EVT_LEFT_UP, self.on_left_up)
-        self.Bind(wx.EVT_LEFT_DOWN, self.on_left_down)
-        self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.on_label_change, id=self.GetId())
-        self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.on_label_begin, id=self.GetId())
-        self.Bind(wx.EVT_CHAR, self.on_char)
-        self.Bind(wx.EVT_KEY_UP, self.on_key_up)
+        if not self.ez_ref:
+            self.Bind(wx.EVT_LEFT_DCLICK, self.on_ldclick)
+            self.Bind(wx.EVT_RIGHT_DOWN, self.on_rclick)
+            self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.on_drag, id=id)
+            self.Bind(wx.EVT_LEFT_UP, self.on_left_up)
+            self.Bind(wx.EVT_LEFT_DOWN, self.on_left_down)
+            self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.on_label_change, id=self.GetId())
+            self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.on_label_begin, id=self.GetId())
+            self.Bind(wx.EVT_CHAR, self.on_char)
+            self.Bind(wx.EVT_KEY_UP, self.on_key_up)
         self.id = 1
         self.dragging = False
         self.last_save_dir = dir_struct["user"]
@@ -108,7 +120,13 @@
 
         #Create tree from default if it does not exist
         validate.config_file("tree.xml","default_tree.xml")
-        component.add("tree", self)
+
+        ## The EZ_Tree Reference creates a duplicate component called tree_back. This is because the
+        ## tree wont parse fully without adding the component, and when a dupplicate component is created
+        ## the older one is deleted. If there are an C++ errors the tree_back can be used as a failsafe
+
+        if not self.ez_ref: component.add("tree", self); component.add('tree_back', self) ## Fail Safe
+        component.add('tree', self)
 
         #build tree
         self.root = self.AddRoot("Game Tree", self.icons['gear'])
@@ -206,7 +224,6 @@
             validate.config_file("tree.xml","default_tree.xml")
             self.load_tree(error=1)
             return
-
     
     def load_tree(self, filename=dir_struct["user"]+'tree.xml', error=0):
         settings.change("gametree", filename)
@@ -662,6 +679,7 @@
         if parent_node == self.root:
             self.tree_map[xml_element.get('name')] = {}
             self.tree_map[xml_element.get('name')]['node'] = xml_element
+            xml_element.set('map', '')
         if parent_node != self.root:
             ## Loading XML seems to lag on Grids and Images need a cache for load speed ##
             family_tree = self.get_tree_map(parent_node)
--- a/orpg/gametree/nodehandlers/containers.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/gametree/nodehandlers/containers.py	Thu Jan 07 01:53:12 2010 -0600
@@ -105,7 +105,7 @@
     def load_children(self):
         self.atts = None
         for child_xml in self.xml:
-            if child_xml.get == "group_atts": #having the group attributes as a child is bad!
+            if child_xml.tag == "group_atts": #having the group attributes as a child is bad!
                 self.xml.remove(child_xml)
             elif child_xml: self.tree.load_xml(child_xml, self.mytree_node)
         if not self.xml.get('cols'): self.xml.set('cols', '1')
@@ -201,10 +201,10 @@
         container_handler.__init__(self, xml, tree_node)
 
     def get_design_panel(self,parent):
-        return tabbed_edit_panel(parent, self)
+        return tabbed_panel(parent, self, 1)
 
     def get_use_panel(self,parent):
-        return tabbed_panel(parent, self, 1)
+        return tabbed_panel(parent, self, 0)
 
 
 class tabbed_panel(orpgTabberWnd):
@@ -217,6 +217,7 @@
 
     def pick_panel(self, treenode, mode):
         node = self.handler.tree.GetPyData(treenode)
+
         if mode == 1: panel = node.get_design_panel(self)
         else: panel = node.get_use_panel(self)
         name = node.xml.get("name")
@@ -262,7 +263,7 @@
     def load_children(self):
         self.atts = None
         for child_xml in self.xml:
-            if child_xml.tag == "splitter_atts": self.xml.remove(child_xml) #Same here!
+            if child_xml.tag == "splitter_atts": print 'splitter_atts exist!'; self.xml.remove(child_xml) #Same here!
             elif child_xml: self.tree.load_xml(child_xml,self.mytree_node)
         if not self.xml.get('horizontal'): self.xml.set('horizontal', '0')
 
@@ -270,7 +271,7 @@
         return self.build_splitter_wnd(parent, 1)
 
     def get_use_panel(self,parent):
-        return self.build_splitter_wnd(parent, 2)
+        return self.build_splitter_wnd(parent, 0)
 
     def on_drop(self,evt):
         drag_obj = self.tree.drag_obj
--- a/orpg/gametree/nodehandlers/core.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/gametree/nodehandlers/core.py	Thu Jan 07 01:53:12 2010 -0600
@@ -132,7 +132,7 @@
         self.myeditor.Thaw()
         return True
 
-    def on_use(self,evt):
+    def on_use(self, evt):
         try:
             self.mywindow.Show()
             self.mywindow.Raise()
@@ -423,7 +423,6 @@
 
     def on_design(self,evt):
         tlist = ['Title','URL']
-        print "design filename",self.xml.get('name')
         vlist = [self.xml.get("name"),
                  self.file_node.get("url")]
         dlg = orpgMultiTextEntry(self.tree.GetParent(),tlist,vlist,"File Loader Edit")
--- a/orpg/gametree/nodehandlers/forms.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/gametree/nodehandlers/forms.py	Thu Jan 07 01:53:12 2010 -0600
@@ -32,6 +32,7 @@
 import orpg.minidom as minidom
 from orpg.orpg_xml import xml
 from wx.lib.scrolledpanel import ScrolledPanel
+from orpg.tools.settings import settings
 
 def bool2int(b):
     #in wxPython 2.5+, evt.Checked() returns True or False instead of 1.0 or 0.
@@ -281,6 +282,7 @@
 F_RAW_SEND = wx.NewId()
 F_HIDE_TITLE = wx.NewId()
 F_TEXT = wx.NewId()
+T_BUT_REF = wx.NewId()
 
 class textctrl_edit_panel(wx.Panel):
     def __init__(self, parent, handler):
@@ -297,6 +299,7 @@
         self.hide_title.SetValue(handler.is_hide_title())
         self.send_button = wx.CheckBox(self, F_SEND_BUTTON, " Send Button")
         self.send_button.SetValue(handler.has_send_button())
+        button_ref = wx.Button(self, T_BUT_REF, "Reference")
 
         sizer.Add(wx.StaticText(self, P_TITLE, "Title:"), 0, wx.EXPAND)
         sizer.Add(self.title, 0, wx.EXPAND)
@@ -305,6 +308,7 @@
         sizer.Add(self.raw_send, 0, wx.EXPAND)
         sizer.Add(self.hide_title, 0, wx.EXPAND)
         sizer.Add(self.send_button, 0 , wx.EXPAND)
+        sizer.Add(button_ref, 0)
         sizer.Add(wx.Size(10,10))
         if handler.is_multi_line():
             sizer_style = wx.EXPAND
@@ -326,6 +330,39 @@
         self.Bind(wx.EVT_CHECKBOX, self.on_raw_button, id=F_RAW_SEND)
         self.Bind(wx.EVT_CHECKBOX, self.on_hide_button, id=F_HIDE_TITLE)
         self.Bind(wx.EVT_CHECKBOX, self.on_send_button, id=F_SEND_BUTTON)
+        self.Bind(wx.EVT_BUTTON, self.on_reference, id=T_BUT_REF)
+
+    ## EZ_Tree Core TaS - Prof.Ebral ##
+    def on_reference(self, evt, car=None):
+        self.do_tree = wx.Frame(self, -1, 'Tree')
+        self.ez_tree = orpg.gametree.gametree
+        self.temp_wnd = self.ez_tree.game_tree(self.do_tree, self.ez_tree.EZ_REF)
+        self.temp_wnd.Bind(wx.EVT_LEFT_DCLICK, self.on_ldclick)
+        self.temp_wnd.load_tree(settings.get("gametree"))
+        self.do_tree.Show()
+
+    def on_ldclick(self, evt):
+        self.rename_flag = 0
+        pt = evt.GetPosition()
+        (item, flag) = self.temp_wnd.HitTest(pt)
+        if item.IsOk():
+            obj = self.temp_wnd.GetPyData(item)
+            self.temp_wnd.SelectItem(item)
+            start = self.handler.xml.get('map').split('::')
+            end = obj.xml.get('map').split('::')
+            x = 0
+            if start[x] == end[x]:
+                try:
+                    while start[x] == end[x]:
+                        del end[x], start[x]
+                        x += 1
+                except: 
+                    complete = "!!"
+                    for e in end: complete += e +'::'
+                    complete = complete + obj.xml.get('name') + '!!'
+            self.text.AppendText(complete); self.on_text(evt)
+        self.do_tree.Destroy()
+    #####                        #####
 
     def on_text(self,evt):
         id = evt.GetId()
@@ -377,12 +414,21 @@
     """
     def __init__(self,xml,tree_node):
         node_handler.__init__(self,xml,tree_node)
-        self.list = self.xml.find('list')
-        self.options = self.list.findall('option')
+        self.list_reload()
+        #print xml
+        #print self.tree.GetItemParent(tree_node)
         if self.list.get("send_button") == "": self.list.set("send_button","0")
         if self.list.get("hide_title") == "": self.list.set("hide_title","0")
         if self.list.get("raw_mode") == "": self.list.set("raw_mode","0")
 
+    def list_reload(self):
+        self.list = self.xml.find('list')
+        self.options = self.list.findall('option')
+        self.captions = []
+        for opt in self.options:
+            if opt.get('caption') == None: opt.set('caption', '')
+            self.captions.append(opt.get('caption'))
+
     def get_design_panel(self,parent):
         return listbox_edit_panel(parent,self)
 
@@ -454,24 +500,39 @@
         for opt in self.options: opts.append(opt.text)
         return opts
 
-    def get_option(self,index):
+    def get_captions(self):
+        captions = []
+        for opt in self.options: captions.append(opt.get("caption"))
+        self.captions = captions
+        return captions
+
+    def get_option(self, index):
         return self.options[index].text
 
-    def add_option(self,opt):
+    def get_caption(self, index):
+        captions = self.get_captions()
+        return captions[index] or ''
+
+    def add_option(self, caption, value):
         elem = Element('option')
         elem.set("value","0")
+        elem.set('caption', caption)
         elem.set("selected","0")
-        elem.text = opt
+        elem.text = value
         self.list.append(elem)
-        self.options = self.list.findall('option')
+        self.list_reload()
 
     def remove_option(self,index):
         self.list.remove(self.options[index])
-        self.options = self.list.findall('option')
+        self.list_reload()
 
-    def edit_option(self,index,value):
+    def edit_option(self, index, value):
         self.options[index].text = value
 
+    def edit_caption(self, index, value):
+        self.options[index].set('caption', value)
+        self.captions[index] = value
+
     def has_send_button(self):
         if self.list.get("send_button") == '0': return False
         else: return True
@@ -518,7 +579,12 @@
         wx.Panel.__init__(self, parent, -1)
         self.handler = handler
         self.chat = handler.chat
-        opts = handler.get_options()
+        opts = []
+        values = handler.get_options()
+        captions = handler.get_captions()
+        for value in values:
+            if captions[values.index(value)] != '': opts.append(captions[values.index(value)])
+            else: opts.append(value)
         cur_opt = handler.get_selected_text()
         type = handler.get_type()
         label = handler.xml.get('name')
@@ -571,20 +637,28 @@
 
 BUT_ADD = wx.NewId()
 BUT_REM = wx.NewId()
+BUT_REF = wx.NewId()
 BUT_EDIT = wx.NewId()
 F_TYPE = wx.NewId()
 F_NO_TITLE = wx.NewId()
+LIST_CTRL = wx.NewId()
 
 class listbox_edit_panel(wx.Panel):
     def __init__(self, parent, handler):
         wx.Panel.__init__(self, parent, -1)
         self.handler = handler
+        self.parent = parent
         sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, "List Box Properties"), wx.VERTICAL)
 
         self.text = wx.TextCtrl(self, P_TITLE, handler.xml.get('name'))
 
-        opts = handler.get_options()
-        self.listbox = wx.ListBox(self, F_LIST, choices=opts, style=wx.LB_HSCROLL|wx.LB_SINGLE|wx.LB_NEEDED_SB)
+        self.listbox = wx.ListCtrl(self, LIST_CTRL, style=wx.LC_REPORT)
+        self.listbox.InsertColumn(0, 'Caption')
+        self.listbox.InsertColumn(1, 'Value')
+        self.listbox.SetColumnWidth(0, 75)
+        self.listbox.SetColumnWidth(1, 300)
+        self.reload_options()
+
         opts = ['Drop Down', 'List Box', 'Radio Box', 'Check List']
         self.type_radios = wx.RadioBox(self,F_TYPE,"List Type",choices=opts)
         self.type_radios.SetSelection(handler.get_type())
@@ -636,11 +710,79 @@
         self.handler.set_type(evt.GetInt())
 
     def on_add(self,evt):
-        dlg = wx.TextEntryDialog(self, 'Enter option?','Add Option', '')
-        if dlg.ShowModal() == wx.ID_OK:
-            self.handler.add_option(dlg.GetValue())
-        dlg.Destroy()
+        self.dlg = wx.Frame(self, -1, 'Text', size=(300,150))
+        edit_panel = wx.Panel(self.dlg, -1)
+        sizer = wx.GridBagSizer(1, 2)
+        edit_panel.SetSizer(sizer)
+        caption_text = wx.StaticText(edit_panel, -1, 'Caption')
+        self.caption_entry = wx.TextCtrl(edit_panel, -1, '')
+        value_text = wx.StaticText(edit_panel, -1, 'Value') 
+        self.value_entry = wx.TextCtrl(edit_panel, -1, '')
+        button_ok = wx.Button(edit_panel, wx.ID_OK)
+        button_cancel = wx.Button(edit_panel, wx.ID_CANCEL)
+        button_ref = wx.Button(edit_panel, BUT_REF, "Reference")
+        sizer.Add(caption_text, (0,0))
+        sizer.Add(self.caption_entry, (0,1), span=(1,3), flag=wx.EXPAND)
+        sizer.Add(value_text, (1,0))
+        sizer.Add(self.value_entry, (1,1), span=(1,3), flag=wx.EXPAND)
+        sizer.Add(button_ok, (3,0))
+        sizer.Add(button_cancel, (3,1))
+        sizer.Add(button_ref, (3,2), flag=wx.EXPAND)
+        self.Bind(wx.EVT_BUTTON, self.on_reference, id=BUT_REF)
+        self.Bind(wx.EVT_BUTTON, self.on_add_option, id=wx.ID_OK)
+        self.Bind(wx.EVT_BUTTON, self.on_edit_cancel, id=wx.ID_CANCEL)
+        self.dlg.Show()
+
+    def on_add_option(self, evt):
+        self.handler.add_option(self.caption_entry.GetValue(), self.value_entry.GetValue())
         self.reload_options()
+        self.dlg.Destroy()
+        return
+
+    ## EZ_Tree Core TaS - Prof.Ebral ##
+    def on_reference(self, evt, car=None):
+        self.do_tree = wx.Frame(self, -1, 'Tree')
+        self.ez_tree = orpg.gametree.gametree
+        self.temp_wnd = self.ez_tree.game_tree(self.do_tree, self.ez_tree.EZ_REF)
+        self.temp_wnd.Bind(wx.EVT_LEFT_DCLICK, self.on_ldclick)
+        self.temp_wnd.load_tree(settings.get("gametree"))
+        self.do_tree.Show()
+
+    def on_ldclick(self, evt):
+        self.rename_flag = 0
+        pt = evt.GetPosition()
+        (item, flag) = self.temp_wnd.HitTest(pt)
+        if item.IsOk():
+            obj = self.temp_wnd.GetPyData(item)
+            self.temp_wnd.SelectItem(item)
+            start = self.handler.xml.get('map').split('::')
+            end = obj.xml.get('map').split('::')
+            x = 0
+            if start[x] == end[x]:
+                try:
+                    while start[x] == end[x]:
+                        del end[x], start[x]
+                        x += 1
+                except: 
+                    complete = "!!"
+                    for e in end: complete += e +'::'
+                    complete = complete + obj.xml.get('name') + '!!'
+            self.value_entry.SetValue(complete); self.reload_options()
+        self.do_tree.Destroy()
+    #####                        #####
+
+    def on_edit_ok(self, evt):
+        self.handler.edit_caption(self.index, self.caption_entry.GetValue())
+        self.handler.edit_option(self.index, self.value_entry.GetValue())
+        self.reload_options()
+        self.dlg.Destroy()
+        component.add('tree', component.get('tree_back')) ## Backup
+        return
+
+    def on_edit_cancel(self, evt):
+        self.dlg.Destroy()
+        component.add('tree', component.get('tree_back')) ## Backup
+        return
 
     def on_remove(self,evt):
         index = self.listbox.GetSelection()
@@ -649,19 +791,37 @@
             self.reload_options()
 
     def on_edit(self,evt):
-        index = self.listbox.GetSelection()
-        if index >= 0:
-            txt = self.handler.get_option(index)
-            dlg = wx.TextEntryDialog(self, 'Enter option?','Edit Option', txt)
-            if dlg.ShowModal() == wx.ID_OK:
-                self.handler.edit_option(index,dlg.GetValue())
-            dlg.Destroy()
-            self.reload_options()
+        self.index = self.listbox.GetFocusedItem()
+        if self.index >= 0:
+            self.dlg = wx.Frame(self, -1, 'Text', size=(300,150))
+            edit_panel = wx.Panel(self.dlg, -1)
+            sizer = wx.GridBagSizer(1, 2)
+            edit_panel.SetSizer(sizer)
+            caption_text = wx.StaticText(edit_panel, -1, 'Caption')
+            self.caption_entry = wx.TextCtrl(edit_panel, -1, self.handler.get_caption(self.index))
+            value_text = wx.StaticText(edit_panel, -1, 'Value') 
+            self.value_entry = wx.TextCtrl(edit_panel, -1, self.handler.get_option(self.index))
+            button_ok = wx.Button(edit_panel, wx.ID_OK)
+            button_cancel = wx.Button(edit_panel, wx.ID_CANCEL)
+            button_ref = wx.Button(edit_panel, BUT_REF, "Reference")
+            sizer.Add(caption_text, (0,0))
+            sizer.Add(self.caption_entry, (0,1), span=(1,3), flag=wx.EXPAND)
+            sizer.Add(value_text, (1,0))
+            sizer.Add(self.value_entry, (1,1), span=(1,3), flag=wx.EXPAND)
+            sizer.Add(button_ok, (3,0))
+            sizer.Add(button_cancel, (3,1))
+            sizer.Add(button_ref, (3,2), flag=wx.EXPAND)
+            self.Bind(wx.EVT_BUTTON, self.on_reference, id=BUT_REF)
+            self.Bind(wx.EVT_BUTTON, self.on_edit_ok, id=wx.ID_OK)
+            self.Bind(wx.EVT_BUTTON, self.on_edit_cancel, id=wx.ID_CANCEL)
+            self.dlg.Show()
 
     def reload_options(self):
-        self.listbox.Clear()
-        for opt in self.handler.get_options():
-            self.listbox.Append(opt)
+        self.listbox.DeleteAllItems()
+        values = self.handler.get_options()
+        captions = self.handler.get_captions()
+        for index in range(len(values)):
+            self.listbox.Append((captions[index], values[index]))
 
     def on_text(self,evt):
         id = evt.GetId()
--- a/orpg/gametree/nodehandlers/rpg_grid.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/gametree/nodehandlers/rpg_grid.py	Thu Jan 07 01:53:12 2010 -0600
@@ -381,6 +381,7 @@
 G_ADD_COL = wx.NewId()
 G_DEL_ROW = wx.NewId()
 G_DEL_COL = wx.NewId()
+G_BUT_REF = wx.NewId()
 
 class rpg_grid_edit_panel(wx.Panel):
     def __init__(self, parent, handler):
@@ -407,6 +408,8 @@
         sizer.Add(wx.Button(self, G_ADD_COL, "Add Column"), 1, wx.EXPAND)
         sizer.Add(wx.Size(10,10))
         sizer.Add(wx.Button(self, G_DEL_COL, "Remove Column"), 1, wx.EXPAND)
+        sizer.Add(wx.Size(10,10))
+        sizer.Add(wx.Button(self, G_BUT_REF, "Reference"), 1)
 
         self.main_sizer.Add(wx.StaticText(self, -1, "Title:"), 0, wx.EXPAND)
         self.main_sizer.Add(self.title, 0, wx.EXPAND)
@@ -426,6 +429,39 @@
         self.Bind(wx.EVT_BUTTON, self.grid.del_col, id=G_DEL_COL)
         self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=GRID_BOR)
         self.Bind(wx.EVT_CHECKBOX, self.on_auto_size, id=G_AUTO_SIZE)
+        self.Bind(wx.EVT_BUTTON, self.on_reference, id=G_BUT_REF)
+
+    ## EZ_Tree Core TaS - Prof.Ebral ##
+    def on_reference(self, evt, car=None):
+        self.do_tree = wx.Frame(self, -1, 'Tree')
+        self.ez_tree = orpg.gametree.gametree
+        self.temp_wnd = self.ez_tree.game_tree(self.do_tree, self.ez_tree.EZ_REF)
+        #self.temp_wnd.Bind(wx.EVT_LEFT_DCLICK, self.on_ldclick) ## Remove for Alpha ##
+        self.temp_wnd.load_tree(settings.get("gametree"))
+        self.do_tree.Show()
+
+    def on_ldclick(self, evt):
+        self.rename_flag = 0
+        pt = evt.GetPosition()
+        (item, flag) = self.temp_wnd.HitTest(pt)
+        if item.IsOk():
+            obj = self.temp_wnd.GetPyData(item)
+            self.temp_wnd.SelectItem(item)
+            start = self.handler.xml.get('map').split('::')
+            end = obj.xml.get('map').split('::')
+            x = 0
+            if start[x] == end[x]:
+                try:
+                    while start[x] == end[x]:
+                        del end[x], start[x]
+                        x += 1
+                except: 
+                    complete = "!!"
+                    for e in end: complete += e +'::'
+                    complete = complete + obj.xml.get('name') + '!!'
+            self.value_entry.SetValue(complete); self.reload_options()
+        self.do_tree.Destroy()
+    #####                        #####
 
     def on_auto_size(self,evt):
         self.handler.set_autosize(bool2int(evt.Checked()))
--- a/orpg/orpg_version.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/orpg_version.py	Thu Jan 07 01:53:12 2010 -0600
@@ -4,7 +4,7 @@
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
 DISTRO = "Traipse Alpha"
 DIS_VER = "Ornery Orc"
-BUILD = "091210-03"
+BUILD = "100107-00"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"
--- a/orpg/tools/orpg_settings.py	Thu Dec 10 22:30:15 2009 -0600
+++ b/orpg/tools/orpg_settings.py	Thu Jan 07 01:53:12 2010 -0600
@@ -129,7 +129,6 @@
 
         for i in xrange(0,len(self.changes)):
             self.settings.set_setting(self.changes[i][0], self.changes[i][1])
-            top_frame = component.get('frame')
 
             ## Settings are now reactive and organized ##
             ok = {'IdleStatusAlias': self.chat.chat_cmds.on_status,
@@ -193,6 +192,7 @@
             self.chat.SystemPost('<b>"' + changes + '"</b> is an invalid roller. Setting roller to <b>"std"</b>')
 
     def colortree_ok(self, changes):
+        top_frame = component.get('frame')
         if changes == '1':
             top_frame.tree.SetBackgroundColour(self.settings.get_setting('bgcolor'))
             top_frame.tree.SetForegroundColour(self.settings.get_setting('textcolor'))
@@ -219,6 +219,7 @@
     def text_ok(self, changes):
         self.chat.chatwnd.SetPage(self.chat.ResetPage())
         self.chat.chatwnd.scroll_down()
+        top_frame = component.get('frame')
         if self.settings.get_setting('ColorTree') == '1':
             top_frame.tree.SetBackgroundColour(self.settings.get_setting('bgcolor'))
             top_frame.tree.SetForegroundColour(self.settings.get_setting('textcolor'))