heaud Posted February 13, 2017 Share Posted February 13, 2017 I am looking to write a mod that restricts the use of food items such as Purified Water to be consumed while in combat. Will it be possible to completely block the use of the item, or is a script required to nullify the benefits and refund the activated item? Link to comment Share on other sites More sharing options...
vkz89q Posted February 14, 2017 Share Posted February 14, 2017 (edited) Well, there is magic effects named RestoreHealth for food, stimpaks and generic. Then there is water drinking spell and food items have those magic effects too. So when you use food, it does the magic effect. I guess you could copy all those effects, so you have 2 instances of each effect. Then give original effects condition isincombat == 0 or similiar and then the new effects, remove the healing effects, and instead use script and event OnEffectStart that says "Can't eat/drink in combat" or similiar. So, you would have the original food with original effects that have condition isincombat==0 and the new effect(s) that display msg with condition(s) isincombat==1. Interesting mod idea. Maybe there is easier/better way but I think this one would work nicely. Just need to find every food, chem, water etc that can heal player. Not too hard when you find the magic effect and click "use info" in CK. Possible problem is that it would consume the food and just display the message. Like you said, you could just give the item back in the script but not sure if there is better way. Edit: AddItem function actually has silent option. So the msg "xxx added" will not display. Pretty cool. Original game does something similiar on survival, like you can't sleep or use water pump if you are in combat, I believe. No idea how that is done. Edited February 14, 2017 by vkz89q Link to comment Share on other sites More sharing options...
Recommended Posts