Menu

Plug In Player Stats, Plug in Object Stats...

2001-09-19
2001-09-22
  • David McCabe

    David McCabe - 2001-09-19

    I am looking to implement a completely new player skill / combat / politic / economy model in a MUD. Having hacked out the heart and soul of CircleMUD I'm at the end of my patience. JaMud looks like a far better solution for such a major rework of the game system itself and so I come here to beg, plead, bribe if necessary in order to find some doco or help on how to use Jamud and these interesting Plug Ins.
    No doubt many "Jaded" individuals will pop up and give me the old "I told you so" but that's to be expected.
    Here's a question to start with...
    How can I "plug in" my code, objects, methods for character attributes and skills, if I actually had written it?

     
    • Christopher (siege) O'Brien

      Wow, that's a lot of question.

      I'm going to answer this as best I can referring to alpha 4 (which was the last thing I posted publicly in the way of code). Keep in mind that I've been reworking all this stuff for alpha 5 which will come out sometime soon. Now with that out of the way...

      Well, let's start at the plugin part. Any class that was built to extend jamud.plugin.JamudPlugin can act as a (you guessed it) plugin. What this means is that two essential methods will be available to the mud itself-- initialize and terminate.

      As for the skill and combat parts; if you have toe commands as you would like the to be, the first step is to figure out how to code them using the public methods of Item and Room and Body. Once you've got the commands written, you need to figure out a way to encapsulate each command (skill, in this case) as its own object which much extend either BodyTrusted or BodyGranted.

      Then, the code for your plugin class only needs to take instances of those command objects and stick them in the command tables (BodyInterpreter.trustedTable and grantedTable, I think).

      Next part: the Body object has a getProperties method which returns a hashtable. You can use this hashtable to store arbitrary values against a key. You can use that to keep any new properties you require with any particular Body for something like an economy (like SSN or feifdom or something can be stored there).

      Hope this gives you somewhat of an idea of how to use these features. I realize right about now that I've done a piss-poor job of documenting them other than the standard API documentation.

      As a warning however, If you're going to really want to get into it with command writing, wait for alpha 5 to come out-- it might save you a considerable amount of headache not to have to re-code things to use MudObjects instead of Rooms and Items and Bodies.

       
    • David McCabe

      David McCabe - 2001-09-19

      So you're recommending I should suspend my need for immediate gratification? :)

      About half of what you've said clicked but I'll digest it more slowly and see if I comprehend it all.

      Before I do that I have yet more questions!

      Will it be easier to remove Class.. er.. Jobs from A5 than it is from A4?
      As combat is likely to take a number of "ticks" does this mean that I will have to change the core code in some way to handle combat?

      Thanks for the response, nice to be able to talk to the developer himself for a change. If I'm lucky I can talk about this to reporters when the demands of fame and fortune have made you cynical and resentful towards your fans.
      "Well I knew him before Jamud took of, before he was a billionaire, back them you see he only had one tongue stud and.." :)

       
    • David McCabe

      David McCabe - 2001-09-19

      I'm full of questions sorry...

      When developing are you using a makefile or similar function to generate the class files and archive them into the jar or am I missing something obvious here. I ask because if I do end up having to play with the core code then my current manual methods might become a little tedious (and error prone).

      More generally and philosophically are you aiming to implement a MUD shell where it is possible for MUD administrators to simply add plug ins to extend the basic functionality you implement? Am I undermining myself if I try to implement components before you've created the basic structure?

      I have to admit I don't understand how a plug in will work in Jamud, the concept escapes me.

       
      • Christopher (siege) O'Brien

        if you downloaded the source right now, there's no makefile or any sort of configuration for a build tool.

        And nobody liked that very much, which is why the work I'm doing on the revisions right now uses ant as a build tool (http://jakarta.apache.org/ant/)

        And the mud as a shell is EXACTLY what I'm aiming for. I have yet to release anything because I don't have anything that is WORKING yet. When I get the current stuff to the point where scripts, commands, and logins are all working again, then I'll post it here.

        The plugins part is weird. Just think of it as this: you write a class, and the mud will load it and run a method on it. Whatever that method does, it doesn't matter-- it can start a server that listens for connections and creates players out of them, it can add commands, it can subscribe for a bunch of events and print them to a file.

         

Log in to post a comment.

MongoDB Logo MongoDB