[Mod] Viewable Skill Progress

A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
User avatar
Sordid
Posts: 8
Joined: Tue Sep 07, 2021 9:05 am

Re: [Mod] Viewable Skill Progress

Post by Sordid »

Perfection! *chef's kiss*

User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

Re: [Mod] Viewable Skill Progress

Post by DunnyOfPenwick »

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:

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.

User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

Re: [Mod] Viewable Skill Progress

Post by DunnyOfPenwick »

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.

User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Viewable Skill Progress

Post by Magicono43 »

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.
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.

User avatar
LifeInVelvet
Posts: 34
Joined: Mon Feb 28, 2022 12:16 am

Re: [Mod] Viewable Skill Progress

Post by LifeInVelvet »

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.

User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Viewable Skill Progress

Post by Magicono43 »

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.
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.
Last edited by Magicono43 on Wed Mar 30, 2022 8:21 pm, edited 1 time in total.

User avatar
LifeInVelvet
Posts: 34
Joined: Mon Feb 28, 2022 12:16 am

Re: [Mod] Viewable Skill Progress

Post by LifeInVelvet »

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.
Oh, I really need to check 'released mods' deeper for mods then.
Can't wait for DFU to exit beta so things can be a bit more streamlined for modding and so forth.

User avatar
Seferoth
Posts: 665
Joined: Fri Nov 22, 2019 5:45 pm
Location: Finland

Re: [Mod] Viewable Skill Progress

Post by Seferoth »

This could be useful, thanks!

User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: [Mod] Viewable Skill Progress

Post by Magicono43 »

Seferoth wrote: Sat Apr 16, 2022 1:57 pm This could be useful, thanks!
No problem, hope it is.

User avatar
SGResponse
Posts: 3
Joined: Tue May 03, 2022 1:01 pm

Re: [Mod] Viewable Skill Progress

Post by SGResponse »

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:

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)
Steps to reproduce:
  • 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
At this point the log file produced will look something like the attached:
Compatibility.zip
(12.07 KiB) Downloaded 59 times
And the nullref spam does not get better (got to a 35 MB logfile size on a 20 minute play session).

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.

Post Reply