(REALIZED IDEA) Allow the paperdoll character backgrounds to have a night variants

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

(REALIZED IDEA) Allow the paperdoll character backgrounds to have a night variants

Post by King of Worms »

Simple as that. When the night comes, the paperdoll character background switches to the night versions - if provided.
Same as when the dungeon exit switches to day/night accordingly (thanks Lacus for help with that)

Make it happen in a way I can somehow include it in the Dream mod as well ;)
I will provide the night versions of the backgrounds

Like this (simple example)
Spoiler!
SCBG07I0.IMG.png
SCBG07I0.IMG.png (594.74 KiB) Viewed 2041 times
Night SCBG07I0.IMG.png
Night SCBG07I0.IMG.png (400.38 KiB) Viewed 2041 times
Last edited by King of Worms on Sun May 02, 2021 6:10 pm, edited 1 time in total.

User avatar
joshcamas
Posts: 87
Joined: Mon Sep 21, 2020 7:01 am

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by joshcamas »

Hello, this seems doable but may be a lil hacky. x)

The background is set via PaperDoll.RefreshBackground(), where it sets backgroundPanel.BackgroundTexture depending on racial override (if vampire / transformed were-creature) or region if that setting is enabled.

The implementation of this mod would probably involve using reflection to access the backgroundPanel field and then setting the graphic to whatever we want. Then every frame check if the backgroundPanel's graphics has been changed by the builtin refresh, and if so refresh the modded version.

If you make modified versions of the background images, but with night (slap a _NIGHT at the end of each background file name) I can make a mod for ya :)) Same for other time of days if you want. I'll make the mod so it checks if the custom file exists, and if not it will do "DFU Vanilla".

User avatar
joshcamas
Posts: 87
Joined: Mon Sep 21, 2020 7:01 am

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by joshcamas »

It's... ALMOST... working...

I think I'm missing something on how to add new IMG files. Is there some sort of metadata file I'm missing? When I try loading the "SCBG04I0_NIGHT.IMG.png" image I've added to the mod, it throws an error related to the palette.

One this issue is fixed, this mod should work!

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

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by King of Worms »

Thats a lovely progress! I pray the last issue can be solved! I will create night variants today and send u a link in a PM. Thanks a lot 😊

It would be great if its possible to share the script or whatever is causing this to work. I mean, Id like to be able to create a DFMOD myself at the end of the day, because Im very used to iterating my art a lot. So most likely I will work on the night variants for a bit longer, and tweak them afterwards over and over :D And I dont want to bother you to pack the mod everytime I make the update.

If thats a issue, I get it, and will just provide the files.

EDIT:
Just made a simple swap to see how it would look if implemented, and it has potential :twisted:
Spoiler!
Night.jpg
Night.jpg (747.39 KiB) Viewed 1928 times

User avatar
joshcamas
Posts: 87
Joined: Mon Sep 21, 2020 7:01 am

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by joshcamas »

Alright, finally figured it out. Using ImageReader.GetTexture for additional images seems like its not really supported, but TextureReplacement.TryImportImage does exactly what I want. THANK GOD.

Here's the mod!
https://github.com/joshcamas/dfu-charac ... /tree/main

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

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by King of Worms »

Downloaded :)
Thanks a lot I will test it tomorrow and report back. But man, you already a hero in my book!

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

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by King of Worms »

Yup its working, really good job man!!!
I will add you in the Dream Credits, thanks a lot for this :)

I saw the readme and I was thinking about the ideas you stated there.

The weather variants:

I can see the raining variant as relatively easy to do and quite nice addition
Rest is not so easy, maybe the fog... but if its implemented, it doesnt hurt at all as its just a option, so Im all in

Dawn/Dusk sounds cool, but will be harder to create, same as the other weather variants - but given its just a option and doesnt execute unless the images are provided, its nice to have it ready.

One thing which I miss is new background while being in Dungeon. That would really be kick ass. But I think its completely different system than day/night/weather as its location dependent. But would absolutely add to the game 100%.

And that leads to other locations, like building interriors, inns, shops... yada yada. But to me, dungeons are the most important.

Anyway, I will work on the night variants 1st. It still needs some tuning and details. Im adding some lights and other slight changes like removing the birds, making sure the stars do not shine thru clouds, fireflies in the swamps/woods etc... :ugeek:
Spoiler!
SCBG01I0_Night.IMG.png
SCBG01I0_Night.IMG.png (531.62 KiB) Viewed 1895 times
SCBG02I0_Night.IMG.png
SCBG02I0_Night.IMG.png (584.36 KiB) Viewed 1895 times
SCBG05I0_Night.IMG.png
SCBG05I0_Night.IMG.png (512.37 KiB) Viewed 1895 times

User avatar
joshcamas
Posts: 87
Joined: Mon Sep 21, 2020 7:01 am

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by joshcamas »

I'm excited! It's all up to you, since you're doing the hard work xD Just tell me what variants you make and I can quickly implement them

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

Re: IDEA: Allow the paperdoll character backgrounds to have a night variants

Post by King of Worms »

Perfect, so you can implement even the dungeon background? Just want to be sure before I dive into it.

I can say right now that the RAIN versions can be produced, I tested it on all backgrounds and it will work, just need some more tuning ;)
Spoiler!
let it rain.jpg
let it rain.jpg (314.1 KiB) Viewed 1737 times
rain.jpg
rain.jpg (1.24 MiB) Viewed 1715 times
Also I can say that the dusk/dawn variants are NOT at the todo list atm, because if you add the weather variants to those as well, the number of backgrounds rise exponentially.. (dusk with rain, rusk without rain etc)

So basically what I would love to have implemented is:

RAIN (ready)
NIGHT RAIN (ready)
DUNGEON (waiting for a confirmation)

Thanks a lot!!! :)


Post Reply