ago

[RELEASED] Server mod loader + priest + crops + seasons + server packs + bag of holding

Recommended Posts

I noticed serverfixes is still in the modlauncher collection. I thought it ceased to do anything after 1.3.1.x am I correct?

 

Also anyone else getting a entry from /seasons that displays "None is in season"? (Or a reference to none anyhow since time obviously isn't synced across other servers). I see all seasonal items in the list so I can't figure out what this entry might be referring so as I don't see any missing.

Share this post


Link to post
Share on other sites
5 hours ago, LifesaverM said:

I noticed serverfixes is still in the modlauncher collection. I thought it ceased to do anything after 1.3.1.x am I correct?

 

Also anyone else getting a entry from /seasons that displays "None is in season"? (Or a reference to none anyhow since time obviously isn't synced across other servers). I see all seasonal items in the list so I can't figure out what this entry might be referring so as I don't see any missing.

 

Yes, I'm getting that.  I guessed that it's something that has been removed from this harvest time. Checking the calendar...

 

Leaf no longer has Olive in week 1

Omen no longer has anything all month, but used to have Lemon in week 1 and Orange in week 3

Silence no longer has Chestnut in week 3

 

I wonder whether "None" corresponds with one of these?

Edited by Batta

Share this post


Link to post
Share on other sites

Well that is possible but I would like it could still identify the material. I know the calendar and some harvest seasons have changed and they said it would change as our server rotated through the year wouldn't be instant. Basically what I gathered would be that it would take a wurm year to fully change. Not like its a big thing figured once "none" season is over it will disappear, more curious that anything. haha

Share this post


Link to post
Share on other sites

A recent server update changed the way the harvest seasons were accessed. There's now a list of all harvestables with their next start time. And there is an entry for "no harvestable item" (like thorns) with id 0 which is called None. This entry is not filtered and is displayed as an extra item. I'll post a fixed version in the next days which filters "None" from the list.

 

The serverfixes mod still exists but does nothing at this time. I don't plan on removing it anytime in the future as it's pretty handy to add quick fixes.

I may however add some code to bypass the NullPointerException which happens if a template is missing for a custom item in a bulk storage.

 

 

Edited by ago

Share this post


Link to post
Share on other sites

Re: serverfixes - make complete sense to me to why you have it there, just wanted to make sure in its current state is wasn't really doing anything

Thanks for that!

 

Ah I did know about the change but I didn't know about that id 0 entry!  Well then at least we know and it isn't something we really have to worry about. If anyone asks we can tell them to just ignore it. Danke! Obviously nothing critical so whenever its updated its updated, no worries.

Share this post


Link to post
Share on other sites

This action performer doesn't appear to be accessible. Am I right?

@Override
public boolean action(Action action, Creature performer, Item[] targets, short aActionId, float counter) {...}

In WU it's in ItemBehaviour.action(...). Usage of that seems to be only one place in Action.poll():

this.done = this.behaviour.action(this, this.performer, targetItems, this.action, this.counter);

As far as I can tell that poll statement will only get called when Action object is created with the constructor containing long[].

Share this post


Link to post
Share on other sites

Our very old orange trees are now harvestable, in the season that USED TO be orange harvest season.  The mature and old trees, however, are still a couple of weeks away from season and are not harvestable.  (The overaged trees that we prune back to very old are currently harvestable, after pruning.)  

 

Just an observation.  I'm guessing that's another thing that will happen only for this one full Wurm year cycle. But maybe it's one of the "None" items that is now in season?

 

(I hope that made sense)

Edited by Batta

Share this post


Link to post
Share on other sites

the Item[] action is related to multi-item actions. The only multi-item actions are found in ItemBehaviour for dropping stuff, rotating walls, renaming items and setting prices.I'm not sure how those actions are selected in the client.

 

The server has the entry for orange season for starfall 7 (fires), week 3. The server calculates the harvest dates and stores them in the database. When it starts it reads the old dates from the database. Those dates may still refer to the old seasons if no new dates have been calculated. When a season is over the server will calculate the next harvest start from the hard coded week + 3 days and adding or removing up to two weeks.

The dates display in HarvestHelper are the actual dates the server has calculated and already include the random deviation from the hard coded week..

And "none" is just an artifact. It's the entry for unharvestable trees which have no season start and end time. This shows up as always in season since the "season" starting at day "0" never ends.

 

Share this post


Link to post
Share on other sites

Has anyone succesfully added a third party library.jar to a mod? In my cases it's this: javax.json-api-1.0.jar.

 

I already tried a whole bunch of configurations like this: classpath=MyMod.jar, javax.json-api-1.0.jar

 

I need actual working examples, thank you.

 

I keep getting these errors. I'm assuming modloader can't find the library.

[03:17:54 PM] SEVERE org.gotti.wurmunlimited.serverlauncher.DelegatedLauncher: javax/json/Json
java.lang.NoClassDefFoundError: javax/json/Json

Edited by joedobo

Share this post


Link to post
Share on other sites

A while back I've been working on a mod to add a XMPP server. I've ran into some unclarities with cross-server kingdom chat so this started to collect dust.

However, this mod uses 3rd party libs https://github.com/ago1024/VysperMod/blob/master/src/dist/vyspermod.properties

classname=org.gotti.wurmunlimited.mods.vyspermod.VysperMod
classpath=vyspermod.jar,libs/*.jar

But there may be issues when using the shared class loader.

 

file system layout:

$ unzip -l vyspermod.zip
Archive:  vyspermod.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
       96  2016-05-24 21:37   mods/vyspermod.properties
    58160  2015-08-17 22:05   mods/vyspermod/libs/commons-codec-1.4.jar
   367444  2016-05-25 00:00   mods/vyspermod/libs/log4j-1.2.14.jar
   445619  2016-05-24 20:13   mods/vyspermod/libs/vysper-core-0.7.jar
    26607  2017-07-26 00:52   mods/vyspermod/vyspermod.jar
   279193  2016-05-24 20:13   mods/vyspermod/libs/commons-lang-2.5.jar
        0  2017-07-26 00:52   mods/vyspermod/libs/
   641543  2016-05-24 20:13   mods/vyspermod/libs/mina-core-2.0.2.jar
   750581  2016-05-02 09:26   mods/vyspermod/libs/javassist-3.20.0-GA.jar
    53299  2016-05-24 20:13   mods/vyspermod/libs/nbxml-0.7.jar
    15113  2016-05-25 00:06   mods/vyspermod/libs/spec-compliance-0.7.jar
    71154  2016-05-25 00:00   mods/vyspermod/libs/xep0045-muc-0.7.jar
     8737  2016-05-24 23:13   mods/vyspermod/libs/slf4j-jdk14-1.5.3.jar
        0  2017-07-26 00:52   mods/vyspermod/
    20124  2016-05-24 20:13   mods/vyspermod/libs/slf4j-api-1.5.3.jar
   286355  2016-05-24 20:13   mods/vyspermod/libs/dnsjava-2.0.8.jar
        0  2017-07-26 00:52   mods/
   109043  2015-08-09 21:06   mods/vyspermod/libs/commons-io-1.4.jar
     9597  2016-05-25 00:00   mods/vyspermod/libs/slf4j-log4j12-1.5.3.jar
    64325  2016-05-25 00:00   mods/vyspermod/libs/xep0060-pubsub-0.7.jar
---------                     -------
  3206990                     20 files

 

Share this post


Link to post
Share on other sites

The error might be related to the javax package: https://jboss-javassist.github.io/javassist/html/javassist/Loader.html

Quote

Because of the fact above, this loader delegates only the loading of javassist.Loader and classes included in package java.* and javax.* to the parent class loader. Other classes are directly loaded by this loader.

 

I can probably add some special logic for javax packages which are not part of the jdk.

Share this post


Link to post
Share on other sites

FIXED

classpath=MobSpawnerGMTool.jar,libs/*.jar

my mod path structure here: WU-Server/mods/*modName*/libs/*extra libraries here*

I used this import for Gradle:

// https://mvnrepository.com/artifact/org.glassfish/javax.json
compile group: 'org.glassfish', name: 'javax.json', version: '1.0.4'

 

Here are a couple lessons from this adventure.

1. The format for classpath is important(without the brackets): [exact jar name with jar extention],[exact jar name with jar extention],[etc].   No spaces, lol!

2. I guess some repo's are better then others. I'm not sure why this seeminly unrelated repo is better then what appears to be the offical one here:

// https://mvnrepository.com/artifact/javax.json/javax.json-api
compile group: 'javax.json', name: 'javax.json-api', version: '1.0'

 

Edited by joedobo

Share this post


Link to post
Share on other sites

Hallo ago

 

Have the other mods an update too? because they have all new version numbers.

 

Eject

Share this post


Link to post
Share on other sites

All mods are rebuilt with each version and receive a new tag. If a mod is not listed in the changes then there's no change in that mod.

It's however possible that changes in the server.jar, common.jar or modloader.jar require the recompiled mods.

  • Like 1

Share this post


Link to post
Share on other sites

HHey ago, sorry about the abrupt leaving earlier. I started to say why I didn't like the split of files, then I remembered doh you are working on 2. I don't mess  with the client so it didnt hit at first.

Share this post


Link to post
Share on other sites

Is it intentional that when using the action performer and reusing an existent WU action that we need to do something like the following so the default WU action doesn't get "true" and ending up prematurely ending the action?

 

@Override
public boolean action(Action act, Creature performer, Item source, int tilex, int tiley, 
		boolean onSurface, int heightOffset, int tile, short action, float counter) {
ActionPerformer.super.action(act, performer, source, tilex, tiley, onSurface, heightOffset, 
		tile, action, counter);
return false;
}

I'm working on a mining related mod where a player can mine tile borders to change the opposing corner for a targeted border. I used the default mine action and it broke the default mining methods. I debugged through one cycle and saw that the ActionPerformer.super.action(...) was returning true. Is this because I don't have any other mods using it with the mine action? Lastly, am I going to have to go through the server to find all action method(s) that use the mine action and add something like the code snip above?

My minding mod: https://github.com/Joedobo27/MightyMattockMod/blob/master/src/main/java/com/joedobo27/mmm/MineAction.java

Share this post


Link to post
Share on other sites

No. This is not intentional. The default value of true was chosen to prevent actions from running forever if any of the action() methods was not implemented. But it's quite obvious that this is not useful when adding special behaviour to existing actions.

I'll create another method in ActionPerformer which can be used to configure the default return value. I guess it'll be false for any existing action ids and true for any new action id.

  • Like 1

Share this post


Link to post
Share on other sites

It should be possible to:

1. Overwrite an existing action. I guess this means return true but there is the problem with how some default action get used in multiple action() methods for different behaviour triggers as seen in the Behaviours.class. At first glance it might be useful to be able to configure how the action-performer treats each behaviour in the Behaviours.behaviours hashMap.

 

2. Reuse an existing action and still have the default usages of the action work as expected (assuming the initial logic control for an action method hasn't be compromised).

 

3. Daisy chain custom modded action reusing existent WU action id.

 

4. It would be useful if there was a way to quickly ask modloader how other mods have treated a default WU action id reuse. I foresee issues with this.

 

The following two things aren't very important, it was relevant so I'm tossing them in.

- Anyway you could add the following because the default action entry creator always sets max range to 2 ( it's the only public constructor we can use).

static public void setActionEntryMaxRangeReflect(ActionEntry actionEntry, Integer maxMeters, Logger logger) {
  try {
    ReflectionUtil.setPrivateField(actionEntry,
    ReflectionUtil.getField(Class.forName("com.wurmonline.server.behaviours.ActionEntry"), "maxRange"),
    	maxMeters);
  }catch (ClassNotFoundException | NoSuchFieldException |IllegalAccessException e){
  	logger.warning(e.getMessage());
  }
}

- How do we add custom selected bar graphics for new actions? Bdew's bind all actions mod works well for keybinding.

Edited by joedobo

Share this post


Link to post
Share on other sites

Thats hard, i updated now all mods from the download

the hitchingpost mod destroyed 2 of my gm chars, the transpher option with the wand, and the portals was also not useable

 

my two gm chars (one is the main) was on neighbour servers, i tried to transpher with the wand, than nothing happens and i got "refresh" whil rc the ground

restarting the client, landing at the target server, but with the new char creation window :(

 

disabled the hitchingpost mod and all was working, but the 2 chars still destroyed

 

Eject

Edited by Eject

Share this post


Link to post
Share on other sites

Do you have any logs which could give a hint on what went wrong? The last couple of release were essentially just bugfixes for incorrect and missing actions.

Share this post


Link to post
Share on other sites

correction, is any other mod from the update

i now logged in with another gm char with disabled hitchingpost mod and now this char also become the "new char" window

 

Eject

 

add: do you mean the actiondemo?

Share this post


Link to post
Share on other sites

i dont know why any mod is working on the player database and delete chars

Share this post


Link to post
Share on other sites

None of my mods should delete any player characters. You mentioned server transfers. It might be possible that some mod or the server has problems reconstructing the player data after a server transfer and leaves the character in a broken state. Please provide logs.

Share this post


Link to post
Share on other sites
7 minutes ago, ago said:

Do you have any logs which could give a hint on what went wrong? The last couple of release were essentially just bugfixes for incorrect and missing actions.

i cant see any log where the chars are deleted. have you any tipp where this could be located?

 

Eject

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