Guest deleted2027229 Posted September 29, 2023 Share Posted September 29, 2023 Use event handlers (for harvest) which only run if needed. Nirnroot would not need a script but could trigger through the onactivate event handler and then disable through that. How do I do this? Link to comment Share on other sites More sharing options...
RomanR Posted September 30, 2023 Share Posted September 30, 2023 Yes, it's quite easy to set up such event. First event function itself: scn RomRFnNirnrootActivateEvent ref object ref actor ref base begin function {object, actor} if actor == PlayerRef ;if player... let base := object.GetBaseObject if base == NirnrootPlant || base == NirnrootPlantSmall ;...takes Nirnroot ;print "Player takes Nirnroot." object.activate object.disable endif endif end It's made to disable Nirnoot only when player takes it, so if another NPC accidentaly harvest it too, he gets Nirnroot, but you can harvest it too after a while. Script on NirnrootPlant and NirnrootPlantSmall base objects needs to be removed of course. Script for registering such event: scn RomRNirnrootEventQuestScript float fQuestDelayTime begin GameMode set fQuestDelayTime to 0.5 if GetGameRestarted SetEventHandler "OnActivate" RomRFnNirnrootActivateEvent "second"::PlayerRef ;Message "Nirnroot event registered." endif end As you see, such event need to be registered every time Oblivion restarts. Also docs are quite silent about what happens if same type of event is registered by multiple mods. Still, I tested it and it works, so for one mod only you don't need to worry about it. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted October 2, 2023 Share Posted October 2, 2023 At worst you can use Harvest nearby flora Link to comment Share on other sites More sharing options...
Guest deleted2027229 Posted October 26, 2023 Share Posted October 26, 2023 How can I apply this script to all flora so they all dissapear (like nirnroot does) when picked? Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted October 26, 2023 Share Posted October 26, 2023 How can I apply this script to all flora so they all dissapear (like nirnroot does) when picked?Take the first event function script, give it a new name starting with a letter because the editor ID's that don't start by a letter are a source of instability. Give it a name contaning a mix of your nickname, the acronym of your mod and a preferably long description of the object to avoid the conflicts because are another source of instability and prevent you from enjoying the features of all the mods. Replace the NirnrootPlantX entry by the editor ID of the flora you want to disable and you should be fine. Link to comment Share on other sites More sharing options...
RomanR Posted October 27, 2023 Share Posted October 27, 2023 How can I apply this script to all flora so they all dissapear (like nirnroot does) when picked? With OBSE it can be done, but it will be a lot harder, because not all flora has a 100% chance to give you an ingredient as Nirnroot plants does. Also you must think of a way of enabling flora (except Nirnroots) again after some time, so extra tracking (which will propably take a lot of memory and cause a OBSE co-save bloat) and timing work is needed. Link to comment Share on other sites More sharing options...
GamerRick Posted October 27, 2023 Share Posted October 27, 2023 The mod Harvest Flora does it all. Link to comment Share on other sites More sharing options...
Recommended Posts