Writing a dungeons and dragons mod would take a long time. D&D is also very copywrited so i'd not be able to release a direct copy.
My 3.8 forum uses a rpg mod based on the 3.0 rpg integration hack; I'm considering creating something based around that as an addon but thats not likely to happen for some time.
I've uploaded a skeleton plugin file. Things you need to do:
1. rename the directory they are in to your plugin name eg rpgsystem
2. open the two files and change the classnames to match the directory name eg rpgsystemPlugin and rpgsystemAdmin
3. insert a db row into pbpg_plugins containing rpgsystem as the dir and a friendly name for title eg RPG System.
4. Create a new product to go with the plugin for the purpose of holding templates phrases etc
The admin file is fairly simple to understand, I suggest you just take a look at one of my mods for how to make that work.
The plugin file contains three functions:
A constructor which is passed in the config settings saved by the admin. The default constructor will work but you may want to set defaults for values that haven't been set and setup the state of the game (eg the chess mod initiallises the board with the pieces in their starting places)
A public function parsePost it takes one argument the post array as fetched by vbulletin from the db, its called once for each post in the thread. It should essentially behaive as a state machine, changing the object state based on the contents of the post; you can again look at my mods on for examples of how I do this.
An output function, this function is called at the end of processing and its return value is used to replace the postbits part of a thread display. (this means you don't need to worry about navbar, footer etc) I used a template based on the postbit template for my UI's but this is totally upto you. If instead you want to stick a flash video in there showing the two combattants mauling each other, thats upto you.
I am tidying up the interfaces so the above information may change in a next release; the only change i'm considering at the moment is adding an ajaxOutput function or a parameter to the output function for returning content for ajax display but there may be other things based on bugs that need changing.
|