[RELz]Custom Spell Icons

Post » Sat Feb 19, 2011 7:46 am

Yes. One of my initial attempts to fix the spellbook issue was messing around with the XML, but I could never get it to work. Your comment made me take another look and I found the problem. It turns out that the search path for UI icons is different from the path for everything else :brokencomputer:

With that issue resolved I'm doing a re-write to have both the menu and HUD icons be set using the ui XML. It will eliminate all the remaining issues and provide seamless icon replacement.

Nice. Can't wait :thumbsup:
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Sat Feb 19, 2011 9:09 am

@WalkerInShadows

Next version fixes the issue... check out this preview picture: http://www.tesnexus.com/downloads/images/26196-1-1249270124.JPG
User avatar
C.L.U.T.C.H
 
Posts: 3385
Joined: Tue Aug 14, 2007 6:23 pm

Post » Sat Feb 19, 2011 10:23 am

Very nice. :D I can definitively say that something in your mod was indeed causing my hotkey issue with Septim Mansion - after I uninstalled it, the SM teleport spell remained bound after being cast, like it should. No other spell or item had that problem, so it might be something with the fact that it gets replaced with the other spell. I don't know if that other spell takes up the same hotkey slot (I'll have to check), but it could be causing problems with assigned icons.
User avatar
Emily Shackleton
 
Posts: 3535
Joined: Sun Feb 11, 2007 12:36 am

Post » Sat Feb 19, 2011 12:30 am

Oh! Now I'm drooling...

Just place my comment here and it'll be fine. Who knows? Maybe I came from the future thinking said feature was already added. :P

Ah, I'm just joking. I'm loving the addition immensely. Thanks again! :tops:
User avatar
Andrea Pratt
 
Posts: 3396
Joined: Mon Jul 31, 2006 4:49 am

Post » Sat Feb 19, 2011 10:16 am

Version 2 Released!
- Bugs fixed, annoying issues resolved
- See custom icons in your spellbook
- Set icons without leaving your inventory/spellbook
- Copy icons from one spell to another
- Tools for modders to add custom icons to their own mods
User avatar
Tyrel
 
Posts: 3304
Joined: Tue Oct 30, 2007 4:52 am

Post » Sat Feb 19, 2011 12:03 pm

I have a bug report :(
With the new version, whenever I set an icon using the lesser power, it shows up fine in the inventory, but is the script effect icon in the HUD. This is sad :(
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

Post » Sat Feb 19, 2011 3:15 am

Misc Bug Report:
The first time I start a SaveGame with your mod active (i.e. the SaveGame was created without your mod Active) my currently equipped Spell changes to "010030FD": CSIDummySpell). It doesn't get added to the Spellbook, though.

Nothing serious, but still annoying. ;)
User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Sat Feb 19, 2011 6:16 am

I have a bug report :(
With the new version, whenever I set an icon using the lesser power, it shows up fine in the inventory, but is the script effect icon in the HUD. This is sad :(


I can't reproduce this one, can you give me more details?

Misc Bug Report:
The first time I start a SaveGame with your mod active (i.e. the SaveGame was created without your mod Active) my currently equipped Spell changes to "010030FD": CSIDummySpell). It doesn't get added to the Spellbook, though.

Nothing serious, but still annoying. ;)


When you load a game, CSI needs to refresh your spell icon by selecting the dummy spell then putting back your previous spell (since UI stuff doesn't get saved). If you happened to remove a mod that contained the spell you had selected when you saved the game, I could see this happening. CSI can't restore the previous spell when it doesn't exist.
User avatar
CORY
 
Posts: 3335
Joined: Sat Oct 13, 2007 9:54 pm

Post » Sat Feb 19, 2011 1:49 am

It's a Vanilla-Spell (00000000 (Console Output of GetPlayerSpell): the Healing-Spell from the beginning, should be DefaultPlayerSpell), so I didn't remove the mod. ;)
Maybe the FormID is the cause of the Problem, but from my experience checking against the EditorID works without problems (Although GetPlayerSpell seems to have problems when called several times in one frame --> Variable).
User avatar
The Time Car
 
Posts: 3435
Joined: Sat Oct 27, 2007 7:13 pm

Post » Sat Feb 19, 2011 12:20 pm

I can't reproduce this one, can you give me more details?



When you load a game, CSI needs to refresh your spell icon by selecting the dummy spell then putting back your previous spell (since UI stuff doesn't get saved). If you happened to remove a mod that contained the spell you had selected when you saved the game, I could see this happening. CSI can't restore the previous spell when it doesn't exist.


Any spell I give a custom icon to shows up fine in the spellbook, but the icon in gamemode is my script effect icon - regardless of which school it's in. I cleansaved when I installed, and v1 still works fine, so perhaps it's just me? :S
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Sat Feb 19, 2011 1:50 am

(Although GetPlayerSpell seems to have problems when called several times in one frame --> Variable).


:huh: Never heard of this problem, though that might explain it... except GetPlayerSpell is only used in assignment once per frame (and only potentially called twice), and if this was the problem you wouldn't just see it on loading.

I found this in the wiki documentation:

Removing the active Spell should be done with caution. OBSE's developers have not found the player's spell list yet, so after you remove the active spell, GetActiveSpell will return 0 until the user selects a new spell. In the future it will always return the spell that will be cast, once we find that information.


Maybe on game load you have a mod that removes the active spell for a couple frames, which would result in the problem you have described.

Any spell I give a custom icon to shows up fine in the spellbook, but the icon in gamemode is my script effect icon - regardless of which school it's in. I cleansaved when I installed, and v1 still works fine, so perhaps it's just me? :S


Does the icon show when you set it from your inventory using the 'I' key?
User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am

Post » Sat Feb 19, 2011 9:25 am

Same behaviour, alas. Could UI mods have any bearing on this?
User avatar
JD bernal
 
Posts: 3450
Joined: Sun Sep 02, 2007 8:10 am

Post » Fri Feb 18, 2011 11:07 pm

Same behaviour, alas. Could UI mods have any bearing on this?


Maybe. Do you have a UI mod that does something unusual to the HUD?
User avatar
ILy- Forver
 
Posts: 3459
Joined: Sun Feb 04, 2007 3:18 am

Post » Sat Feb 19, 2011 10:01 am

Nothing weird, just good ol' DarkUI'd DarN.
User avatar
Marguerite Dabrin
 
Posts: 3546
Joined: Tue Mar 20, 2007 11:33 am

Post » Sat Feb 19, 2011 6:09 am

:huh: Never heard of this problem, though that might explain it... except GetPlayerSpell is only used in assignment once per frame (and only potentially called twice), and if this was the problem you wouldn't just see it on loading.


Found it because a code like this didn't work:
scn LPCSBActiCheckCurrentSpellScriptref rSpellarray_var aIteratorBegin OnActivate	let rSpell := GetPlayerSpell	if ( Player.HasSpell rSpell == 0 ) && ( GetObjectType rSpell == 16 )		DebugPrint "%aLPCSB:%a Player has equipped a hidden Spell -> Search other Spell", 2, 3		ForEach aIterator <- ( Player.GetSpells )			let rSpell := aIterator["Value"]			if ( GetSpellType rSpell == 1 ) || ( GetSpellType rSpell == 4 )		;Disease || Ability				Continue			else				SelectPlayerSpell rSpell				Break			endif					Loop		if ( Player.HasSpell rSpell == 0 )			DebugPrint "%aLPCSB:%a No Spell found -> Search for Scrolls", 2, 3			ForEach aIterator <- ( Player.GetItems 21 )				let rSpell := aIterator["Value"]				if ( GetBookIsScroll rSpell )					SelectPlayerSpell rSpell					Break				endif			Loop		endif		let aIterator := ar_Null	endifEnd

I think sth. like this is better then just leaving a (hostile) dummy spell selected. ;)
Or you just switch back to DefaultPlayerSpell, at least this wouldn't hurt anyone. ^^



Btw: The change to the DummySpell occurred only with DefaultPlayerSpell.


Does the icon show when you set it from your inventory using the 'I' key?

OK, question was not for me, but I have a similar behavior:
Changing the Icon of a SpellEffect using I works (displays all right in the Spellbook, and in Gamemode the Icon for the Selected Spell), but the Icon in the upper right corner (for active Effects) still shows the ScriptEffect-Icon. Couldn't you change Icons of every Script-Effect in the Effect-List, too?
Because I think this is due to displaying the Effects, not the spells.


Additionally, I tried setting the Icons of several Spell with a Mod, but it didn't work. Maybe the Error is on my side*, so is there any way to enable some Debug-Output?

*I don't like dependencies, so I chose a slightly altered way. Would be easier btw. if the Variables would be hold by a Quest. ;)
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Sat Feb 19, 2011 9:57 am

I think sth. like this is better then just leaving a (hostile) dummy spell selected. ;)
Or you just switch back to DefaultPlayerSpell, at least this wouldn't hurt anyone. ^^


The exact code that is causing you problems is this:

if ((currentSpell != GetPlayerSpell) || (refresh))	set currentSpell to GetPlayerSpell	if (refresh)		SelectPlayerSpell CSIDummySpell		SelectPlayerSpell currentSpell		set refresh to 0	endif...


There is the assumption that GetPlayerSpell will actually return a valid spell reference. I suppose I could add a check that currentSpell == 0, and if so, set the player spell to DefaultPlayerSpell.

edit: found a way to avoid the issue.

OK, question was not for me, but I have a similar behavior:
Changing the Icon of a SpellEffect using I works (displays all right in the Spellbook, and in Gamemode the Icon for the Selected Spell), but the Icon in the upper right corner (for active Effects) still shows the ScriptEffect-Icon. Couldn't you change Icons of every Script-Effect in the Effect-List, too?
Because I think this is due to displaying the Effects, not the spells.


Maybe this is what Phosi was talking about... I thought he meant the icon in the lower left :facepalm:
The problem with changing the active effect icons is that spells share them - two or more spells with the same effect results in one icon, and the timer displayed is for the most recent active effect. So you end up with your HUD giving you incorrect information about the status of your spells. The feature only existed in the 1st version as one of the annoying side effects/bugs of messing with magic effect settings, which the new version no longer does.

That said, it might be possible to have at least script effects show unique icons. Back to the CS...

Additionally, I tried setting the Icons of several Spell with a Mod, but it didn't work. Maybe the Error is on my side*, so is there any way to enable some Debug-Output?

*I don't like dependencies, so I chose a slightly altered way. Would be easier btw. if the Variables would be hold by a Quest. ;)


I don't thinks it's possible without dependencies, unless you copy the entire contents of the .esm into your mod (which you are free to do so). But then, as I explained in an earlier post, you will have conflicts if you use your mod with CSI or any other mod that does the same.

I'm curious what your altered way is.
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Sat Feb 19, 2011 2:08 am

I don't thinks it's possible without dependencies, unless you copy the entire contents of the .esm into your mod (which you are free to do so). But then, as I explained in an earlier post, you will have conflicts if you use your mod with CSI or any other mod that does the same.

I'm curious what your altered way is.


	RunScriptLine "set LPUSfEQuInitialization.rCustomSpellIcons to CustomSpellIcons"	set lIndex to ( GetSourceModIndex rCustomSpellIcons )	set sTemp to ( GetNthModName lIndex )	set rCustomSpellIconsReset to ( GetFormFromMod $sTemp "001C82" )	set rCustomSpellIconsSet to ( GetFormFromMod $sTemp "0015AD" )	sv_Destruct sTemp	if Eval ( IsFormValid rCustomSpellIconsSet ) && ( !bCustomSpellIcons )		if ( IsReference rCustomSpellIconsSet )	;I put this one in because I used the wrong FormID first ^^			if ( rCustomSpellIconsSet.HasVariable "SpellRef" ) && ( rCustomSpellIconsSet.HasVariable "IconPath" )				PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Custom Spell Icons found."				set bCustomSpellIcons to 1				let aMagicItems := ( Call LPUSfEFuncGetAllMagicItems )				PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Start, MagicEffectCount: " + ( ToString ( ar_Size aMagicItems ) )				ForEach aIterator <- aMagicItems					let rMagicItem := ( aIterator["Value"] )					PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " MagicItem: " + ( GetName rMagicItem ) + " (" + ( GetFormIDString rMagicItem ) + ")"					set lIndex to -1					While ( ( lIndex += 1 ) < ( GetMagicItemEffectCount rMagicItem ) )						if ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEAbsorbScript ) || ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEDrainScript ) || ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEFortifyScript )							Break						endif					Loop					if ( lIndex == ( GetMagicItemEffectCount rMagicItem ) )						PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " MagicItem " + ( GetName rMagicItem ) + " (" + ( GetFormIDString rMagicItem ) + ") doesn't have an Unarmored ME-Script."						Continue					endif					if ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEAbsorbScript )						set rMagicEffect to ( MagicEffectFromChars ABSK )					elseif ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEDrainScript )						set rMagicEffect to ( MagicEffectFromChars DRSK )					elseif ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEFortifyScript )						set rMagicEffect to ( MagicEffectFromChars FOSK )					endif					set sIconPath to ( GetIconPath rMagicEffect )					PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " IconPath: " + sIconPath					rCustomSpellIconsSet.RunScriptLine "set SpellRef to %i", rMagicItem, 1		;These are the lines where I'm not sure if they're working					rCustomSpellIconsSet.RunScriptLine "set IconPath to %.0f", sIconPath, 1		;These are the lines where I'm not sure if they're working					rCustomSpellIconsSet.Activate2 Player, 1				Loop				sv_Destruct sIconPath				PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Finished, MagicEffectCount: " + ( ToString ( ar_Size aMagicItems ) )			else				PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Variables not found. Reference: " + ( rCustomSpellIconsSet.GetName ) + " (" + ( rCustomSpellIconsSet.GetFormIDString ) + ")"				set bCustomSpellIcons to 0			endif		else			PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Is not a Reference: " + ( GetName rCustomSpellIconsSet ) + " (" + ( GetFormIDString rCustomSpellIconsSet ) + ")"			set bCustomSpellIcons to 0		endif	endif


So in fact I just need an output-function for the values of SpellRef & IconPath. :D
Think I'll do this for myself, shouldn't be that difficult. ;)
User avatar
Theodore Walling
 
Posts: 3420
Joined: Sat Jun 02, 2007 12:48 pm

Post » Sat Feb 19, 2011 5:05 am

Seems like a lot of work just to avoid the file requiring a dependency to load, even though it still needs the esm to actually do anything. Though I guess it's a good way to include the feature as an option without needing extra .esp patches. If you can wait until OBSE v0018 I'm going to add actual functions to make it easier to work with.
User avatar
Kelly Upshall
 
Posts: 3475
Joined: Sat Oct 28, 2006 6:26 pm

Post » Fri Feb 18, 2011 11:32 pm

Only the first 7 lines are required to remove the dependency. Not that much of work I think. At least for me, because I already did this for X-Skills so this was basically Copy & Paste.
Setting the Variables is a bit difficult, though.
The way I tried it here didn't work by the way. ;)

Currently the main problem I have is, that I already use a UserFunction and therefore can't reference it directly in RunScriptLine.
Will try out using a Quest-Variable next. ;)

Oh, and the ForEach-Block is only required because it's impossible to use let within RunScriptLine and therefore to use Arrays.

Here's my (adjusted & currently untested) Function-Code:
scn LPUSfEFuncSetSpellIconslong lIndexref rCustomSpellIconsSetref rMagicEffectref rMagicItemref rScriptarray_var aIteratorarray_var aMagicItemsBegin Function { rCustomSpellIconsSet }	set rScript to LPUSfEFuncSetSpellIcons	if ( IsFormValid rCustomSpellIconsSet )		PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Custom Spell Icons found."		SetFunctionValue 1		let aMagicItems := ( Call LPUSfEFuncGetAllMagicItems )		PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Start, MagicEffectCount: " + ( ToString ( ar_Size aMagicItems ) )		ForEach aIterator <- aMagicItems			let LPUSfEQuInitialization.rSpell := rMagicItem := ( aIterator["Value"] )			PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " MagicItem: " + ( GetName rMagicItem ) + " (" + ( GetFormIDString rMagicItem ) + ")"			set lIndex to -1			While ( ( lIndex += 1 ) < ( GetMagicItemEffectCount rMagicItem ) )				if ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEAbsorbScript ) || ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEDrainScript ) || ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEFortifyScript )					Break				endif			Loop			if ( lIndex == ( GetMagicItemEffectCount rMagicItem ) )				PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " MagicItem " + ( GetName rMagicItem ) + " (" + ( GetFormIDString rMagicItem ) + ") doesn't have an Unarmored ME-Script."				Continue			endif			if ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEAbsorbScript )				set rMagicEffect to ( MagicEffectFromChars ABSK )			elseif ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEDrainScript )				set rMagicEffect to ( MagicEffectFromChars DRSK )			elseif ( ( GetNthEffectItemScript rMagicItem, lIndex ) == LPUSfEMEFortifyScript )				set rMagicEffect to ( MagicEffectFromChars FOSK )			endif			set LPUSfEQuInitialization.sTemp to ( GetIconPath rMagicEffect )			PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " IconPath: " + LPUSfEQuInitialization.sTemp			rCustomSpellIconsSet.RunScriptLine "set SpellRef to LPUSfEQuInitialization.rSpell", 1			rCustomSpellIconsSet.RunScriptLine "set IconPath to LPUSfEQuInitialization.sTemp", 1			rCustomSpellIconsSet.Activate2 Player, 1		Loop		sv_Destruct LPUSfEQuInitialization.sTemp		PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Finished, MagicEffectCount: " + ( ToString ( ar_Size aMagicItems ) )	else		PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Custom Spell Icons not found."		SetFunctionValue 0	endifEnd


And that's the code calling it:
;Scriptname & Variables hereBegin Gamemode;Some other stuff here	RunScriptLine "set LPUSfEQuInitialization.rCustomSpellIcons to CustomSpellIcons"	set lIndex to ( GetSourceModIndex rCustomSpellIcons )	set sTemp to ( GetNthModName lIndex )	set rCustomSpellIconsReset to ( GetFormFromMod $sTemp "001C82" )	set rCustomSpellIconsSet to ( GetFormFromMod $sTemp "0015AD" )	sv_Destruct sTemp	if Eval ( IsFormValid rCustomSpellIconsSet ) && ( !bCustomSpellIcons )		let bCustomSpellIcons := ( Call LPUSfEFuncSetSpellIcons rCustomSpellIconsSet )		if ( bCustomSpellIcons )			PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Custom Spell Icons Initialized."		else			PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Custom Spell Icons couldn't be Initialized."		endif	endif	if ( bAllMIDummyEffectsHidden ) && ( bCustomSpellIcons )		let bAllMIDummyEffectsHidden := ( Call LPUSfEFuncAllMIAddDummyEffects )		PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Added Dummy Effects."		Call LPUSfEFuncSetSpellIcons rCustomSpellIconsSet	endifEndBegin Menumode	if Eval ( !( Menumode 1022 ) ) && ( !( Menumode 1037 ) ) || ( !bCustomSpellIcons ) || ( bAllMIDummyEffectsHidden )	;Magic / Spell Purchase		Return	endif	let bAllMIDummyEffectsHidden := ( Call LPUSfEFuncAllMIRemoveDummyEffects )	PrintD ( ASCIIToChar 2 ) + "LPUSfE (" + ( GetFormIDString rScript ) + "):" + ( ASCIIToChar 3 ) + " Removed Dummy Effects."	Call LPUSfEFuncSetSpellIcons rCustomSpellIconsSetEnd




PS:
Just tried it: the CSI.esm doesn't need to be dependent of the Oblivion.esm.
Removing it from the MasterList fastens loading in CS drastically (and doesn't create any problems ingame). ;)




Edit:
New Code works now. :celebration:

One request, though:
Can you please also update the spells in the Spell purchase Menu (Menumode 1037). :sad:
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Sat Feb 19, 2011 7:54 am

I fixed your issue with the dummy spell showing up, you can get the new .esm from tesnexus.

Just tried it: the CSI.esm doesn't need to be dependent of the Oblivion.esm.
Removing it from the MasterList fastens loading in CS drastically (and doesn't create any problems ingame). wink.gif


That's actually why I had my dummy spell instead of just using one from oblivion.esm, but at some point I loaded a different mod, reloaded CSI, and didn't remove oblivion.esm as a master.

Can you please also update the spells in the Spell purchase Menu (Menumode 1037). 1346.gif
'

Heh, never thought about that one. Shouldn't be too hard to do.
User avatar
Epul Kedah
 
Posts: 3545
Joined: Tue Oct 09, 2007 3:35 am

Post » Sat Feb 19, 2011 10:53 am

Shouldn't be too hard to do.


...or not. Unless I'm missing something, there doesn't seem to be a way to get a list of all the spells an actor has. You can get the leveled spells, and you can use HasSpell, but there's no GetNthSpell like there is for the player. Without the list of spells I can't properly set the icons in the merchant menu.
User avatar
Taylor Bakos
 
Posts: 3408
Joined: Mon Jan 15, 2007 12:05 am

Post » Sat Feb 19, 2011 2:14 pm

...or not. Unless I'm missing something, there doesn't seem to be a way to get a list of all the spells an actor has. You can get the leveled spells, and you can use HasSpell, but there's no GetNthSpell like there is for the player. Without the list of spells I can't properly set the icons in the merchant menu.

Actually, there is. And it's just reference.GetNthSpell (same for GetSpellCount), originally it was GetNthPlayerSpell but later on it became possible to use just GetNthSpell on any reference.

When you call GetNthSpell without a reference it will default to the player.
User avatar
Sophie Morrell
 
Posts: 3364
Joined: Sat Aug 12, 2006 11:13 am

Post » Fri Feb 18, 2011 10:39 pm

In the OBSE documentation it's still listed as an alias for GetNthPlayerSpell. I guess it must be out of date, there have been a couple other functions that aren't listed. Good to hear though :)
User avatar
Ells
 
Posts: 3430
Joined: Thu Aug 10, 2006 9:03 pm

Post » Sat Feb 19, 2011 3:14 am

In the OBSE documentation it's still listed as an alias for GetNthPlayerSpell. I guess it must be out of date, there have been a couple other functions that aren't listed.

Yea it's a bit outdated, but I'm positive it works, I use it in my Spell Renamer mod without problems. :)
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Sat Feb 19, 2011 8:42 am

Ah. Alas, I did mean in the lower left, sorry :(

It's ok, though, V1 still works fine, it's a lovely mod :)
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

PreviousNext

Return to IV - Oblivion