Page 1 of 3

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

Posted: Thu Oct 22, 2020 11:24 pm
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 2079 times
Night SCBG07I0.IMG.png
Night SCBG07I0.IMG.png (400.38 KiB) Viewed 2079 times

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

Posted: Sat Nov 14, 2020 4:11 am
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".

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

Posted: Sat Nov 14, 2020 5:48 am
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!

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

Posted: Sat Nov 14, 2020 9:32 am
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 1966 times

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

Posted: Sat Nov 14, 2020 11:08 pm
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

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

Posted: Sat Nov 14, 2020 11:41 pm
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!

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

Posted: Sun Nov 15, 2020 7:08 pm
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 1933 times
SCBG02I0_Night.IMG.png
SCBG02I0_Night.IMG.png (584.36 KiB) Viewed 1933 times
SCBG05I0_Night.IMG.png
SCBG05I0_Night.IMG.png (512.37 KiB) Viewed 1933 times

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

Posted: Thu Nov 19, 2020 3:47 pm
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

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

Posted: Fri Nov 20, 2020 4:06 pm
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 1775 times
rain.jpg
rain.jpg (1.24 MiB) Viewed 1753 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!!! :)

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

Posted: Tue Nov 24, 2020 4:44 am
by joshcamas
Yep, dungeon is easy!