[RELz]Lightweight Potions

Post » Wed Sep 01, 2010 1:56 pm

========= LIGHTWEIGHT POTIONS 1.1============

Do you think its stupid that the weight of a potion is dependant of the ingredients used to make the first potion of that type?
I do. That's why I made this mod which automatically makes every player-made potion weight exactly the same. Default is 0.2, but you can change this to 0.0 or whatever you want.


=========

Author: Ole B?e, a.k.a. TheNiceOne
Date: September 25, 2009

OBSE v 17 or newer required!

Download: http://www.tesnexus.com/downloads/file.php?id=25714

========= DESCRIPTION

The mod checks the weight of every potion you have, and sets the weight of every player-made potion to a value of your choice. Default is 0.2, but this is controlled by the mod's ini file, or OBMM install script.

The mod can optionally reweigh potions NOT made by the player as well. This is off by default, but can be turned on in the ini file or OBMM install script. Note that Wrye Bash can do this as a tweak in the Bashed Patch, which is why this is off by default. If enabling it, this mod will override the Bashed Patch tweak, regardless of load order. Like the Bashed Patch tweak, it will not reweigh scripted potions or potions with initial weight of higher than a max value (default 1.0).

Wrye Bash has a similar feature, but that only works for the potions that currently exists. As soon as you increase your Alchemy skill again, your potions will usually be slightly stronger and therefore considered a new type. Lightweight Potions catches this immediately in-game, but Wrye Bash doesn't until you rebuild your Bashed Patch.

========= INSTALLATION

Create an OMOD of the archive and install with OBMM. The archive is OMOD-ready.

Alternatively, just copy "Lightweight Potions.esp" to your data folder, and Lightweight Potions.ini to your "data\ini" or "data" folder.

========= COMPATIBILITY

This mod is fully compatible with any mod I know about. It can go absolutely anywhere in your load order.

========= CHANGELOG

1.1: Allows the user to set the max initial value for reweighting of non-player made potions.
User avatar
Francesca
 
Posts: 3485
Joined: Thu Jun 22, 2006 5:26 pm

Post » Wed Sep 01, 2010 4:46 pm

Oh thank you, I'll be sure to add this one to my game. 0.2 sounds about right to me as I've reduced the premades to 0.1.
User avatar
Mashystar
 
Posts: 3460
Joined: Mon Jul 16, 2007 6:35 am

Post » Wed Sep 01, 2010 7:51 pm

Thanks for sharing and the linky, will add this to the list ! ! ! ! !
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm

Post » Wed Sep 01, 2010 6:28 pm

The mod runs once in a while....


How often is "once in a while," if you don't mind my asking? I take it a potion that weighs 1.0 will continue to weigh 1.0 until the script runs again?

The most seamless effect would be for each to potion to weigh 0.2 the instant it's produced. Is that not possible?

Don't get me wrong, I really like this mod and will download and use it. In-character, I can explain away the fact that potions aren't changed to 0.2 immediately as "the ingredients are still settling down." I'm just curious.
User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Wed Sep 01, 2010 4:16 pm

The most seamless effect would be for each to potion to weigh 0.2 the instant it's produced. Is that not possible?


I was kind of wondering why it isn't done that way as well. That would be the most logical place to make the change.
User avatar
Cathrine Jack
 
Posts: 3329
Joined: Sat Dec 02, 2006 1:29 am

Post » Wed Sep 01, 2010 8:34 am

I was kind of wondering why it isn't done that way as well. That would be the most logical place to make the change.

Most likely to reduce the possible overhead from scanning for new potions all the time.
User avatar
Lou
 
Posts: 3518
Joined: Wed Aug 23, 2006 6:56 pm

Post » Wed Sep 01, 2010 3:40 pm

Most likely to reduce the possible overhead from scanning for new potions all the time.


Why would it have to be all the time?

New potions can only be created from the Alchemy menu. I definitely don't know much about scripting (though I really should learn, so that I can give back to the community), but perhaps the script could be run automatically whenever the Alchemy menu is closed? If there's a detectable "signal" that another script can "look" for, it should be possible. (Example: IF [menu closes] THEN [run POTION WEIGHT SCRIPT].)

Of course, I could be way off with that.
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

Post » Wed Sep 01, 2010 4:14 pm

I'm not too sure why the mod couldn't just work whenever new potions are made (though I know nothing of scripting in Oblivion, so who knows.) I could see that posing a problem of potions the player made before installing the mod still not being reweighed, but couldn't that be avoided by having the script run when first activating the mod as well?

In any case, though, I like the sound of this mod, it's always annoyed me that custom potions are always weighing me down, when their non-custom counterparts are much lighter, it's gotten to the point where I often sell heavier player made potions even if they're ones I normally would use (It's worst for restore health potions as all the meat weighs at least one unit, and a lot of it serves as a commonly available source of restore health for me.). So I downloaded this.
User avatar
IsAiah AkA figgy
 
Posts: 3398
Joined: Tue Oct 09, 2007 7:43 am

Post » Wed Sep 01, 2010 1:55 pm

To all the non-scripters: There's no specific "Alchemy menu" check ;)
There's a way to check if ANY menu closes, though, and that might help this mod. You could have a menumode block which sets a certain variable to 1, and a gamemode block that only "works" when that variable is 1, and immediately sets it to 0.

If that menu happens to be an alchemy menu, this system would run the very frame it closes.
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Wed Sep 01, 2010 8:40 pm

To all the non-scripters: There's no specific "Alchemy menu" check ;)


NOOOOOOOOOOOOOOOOOOOOOOOOOOOO.... :sadvaultboy:

There's a way to check if ANY menu closes, though, and that might help this mod. You could have a menumode block which sets a certain variable to 1, and a gamemode block that only "works" when that variable is 1, and immediately sets it to 0.

If that menu happens to be an alchemy menu, this system would run the very frame it closes.


That sounds brilliant, because adding a check whenever any menu closes shouldn't slow the game down noticeably (a split second longer to close each menu?), and ensures that potions always weigh 0.2 as soon as the Alchemy menu closes (any menu, but since that includes the Alchemy menu, it's essentially the same thing).

The only noticeable quirk would be that you could get an over-encumbered message before you closed the Alchemy menu; but (depending on how many potions you've made) that would no longer be the case once the menu closed.
User avatar
Amelia Pritchard
 
Posts: 3445
Joined: Mon Jul 24, 2006 2:40 am

Post » Wed Sep 01, 2010 11:29 pm

How often is "once in a while," if you don't mind my asking? I take it a potion that weighs 1.0 will continue to weigh 1.0 until the script runs again?
Sorry for being that vague, here's the details:

The script runs once every 5 seconds in gamemode. It then checks whether you have just loaded a savegame, or have been inside the alchemy menu since last run. If one of those are true, the script reweights all potions.

So the effect is that just after loading a game, or after having created a completely new potion, it will go from 0 to 5 seconds before the potions are reweighted. This isn't instant, but almost. Also note that as soon as the mod has reweighted one potion of a type, all identical potions you make later will get the same weight by the game, even if the mod isn't run.


BTW, if you enable the optional reweighting of non-user made potions, the script will run every 5 seconds regardless of whether the alchemy menu has been opened, to make sure that any potions bought, looted or picked up are reweighted (almost) immediately as well.


To all the non-scripters: There's no specific "Alchemy menu" check wink.gif
Well this works to tell if the user have been inside the alchemy menu:
Begin Menumode 1040  Set alcheyMenuHasBeenOpen to 1End

User avatar
Lisa Robb
 
Posts: 3542
Joined: Mon Nov 27, 2006 9:13 pm

Post » Wed Sep 01, 2010 5:40 pm

Well heck, that sounds almost completely seamless. I doubt I'll even notice a difference as I play other than the fact that my player-made potions all weigh 0.2. :)

Thanks for a great mod!

And I feel a perverse need to speak in my own defense here: It's not that I want to make the game "easier" on myself by having potions that used to be heavy weigh less. It's that all potion bottles in-game contain approximately the same amount of liquid, and the idea that using pumpkin juice makes them 3-5x heavier is simply absurd. ;)
User avatar
Adam Kriner
 
Posts: 3448
Joined: Mon Aug 06, 2007 2:30 am

Post » Wed Sep 01, 2010 11:32 pm

Thanks for a great mod!

Echoed! One of those tiny tweaks that makes all the difference...
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Wed Sep 01, 2010 7:45 pm

Well heck, that sounds almost completely seamless. I doubt I'll even notice a difference as I play other than the fact that my player-made potions all weigh 0.2. :)

Thanks for a great mod!
Thanks. I consider making the update time optional, or turning it down to 1 or 0.1 second - but I don't really think the current lag is noticeable. The reason I'm hesitant to run the script more often, is if you enable reweighting of non-player made potions. There is no decent way of noticing whether a non-player made potion has been taken/looted/bought/given, so the script would have to reweigh all potions each run to make sure. And that could possibly have some performance impact, though I really doubt it.

And I feel a perverse need to speak in my own defense here: It's not that I want to make the game "easier" on myself by having potions that used to be heavy weigh less. It's that all potion bottles in-game contain approximately the same amount of liquid, and the idea that using pumpkin juice makes them 3-5x heavier is simply absurd. ;)
I know what you mean. To me, the fact that I feel I need to spare the lowest-weight ingredients, and keep an eye on how far I'm before next Alchemy level to make sure that my next health potion weights 0.1 and not 1.0, is just immersion breaking.


Echoed! One of those tiny tweaks that makes all the difference...
Thanks. The mod was quite easy to make - I think I've vasted much, much more time in-game checking weight of ingredients, than I spent making this mod, but I am really happy to have it now :)
User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Wed Sep 01, 2010 9:56 am

Lightweight Potions is now updated to version 1.1

The only change is that you can now set the weight threshold for non-player made potions that will not be adjusted - or turn it off completely if you want all potions to be reweighted.
User avatar
Louise
 
Posts: 3407
Joined: Wed Nov 01, 2006 1:06 pm

Post » Wed Sep 01, 2010 10:44 pm

I've been using this mod for a while now, and I like it. Personally I have noticed the lag, but I simply don't care because the lag is extremely short and the potions are going to be reweighed by the time I open up the inventory again anyway.
User avatar
Elle H
 
Posts: 3407
Joined: Sun Aug 06, 2006 3:15 am

Post » Wed Sep 01, 2010 11:49 am

To all the non-scripters: There's no specific "Alchemy menu" check ;)
There's a way to check if ANY menu closes, though, and that might help this mod. You could have a menumode block which sets a certain variable to 1, and a gamemode block that only "works" when that variable is 1, and immediately sets it to 0.

If that menu happens to be an alchemy menu, this system would run the very frame it closes.


In my personal zero-weight ingredients & potions mod, I checked menumode 1040. I'm reasonably certain it worked correctly....

scn danoReagentCaseScriptfloat timershort doNowlong counterlong numItemsref userRefref itemshort nbegin MenuMode 1040	if (doNow == 1)		set doNow to 0	endifendbegin MenuMode	if (getGameLoaded || GetGameRestarted) 		set doNow to 0		return	endifendbegin GameMode	if (GetGameLoaded || GetGameRestarted)		set doNow to 0		return	endif	if ((timer >= 60) || (doNow == 0))		set userRef to player		set numItems to userRef.getNumItems		set counter to numItems - 1		LABEL 0		set item to userRef.getinventoryobject counter		if (isIngredient item)			setWeight 0.0 item		endif		set counter to counter - 1				if (item.isPotion)			setweight 0.0 item		endif		if (item.isPoison)			setweight 0.0 item		endif					if (counter >= 0) 			GOTO 0		endif		set doNow to 1		set timer to 0	else		set timer to timer + getsecondspassed	endifend

User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Wed Sep 01, 2010 10:28 pm

In my personal zero-weight ingredients & potions mod, I checked menumode 1040. I'm reasonably certain it worked correctly...

Yes it does, see my reply in post #11 above :)
User avatar
Amanda Leis
 
Posts: 3518
Joined: Sun Dec 24, 2006 1:57 am

Post » Wed Sep 01, 2010 8:21 am

Thank You sir for this mod.
User avatar
Megan Stabler
 
Posts: 3420
Joined: Mon Sep 18, 2006 2:03 pm

Post » Wed Sep 01, 2010 2:47 pm

Just a bump for one of my mods that doesn't get much attention, but still is very useful - to avoid the thread from being purged.
User avatar
Agnieszka Bak
 
Posts: 3540
Joined: Fri Jun 16, 2006 4:15 pm

Post » Wed Sep 01, 2010 12:04 pm

This is an awesome little mod, both convenient and useful. No more ridiculous potion weights, and no save / reload required. I love it! Thanks for it, TheNiceOne!
User avatar
Danii Brown
 
Posts: 3337
Joined: Tue Aug 22, 2006 7:13 am

Post » Wed Sep 01, 2010 12:11 pm

This is an awesome little mod, both convenient and useful. No more ridiculous potion weights, and no save / reload required. I love it! Thanks for it, TheNiceOne!

Thanks. Your comment is appreciated :)
User avatar
Kieren Thomson
 
Posts: 3454
Joined: Sat Jul 21, 2007 3:28 am

Post » Wed Sep 01, 2010 6:46 pm

Nice little mod. It can be done with a bash patch (for all potions) , but I don't think every mod user feels comfortable using Wrye Bash. I like your use of the other type of "?" in your more recent threads. :thumbsup:
User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Post » Wed Sep 01, 2010 10:29 am

Nice little mod. It can be done with a bash patch (for all potions) , but I don't think every mod user feels comfortable using Wrye Bash.
This mod has one very big advantage compared to the WB function, even for those that know Wrye Bash very well: Any time you create a completely new user-made potion (one where effect, price or duration changes from the one's you've made before), the new potions will not be affected by the WB function until you manually use Wrye Bash to reweigh the potions for the latest save, and so on.

So each time your Alchemy skill increases, and each time you get better alchemy equipment, the WB reweigh function will not work for any of the new potions until you have reweighted them in the new savegame. My mod does this automatically in-game within 5 seconds after closing the Alchemy menu.

But for mod-placed potions, there is no advantage in using this mod over Wrye Bash, so if you have a Bashed Patch, you should enable that feature in the Bashed Patch and disable it in this mod, and just use the user-made potion reweigh option (which happens to be the default settings). There's no harm in having it enabled in both, btw.

I like your use of the other type of "?" in your more recent threads. :thumbsup:
That is the usual way of spelling it here in Norway :)
User avatar
Lynne Hinton
 
Posts: 3388
Joined: Wed Nov 15, 2006 4:24 am

Post » Thu Sep 02, 2010 12:18 am

Hey!

Love this little mod! I was wondering if you'd consider adding a certain feature: the option to have potions weight depend on the alchemy skill of the creator. That is, potions made when my alchemy score is below 25 would weigh one ini-configured value, below 50 but above 25 another value and so on. And mod added potions would have variations based on their name - weak, strong etc. Kind of like it was in Morrowind.

I think it might require quite a bit of a rewrite, going away from what it's currently doing, but I think it might be worth it.

Cheers!

cc
User avatar
Ryan Lutz
 
Posts: 3465
Joined: Sun Sep 09, 2007 12:39 pm

Next

Return to IV - Oblivion