Sign in to follow this  
Ubai

Questions about what is possible....

Recommended Posts

Hello,

 

I'm not a Java programmer, but I have done a lot of Lua scripting, Python, and NWscript over the years. I have also done some 3D modeling in Blender and a few other apps, and I have done a bit of modding for NWN1 and 2, as well as a few others. Before I invest any time into Wurm modding I would like to have a sense of what can be done compared to the amount of effort involved.

With that in mind, can anyone answer the following questions in a way that won't make my head explode? :P

* Can new skills be added to the game? I posted the other day about an alternate magic system, I was wondering if I could add a few new magic skills and tie them to the use of objects like magic wands.

 

* related to the above, how hard is it to add new objects to the game (like a magic wand). Obviously, the item would also have to be tied to the skill system as well. Is this doable?

 

* can items be used to cast spells? That is to say can I attach spell-like effects to a magic wand so that it is "casting" the spell rather than the player? I would like the item to check the player's skill of course, as above. A bonus thing would be that each attempt uses spell reagents (eye of newt, toe of frog, that sort of thing).

 

* I read that the recent update does not allow Rifts like WO, but it it possible to set up "invasions" or monster attacks? If you've played 7 Days to Die you may know what I mean, but basically I want semi-random or random attacks on players and their property. Is this something that can be done? I feel weird making a fort if no one is going to bother attacking it. :P

 

Thanks in advance!

Matt

Share this post


Link to post
Share on other sites

Adding skills and items is pretty easy. Adding all kinds of actions (including spells) to items is also easy.

 

Spells... depending on what are they doing. Any kind of new visual effects would probably require a client side mod, and some more advanced knowledge of Java, OpenGL, shaders, etc. to implement.

 

"Invasions"  could be done but would require some work, scripting of that kind (AI, pathfinding, group interactions, etc.) is usually is a lot of pain in the rear to write, and here it would be even more pain since you need to inject it into existing decompiled code with no documentation. But definitely doable.

Share this post


Link to post
Share on other sites

* new items are easy: in Ago's server modloader there is a tool to add new itemTemplates or basicly items: ItemTemplateBuilder.class

 

I think adding new functional use of items is much harder.

1. Potentially new Action(s) and ActionEntry(s)

2. new behaviour classes ( or inject into an existent behavior class) in order to control when actionEntry objects are become available. In other words, when something shows up on the click context menu.

3. new action or methods-for-items classes that control doing the action. Look at MethodsItems.class

I guess if you can find a way to add a new class, say MagicWandBehaviour.class and MethodsMagicWand.class, and tell the server to run them properly you'd wouldn't have to deal with the the Action.class or ItemBehaviour.class. 

 

* spells are just actions essentially. for example from actions.class: public static final short SPELL_ITEMBUFF_QUICKACTIONS = 279.

yes, you can use items to cast spells.

 

* a word of warning about new spells. From the SpellEffect.class

public SpellEffect(final long aOwner, final byte aType, final float aPower, final int aTimeleft, final byte effType, final byte influenceType, final boolean persist)

 

What's important here is that byte value for aType.  I count 123 spells now and a byte can hold up to 127...so there is space for 4 more spells.

 

Edited by joedobo

Share this post


Link to post
Share on other sites

Any chance of changing the single byte for the number of spells to a double? That would allow up to 32767 spells in total.

 

Or would that take too much modification of the entire code?

Edited by Tryst

Share this post


Link to post
Share on other sites

a Java short is ~32k. Java's Double.MAX_VALUE is a huge number.

 

Given that a method's (or constructor in this case) variable types are essential for Java to identify the method I'd think it would require changing the SpellEffect.class constructors (there are 3 of them) and all the "new" instances where those constructors are called.

But it doesn't end there....

ItemSpellEffects.class also strictly deals with spell effects as bytes. Some changes would need to be made there. Also, the data base looks like it might be storing effects as bytes.

Oh but there is some good news! After looking at ItemSpellEffects.class it looks like there are more than 4 slots available. I'm think some spells share the same effect.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this