[RELz]Custom Spell Icons

Post » Sat Feb 19, 2011 2:52 am

Second problem:
When I change an Icon via Script it is only displayed correctly in the current spell-part of the UI, not the Inventory.

[Update while writing]After some further testing this doesn't seem to occur anymore. Maybe I just was impatient again. ;)[/Update while writing]


Strange bug:
If I only replace one spell, directly add it to the player and use selectplayerspell it is shown correctly in the spellbook, but not the UI (current spell Icon still a script effect).
http://www.npshare.de/files/512a1d4a/ScreenShot0.jpg

The strange part is that this also applies to spells set with the old (Activate) method bought via spell purchase.
Only tried this once, so may be a problem on my side.

Third problem:
Spell Icons show fine in the spell purchase menu, but only until you buy a spell.
Afterwards, they all have the normal Icon again.


Still a problem. :(

Fourth problem:
Two Screenshots: http://www.npshare.de/files/56c40366/CSI0.jpg http://www.npshare.de/files/3364d802/CSI.jpg
I think both times the current spell Icon (the one you can also see in Gamemode) is the correct one.


Seems to be fixed now.
At least both show the same Icon.


But I think there's a problem with Icon assigning for a whole bunch of spells: they all have the Icon of the next group, but not the one they should have. :(
Could it be a problem because I set the Icon for 70 spells in one single frame?

Icon changes back from Script Effect to the one specified in the Script.
If it isn't this should be expected behaviour; just doesn't fit my testing purpose. ;)


Also applies if you specify a new custom Icon.



LP
User avatar
ashleigh bryden
 
Posts: 3446
Joined: Thu Jun 29, 2006 5:43 am

Post » Sat Feb 19, 2011 2:21 pm

Strange bug:
If I only replace one spell, directly add it to the player and use selectplayerspell it is shown correctly in the spellbook, but not the UI (current spell Icon still a script effect).
http://www.npshare.de/files/512a1d4a/ScreenShot0.jpg

The strange part is that this also applies to spells set with the old (Activate) method bought via spell purchase.
Only tried this once, so may be a problem on my side.


You will get some strange things when calling SelectPlayerSpell in the spellbook menu. It seems that the game doesn't update UI when it's called, and what it shows to be your selected spell is actually not.

Third problem:
Spell Icons show fine in the spell purchase menu, but only until you buy a spell.
Afterwards, they all have the normal Icon again.


Fixed, will upload new file soon.

But I think there's a problem with Icon assigning for a whole bunch of spells: they all have the Icon of the next group, but not the one they should have. :(
Could it be a problem because I set the Icon for 70 spells in one single frame?


If you use the old activate method, definitely. There are limits to how many times you can activate an object in a single frame. There may also be limits to how many times you can call a function in one frame; I know there are limits for nesting.


Icon changes back from Script Effect to the one specified in the Script.
If it isn't this should be expected behaviour; just doesn't fit my testing purpose. ;)


This sounds like expected behavior. If you set the icon by script, it should keep that icon until you remove it, and will change it back if something else changes it.
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm

Post » Sat Feb 19, 2011 3:47 am

This is just plain wonderful. I think I've managed to get all the bugs in my scripts squished, and it works exactly as desired. Have you considered contacting the cobl team to have this merged into cobl? It would make it much more accessible for the mass populous, because at the moment I don't think it's getting the exposure it deserves. Ideally you would send them the .esp and .esm seperate (.esm containing only core functionality, as you did with your old method) and they would just merge CustomSpellIcons.esm into Cobl_Main.esm, then package CustomSpellIcons.esp with the next release of cobl.

Kudos to you, statttis, you've managed to make a wonderful utility!
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Sat Feb 19, 2011 10:15 am

Any chance of getting an ini-like support? Where you can set the icons for spells through an ini instead of having to select and change each of them manually. A possible implementation could be something like this
;Manipulate Weatherset DASI.rSpell to GetFormFromMod "Oblivion.esm" "05DD22"sv_Set "magic\conjuration_icons\bringstormsconjuration.dds" DASI.sIconSetStage DASI 10;Summon Haskillset DASI.rSpell to GetFormFromMod "Oblivion.esm" "019867"sv_Set "magic\conjuration_icons\summonhaskillconjuration.dds" DASI.sIconSetStage DASI 10;Sheogorath's Protectionset DASI.rSpell to GetFormFromMod "Oblivion.esm" "04BD29"sv_Set "magic\conjuration_icons\sheogorathsprotectionconjuration.dds" DASI.sIconSetStage DASI 10
Where stage 10 of the DASI quest consists of this line (user functions don't work in the console/batch scripts but they do in result scripts).
Call DASISetIcon DASI.rSpell DASI.sIcon 0
Don't mind the names in the code, it's from a very, very old mod that basically did the same as CSI. I never got past 95% completion (a fate that alot of my mods meet) and when you released CSI it got buried even deeper. :P Although I may have finally found a way to give scripted effects unique icons in the active spells (the upper right icons).

-kyoma
User avatar
Charleigh Anderson
 
Posts: 3398
Joined: Fri Feb 02, 2007 5:17 am

Post » Fri Feb 18, 2011 9:49 pm

Have you considered contacting the cobl team to have this merged into cobl?


I think somebody might have asked about that before. Or maybe not, it was a while ago. I just remember there being some reason why this wouldn't fit in cobl.

Any chance of getting an ini-like support?


Sounds easy enough to add. I'll put it into 2.4.

Although I may have finally found a way to give scripted effects unique icons in the active spells (the upper right icons).


Interesting... a proper way to do that would be a nice addition.
User avatar
Del Arte
 
Posts: 3543
Joined: Tue Aug 01, 2006 8:40 pm

Post » Sat Feb 19, 2011 5:31 am

Damn it, read this post, but totally forgot to answer. :banghead:

You will get some strange things when calling SelectPlayerSpell in the spellbook menu. It seems that the game doesn't update UI when it's called, and what it shows to be your selected spell is actually not.


SelectPlayerSpell was called in Gamemode, so the problem lies somewhere else.

If you use the old activate method, definitely. There are limits to how many times you can activate an object in a single frame. There may also be limits to how many times you can call a function in one frame; I know there are limits for nesting.


Well, I use the UF-Version. Can't remember if this also occured with the Activate-method (you can bypass the limit using Activate2 btw.).
I think I could drastically reduce the number of function calls if you'd add a function accepting arrays. Although this would require a little work on my part. ;)

This sounds like expected behavior. If you set the icon by script, it should keep that icon until you remove it, and will change it back if something else changes it.


No problem with that.


According the Spell purchase problem:
Don't know which Version I'm currently running and don't remember the results of my test. Maybe I can tell you later.
User avatar
Rex Help
 
Posts: 3380
Joined: Mon Jun 18, 2007 6:52 pm

Post » Sat Feb 19, 2011 2:06 pm

I think I could drastically reduce the number of function calls if you'd add a function accepting arrays.

If you use the activate method, there are two arrays you can set:
array_var spellRefs
array_var iconPaths
You can use them to assign one icon to multiple spells or multiple spells to multiple icons. I took that out of the documentation when I added the function method, since OBSE 18 adds ForEach which makes doing the arrays yourself easy (plus the array assignment code isn't well tested).

As for your bug with multiple calls, that should be fixed in future versions. The SetStage method seems to work fine when assigning large numbers of icons. I've used it with an ini file that assigns dozens of icons.


Future plans:
A complete set of custom icons that covers every spell in LAME, Supreme Magicka, and Midas.
An OBSE plugin that makes custom icons totally seamless.
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Sat Feb 19, 2011 12:37 pm

Oh, God! I was about to make a custom magic and was wondering how to give it a custom icon when I see this and know I can use it in my mod! :cry: I almost cry in happiness!

Let me verify a bit:

ref spell ;reference to spell you want to give a custom iconstring_var iconPath ;string path of the icon. should be something like e.g. "clutter\upper\iconupperbowl01.dds"ref csiFunctionmy codesmy codesmy codesset csiFunction to GetFormFromMod "CustomSpellIcons.esm" 0059F3Call csiFunction spell $iconPath


Is this how I should make my mod if I want to use custom icons?
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Fri Feb 18, 2011 10:29 pm

Oh, God! I was about to make a custom magic and was wondering how to give it a custom icon when I see this and know I can use it in my mod! :cry: I almost cry in happiness!

Let me verify a bit:

ref spell ;reference to spell you want to give a custom iconstring_var iconPath ;string path of the icon. should be something like e.g. "clutter\upper\iconupperbowl01.dds"ref csiFunctionmy codesmy codesmy codesset csiFunction to GetFormFromMod "CustomSpellIcons.esm" 0059F3Call csiFunction spell $iconPath


Is this how I should make my mod if I want to use custom icons?

Yes. Just don't forget to assign spell and iconPath somewhere in "my codes."
User avatar
Music Show
 
Posts: 3512
Joined: Sun Sep 09, 2007 10:53 am

Post » Sat Feb 19, 2011 10:45 am

hmm... will this kind of code do the trick?
set spell to RaestlozSunburnSpellset iconpath to "Textures/Menus/Icons/MyCustomIcon.dds"

User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Sat Feb 19, 2011 1:28 pm

You should change "Textures/Menus/Icons/MyCustomIcon.dds" to just "Icons/MyCustomIcon.dds" or "MyCustomIcon.dds" Basically give the icon path like you would in the Construction Set for an item.
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Sat Feb 19, 2011 12:23 pm

Sorry, I'm a bit confused, because in CS the folder path is too long that the button cannot display the full path :shrug:

Okay, why not we go with an example? I'll understand faster that way.

Say, I have an icon placed in this:
Oblivion/Data/Textures/Menus/Icons/CustomSpells/MyIcon.dds

what should I feed to icon_path?
User avatar
Kayla Bee
 
Posts: 3349
Joined: Fri Aug 24, 2007 5:34 pm

Post » Sat Feb 19, 2011 4:54 am

Say, I have an icon placed in this:
Oblivion/Data/Textures/Menus/Icons/CustomSpells/MyIcon.dds

what should I feed to icon_path?

Sorry for being confusing. You should feed it this: "CustomSpells/MyIcon.dds"


Progress updates:
There are now icons for about 50% of LAME, 80% of Supreme Magicka, 10% of Midas, and a few for Race Balancing Project and Deadly reflex.
Example of my better efforts: http://www.tesnexus.com/imageshare/images/778458-1275670510.jpg
The OBSE plugin is coming along nicely; using AddSpell will now display custom icons.
User avatar
remi lasisi
 
Posts: 3307
Joined: Sun Jul 02, 2006 2:26 pm

Post » Sat Feb 19, 2011 1:23 pm

If you use the activate method, there are two arrays you can set:
array_var spellRefs
array_var iconPaths
You can use them to assign one icon to multiple spells or multiple spells to multiple icons. I took that out of the documentation when I added the function method, since OBSE 18 adds ForEach which makes doing the arrays yourself easy (plus the array assignment code isn't well tested).

As for your bug with multiple calls, that should be fixed in future versions. The SetStage method seems to work fine when assigning large numbers of icons. I've used it with an ini file that assigns dozens of icons.


Found the source of the bug: I assigned the wrong name to the Magic Effect, CSI worked without problems from the beginning (well, except the spell purchase thing). Sorry if that bothered you, was a c&p-Error. I forgot to change the important part.:banghead:
User avatar
Camden Unglesbee
 
Posts: 3467
Joined: Wed Aug 15, 2007 8:30 am

Post » Sat Feb 19, 2011 1:55 am

Sorry for being confusing. You should feed it this: "CustomSpells/MyIcon.dds"


Progress updates:
There are now icons for about 50% of LAME, 80% of Supreme Magicka, 10% of Midas, and a few for Race Balancing Project and Deadly reflex.
Example of my better efforts: http://www.tesnexus.com/imageshare/images/778458-1275670510.jpg
The OBSE plugin is coming along nicely; using AddSpell will now display custom icons.


Yes! Thanks! Now I can go and make my own Mighty Morphin' Power Rangers mod :intergalactic: thanks again for your brilliant mod! :D

One more thing, should I make the esm a parent when I make my mod (load it along with my intended plugin) or I can just go and use that reference?
User avatar
Invasion's
 
Posts: 3546
Joined: Fri Aug 18, 2006 6:09 pm

Post » Sat Feb 19, 2011 9:33 am

One more thing, should I make the esm a parent when I make my mod (load it along with my intended plugin) or I can just go and use that reference?

You should just use the reference. That way your mod won't require CSI, but users who have it will get to see the icons.
User avatar
Travis
 
Posts: 3456
Joined: Wed Oct 24, 2007 1:57 am

Post » Sat Feb 19, 2011 12:22 am

You should just use the reference. That way your mod won't require CSI, but users who have it will get to see the icons.

Wait, but um... the reference calls csiFunction right? Shouldn't it require CSI then?
set csiFunction to GetFormFromMod "CustomSpellIcons.esm" 0059F3Call csiFunction spell $iconPath

User avatar
Hearts
 
Posts: 3306
Joined: Sat Oct 20, 2007 1:26 am

Post » Sat Feb 19, 2011 1:24 pm

Wait, but um... the reference calls csiFunction right? Shouldn't it require CSI then?

To avoid error messages you'll want to check that the file is loaded first. Something like:
if (IsModLoaded "CustomSpellIcons.esm");code to set iconsendif


I promise to include a well written guide with the next version :unsure:
User avatar
Emily abigail Villarreal
 
Posts: 3433
Joined: Mon Aug 27, 2007 9:38 am

Post » Sat Feb 19, 2011 12:44 pm

Sorry for being confusing. You should feed it this: "CustomSpells/MyIcon.dds"


Progress updates:
There are now icons for about 50% of LAME, 80% of Supreme Magicka, 10% of Midas, and a few for Race Balancing Project and Deadly reflex.
Example of my better efforts: http://www.tesnexus.com/imageshare/images/778458-1275670510.jpg
The OBSE plugin is coming along nicely; using AddSpell will now display custom icons.


Liking the two icons, and I can't wait to see the rest. You are progressing through those faster than I thought. Will be nice to finally be rid of all the script effect icon spells :D

Will you be releasing the DLL with the new icons for the magic mods?
User avatar
Kaley X
 
Posts: 3372
Joined: Wed Jul 05, 2006 5:46 pm

Post » Sat Feb 19, 2011 4:06 am

Liking the two icons, and I can't wait to see the rest. You are progressing through those faster than I thought. Will be nice to finally be rid of all the script effect icon spells :D

Will you be releasing the DLL with the new icons for the magic mods?

Thats the plan. I may release the .dll before I finish all the icons, considering how well things have been going. The plugin already does more than everything I made previously. Custom icons now show whenever a spell does: AddSpell, HUD (now without any flickering), spell list, spell purchase, hotkeys. Right now I'm working on icons for scripted active effects.

http://www.tesnexus.com/imageshare/images/778458-1275774761.jpg
User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am

Post » Sat Feb 19, 2011 1:33 am

Very nice. Looking forward to it.
User avatar
Kelsey Hall
 
Posts: 3355
Joined: Sat Dec 16, 2006 8:10 pm

Post » Sat Feb 19, 2011 10:49 am

Thanks for all your hard work on this mod statttis - to me this one falls in my 'must have' mod category.
Having the same icon for all scripted spells was really boring.

I'm surprised you don't have more downloads on nexus.
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Sat Feb 19, 2011 12:38 pm

More screenshots!

http://www.tesnexus.com/imageshare/images/778458-1275841899.jpg
http://www.tesnexus.com/imageshare/images/778458-1275841919.jpg

I may end up leaving out active effects because their behavior is broken (once you start giving them useful icons) and fixing it is beyond my skills.
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Sat Feb 19, 2011 12:43 pm

Awesome!
User avatar
Brittany Abner
 
Posts: 3401
Joined: Wed Oct 24, 2007 10:48 pm

Post » Sat Feb 19, 2011 8:29 am

Well now I have active effect icons working for both the HUD and active effects list in the magic menu. The HUD behavior is still less than ideal though.
Icons for LAME and Supreme Magicka are done and Midas is almost done. Icons for RBP are in the works.

New screenshots:
http://www.tesnexus.com/imageshare/images/778458-1276046577.jpg
http://www.tesnexus.com/imageshare/images/778458-1276046598.jpg
http://www.tesnexus.com/imageshare/images/778458-1276046110.jpg
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

PreviousNext

Return to IV - Oblivion