Natural Healing corrected and fully functional!

Learn about OpenMW mod compatibility, check for problematic mods, discuss issues, and give us feedback about your experience with modded OpenMW.
zelo86
Posts: 7
Joined: 23 Aug 2017, 14:46

Natural Healing corrected and fully functional!

Post by zelo86 » 23 Aug 2017, 15:18

Hi, I'm Nicola and I'm new to this forum. That's my first post.

I modified Natural Healing Mod (by myself) and I was able to correct the syntax error that stopped it from working. Now it's fully functional! Plus it works as intended, healing slower the more you are damaged.
I want to share the corrected Mod and how I was able to do it.

Basically I corrected the "HRatio && HRatio" formula into a "<= HRatio >=" one. That's how my corrected Mod looks from line 18 to line 39.

; Set the regen multiplier based on current health ratio
if ( HRatio <= 10 )
Set RMult to 1 ; Lowest Mult
elseif ( 20 <= HRatio >= 11 )
Set RMult to 2
elseif ( 30 <= HRatio >= 21 )
Set RMult to 3
elseif ( 40 <= HRatio >= 31 )
Set RMult to 4
elseif ( 50 <= HRatio >= 41 )
Set RMult to 5
elseif ( 60 <= HRatio >= 51 )
Set RMult to 6
elseif ( 70 <= HRatio >= 61 )
Set RMult to 7
elseif ( 80 <= HRatio >= 71 )
Set RMult to 8
elseif ( 90 <= HRatio >= 81 )
Set RMult to 9
elseif ( 100 <= HRatio >= 91 )
Set RMult to 10
endif


I'm uploading a *.zip that contains the corrected Mod, ready for use, here.
I checked the file with VirusTotal online antivirus and says that's not infected. I hope this can help someone!

Thanks to OpenMW to exist! And forgive my english, that's not my first language!

P.S.: See the bottom of this page for a better version of this file..

Cheers, Nicola
Attachments
Natural Healing.zip
Corrected Mod. Use with OpenMW
(1.29 KiB) Downloaded 7 times
Last edited by zelo86 on 24 Aug 2017, 07:16, edited 1 time in total.

Loriel
Posts: 99
Joined: 28 May 2015, 00:44

Re: Natural Healing corrected and fully functional!

Post by Loriel » 23 Aug 2017, 15:47

Welcome, and many thanks for this.

Would you like to update the relevant wiki page at https://wiki.openmw.org/index.php?title ... culty_Mods ? Otherwise I will add it to my list and update it later.

Did you start with version 1 or version 2 beta? Both are present on Nexus (at http://www.nexusmods.com/morrowind/mods/39369/), only version 1 on Morrowind Modding History which is linked on the wiki, so I assume you used version 1.

I couldn't see any indication of permission to amend and redistribute in the readme, so it's probably safest just to explain the necessary changes, rather than actually redistribute the amended version - unless you can get the original author's permission.

You appear to have identified another interesting variation from the original vanilla engine, and a suitable workaround - might be worth documenting it in a bug report or feature request.

Loriel

zelo86
Posts: 7
Joined: 23 Aug 2017, 14:46

Re: Natural Healing corrected and fully functional!

Post by zelo86 » 23 Aug 2017, 16:39

Hello Loriel.

Just now I'm trying to update the Wiki page, but I'm still guessing how to (I registered, but when I try to log in it says my password isn't correct..)!

Thanks for the hint about mod redistribuition, because I know nothing on the Modding scene and didn't know there must be author's permission to alter and upload a Mod.. By the way I used version 1, you assumed correctly!

So, now what should I do? I guess it's safest to not upload my file and find a method to explain how to get this mod working.. Am I right?

I'll wait for your reply.. Cheers

Loriel
Posts: 99
Joined: 28 May 2015, 00:44

Re: Natural Healing corrected and fully functional!

Post by Loriel » 23 Aug 2017, 17:03

Many Morrowind Modders are rather casual about permissions, so there probably wouldn't be any objection if you did redistribute. But it would, in my opinion, be a breach of Copyright.

There was major uproar in the community a few years ago, when Bethesda proposed introducing paid mods, and the thought that other modders might financially benefit by re-using or improving mod contents might have changed attitudes.

I suggest we put a link from the wiki to your original post, indicating in the wiki that the fix is explained there, and for now we leave that post untouched. Others can comment on whether the download should stay there or be removed, personally I'd probably recommend it stays there.

If you can't sort out your wiki access/password problem, I will make a suitable entry there.

Loriel

zelo86
Posts: 7
Joined: 23 Aug 2017, 14:46

Re: Natural Healing corrected and fully functional!

Post by zelo86 » 23 Aug 2017, 17:13

Ok and thanks for the support..

Because I can't update the Wiki, would you mind doing it you, please?
I'll leave the post as it is, hoping it's understendable.. And that was usefully for someone!

Nicola

Loriel
Posts: 99
Joined: 28 May 2015, 00:44

Re: Natural Healing corrected and fully functional!

Post by Loriel » 23 Aug 2017, 17:25

Will do.

I know I've seen some related discussion, and I think it was here - viewtopic.php?f=40&t=4304

Loriel

zelo86
Posts: 7
Joined: 23 Aug 2017, 14:46

Re: Natural Healing corrected and fully functional!

Post by zelo86 » 23 Aug 2017, 17:37

Thanks Loriel again..

But I was controlling the correction and found, in my opinion, an error.. I think the formula should be ">= HRatio <=".. So the line from 18 to 39 should be:

; Set the regen multiplier based on current health ratio
if ( HRatio <= 10 )
Set RMult to 1 ; Lowest Mult
elseif ( 20 >= HRatio >= 11 )
Set RMult to 2
elseif ( 30 >= HRatio >= 21 )
Set RMult to 3
elseif ( 40 >= HRatio >= 31 )
Set RMult to 4
elseif ( 50 >= HRatio >= 41 )
Set RMult to 5
elseif ( 60 >= HRatio >= 51 )
Set RMult to 6
elseif ( 70 >= HRatio >= 61 )
Set RMult to 7
elseif ( 80 >= HRatio >= 71 )
Set RMult to 8
elseif ( 90 >= HRatio >= 81 )
Set RMult to 9
elseif ( 100 >= HRatio >= 91 )
Set RMult to 10
endif

I tested this new correction and it also works. A little bit better I think..
Last edited by zelo86 on 24 Aug 2017, 07:14, edited 1 time in total.

Loriel
Posts: 99
Joined: 28 May 2015, 00:44

Re: Natural Healing corrected and fully functional!

Post by Loriel » 23 Aug 2017, 17:42

Yes, that does look better. I will change the wiki link to that post.

Loriel

zelo86
Posts: 7
Joined: 23 Aug 2017, 14:46

Re: Natural Healing corrected and fully functional!

Post by zelo86 » 23 Aug 2017, 17:48

Ok. Here's the corrected version, hoping posting that won't hurt no one.. Also controlled with virus total.
Attachments
Natural Healing.zip
Correct version
(1.28 KiB) Downloaded 8 times

User avatar
Zini
Posts: 5112
Joined: 06 Aug 2011, 15:16

Re: Natural Healing corrected and fully functional!

Post by Zini » 24 Aug 2017, 11:00

Sorry, what?

Code: Select all

elseif ( 20 >= HRatio >= 11 )
This should first evaluate 20 >= HRatio to a value of either 1 or 0 (true or false) and then compare that with 11. That is most likely not what was intended.

I suggest to do something like

Code: Select all

Set RMult to HRatio/10 +1
Not exactly the same but probably close enough. If it is important that RMult is within the range of [ 1, 10 ] you clamp if afterwards with two simple if statements.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests