[Mod] Viewable Skill Progress
- Sordid
- Posts: 8
- Joined: Tue Sep 07, 2021 9:05 am
Re: [Mod] Viewable Skill Progress
Perfection! *chef's kiss*
- DunnyOfPenwick
- Posts: 275
- Joined: Wed Apr 14, 2021 1:58 am
- Location: Southeast US
Re: [Mod] Viewable Skill Progress
I'm not aware if any progress bars exist in DFU core, but it should be pretty easy to create one by just creating a Panel and drawing on it. If you want a progress bar with a border you can use an Outline window component instead.
It doesn't require much coding, here's some basic code using an Outline component:
It would look cleaner to use a Panel instead of Outline, borders aren't really needed. A thin panel, vertically centered.
It doesn't require much coding, here's some basic code using an Outline component:
Code: Select all
//..In Setup()
outline = DaggerfallUI.AddOutline(rect, Color.yellow, mainPanel);
outline.BackgroundColor = new Color(0.6f, 0, 0); //dark red
outline.ToolTip = defaultToolTip;
outline.ToolTipText = skillTally + " / " + maxTally;
Code: Select all
//...in Draw()
foreach (SkillEntry item in SkillEntries) //assuming you are using a List<>
{
DrawProgressBar(item);
}
Code: Select all
//..in DrawProgressBar(skillEntry)
Color32[] colors = new Color32[1];
colors[0] = Color.white;
Texture2D tex = new Texture2D(1, 1);
tex.SetPixels32(colors);
tex.Apply(false, true);
Color originalColor = GUI.color;
GUI.color = Color.red;
Outline outline = skillEntry.OutLine;
Rect rect = outline.Rectangle;
//reduce rect.xMax to match ratio
GUI.DrawTexture(rect, tex);
GUI.color = originalColor;
It would look cleaner to use a Panel instead of Outline, borders aren't really needed. A thin panel, vertically centered.
- DunnyOfPenwick
- Posts: 275
- Joined: Wed Apr 14, 2021 1:58 am
- Location: Southeast US
Re: [Mod] Viewable Skill Progress
You can probably squeeze a small, thin vertical bar just in front of the skill name, just big enough to serve as an indicator.
If the player is really interested in the exact amount, they can look at the tooltip.
If that's too small, you can go horizontal.
If the player is really interested in the exact amount, they can look at the tooltip.
If that's too small, you can go horizontal.
- Magicono43
- Posts: 1141
- Joined: Tue Nov 06, 2018 7:06 am
Re: [Mod] Viewable Skill Progress
Thanks for the info on the actual code part, I'll definitely consider next time I plan on updating the code, (or you could make a Pull-request on the github of course, or just copy my code if you want, lol.) whatever works for you.DunnyOfPenwick wrote: ↑Tue Mar 22, 2022 4:13 pm You can probably squeeze a small, thin vertical bar just in front of the skill name, just big enough to serve as an indicator.
If the player is really interested in the exact amount, they can look at the tooltip.
If that's too small, you can go horizontal.
- LifeInVelvet
- Posts: 34
- Joined: Mon Feb 28, 2022 12:16 am
Re: [Mod] Viewable Skill Progress
This mod just exposed to me how funky and off Daggerfall skill leveling is, for example:
Mercantile if you want it to increase an actual amount, you need to sell items ONE by ONE. Otherwise if you sell all the items, you get just one skill point. Skill increases need to be fixed overall though or something, so it promotes less tedium.
Mercantile if you want it to increase an actual amount, you need to sell items ONE by ONE. Otherwise if you sell all the items, you get just one skill point. Skill increases need to be fixed overall though or something, so it promotes less tedium.
- Magicono43
- Posts: 1141
- Joined: Tue Nov 06, 2018 7:06 am
Re: [Mod] Viewable Skill Progress
Yeah, I already have that "fixed" in my WIP "better skill leveling" code a made a while ago. At least in it's most simple form you get more mercantile XP in a transaction based on the total "cart size" as well as the cost of the transaction. But that will likely only work post DFU 1.0, when the skill code and such gets opened up more for easier modding.LifeInVelvet wrote: ↑Wed Mar 30, 2022 7:33 am This mod just exposed to me how funky and off Daggerfall skill leveling is, for example:
Mercantile if you want it to increase an actual amount, you need to sell items ONE by ONE. Otherwise if you sell all the items, you get just one skill point. Skill increases need to be fixed overall though or something, so it promotes less tedium.
Last edited by Magicono43 on Wed Mar 30, 2022 8:21 pm, edited 1 time in total.
- LifeInVelvet
- Posts: 34
- Joined: Mon Feb 28, 2022 12:16 am
Re: [Mod] Viewable Skill Progress
Oh, I really need to check 'released mods' deeper for mods then.Magicono43 wrote: ↑Wed Mar 30, 2022 12:37 pm Yeah, I already have that "fixed" in my WIP "better skill leveling" code a made a while ago. At least in it's most simple form you get more mercantile XP in a transaction based on the total "cart size" as well as the cost of the transaction. But that will likely only work most DFU 1.0, when the skill code and such gets opened up more to easier modding.
Can't wait for DFU to exit beta so things can be a bit more streamlined for modding and so forth.
- Seferoth
- Posts: 665
- Joined: Fri Nov 22, 2019 5:45 pm
- Location: Finland
Re: [Mod] Viewable Skill Progress
This could be useful, thanks!
- Magicono43
- Posts: 1141
- Joined: Tue Nov 06, 2018 7:06 am
- SGResponse
- Posts: 3
- Joined: Tue May 03, 2022 1:01 pm
Re: [Mod] Viewable Skill Progress
Compatibility issue with D.R.E.A.M. 2022 1.0
This mod running alongside DREAM - HUD & MENU will cause the log file to be incessently spammed with the following:
Steps to reproduce:
The order of mods does not matter. This is the reason why I'm posting at all, as you've suggested to address compatibility issues by switching up the load order.
----
EDIT:
Along with @Magicono43 and @Joshcamas we found the issue within dfu-character-background-swapper. On ViewableSkillProgress side - nothing short of a total rewrite (ommitting the usage of class overrides) could suffice as a fix. As it stands it needs an update within dfu-character-background-swapper and then DREAM needs to reintegrate that change into its bundle.
This mod running alongside DREAM - HUD & MENU will cause the log file to be incessently spammed with the following:
Code: Select all
NullReferenceException: Object reference not set to an instance of an object
at SpellcastStudios.TODBackgrounds.TODBackgrounds+BackgroundScreen.Update () [0x0001c] in <21dfa6eeb80141219ea4bdfce7ab4b36>:0
at SpellcastStudios.TODBackgrounds.TODBackgrounds.LateUpdate () [0x0000b] in <21dfa6eeb80141219ea4bdfce7ab4b36>:0
(Filename: <21dfa6eeb80141219ea4bdfce7ab4b36> Line: 0)
- Get a clean DFU 0.13.5 instance.
- Install D.R.E.A.M. 2022 1.0
- Install Viewable Skill Progress 1.02
- Run game, enable only DREAM - HUD & MENU and ViewableSkillProgress
- Get to the Load/New/Exit menu
The order of mods does not matter. This is the reason why I'm posting at all, as you've suggested to address compatibility issues by switching up the load order.
----
EDIT:
Along with @Magicono43 and @Joshcamas we found the issue within dfu-character-background-swapper. On ViewableSkillProgress side - nothing short of a total rewrite (ommitting the usage of class overrides) could suffice as a fix. As it stands it needs an update within dfu-character-background-swapper and then DREAM needs to reintegrate that change into its bundle.