[MOD] Buff/Debuff Icons

Discuss modding questions and implementation details.
Post Reply
User avatar
VMblast
Posts: 519
Joined: Wed Mar 29, 2017 12:22 pm
Contact:

[MOD] Buff/Debuff Icons

Post by VMblast »

Ok, Ill just open new mod topic for this icon set. As the title says, this is my attempt do produce the entire set of core debuff icons (from the list).

Spoiler!
paralysis++
free action++
(taking) continuous damage (of some kind)++
elemental resistance (by element?)++
fortified attribute (of some kind)
invisibility (different levels: chameleon/shadow form/invisibility, normal or true)
levitation
slowfall
light
regenerate health
silence(d)
spell absorption
spell reflection
spell resistance
climbing
jumping
water breathing
water walking
shield [not implemented in DFU yet]


PARALYSIS: Image Image Image

FREE ACTION: Image Image Image

CONTINUOUS DAMAGE: Image Image Image

ELEMENTAL RESISTANCE: Image Image Image


PS - Unfortunately I dont know how to install them into the game, so this is for someone who can make that kind of comment. :P
Last edited by VMblast on Sun Jan 06, 2019 1:40 pm, edited 1 time in total.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [MOD] Buff/Debuff Icons

Post by pango »

I assume you could overload icons by creating a StreamingAssets/Textures/Img/ICON00I0.IMG.png with a similar layout as the standard one (69 square icons packed in 20 rows).
ICON00I0.IMG.png
ICON00I0.IMG.png (30.82 KiB) Viewed 4441 times
Loading code doesn't seem to assume a specific size, I'm not sure what are scale constraints.

But when I tested it didn't work for me, I got white icons instead:

Code: Select all

Graphics.CopyTexture with a region will not copy readable texture data for compressed formats (source texture format 12)

Graphics.CopyTexture can only copy between same texture format groups (OpenGL internal formats: src=33779, blockSize=16 ; dst=32856, blockSize=4)
So I couldn't test icons overloading on my system. Maybe I'm doing something wrong.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [MOD] Buff/Debuff Icons

Post by pango »

Okay, it's related to DXT5 packing, if I convert the icons atlas back to ARGB32 format it works (ok, it's probably not a good idea):

Code: Select all

diff --git a/Assets/Scripts/Game/UserInterface/SpellIconCollection.cs b/Assets/Scripts/Game/UserInterface/SpellIconCollection.cs
index 58731630..9cd6fbc5 100644
--- a/Assets/Scripts/Game/UserInterface/SpellIconCollection.cs
+++ b/Assets/Scripts/Game/UserInterface/SpellIconCollection.cs
@@ -174,13 +174,17 @@ namespace DaggerfallWorkshop.Game.UserInterface
             spellIcons.Clear();
 
             // Get source atlas
-            Texture2D spellIconAtlas = DaggerfallUI.GetTextureFromImg(spellIconsFile);
-            if (spellIconAtlas == null)
+            Texture2D loadSpellIconAtlas = DaggerfallUI.GetTextureFromImg(spellIconsFile);
+            if (loadSpellIconAtlas == null)
             {
                 Debug.LogWarning("SpellIconCollection: Could not load spell icons atlas texture. Arena2 path might not be set yet.");
                 return;
             }
 
+            Texture2D spellIconAtlas = new Texture2D(loadSpellIconAtlas.width, loadSpellIconAtlas.height, TextureFormat.ARGB32, false);
+            spellIconAtlas.SetPixels(loadSpellIconAtlas.GetPixels());
+            spellIconAtlas.Apply();
+
             // Derive dimension of each icon from atlas width
             const int rowCount = 20;
             int dim = spellIconAtlas.width / rowCount;
But wow, it feels great!
spells icons.jpg
spells icons.jpg (201.6 KiB) Viewed 4425 times
(the icons I replaced are rather random, they just happened to be the icons of my current buffs)
Attachments
ICON00I0.IMG.png
ICON00I0.IMG.png (1.01 MiB) Viewed 4425 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: [MOD] Buff/Debuff Icons

Post by Jay_H »

Clever stuff. Looks right in line with a modern MMO :)

User avatar
VMblast
Posts: 519
Joined: Wed Mar 29, 2017 12:22 pm
Contact:

Re: [MOD] Buff/Debuff Icons

Post by VMblast »

@pango
Thanks! It looks like it works! So, the icons just should be placed into existing atlas to work? Good to know. :)

Jay_H wrote: Sun Jan 06, 2019 3:46 am Clever stuff. Looks right in line with a modern MMO :)
Uuugghhhh, that wasnt what I was aiming at....hmm maybe I should rethink using this style for the icons... :?

User avatar
Jukic
Posts: 68
Joined: Sun May 13, 2018 5:51 pm

Re: [MOD] Buff/Debuff Icons

Post by Jukic »

What is the exact classic meaning of all 69 icons in ICON00I0.IMG.png ? Can we make a mini table ?

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [MOD] Buff/Debuff Icons

Post by pango »

VMblast wrote: Sun Jan 06, 2019 7:53 am @pango
Thanks! It looks like it works! So, the icons just should be placed into existing atlas to work? Good to know. :)
So, DFU needs some slight modification for this to work, because currently the atlas, when loaded from external resource (not classic Daggerfall .IMG file), is compressed in memory and then it gets in the way of splitting the atlas into individual icons. Even unchecking "compressed modded textures" in options doesn't seem to work, because this is done very early when DFU starts, even before the options screen (?).
What I did is uncompress the atlas so it can be splitted, but that's not very efficient, maybe modding experts (@TheLacus? @LypyL?...) have better solutions. I just checked that it was possible, but that's outside of my zone of comfort already.

Anyway, once this is fixed, icons can be replaced with a single ICON00I0.IMG.png texture like described before.

For the test I upscaled the original .IMG file to get 86x86 pixels icons (any square resolution should do), then replaced some icons with yours with the right alignment and that was it!
Last edited by pango on Sun Jan 06, 2019 5:34 pm, edited 1 time in total.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [MOD] Buff/Debuff Icons

Post by pango »

Jukic wrote: Sun Jan 06, 2019 11:59 am What is the exact classic meaning of all 69 icons in ICON00I0.IMG.png ? Can we make a mini table ?
As I said before, there's no strong tie in classic, given the player can remap the icons of the his/her spells at any time.
But if we look at the icons associated by default to the circinate spells, it gives:

1. Image
buffs:
Jumping - Jumping
Nimbleness - Fortify Attribute (Agility)
Orc Strength - Fortify Attribute (Strength)
Resist Poison - Elemental Resistance (Poison)
Spell Shield - Spell Resistance
Troll's Blood - Regenerate
debuffs:
Hand of Sleep - Continuous Damage (Fatigue)
others:
Cure Poison - Cure (Poison)
Fenrik's Door Jam - Lock
Force Bolt - Damage (Health)
Recall - Teleport
Spell Drain - Damage (Spell Points)
Wizard Lock - Lock
2. Image
buffs:
Buoyancy - Water Walking
Chameleon - Chameleon (Normal)
Free Action - Cure (Paralyzation) [makes you immune to paralysis for as long as it lasts, so it's a buff]
Invisibility - Invisibility (Normal)
Levitate - Levitate
Light - Light
Resist Cold - Elemental Resistance (Frost)
Resist Fire - Elemental Resistance (Fire)
Resist Shock - Elemental Resistance (Shock)
Shield - Shield
Water Walking - Water Walking
debuffs:
Far Silence - Silence
Medusa's Gaze - Paralyze
Paralysis - Paralyze
Silence - Silence
Sleep - Continuous Damage (Fatigue)
Spider Touch - Paralyze
Strength Leech - Drain (Strength)
Vampiric Touch - Transfer (Health) [could be considered as a buff for you, but it's applied on the victim]
Wild Fire - Continuous Damage (Health)
others:
Banish Deadra - Dispel (Daedra)
Calm Humanoid - Pacify (Humanoid)
Cure Disease - Cure (Disease)
Fireball - Damage (Health)
Fire Storm - Damage (Health)
Frostbite - Damage (Health)
Gods' Fire - Damage (Health)
Ice Bolt - Damage (Health)
Ice Storm - Damage (Health)
Open - Open
Quiet Undead - Pacify (Undead)
Shock - Damage (Health)
Sphere of Negation - Disintegrate
Tame - Pacify (Animal)
Toxic Cloud - Damage (Health)
Wizard Rend - Damage (Health)
Wizard's Fire - Damage (Health)
3. Image
others:
Balyna's Balm - Heal (Health)
Heal - Heal (Health)
Lightning - Damage (Health)
Stamina - Heal (Fatigue)
4. Image
buffs:
Jack of Trades - Fortify Attribute (Luck)
5. Image
buffs:
Wisdom - Fortify Attribute (Intelligence)
6. Image
buffs:
Water Breathing - Water Breathing
others:
Charm Mortal - Charm
9. Image
buffs:
Spell Reflection - Spell Reflection
11. Image
buffs:
Spell Resistance - Spell Resistance
12. Image
others:
Holy Touch - Dispel (Undead)
Holy Word - Dispel (Undead)
13. Image
buffs:
Slowfalling - Slowfall
15. Image
buffs:
Shadow Form - Shadow (Normal)
25. Image
buffs:
Feet of Notorgo - Fortify Attribute (Speed)
Spell Absorption - Spell Absorption
31. Image
others:
Null Magicka - Dispel (Magic)
33. Image
debuffs:
Energy Leech - Transfer (Fatigue) [could be considered as a buff for you, but it's applied on the victim]
36. Image
others:
Soul Trap - Soul Trap
39. Image
others:
Hand of Decay - Disintegrate
44. Image
buffs:
Charisma - Fortify Attribute (Personality)
Tongues - Comprehend Languages
45. Image
buffs:
Iron Will - Fortify Attribute (Willpower)
47. Image
buffs:
Fortitude - Fortify Attribute (Endurance)
Shalidor's Mirror - Spell Reflection
debuffs:
Magicka Leech - Continuous Damage (Spell Points)
49. Image
others:
Balyna's Antidote - Cure (Poison)
Then there's Detect buff that is not used in any circinate spell, so never had an official icon.

So many are unused whereas some are used for several things, including both buffs and debuffs :(

(feel free to report mistakes)
Last edited by pango on Sun Jan 06, 2019 5:37 pm, edited 2 times in total.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Jukic
Posts: 68
Joined: Sun May 13, 2018 5:51 pm

Re: [MOD] Buff/Debuff Icons

Post by Jukic »

@pango:
thanks! Indeed so many are unused and many overloaded!

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [MOD] Buff/Debuff Icons

Post by King of Worms »

This will be kickass :twisted:

Post Reply