Gathering experience

Post » Sat Aug 16, 2014 2:33 am

I found this nice event:

http://www.creationkit.com/AddInventoryEventFilter_-_ObjectReference

Something like:

Event AddInventoryEventFilter(CookingIngredientsList)  Game.AdvanceSkill("Alchemy", 10.0)endEvent

Now, does CookingIngredientsList contain all alchemy ingredients as well or is there a better collection to use?

I plan on increasing the alchemy skill if ingredients are picked up, especially if gathered in the wild.

p.s. still at work, no way I can check creation kit or the game itself... this is all theory-crafting for now.

User avatar
CxvIII
 
Posts: 3329
Joined: Wed Sep 06, 2006 10:35 pm

Post » Sat Aug 16, 2014 12:14 pm

Well, what does the list look like?

User avatar
Mimi BC
 
Posts: 3282
Joined: Sat Oct 07, 2006 10:30 pm

Post » Sat Aug 16, 2014 12:33 am

It only contains 7 ingredients, the other 14 being food (Potions). You are probably better off creating a new formlist, with all the ingredients you want in your list

User avatar
Greg Swan
 
Posts: 3413
Joined: Tue Jun 05, 2007 12:49 am

Post » Sat Aug 16, 2014 4:26 am

I was hoping you could tell me. I found it mentioned here:

http://www.gamesas.com/getting-inventory-filter-work-t256226.html

It seems to be a vanilla form list, so I would be able to check it out in creation kit?

@heilgast, thanks. I'll do that.

//edit: for later to test :smile:

ScriptName MyGatherExperienceScript extends ObjectReferenceFormList property MyIngredientsFormList autoEvent OnInit()    MyIngredientFormList.AddForm(CookingIngredientsList)    MyIngredientFormList.AddForm(Food)    ; probably need more here [or|and] add single IDsEndEventEvent AddInventoryEventFilter(MyIngredientFormList)    Game.AdvanceSkill("Alchemy", 10.0)EndEvent

Probably needs a state to not be active if the inventory is open, this would limit it to picking stuff up.

User avatar
matt oneil
 
Posts: 3383
Joined: Tue Oct 09, 2007 12:54 am

Post » Sat Aug 16, 2014 6:26 am

AddInventoryEventFilter is not an event, it is the filter for OnItemRemoved and OnItemAdded Events. This will do what you expect:

ScriptName MyGatherExperienceScript extends ObjectReferenceFormList property MyIngridientsFormList auto  Event OnInit() AddInventoryEventFilter(MyIngridientsFormList)EndEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer);Will listen ONLY for anything in the formlist. A nifty function!EndEvent
User avatar
how solid
 
Posts: 3434
Joined: Mon Apr 23, 2007 5:27 am

Post » Fri Aug 15, 2014 9:04 pm

cheers!

User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Sat Aug 16, 2014 9:28 am

And you can use states for those events to flip flop between either to suit your needs, or even put it in a Done state with no event all if you have no further use for the script after its served its purpose.

User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am


Return to V - Skyrim