DavaScript Posted July 31, 2021 Share Posted July 31, 2021 So I've created a custom potion, and I would like to add it as a buyable item to every merchant that sells potions. I would also like the item to be available regardless of the players level. I'm going by the wiki, and it pointed me to World Objects > Container. I've located the correct containers (at least I think so) which are 'ChestVendorAlchemyPotions', but I'm a little confused on what 'Low01-LowG01-etc' signifies. Link to comment Share on other sites More sharing options...
Striker879 Posted July 31, 2021 Share Posted July 31, 2021 So I've created a custom potion, and I would like to add it as a buyable item to every merchant that sells potions. I would also like the item to be available regardless of the players level. I'm going by the wiki, and it pointed me to World Objects > Container. I've located the correct containers (at least I think so) which are 'ChestVendorAlchemyPotions', but I'm a little confused on what 'Low01-LowG01-etc' signifies.I'm not at my gaming computer, but my guess would be that those would be leveled lists used to populate the vendor chest. Add your potion to a vanilla leveled potion list, or create a custom leveled list and add that to the vendor chest (the first way for a quick and dirty personal mod and the second method to improve compatibility with other mods). Link to comment Share on other sites More sharing options...
DavaScript Posted August 1, 2021 Author Share Posted August 1, 2021 I'm not at my gaming computer, but my guess would be that those would be leveled lists used to populate the vendor chest. Add your potion to a vanilla leveled potion list, or create a custom leveled list and add that to the vendor chest (the first way for a quick and dirty personal mod and the second method to improve compatibility with other mods). Thank you, that was more than enough information to figure it out. I do have another question, How do I change a potion's description via script? So far, I've set my custom potion to be a Script Effect in order to edit the 'Effect Name' in the 'Script Effect info' box, and my quest script is as follows: float fQuestDelayTime ref potionEffect Begin MenuMode set fQuestDelayTime to 0.01 let potionEffect := customPotion01 ;editorID of potion if (GetGameRestarted) SetMagicEffectName "Description has been changed." potionEffect endif End I'm not sure if I'm using 'SetMagicEffectName' correctly here. Link to comment Share on other sites More sharing options...
Pellape Posted August 1, 2021 Share Posted August 1, 2021 When you edit levelists, be sure to add your mod to the Wrye Bash patch and that includes every mod that edit level lists. ;) You might already know this but I mention it anyway in case you do not know. Another thing you must take in count is that only potions in inventories will be changed by that script, and no potions placed in the open world. The reason is that it is the base object that we see in inventories and references to the base object in the open world. I do guess you know that as well? Link to comment Share on other sites More sharing options...
qwertyasdfgh Posted August 1, 2021 Share Posted August 1, 2021 I'm not sure if I'm using 'SetMagicEffectName' correctly here. No. Specifically, you're using the wrong function - what you need is SetNthEffectItemScriptName You need to use it like this: SetNthEffectItemScriptName "Your effect name" customPotion01 0 Note, that the example above assumes that your script effect is the first effect of a potion. If it has more effects, then you potentially need to change the third parameter, which is the index of effect you're trying to edit.Also, is there a specific reason you want to do this from a script? Does the text need to be dynamic and can change based on ingame conditions? Link to comment Share on other sites More sharing options...
DavaScript Posted August 1, 2021 Author Share Posted August 1, 2021 (edited) When you edit levelists, be sure to add your mod to the Wrye Bash patch and that includes every mod that edit level lists. :wink: You might already know this but I mention it anyway in case you do not know. What do you mean by that? Do you mean adding the 'Invent.Add' Bash tag? For this mod, I just made a custom container and assigned it to the shop owner rather than editing the existing vendor chest. Wouldn't this way be the appropriate approach to maximize compatibility with other mods? Edited August 1, 2021 by DavaScript Link to comment Share on other sites More sharing options...
Pellape Posted August 5, 2021 Share Posted August 5, 2021 Absolutely as than it is no point in using the patch as there is nothing to patch... :) You did start to talk about existing containers and loot lists so then you had to patch it. It is always more clean to make custom stuff. Link to comment Share on other sites More sharing options...
Recommended Posts