ago

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

Recommended Posts

ago i really tried everything i can (as a noob to programming XD ) but i coundt get it to work, the window allways just close after starting your bat file.

maybe you can pointing out some possibilitys where i can look to get it run?

thx in advance

bier

Share this post


Link to post
Share on other sites

ago i really tried everything i can (as a noob to programming XD ) but i coundt get it to work, the window allways just close after starting your bat file.

maybe you can pointing out some possibilitys where i can look to get it run?

Try running it from the command prompt (hope this works: press shift and right click the dedicated server folder, select "Open command prompt"). This should keep the error messages around.

Share this post


Link to post
Share on other sites

So ago could you please explain how you fixed it.

I have Java installed and running "java" will actually start the installed Java from "Program Files". So I changed "runtime\bin\java" to "java" in modlauncher.bat and it started to work again. After all it did work without problems from the test folder. So another option is copying the whole dedicated server directory to a different folder and try running it from that folder.

I spent like two hours yesterday chasing that problem and could resolve this only by using a different Java installation. In the end I even uninstalled VirtualBox in case the network interface was messing things up for steam.

Another issue is the long timeout for the Steam network port. After the server was stopped I'm usually not able to use port 27016 again for a couple of minutes. There will be a message that no free port between 27016 and 27016 could be found. If this happens the server seems to have started but is not available in Steam either. This is not a problem of the modloader but a problem with the Stream library. Once this happens I can only wait or change the Steam port to 27017, 27018 and so forth.

Edited by ago

Share this post


Link to post
Share on other sites

Is there anyway you could simply give me the edited files that give priests the abilities to do restricted actions? Me and my friends have a dedicated server and I just have no idea how to use your mod launcher using FTP on the host website. With the Server.jar files it would be a lot simpler for me to replace the old files with the edited one like Keenan did with his stats gain mods.


 


I would be greatly grateful as I know very little of Java scripting and since there's only 3 of us playing, becoming a priest would be a pain and that's a shame.


Edited by Sylias

Share this post


Link to post
Share on other sites

All changes are done at runtime. There are no edited files. This was done on purpose to avoid the need to rebuild the mod after every single update.

The sources of the mod are available on github. Everyone with java knowledge can modify the server.jar with those files.

Edited by ago

Share this post


Link to post
Share on other sites

ago i did like you said and the cmd tells me it cant find the path.... do you know what could be wrong?


 


sorry that this is maybe a bit annoying for you but i really wanna use that mod :D


 


/edit im using jave 8 64bit update 65... dont know if that has something to do with it


Edited by Biervampyr

Share this post


Link to post
Share on other sites

The recent releases will use the bundled java from runtime\bin\java. The first release was checking for java in the search path which may not be available everywhere.

Share this post


Link to post
Share on other sites

I have a DeedMod I've written using this framework. I'll be posting it soon.


 


Current features:


  • Specify number of deeds per SteamID
  • Specify max North+South (Y) and East+West (X) sizes
  • Specify max total tile size
  • Control at which GM power can the restrictions be ignored.

 


Working on upkeep costs at the moment.


 


Any other ideas would be great.


Share this post


Link to post
Share on other sites

kinda weird of an issue here

with 1 of my chars on my own server i keep getting [00:01:33] Religion decreased by NaN to NaN every time i pray(fresh toon meant to become a lib priest) and i have to wait 20 min in between the prayers to gain faith

 

 

now everything else does seem to work fine so i  just figured id let you know incase someone else ends up having something like that pop up that there is a chance something like that happens with the no time in between prays(dont ask why as i have no clue)

Share this post


Link to post
Share on other sites

unlimitedPrayers and noPrayerDelay are off by default. You can change the settings in mods\spellmod.properties

# true: There are no restrictions on the number of faith gains per day# false: Only 5 faith gains per day are possible unlimitedPrayers=true# true: There is no delay between faith gains# false: Prayers only yield faith if they are at least 20 minutes apartnoPrayerDelay=true
I just tested with fresh HOTS character and he's getting proper religion gains. In fact, the mod does not touch the skill gain variables at all.

Do you by chance use any other mod that affects skill gain?

Share this post


Link to post
Share on other sites

I have Java installed and running "java" will actually start the installed Java from "Program Files". So I changed "runtime\bin\java" to "java" in modlauncher.bat and it started to work again.

 

 

it worked like magic lol! i somehow didnt read that part XD

 

thx again for that great mod!!!

Share this post


Link to post
Share on other sites

It was in fact the windows firewall preventing the server from being listed in the client. The bundled java was blocked in the firewall so steam would not list it as a server at all.

Share this post


Link to post
Share on other sites

im really flashed i tried it out several minutes ago and it works like a charm in singleplayer XD

really big big thanks for that great mod!

Share this post


Link to post
Share on other sites

Dunno if this is the right place for it, but here's something that's been baking my noodle:  In MethodsItems.java (com.wurmonline.server.behaviors) there's 3 methods, "improveItem", "polishItem" and "temper", all of which seem to be improving-related.  The catch is, in each one there's checks for if the performer is a priest, and if so, it applies a penalty (ranging from a flat penalty to negating any positive bonuses, there's multiple such checks/penalties in each method).  What's been baking my noodle is how to override / shut off this behavior using the superior reflection / external mod system you have going, rather than editing MethodsItems.java.  Anyone have any thoughts or punts into the correct forum/topic?


Share this post


Link to post
Share on other sites

Can this be patched to include a config option for the command line to select which server folder to start much like the Start=GameName option for the exe?  Your wrapper only starts the exe, and does not allow for headless application.


Share this post


Link to post
Share on other sites

Can this be patched to include a config option for the command line to select which server folder to start much like the Start=GameName option for the exe?  Your wrapper only starts the exe, and does not allow for headless application.

sure. It just needs to pass the script arguments to the java call

runtime\bin\java "-Dworkdir=%CD%" "-Djava.library.path=%CD%\nativelibs" -Xmn256M -Xms512m -Xmx2048m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar "%1" "%2 "%3"
the run with modlauncher "Start=ServerName"

The quotation marks are important. The commandline interpreter otherwise splits the argument at the equals sign.

Share this post


Link to post
Share on other sites

runtime\bin\java -Dworkdir=%CD% -Djava.library.path=%CD%\nativelibs -Xmn256M -Xms512m -Xmx2048m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar Start=ServerName %1 %2 %3 

So would this be fine, if not using a batch?

Share this post


Link to post
Share on other sites

Dunno if this is the right place for it, but here's something that's been baking my noodle:  In MethodsItems.java (com.wurmonline.server.behaviors) there's 3 methods, "improveItem", "polishItem" and "temper", all of which seem to be improving-related.  The catch is, in each one there's checks for if the performer is a priest, and if so, it applies a penalty (ranging from a flat penalty to negating any positive bonuses, there's multiple such checks/penalties in each method).  What's been baking my noodle is how to override / shut off this behavior using the superior reflection / external mod system you have going, rather than editing MethodsItems.java.  Anyone have any thoughts or punts into the correct forum/topic?

Checking the stacktrace should work and changing the return value depending on the stacktrace

This is pretty rough and untested. There should probably be a check for the correct method too and not just the class name of the caller. Also a limit on the depth of the stack trace checking would probably be wise to avoid running through the complete stacktrace whenever the function is called.

			HookManager.getInstance().registerHook("com.wurmonline.server.players.Player", "isPriest", "()Z", new InvocationHandler() {				@Override				public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {					StackTraceElement[] stackTrace = new Exception().getStackTrace();					for (StackTraceElement stackTraceElement : stackTrace) {						if ("com.wurmonline.server.behaviours.MethodsItems".equals(stackTraceElement.getClassName())) {							return Boolean.FALSE;						}					}					return method.invoke(proxy, args);				}			});
I'll test that tonight. There's also a restriction on removing pavement that has not been removed yet.

Share this post


Link to post
Share on other sites

runtime\bin\java -Dworkdir=%CD% -Djava.library.path=%CD%\nativelibs -Xmn256M -Xms512m -Xmx2048m -XX:+OptimizeStringConcat -XX:+AggressiveOpts -jar modlauncher.jar Start=ServerName %1 %2 %3 

So would this be fine, if not using a batch?

Basicly yes. You should omit the %1 %2 %3 since that's just the placeholder for the arguments passed to the bat file

Share this post


Link to post
Share on other sites

Checking the stacktrace should work and changing the return value depending on the stacktrace

This is pretty rough and untested. There should probably be a check for the correct method too and not just the class name of the caller. Also a limit on the depth of the stack trace checking would probably be wise to avoid running through the complete stacktrace whenever the function is called.

I'll test that tonight. There's also a restriction on removing pavement that has not been removed yet.

O.o

Most impressive sir. In the previous example, those are the only three methods in MethodsItems that call isPriest(), and more importantly, they all call it directly. So you probably could get away with just checking the first (or in this case, second, since the exception is being made in the isPriest method) element in the Stacktrace, rather than the whole thing.

As for the pavement removal, I'm not 100 percent sure, but it seems the "is destroying pavement okay" (and destroying walls or fences for that matter) check is done in the "isActionFaithful" method (technically there's two, but one's just a wrapper for the other). It checks if the action number is 191 (Destroy Pavement), or if it's 172 (destroy fence) or 174 (destroy wall).

One caveat, though. The pavement and wall destruction isn't a priest restriction, it's a Vynora restriction. It even applies to followers, not just priests. As a result you may want to put it in a separate property in the properties file. Beyond that, seems it'd be a simple matter of just overriding isActionFaithful to always return TRUE.

EDIT: Derp. I forgot to add that "IsActionFaithful" can be found in Diety.java. My apologies.

Edited by WalkerInTheVoid

Share this post


Link to post
Share on other sites

Hello,


 


Thanks for making this mod, will this work for a server with two players on it?  I noticed you said "single player" in the title and wasn't sure if that meant it will only work for a single player server or not.


 


Thanks


Share this post


Link to post
Share on other sites

Heya! I'm having some issues with the latest version of the mod (0.5.1). 0.5.0 worked fine but when I deleted the old mod files and installed the new one, It won't start and gives me the following error: http://i.imgur.com/QiFEtux.png


 


I'm not even going to pretend to understand the java voodoo speak in the error, but it looks like a "disciomod.jar" might be missing from the mod .zip? Lemme know what I can do to fix this. Thanks again for the awesome mod!


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