Version 6, last updated by davidbyron at April 09, 2010 19:54 UTC

Please, do format this page using markdown

Document 1:

Making a Dev Platform for OpenRPG Development

I wanted to start a page that documents the source code used in OpenRPG. Some of us can program in Python on low level, some of us can program in Python on a high level. The documentation I would like to start will help programmers of all levels to program in Python so they can add their own personal touches to OpenRPG.

The first part of this documentation is Making a Dev Platform. The Dev platform is a copy of OpenRPG that we can edit without the fear of losing our 'stable' version due to bad coding. In order to make this we need to edit a few files to make sure we are calling the correct version of OpenRPG during development. I am running on Ubuntu 8.04 Hardy Heron so my documentation is going to be a little different then the Windows users.

First you will want to make a complete copy of your OpenRPG directory. All of the components of OpenRPG are found in my user folder, so if I just copy that folder to a new folder, "openrpg_dev", I have started. I will then need to change the location from which OpenRPG is called from.


In openrpg_dev\orpg\dirpath\approot.py 
Change the basedir object to 
basedir = "/home/user/openrpg_dev"  

Make sure you replace 'user' with your user account.
In openrpg_dev\OpenRPG\location.py
Change the dyn_dir object to
dyn_dir = "openrpg_dev"

Your last and final step is to open a new port and edit the server_ini.xml file to reflect the new port. This will prevent you from running a server on a duplicate port.

Now you have a Dev Platform and you can mess around with the code and not need to worry about ruining your playing platform.

Vista users can probably install a new version in a different directory.

Documentation 2:

Removing Assembla from the startup process

One problem I had keeping my Dev enhancements was Assembla. Assembla is -not- a big problem, but it does force the files to reload from the Assembla documents. To remove Assembla from the startup process edit your OpenRPG.pyw file to look like this:


#    if cmd != '-n':
#        runpy.run_module('start_release')
#    else:
#        runpy.run_module('start_noupdate')
    runpy.run_module('start_noupdate')

This prevents the software from checking for updates and running a -start_noupdate- version. Then you won't be required to re-save all of your files every time you start OpenRPG. However, if you do run into a critical error, you can re-instate Assembla and the files will be updated back to their original state. Assembla is a good safety feature for developers who don't want to re-install every time they mess up.

Documentation 3:

Don't forget the interpretor!!

I noticed some strange errors while crafting my last update. Everytime I ran OpenRPG I received a Python error, but the software worked through it. Trying hard to discover the error I ran OpenRPG through IDLE. WoW!! No errors. So I ran OpenRPG through my Linux Terminal and WoW! No errors.

Lesson of the day, don't forget that Python tells you where and which kind of error you are producing. If you are having errors from python, you might need to recomplie some PYC files. Also the Interpretor works great if you want to test out a small snippet of code. Remember, the interpretor is our friend.