How Are Painting Created?
- Magicono43
- Posts: 1141
- Joined: Tue Nov 06, 2018 7:06 am
How Are Painting Created?
I have been looking through the code and can't seem to find anywhere that the painting items are generated, and this makes me wonder if they can be generated at all? Either i'm completely missing something somewhere in the scripts or something else is going on, I do know there is meta-data to handle painting and such, but I don't see anything in places like "ItemBuilder.cs" that have any method like "CreateRandomPainting" or something.
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: How Are Painting Created?
My memory is they're generated straight from random loot tables using the template group and index, and the image displayed is selected randomly with UID as a seed. There's also a regression I need to look at where image isn't displayed correctly.
I'm about to leave for work, will be able to give more details a bit later today when back in front of my dev PC.
I'm about to leave for work, will be able to give more details a bit later today when back in front of my dev PC.
- Magicono43
- Posts: 1141
- Joined: Tue Nov 06, 2018 7:06 am
Re: How Are Painting Created?
Thanks for the info. I figured the painting must have been generating somewhere since I have had a few people tell me they have seen paintings occasionally show up, after some key-word searching for "paint" and "painting" I was just unable to find anything that I was used to seeing for the other items.Interkarma wrote: ↑Sun Feb 28, 2021 8:52 pm My memory is they're generated straight from random loot tables using the template group and index, and the image displayed is selected randomly with UID as a seed. There's also a regression I need to look at where image isn't displayed correctly.
I'm about to leave for work, will be able to give more details a bit later today when back in front of my dev PC.
- Magicono43
- Posts: 1141
- Joined: Tue Nov 06, 2018 7:06 am
Re: How Are Painting Created?
It was a lot more simple than I expected actually after seeing your response.
You were close with how it generates a seed but slightly off, it does not use the UID of the item but instead rolls a random number between 0 and 65536, then that does some magic later on that turns that into the seed that chooses the image somehow, which started too look too complicated for me to easily comprehend, lol.
Oh yeah, I saw the regression it looks like you were talking about, at least it just seems that the windows don't come up at the correct times when using the "info" action on the paintings, I assume the title is supposed to show and then after clicking off that the painting picture itself shows, here is what I was seeing.
Thanks for the extra info though, was much more simple than expected for my purposes, lol.
You were close with how it generates a seed but slightly off, it does not use the UID of the item but instead rolls a random number between 0 and 65536, then that does some magic later on that turns that into the seed that chooses the image somehow, which started too look too complicated for me to easily comprehend, lol.
Oh yeah, I saw the regression it looks like you were talking about, at least it just seems that the windows don't come up at the correct times when using the "info" action on the paintings, I assume the title is supposed to show and then after clicking off that the painting picture itself shows, here is what I was seeing.
Thanks for the extra info though, was much more simple than expected for my purposes, lol.
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: How Are Painting Created?
Happy you were able to make progress for your needs.
It's supposed to render the painting within the dialog and it's not sizing appropriately in that screenshot. The issue I've seen is the painting doesn't render at all. The two issues could be related, I've not looked into this one at all.
It's supposed to render the painting within the dialog and it's not sizing appropriately in that screenshot. The issue I've seen is the painting doesn't render at all. The two issues could be related, I've not looked into this one at all.
- Magicono43
- Posts: 1141
- Joined: Tue Nov 06, 2018 7:06 am
Re: How Are Painting Created?
Ah ok, I also forgot to mention that my fork i'm working with is currently in 0.10.26 as well, so maybe the problem you brought up was a different one from the latest versions.Interkarma wrote: ↑Mon Mar 01, 2021 12:19 am Happy you were able to make progress for your needs.
It's supposed to render the painting within the dialog and it's not sizing appropriately in that screenshot. The issue I've seen is the painting doesn't render at all. The two issues could be related, I've not looked into this one at all.