Check if player knows Nth effect of an ingredient...

Post » Sun Nov 18, 2012 4:37 am

Just as the title says. I am looking for a way to check if the player knows a certain level of an ingredient. I have been through every Script Object and cannot find a way.
User avatar
Carolyne Bolt
 
Posts: 3401
Joined: Mon Jul 10, 2006 4:56 am

Post » Sun Nov 18, 2012 3:04 am

Just for the sake of curiosity, I tried casting an Ingredient as a FormList and checking GetSize(), theory being the game must have some hidden internal way of tracking how many of the four possible effects on each ingredient the player currently knows.

Unfortunately Papyrus won't compile it, saying ingredients can't be cast as FormLists.

It seems like such a simple thing to do!
User avatar
Ernesto Salinas
 
Posts: 3399
Joined: Sat Nov 03, 2007 2:19 pm

Post » Sun Nov 18, 2012 9:11 am

I am confused how the Ingredients script object has commands for IsHostile, LearnEffect, LearnNextEffect, and LearnAllEffects, but NOTHING to check if the player HAS or knows the effect at a certain index. Almost inconceivable such a thing could have been overlooked.

SKSE hasn't even included it yet!
User avatar
DAVId Bryant
 
Posts: 3366
Joined: Wed Nov 14, 2007 11:41 pm

Post » Sun Nov 18, 2012 5:54 am

Just tried this for the heck of it:

Scriptname phiTestIngScript extends ActiveMagicEffectIngredient Property MountainFlower01Blue autoEvent OnEffectStart(Actor akTarget, Actor akCaster)if (MountainFlower01Blue.LearnNextEffect() == 0)  Debug.Notification("Known effects: 0")elseif (MountainFlower01Blue.LearnNextEffect() == 1)  Debug.Notification("Known effects: 1")elseif (MountainFlower01Blue.LearnNextEffect() == 2)  Debug.Notification("Known effects: 2")elseif (MountainFlower01Blue.LearnNextEffect() == 3)  Debug.Notification("Known effects: 3")else  Debug.Notification("All effects known.")endifEndEvent

Unsurprisingly, it adds the effect it is returning, making the function useless for simply checking whether an effect is known.
User avatar
Dj Matty P
 
Posts: 3398
Joined: Sat Jun 09, 2007 12:31 am

Post » Sun Nov 18, 2012 6:42 am

Edit: Useless frustration post. Had to be done. Removed.
User avatar
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm


Return to V - Skyrim