posted on Thursday, December 14, 2006 8:58 AM by Endie

Multiverse - MARS, levels and more

Dragon asked if it is possible to pick and choose elements from Multiverse's MARS object library (a collection of classes which implement a basic graphical DIKU).

Each plug-in of the MARS library is loaded separately, so there is a degree of granularity there: you could replace the objects library (multiverse.mars.objects) with your own, if you so desired (big job, though!).  Similarly, the skills and abilities classes can be extended or replaced.

For instance, if you want to have a priest class who heals for 7 to 10 points per level, you could use the Mars.EffectManager to register an ability thus:

effect = new HealEffect("heal effect");
effect.setMinInstantHeal(7*iCharLevel);
effect.setMaxInstantHeal(10*iCharLevel);

[edit - on reflection, there are better places to do the scaling!]

But you could just as easily alter that code to make it flat-rate, by removing level in the calcs altogether.  That would be a hybrid.  Similarly, you could choose to extent the library with your own variation.  Or in the .py configuration file that loads the server plugins you could simply replace the skills and abilities library with your own version.  This file is pretty key to extending the functionality, and that's where I put my own "Hello World" plugin.

So yes, it seems pretty easy to swap functionality in and out, so long as you're happy messing around with Java.

Comments