Skyrim

File information

Last updated

Original upload

Created by

tiggz

Uploaded by

tiggz

Virus scan

Safe to use

Tags for this mod

About this mod

my take on autoquaffing potions and potions rename

Permissions and credits
potion auto quaffer with integrated renamer. with sources. SKSE required. BETA

i started after getting an idea while commenting on chesko swift potion page, initially i planned on adding support for crafted potions to his mod, but he wasnt interested on improving the old thing while i found that it would require complete rewrite anyway. then i came across potion renaming mod by spinner385 which grabbed my attention - his naming scheme is pretty cool, since i was already doing all the needed checks for crafted potions anyway, i decided to implement it as well. couple packs of ciggs later and there you go.

for code simplicity sake only first effect (strongest) is taken into consideration when quaffing - you dont want to quaff you nightvision/invis pots that have +21 stamina in silly moments now, right?
also, only selected effects are supported for renaming (18 positive, 18 negative)
renamed potions have only positive effects included in name, same for poisons
quaff delays dynamic per potion (reads actual effect duration)
also included tidbid of code that when put on activator will store all known potions to linked container (modders resource ;)

potential issues:
-when taking more than 127 different potions from one container array will overflow, not sure what happens then ;)
-there _might_ be poisons in game that have both vendortypepotion and poison keywords set, they will get renamed as potions
-dont save for at least 10s while the mod is first installed, or when that game is loaded some potions wont be renamed/autoquaffable - storing/retrieving them fixes that tho
-i tried to make this as thread-safe as possible, but if you encounter strangely named potions, or worse - food, its a threading issue, lemme kno

(non-perfectionists and non-modders disregard this paragraph) honestly whole thing is a hackjob (tho perfectly usable and to the best of papyrus capabilities, imd), to do it *proper* would require writing skse plugin which hooks usercreatepotion, but while id love to do that (i have tons of awesome alchemy related ideas that can be implemented there) i dont have skyrims .idb/.idc file, and im to old, scratch that, wise to jump in without those. but, if someone kind enough sends me above mentioned file (one with well disassembled related code pieces and structures, preferably ^^), i might just do that ;)

configuration:
SetPQV _tipq <property> <value><br> [property: default value - info]<br> weakestfirst: true - uses potions from weakest to strongest<br> incombat: true<span class="wbbtab"></span> - autoquaff only in combat<br> athp = 50 - autoquaff at this health percentage<br> atmp = 20 - aa. but for magicka<br> atst = 20 - aa. but for stamina<br> ultiat = 5 - autoquaff ultimate health pot at this hp%, ulti bypasses any current hp delay but not incombat setting</value></property>