Sign in to follow this  
cantorsdust

[Released] Unlimited Stamina Mod

Recommended Posts

I'm pleased to release my third mod, UnlimitedFatigue, using Ago's Modloader.  The source code is blatantly stolen adapted from Ulviirala's BetterGamemasters.  Credit to Webba for the inspiration at NoFatigue


 




Version 1.1 of UnlimitedFatigue (Now renamed UnlimitedStamina internally).

 

UnlimitedFatigue

 

A mod for Wurm Unlimited. Has two options. Option 1 prevents all creatures' stamina from ever lowering. Option 2 prevents all creatures' stamina from lowering during movement. The options can be configurated using the mod's .properties file. This affects all creatures including players. It does so by adding modloader code.

 

UnlimitedStaminaFunction intercepts modifyStamina() in com.wurmonline.server.creatures.CreatureStatus and sets it so that any negative modifier is turned into a positive one, then the regular native code is allowed to run. UnlimitedStaminaMovingFunction intercepts modifyStamina() when called as part of the move() function in com.wurmonline.server.creatures.MovementScheme and prevents it from being called.

 

It should remain up to date for any Wurm Unlimited version.

 

Installation instructions:

 

Make sure you have Ago's Modloader

Unzip UnlimitedFatigue.zip to the Wurm Unlimited Dedicated Server folder so that modloader.bat and the mods folder are in the same directory as WurmServerLauncher.exe.

Start the game.


 


 

Installation instructions:

 

1.  Make sure you have Ago's Modloader

2.  Unzip UnlimitedFatigue.zip to the Wurm Unlimited Dedicated Server folder so that modloader.bat and the mods folder are in the same directory as WurmServerLauncher.exe.

4.  Start the game.

 


 


Edited by cantorsdust
  • Like 1

Share this post


Link to post
Share on other sites

Unzip UnlimitedFatigue.zip to the Wurm Unlimited Dedicated Server folder so that modloader.bat and the mods folder are in the same directory as WurmServerLauncher.exe.


 


2.  Unzip NoDecay.zip to the Wurm Unlimited Dedicated Server folder so that modloader.bat and the mods folder are in the same directory as WurmServerLauncher.exe.


 


I suspect you copy/paste and forgot to make one update.


 


~Nappy


  • Like 1

Share this post


Link to post
Share on other sites

Unzip UnlimitedFatigue.zip to the Wurm Unlimited Dedicated Server folder so that modloader.bat and the mods folder are in the same directory as WurmServerLauncher.exe.

 

2.  Unzip NoDecay.zip to the Wurm Unlimited Dedicated Server folder so that modloader.bat and the mods folder are in the same directory as WurmServerLauncher.exe.

 

I suspect you copy/paste and forgot to make one update.

 

~Nappy

;)

Share this post


Link to post
Share on other sites

Is there a way to be more nuanced about stamina? I mean I like stamina management in normal operations where it makes sense, like physical effort when running, digging, climbing, etc. Is there a way to let this work as intended, but instead fix what rolf has refused to fix for years: stamina loss on horseback or in carts, and stamina not regenerating when standing still on horseback on the tiniest of slopes?


Share this post


Link to post
Share on other sites

Is there a way to be more nuanced about stamina? I mean I like stamina management in normal operations where it makes sense, like physical effort when running, digging, climbing, etc. Is there a way to let this work as intended, but instead fix what rolf has refused to fix for years: stamina loss on horseback or in carts, and stamina not regenerating when standing still on horseback on the tiniest of slopes?

I was thinking about this this morning, and I agree with you. This is just a hammer of a mod. I'm thinkin about digging through the code later and seeing if I can make finer, configurable tweaks.

Share this post


Link to post
Share on other sites

Is there a way to be more nuanced about stamina? I mean I like stamina management in normal operations where it makes sense, like physical effort when running, digging, climbing, etc. Is there a way to let this work as intended, but instead fix what rolf has refused to fix for years: stamina loss on horseback or in carts, and stamina not regenerating when standing still on horseback on the tiniest of slopes?

 

 

Updated to 1.1.  Now adds second config option, unlimitedStaminaMovingOn.  When true, prevents stamina from dropping only from moving.  Actions that normally deplete stamina will still do so.  This should also prevent stamina loss on horseback or in carts.  I haven't tried whether it would prevent stamina loss on horseback but I suspect it will.

Share this post


Link to post
Share on other sites

Updated to 1.1.  Now adds second config option, unlimitedStaminaMovingOn.  When true, prevents stamina from dropping only from moving.  Actions that normally deplete stamina will still do so.  This should also prevent stamina loss on horseback or in carts.  I haven't tried whether it would prevent stamina loss on horseback but I suspect it will.

I've tried it, and it does not work as intended. Whatever I do, I do not lose stamina. I tested digging, going up a slope, riding up a slope.

 

1. with UnlimitedStamina.disabled, it works as if there was no mod: stamina loss in all 3 activities.

 

2. with UnlimitedStamina.properties, and the default values:

unlimitedStaminaOn=false

# true: Stamina never drops for any reason

unlimitedStaminaMovingOn=true

# true: Stamina never drops from moving

I do NOT lose stamina in any of the 3 activities: free digging, free climbing, free riding

 

2. with UnlimitedStamina.properties, and the values (in case the 2nd switch is inverted):

unlimitedStaminaOn=false

# true: Stamina never drops for any reason

unlimitedStaminaMovingOn=false

# true: Stamina never drops from moving

Same thing, free stamina when digging, etc.

 

It seems as if the addition of the 2nd option actually forced free stamina and even disabled the first unlimitedStaminaOn switch.

Share this post


Link to post
Share on other sites

I've tried it, and it does not work as intended. Whatever I do, I do not lose stamina. I tested digging, going up a slope, riding up a slope.

 

1. with UnlimitedStamina.disabled, it works as if there was no mod: stamina loss in all 3 activities.

 

2. with UnlimitedStamina.properties, and the default values:

unlimitedStaminaOn=false

# true: Stamina never drops for any reason

unlimitedStaminaMovingOn=true

# true: Stamina never drops from moving

I do NOT lose stamina in any of the 3 activities: free digging, free climbing, free riding

 

2. with UnlimitedStamina.properties, and the values (in case the 2nd switch is inverted):

unlimitedStaminaOn=false

# true: Stamina never drops for any reason

unlimitedStaminaMovingOn=false

# true: Stamina never drops from moving

Same thing, free stamina when digging, etc.

 

It seems as if the addition of the 2nd option actually forced free stamina and even disabled the first unlimitedStaminaOn switch.

 

Very odd.  I'm actively using it on my server now and have tried all 4 combinations of true and false for the two options and confirmed they work correctly.  With unlimitedStaminaOn true, stamina is always full.  With only unlimitedStaminaMovingOn true, walking and climbing (handled by the same code in the game, so difficult to tease out one from the other) are free, but digging is definitely not.  I don't have a horse, so I cannot test riding.  I would suspect it would also be free, though, as it again is handled by the same moving code.  With both false, everything works as vanilla.

 

Perhaps redownload 1.1 from Github and make sure that you have the correct .jar and .properties in the correct place?  Perhaps the old one got left or the new one got unzipped to the wrong location.

 

The actual code to handle what gets turned on is quite simple, and I don't see a way for both options to accidentally get turned on:

public void preInit() {

if(this._unlimitedStaminaOn) {

this.UnlimitedStaminaFunction();

}

else {

if(this._unlimitedStaminaMovingOn) {

this.UnlimitedStaminaMovingFunction();

}

}

}

Let me know if anything helps.  Sorry I could not find a better solution for you.

Share this post


Link to post
Share on other sites

I never had the old one, just downloaded the 1.1 one from the v1.1 directory, so it couldn't be that. So two options, either you didn't zip the jars you are testing with, or my modlauncher was out of date. And indeed, I refreshed the modlauncher I had (it was from two weeks ago, I wish people the version number on their zip files) and every switch is working perfectly fine now in your mod.


 


Thanks for fixing that part of the game :).


Share this post


Link to post
Share on other sites

I've noticed that climbing is also impacted by this module so that you can climb continuously. Would it be possible to add an option to the configuration file so that I can turn off the climbing impact?

Share this post


Link to post
Share on other sites

Am I understanding correctly?  Does this mod make it so that even mobs that are attacking or chasing you also never run out of stamina?

Share this post


Link to post
Share on other sites

I don't know if this thread is dead, if it is I'm sorry.

 

Anyway. I'm playing Wurm Unlimited on my own dedicated server in offline mode. So everytime I stop playing, I turn the whole thing off and because of that I never get rested nor recover fatigue... =/

 

I pasted the modlauncher and the Unlimited Stamina files/folders in Wurm Unlimited Dedicated Server folder, ran the patcher and modlauncher bat files and started the server from the patched.exe

 

My fatigue was already at zero when I did this whole process and when in game I saw no difference.

 

Does anyone knows what I could do?

 

Thank you very much!

Edited by Drowssap
I mistakenly pressed Ctrl+Enter to skip a line instead of just pressing Enter.

Share this post


Link to post
Share on other sites
On 10/16/2017 at 7:10 PM, Drowssap said:

I don't know if this thread is dead, if it is I'm sorry.

 

Anyway. I'm playing Wurm Unlimited on my own dedicated server in offline mode. So everytime I stop playing, I turn the whole thing off and because of that I never get rested nor recover fatigue... =/

 

I pasted the modlauncher and the Unlimited Stamina files/folders in Wurm Unlimited Dedicated Server folder, ran the patcher and modlauncher bat files and started the server from the patched.exe

 

My fatigue was already at zero when I did this whole process and when in game I saw no difference.

 

Does anyone knows what I could do?

 

Thank you very much!

 

I suspect that this thread is dead, as I've been waiting since May for an answer to my question.  On my own Local server, I sometimes just leave it running while I go do RL stuff, in order to allow the time to advance and my stats to normalize.  I hope this helps!  

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