im.MatrixColor changing hue value on a DynamicImage?
Posted: Tue Dec 20, 2016 6:17 pm
I feel kinda bad for asking so much on this forum lol
But i lose nothing for asking, so here it goes!
If you have read my previows posts, i doing some kind of customizable clothing system.
So far thanks to the help from the people on this forum I managed to make almost everything, the only thing that remains regarding clothing customization is the colors.
I managed to get the im.MatrixColor working on a single, regular image.
However, when i try to replicate that on my dynamic images, I don't know how to make it work.
Here is how i got the one that works (without variables so it really doesnt do the trick for me, that is why im asking!)
image scene1 = im.MatrixColor(
"images/s1/s1_base.png",
im.matrix.hue(20))
This changes the hue from the scene1, however since the player will be able tu set multiple different colors, its just not realistic to set every different color on a different variable.
So instead i was trying to do it on the fly like this:
$ legs = "images/s0/s0_" + underwear + ".png"
image girl = Fixed(DynamicImage("[legs]"))
This method allows me to change the clothing on every scene without much effort. The bad thing is that I dont know sh** about python (or programming in general for that matter) so I dont really know the way I should include what i want. I already tried a few optnios that came to my mind, since i found nothing about this on the documentation about both the IM.MatrixColor and the dynamic images.
This is more or less what I tried:
$ legs = im.MatrixColor("images/s0/s0_" + underwear + ".png", im.matrix.hue(20)) # <---------- this didnt work!
image girl = Fixed(im.MatrixColor(DynamicImage("[legs]"), im.matrix.hue(20))) <------------ this didnt work neither!
I've tried many more things, and the further i got was getting the compiler to not crash and not getting an error message ingame.
Whenever I got a compiling error it would say something like wrong syntax or expecting int or similar stuff, ingame errors were along the lines of "couldnt find image (im.MatrixColor...etc)"
So yeah, the documentation didnt help me much neither so my last resort as always is asking the considerably-more-experienced forum users.
Any insight on how can i achieve this?
Also, is there any page that explains the overall terminology/structure of renpy's programming to know what to do in case those kind of silly things related to "not knowing where to place what" happens?
Again thanks for your patience with me!
But i lose nothing for asking, so here it goes!
If you have read my previows posts, i doing some kind of customizable clothing system.
So far thanks to the help from the people on this forum I managed to make almost everything, the only thing that remains regarding clothing customization is the colors.
I managed to get the im.MatrixColor working on a single, regular image.
However, when i try to replicate that on my dynamic images, I don't know how to make it work.
Here is how i got the one that works (without variables so it really doesnt do the trick for me, that is why im asking!)
image scene1 = im.MatrixColor(
"images/s1/s1_base.png",
im.matrix.hue(20))
This changes the hue from the scene1, however since the player will be able tu set multiple different colors, its just not realistic to set every different color on a different variable.
So instead i was trying to do it on the fly like this:
$ legs = "images/s0/s0_" + underwear + ".png"
image girl = Fixed(DynamicImage("[legs]"))
This method allows me to change the clothing on every scene without much effort. The bad thing is that I dont know sh** about python (or programming in general for that matter) so I dont really know the way I should include what i want. I already tried a few optnios that came to my mind, since i found nothing about this on the documentation about both the IM.MatrixColor and the dynamic images.
This is more or less what I tried:
$ legs = im.MatrixColor("images/s0/s0_" + underwear + ".png", im.matrix.hue(20)) # <---------- this didnt work!
image girl = Fixed(im.MatrixColor(DynamicImage("[legs]"), im.matrix.hue(20))) <------------ this didnt work neither!
I've tried many more things, and the further i got was getting the compiler to not crash and not getting an error message ingame.
Whenever I got a compiling error it would say something like wrong syntax or expecting int or similar stuff, ingame errors were along the lines of "couldnt find image (im.MatrixColor...etc)"
So yeah, the documentation didnt help me much neither so my last resort as always is asking the considerably-more-experienced forum users.
Any insight on how can i achieve this?
Also, is there any page that explains the overall terminology/structure of renpy's programming to know what to do in case those kind of silly things related to "not knowing where to place what" happens?
Again thanks for your patience with me!