game.getplayer() or actor PlayerRef Auto?

Post » Tue Nov 20, 2012 5:59 am

It's just as easy to update an array as it is a FormList. No time lost there...
Periodically recreating the array anytime you changed a property name because the CK cannot read the container is a waste of time. A form list is never lost however.

That's the point, that it will execute faster and of course it matters, in most every context I can think of, how snappy a script or function does its thing.
If you know that your script needs to run below X frames and that given the number of native calls you would not make it, then, yes it is fully justified to trim the number of calls in advance.
The problem is that you're advocating for always doing this even when it is useless, and that you're advocating for pseudo-optimizations that are not optimizing anything.
The only habit you need to take with papyrus is to ask yourself: "under how many frames must it run?"
User avatar
Catherine Harte
 
Posts: 3379
Joined: Sat Aug 26, 2006 12:58 pm

Post » Tue Nov 20, 2012 3:24 pm

Since I started this and my next question does deal with speed I'll post back here.
I'm making a dynamic renaming script (it's in early stages right now).

I have one quest and one playeralias script. It all works fine, but the quest / maintenance portion has me walking through
a container upon game load to rename items depending on if they meet certain keywords.

At first I used a formlist to walk through the items, then switched to using a container.
Here is the script in question.

Spoiler
Scriptname CSReweighQuestScript extends Quest  Actor Property PlayerRef AutoFormList Property CSAllItemsList AutoFormList Property CSFoodPotionList AutoFormList Property CSIngredList AutoKeyword Property VendorItemFood AutoKeyword Property VendorItemFoodRaw  Auto  Keyword Property VendorItemPotion AutoKeyword Property VendorItemPoison AutoKeyword Property VendorItemArrow AutoKeyword Property WeapTypeBoundArrow AutoKeyword Property VendorItemSoulGem AutoKeyword Property ReusableSoulGem AutoKeyword Property VendorItemOreIngot AutoKeyword Property WeapTypeGreatSword AutoKeyword Property WeapTypeSword AutoKeyword Property WeapTypeBow AutoKeyword Property WeapTypeDagger AutoKeyword Property WeapTypeBattleAxe AutoKeyword Property WeapTypeWarAxe AutoKeyword Property WeapTypeMace AutoKeyword Property WeapTypeWarHammer AutoObjectReference Property CSAllItemCont Auto ;Container that has as many weapons/ingredients/food/potions/poisons as possible.Event OnInit()	Maintenance() ; OnPlayerLoadGame will not fire the first timeEndEvent;-------------- Items get added if they are not in the container/formlist if they meet the keyword requirements during gameplay.Function Maintenance()	float PassedTime = utility.GetCurrentGameTime()	Debug.Notification("Now Renaming list")		;	Used formlists initially, then tried doing the same with a container.  ;	int iFIndex = CSAllItemsList.GetSize();	While iFIndex > 0;		iFIndex -= 1;		Form akBaseItem = CSAllItemsList.GetAt(iFIndex);-----------------------------------------------------------------------		Int iFIndex = CSAllItemCont.GetNumItems()	While iFIndex > 0		iFIndex -= 1		Form akBaseItem = CSAllItemCont.GetNthForm(iFIndex)				if (akBaseItem.HasKeyword(VendorItemPotion))			akBaseItem.SetName("Pt - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(VendorItemPoison))			akBaseItem.SetName("Xd - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(VendorItemOreIngot))			akBaseItem.SetName("In - " +akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(VendorItemSoulGem)) || (akBaseItem.HasKeyword(ReusableSoulGem))			akBaseItem.SetName("Sg - "+akBaseItem.GetName())		elseif (akBaseItem as ammo)			akBaseItem.SetName("Am - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeGreatSword))			akBaseItem.SetName("2s - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeSword))			akBaseItem.SetName("1s - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeBow))			akBaseItem.SetName("Bw - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeDagger))			akBaseItem.SetName("Dg - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeBattleAxe))			akBaseItem.SetName("Ba - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeWarAxe))			akBaseItem.SetName("Wa - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeMace))			akBaseItem.SetName("Mc - "+akBaseItem.GetName())		elseif (akBaseItem.HasKeyword(WeapTypeWarHammer))			akBaseItem.SetName("Wh - "+akBaseItem.GetName())		endif			endwhile			float CurrentTime = utility.GetCurrentGameTime()			float TotalTime = CurrentTime - PassedTime			Debug.MessageBox("Finished re-naming. Time: "+TotalTime)	;numbers are odd. shows in negatives with "-0.0somenumbers" have to fix that.	EndFunction

My question would be, is there another or faster way to walk through lists? As it is, either using the formlist or container method, it takes sometimes up to
10 - 15 minutes of real time from start to finish. Now that really isn't an issue if one is playing for awhile ,as it all happens without the player knowing and
changes names accordingly, but what happens when the player re-loads during that 15 mins? Will the code run again while it was still in the while loop
or does that end once the game is re-loaded and starts up a new?

I'd just like to be able to cut that time it processes the lists down considerably but am not sure how.

Oh, forgot to mention, the lists get added to during the game if a player picks up certain items with keywords and they aren't in the list.
So the list can keep growing till there is nothing else left to add to, but items never get removed. In other words for every item that gets added
means another form to process.

Help please? Thanks guys.

-Mush-
User avatar
Bones47
 
Posts: 3399
Joined: Fri Nov 09, 2007 11:15 pm

Post » Tue Nov 20, 2012 2:56 am

First let me say that a 15-minute script execution time is ridiculous. FormLists are, in my experience, hella slow. Arrays much, much faster. I don't have any experience with using GetNthForm, so I couldn't say.

Try using an array instead using http://www.gamesas.com/topic/1365378-exampleresourcegeneral-purpose-array-functions/. If you need to track more than 128 items in a single "array", check out my http://www.gamesas.com/topic/1413790-resource-beyond-128-extended-array-functions-to-go-to-512-and-up/page__fromsearch__1. The ArrayXT page has some performance information if that interests you.

Most of these functions need to be modified to use the new Find() and RFind() functions, but I haven't had a chance to get to that yet.
User avatar
Amy Gibson
 
Posts: 3540
Joined: Wed Oct 04, 2006 2:11 pm

Post » Tue Nov 20, 2012 2:13 am

Mush: I'd stick with the FormLists so you can break it up into chunks and have the player alias and quest split the load (or activators as SkmViper suggested http://www.gamesas.com/topic/1409991-best-practices-papyrus/page__view__findpost__p__21534169). Here's a http://www.mediafire.com/?ymd0gweytxb961o with Bag of Holding's sorting FormLists which you're free to pillage, although you'll probably want to rename them and some you'll probably not need. Anyhow
Spoiler
ScriptName CSReweighQuestScript Extends Quest  FormList Property MushAmmoFLST AutoFormList Property MushBattleAxeFLST AutoFormList Property MushBowFLST AutoFormList Property MushDaggerFLST AutoFormList Property MushGreatSwordFLST AutoFormList Property MushMaceFLST AutoFormList Property MushOreIngotFLST AutoFormList Property MushPoisonFLST AutoFormList Property MushPotionFLST AutoFormList Property MushSoulGemFLST AutoFormList Property MushSwordFLST AutoFormList Property MushWarAxeFLST AutoFormList Property MushWarHammerFLST AutoEvent OnInit()	Maintenance(True)EndEvent  Function Maintenance(Bool abInit = False)	Debug.Notification("Renaming lists")	Float fTimeStart = Utility.GetCurrentRealTime()	RenameFormList(MushAmmoFLST, "Am - ")	RenameFormList(MushBattleAxeFLST, "Ba - ")	RenameFormList(MushBowFLST, "Bw - ")	RenameFormList(MushDaggerFLST, "Dg - ")	RenameFormList(MushGreatSwordFLST, "2s - ")	RenameFormList(MushMaceFLST, "Mc - ")	RenameFormList(MushOreIngotFLST, "In - ")	RenameFormList(MushPoisonFLST, "Xd - ")	RenameFormList(MushPotionFLST, "Pt - ")	RenameFormList(MushSoulGemFLST, "Sg - ")	RenameFormList(MushSwordFLST, "1s - ")	RenameFormList(MushWarAxeFLST, "Wa - ")	RenameFormList(MushWarHammerFLST, "Wh - ")	Debug.MessageBox("Finished re-naming. Time elapsed: " + (Utility.GetCurrentRealTime() - fTimeStart))EndFunctionFunction RenameFormList(FormList akList, String asPrefix) Global	Int iIndex = akList.GetSize()	While iIndex > 0		iIndex -= 1		Form kForm = akList.GetAt(iIndex)		kForm.SetName(asPrefix + kForm.GetName())	EndWhileEndFunction
That should be faster from the onset, but it might be prudent to split up the load given there will be soooooo many items to rename. While arrays would speed things up tremendously, managing them would be a nightmare unless filling 'em from FormLists once when the mod initializes, then drawing upon them after they're filled. Perhaps filling Chesko patented extended arrays with the FormLists 'If abInit' would be the fastest (excluding, of course, the first time the mod loads) since timing is of the essence (for consecutive loads).
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Tue Nov 20, 2012 5:17 am

First let me say that a 15-minute script execution time is ridiculous. FormLists are, in my experience, hella slow. Arrays much, much faster. I don't have any experience with using GetNthForm, so I couldn't say.

Try using an array instead using http://www.gamesas.com/topic/1365378-exampleresourcegeneral-purpose-array-functions/. If you need to track more than 128 items in a single "array", check out my http://www.gamesas.com/topic/1413790-resource-beyond-128-extended-array-functions-to-go-to-512-and-up/page__fromsearch__1. The ArrayXT page has some performance information if that interests you.

Most of these functions need to be modified to use the new Find() and RFind() functions, but I haven't had a chance to get to that yet.

Upon clicking those links and reading the contents, my brain cooked and turned into a nice crispy burnt black and then all the mucus in my skull liquified my previously choarcoal'd brain and made it ooz out of my ears. Papyrus was definitely made with you people in mind.
User avatar
matt white
 
Posts: 3444
Joined: Fri Jul 27, 2007 2:43 pm

Post » Tue Nov 20, 2012 7:58 am

my brain cooked and turned into a nice crispy burnt black and then all the mucus in my skull liquified my previously choarcoal'd brain and made it ooz out of my ears.
You gonna eat that? <_<

Renaming stuff en masse: You might be able to write a script for TES5Edit that prefixed the forms as desired. Editing the base forms would be the most seamless, but would also leave all sorts of room for conflicts.
User avatar
Milad Hajipour
 
Posts: 3482
Joined: Tue May 29, 2007 3:01 am

Post » Tue Nov 20, 2012 4:45 am

Will the code run again while it was still in the while loop
Once you reload your game everything resumes at the exact point it was. Just like if the player had never saved/reloaded. If you algorithm was on the second instruction on line 27 for the 137th item, it will resume at the exact same point.

Now, you need to understand that anytime you use HasKeyword, GetAt, GetNthForm, or other native functions, your script is paused for one frame (this does not happen for "non-delayed" native functions and non-native functions). Your code does nothing during that time, it just waits uselessly, it does not consume CPU. So, basically, there are two ways to proceed:
* Reduce the number of native calls, this is what JustinOther suggested and his solution saves you from testing keywords. Since you were testing up to 12 (6 on average) of them per form out of up to 14 (8 on average) instructions per form, your code will be up to 7 times faster (4 times on average), with one item performed every 2 frames (GetAt + SetName). Chesko's suggestion to use arrays would have saved you one call (GetAt) but I don't think it is worth the hassle.
* Split the job across many objects: you could for example have one quest for armors, one for potions, etc. If you have 12 quests, you will process 12 times more items per frame.


The good news is that once you understand this, everything is pretty predictable. Count the number of native calls required, the number of items and you can know in advance how long it will take. If you think it's not fast enough, you can divide further.

Upon clicking those links and reading the contents, my brain cooked and turned into a nice crispy burnt black and then all the mucus in my skull liquified my previously choarcoal'd brain and made it ooz out of my ears. Papyrus was definitely made with you people in mind.
Moving to a "real" programming language was a good idea from Bethesda but the concurrent architecture of Papyrus is very hard to deal with. There are reasons for that, though, related to the strategy used by Bethesda to exploit every core of your CPU, and concurrency is always painful. Now I would have liked more tools to deal with those problems (like a granular control over locking, etc). And I wish that in TES6 they will move to a model where object is an agent and all cals are asynchronous unless specified otherwise, with a richer language.
User avatar
Mike Plumley
 
Posts: 3392
Joined: Wed Sep 05, 2007 10:45 pm

Post » Tue Nov 20, 2012 3:45 pm

I want to thank you guys. I ended up using JustinOther's script combined with Perdev's and split up the work with 6 different quests.
I went from 15 minutes rl down to 30 seconds so I thank you. I used 1 quest script with different int 'states' or sections. so quest 1
would run section 0, quest 2- section 1, etc.. I thought it would slow it down but I was surprised it was rather quick.

Here's the quest script that is used on 6 different quests:
Spoiler
Scriptname CSReweighNameQuestScript extends Quest  Actor Property PlayerRef AutoKeyword Property VendorItemFood AutoKeyword Property VendorItemFoodRaw  Auto  Keyword Property VendorItemPotion AutoKeyword Property VendorItemPoison AutoKeyword Property VendorItemArrow AutoKeyword Property WeapTypeBoundArrow AutoKeyword Property VendorItemSoulGem AutoKeyword Property ReusableSoulGem AutoKeyword Property VendorItemOreIngot AutoKeyword Property WeapTypeGreatSword AutoKeyword Property WeapTypeSword AutoKeyword Property WeapTypeBow AutoKeyword Property WeapTypeDagger AutoKeyword Property WeapTypeBattleAxe AutoKeyword Property WeapTypeWarAxe AutoKeyword Property WeapTypeMace AutoKeyword Property WeapTypeWarHammer Auto;Used in Misc Quest - state 5FormList Property CSGemsFLST AutoFormList Property CSClawsFLST AutoFormList Property CSOreFLST AutoFormList Property CSIngotsFLST AutoFormList Property CSSoulGemsFLST Auto;Used in Food Quest - state 4FormList Property CSFoodFLST AutoFormList Property CSIngredientFLST Auto;Used in Potions Quest - state 3FormList Property CSPoisonsFLST AutoFormList Property CSPotionsFLST Auto;Used in Weap03 Quest - state 2FormList Property CSBattleAxeFLST AutoFormList Property CSWarAxeFLST AutoFormList Property CSBowFLST Auto;Used in Weap02 Quest - state 1FormList Property CSStaffFLST AutoFormList Property CSWarHammerFLST AutoFormList Property CSMaceFLST Auto;Used In Weap01 Quest - state 0FormList Property CSDaggerFLST AutoFormList Property CSGreatSwordFLST AutoFormList Property CSOneSwordFLST AutoFormList Property CSAmmoFLST AutoInt Property iState AutoEvent OnInit()		Maintenance(True)EndEvent  Function Maintenance(Bool abInit = False)		Debug.Notification("Renaming lists")		Float fTimeStart = Utility.GetCurrentRealTime()			if iState == 0	;Weap Quest 1		RenameFormList(CSAmmoFLST, "Am - ")		RenameFormList(CSDaggerFLST, "Dg - ")		RenameFormList(CSGreatSwordFLST, "2s - ")		RenameFormList(CSOneSwordFLST, "1s - ")	elseif iState == 1	;Weap Quest 2		RenameFormList(CSStaffFLST, "Ba - ")		RenameFormList(CSWarHammerFLST, "Wh - ")		RenameFormList(CSMaceFLST, "Mc - ")	elseif iState == 2 ;Weap Quest 3		RenameFormList(CSBattleAxeFLST, "Ba - ")		RenameFormList(CSWarAxeFLST, "Wa - ")		RenameFormList(CSBowFLST, "Bw - ")	elseif iState == 3	;Potion Quest 1		 ReWeighNameFormList(CSPotionsFLST, "Pt - ", 0.1)		 ReWeighNameFormList(CSPoisonsFLST, "Xd - ", 0.1)	elseif iState == 4	;Food Quest 1		 ReWeighFormList(CSIngredientFLST, 0.1)		 ReweighFormList(CSFoodFLST, 0.2)	elseif iState == 5	;Misc Quest 1		RenameFormList(CSGemsFLST, "Gem - ")		RenameFormList(CSClawsFLST, "Claw - ")		RenameFormList(CSOreFLST, "Ore - ")		RenameFormList(CSIngotsFLST, "Ingot - ")		RenameFormList(CSSoulGemsFLST, "Soul Gem - ")	endif		Debug.MessageBox("Finished re-naming. Time elapsed: " + (Utility.GetCurrentRealTime() - fTimeStart))EndFunctionFunction RenameFormList(FormList akList, String asPrefix) Global		Int iIndex = akList.GetSize()		While iIndex &--#62; 0				iIndex -= 1				Form kForm = akList.GetAt(iIndex)				kForm.SetName(asPrefix + kForm.GetName())		EndWhileEndFunctionFunction ReWeighFormList(FormList akList, Float afNum) Global		Int iIndex = akList.GetSize()		While iIndex &--#62; 0				iIndex -= 1				Form kForm = akList.GetAt(iIndex)				kForm.Setweight(afNum)		EndWhileEndFunctionFunction ReWeighNameFormList(FormList akList, String asPrefix, Float afNum) Global		Int iIndex = akList.GetSize()		While iIndex &--#62; 0				iIndex -= 1				Form kForm = akList.GetAt(iIndex)				kForm.SetName(asPrefix + kForm.GetName())				kForm.Setweight(afNum)		EndWhileEndFunction

And this script is on 6 player aliases on each of the scripts, also split corresponding to the quests.
This is to rename items that didn't get in the initial list, so far it happens upon picking up an item from the world.
If a player has it in their inventory, they would have to drop it then pick it up to work. I didn't want to have a script
constantly check the player so I opted for an Onadded function.

Spoiler
Scriptname CSPlayerAWeighNameScript extends ReferenceAlias  Actor Property PlayerRef AutoKeyword Property VendorItemClutter AutoKeyword Property VendorItemGem AutoKeyword Property VendorItemFood AutoKeyword Property VendorItemFoodRaw  Auto  Keyword Property VendorItemPotion AutoKeyword Property VendorItemPoison AutoKeyword Property VendorItemArrow AutoKeyword Property WeapTypeBoundArrow AutoKeyword Property VendorItemSoulGem AutoKeyword Property ReusableSoulGem AutoKeyword Property VendorItemOreIngot AutoKeyword Property WeapTypeGreatSword AutoKeyword Property WeapTypeSword AutoKeyword Property WeapTypeBow AutoKeyword Property WeapTypeDagger AutoKeyword Property WeapTypeBattleAxe AutoKeyword Property WeapTypeWarAxe AutoKeyword Property WeapTypeMace AutoKeyword Property WeapTypeWarHammer AutoKeyword Property WeapTypeStaff Auto;Used in Misc Quest - state 5FormList Property CSGemsFLST AutoFormList Property CSClawsFLST AutoFormList Property CSOreFLST AutoFormList Property CSIngotsFLST AutoFormList Property CSSoulGemsFLST Auto;Used in Food Quest - state 4FormList Property CSFoodFLST AutoFormList Property CSIngredientFLST Auto;Used in Potions Quest - state 3FormList Property CSPoisonsFLST AutoFormList Property CSPotionsFLST Auto;Used in Weap03 Quest - state 2FormList Property CSBattleAxeFLST AutoFormList Property CSWarAxeFLST AutoFormList Property CSBowFLST Auto;Used in Weap02 Quest - state 1FormList Property CSStaffFLST AutoFormList Property CSWarHammerFLST AutoFormList Property CSMaceFLST Auto;Used In Weap01 Quest - state 0FormList Property CSDaggerFLST AutoFormList Property CSGreatSwordFLST AutoFormList Property CSOneSwordFLST AutoFormList Property CSAmmoFLST AutoCSReweighNameQuestScript Property CSReweighNameQuest AutoInt Property iState AutoEvent OnPlayerLoadGame()	CSReweighNameQuest.Maintenance(True)EndEventEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)	if !akSourceContainer			;if the item isn't taken from the world then don't process the rest of the script.     if iState == 0	 ;Weapon Quest 1		If(akBaseItem as ammo)			If !CSAmmoFLST.HasForm(akBaseItem)				CSAmmoFLST.AddForm(akBaseItem)				akBaseItem.SetName("Am - "+akBaseItem.GetName())			endif			elseif (akBaseItem as weapon).IsSword()			If !CSOneSwordFLST.HasForm(akBaseItem)				CSOneSwordFLST.AddForm(akBaseItem)				akBaseItem.SetName("1s - "+akBaseItem.GetName())			endif		elseif (akBaseItem as weapon).IsGreatSword()			If !CSGreatSwordFLST.HasForm(akBaseItem)				CSGreatSwordFLST.AddForm(AkBaseItem)				akBaseItem.SetName("2s - "+akBaseItem.GetName())			endif		elseif (akBaseItem as weapon).IsDagger()			if !CSDaggerFLST.HasForm(akBaseItem)				CSDaggerFLST.AddForm(akBaseItem)				akBaseItem.SetName("Dg - "+akBaseItem.GetName())			endif		endif		elseif iState == 1	 ;Weapon Quest 2		if (akBaseItem as weapon).IsMace()			if !CSMaceFLST.HasForm(akBaseItem)				CSMaceFLST.AddForm(akBaseItem)				akBaseItem.SetName("Mc - "+akBaseItem.GetName())			endif		elseif (akBaseItem as weapon).IsWarHammer()			if !CSWarHammerFLST.HasForm(akBaseItem)				CSWarHammerFLST.AddForm(akBaseItem)				akBaseItem.SetName("Wh - "+akBaseItem.GetName())			endif		elseif (akBaseItem as weapon).IsStaff()			if !CSStaffFLST.HasForm(akBaseItem)				CSStaffFLST.AddForm(akBaseItem)				akBaseItem.SetName("St - "+akBaseItem.GetName())			endif		endif		elseif iState == 2	 ;Weapon Quest 3		if (akBaseItem as weapon).IsBow()			if !CSBowFLST.HasForm(akBaseItem)				CSBowFLST.AddForm(akBaseItem)				akBaseItem.SetName("Bw - "+akBaseItem.GetName())			endif		elseif (akBaseItem as weapon).IsWarAxe()			if !CSWarAxeFLST.HasForm(akBaseItem)				CSWarAxeFLST.AddForm(akBaseItem)				akBaseItem.SetName("Wa - "+akBaseItem.GetName())			endif		elseif  (akBaseItem as weapon).IsBattleAxe()			if !CSBattleAxeFLST.HasForm(akBaseItem)				CSBattleAxeFLST.AddForm(akBaseItem)				akBaseItem.SetName("Ba - "+akBaseItem.GetName())			endif		endif		elseif iState == 3	 ;Potion Quest 1		if (akBaseItem.HasKeyword(VendorItemPotion))			if !CSPotionsFLST.HasForm(akBaseItem)				CSPotionsFLST.AddForm(akBaseItem)				akBaseItem.SetName("Pt - "+akBaseItem.GetName())				akBaseItem.SetWeight(0.0)			endif		elseif (akBaseItem.HasKeyword(VendorItemPoison))			if !CSPoisonsFLST.HasForm(akBaseItem)				CSPoisonsFLST.AddForm(akBaseItem)				akBaseItem.SetName("Xd - "+akBaseItem.GetName())				akBaseItem.SetWeight(0.0)			endif		endif		elseif iState == 4	 ;Food Quest 1		if (akBaseItem as Ingredient)			if !CSIngredientFLST.HasForm(akBaseItem)				CSIngredientFLST.AddForm(akBaseItem)				akBaseItem.SetWeight(0.0)			endif		elseif (akBaseItem.HasKeyword(VendorItemFood)) || (akBaseItem.HasKeyword(VendorItemFoodRaw))			if !CSFoodFLST.HasForm(akBaseItem)				CSFoodFLST.AddForm(akBaseItem)				CSFoodFLST.SetWeight(0.0)				endif		endif			elseif iState == 5	 ;Misc Quest 1		if (akBaseItem.HasKeyword(VendorItemOreIngot))			if !CSIngotsFLST.HasForm(akBaseItem)				CSIngotsFLST.AddForm(akBaseItem)				akBaseItem.SetName("Ingot - "+akBaseItem.GetName())			endif		elseif (akBaseItem.HasKeyword(VendorItemSoulGem)) || (akBaseItem.HasKeyword(ReusableSoulGem))			if !CSSoulGemsFLST.HasForm(akBaseItem)				CSSoulGemsFLST.AddForm(akBaseItem)				akBaseItem.SetName("Soul Gem - "+akBaseItem.GetName())			endif		elseif (akBaseItem.HasKeyword(VendorItemGem))			if !CSGemsFLST.HasForm(akBaseItem)				CSGemsFLST.AddForm(akBaseItem)				akBaseItem.SetName("Gem - "+akBaseItem.GetName())			endif		elseif (akBaseItem.HasKeyword(VendorItemClutter)) && (akBaseItem.GetName() == "Claw")			if !CSClawsFLST.HasForm(akBaseItem)				CSClawsFLST.AddForm(akBaseItem)				akBaseItem.SetName("Claw - "+akBaseItem.GetName())			endif		endif	endifendifEndEvent

Please forgive the formatting. I use Notepad+ and in that program the codes line up fine.

Edit: Spelling
User avatar
Poetic Vice
 
Posts: 3440
Joined: Wed Oct 31, 2007 8:19 pm

Post » Tue Nov 20, 2012 9:28 am

You gonna eat that? <_<


All I did was tell the truth. :)
User avatar
jess hughes
 
Posts: 3382
Joined: Tue Oct 24, 2006 8:10 pm

Previous

Return to V - Skyrim