Page 1 of 1

LayeredImage Help

Posted: Thu Jan 10, 2019 5:19 pm
by runs
Hi guys,

I have a character with a head with a lot of facial expressions and a body (dresses). I've used Layered Image to make the whole character image.

I have some few questions:

- I do not use a base, only head + body. I thinks is not necessary.
- The 'pos' is refered to what? the base layer? the screen? I do not understand how to positionate the two parts.
- How the layers are stacked in one show sentence? In their call order?


In my case, would it be better to use 'Composite' instead of?


Thanks.

Re: LayeredImage Help

Posted: Fri Jan 11, 2019 6:09 pm
by mitoky
It depens how exactly your files are. So basially only a head + the body? (also more than one head etc?)

Usually you dont need to position anything if you save the layers "as they are" overlapping and in same image size. Cropping isnt necsassary for small parts, so simply leave it as it is.

Usually images are called by imagename + attributes, so the same goes here. Example:

Code: Select all

layeredimage eileen:
    group head:
        attribute head_1 default:
        "images/xxx.png"
 
        attribute head_2:
        "images/xxx.png"
        
    group body:
        attribute body_1 default:
            "images/xxx.png"
 
        attribute body_2:
            "images/xxx.png"
            
    group face:
        attribute expression_1 default:
            "images/xxx.png"
            
        attribute expression_2:
            "images/xxx.png"     
Things of the same kind go into the same group and the group name itself doenst matters for calling the image.

Either way, back to calling things. If we go with this example the way we would call the image would be:
eileen head body expression

eileen is the image name.
for head we can insert: head_1 or head_2
for body we can insert: body_1 or body_2
for expression we can insert: expression_1 or expression_2

So if you want eileen's second head, second body and first expressions we do:

Code: Select all

show eileen head_2 body_2 expression_1
Additionally you might have noticed that some attributes have "default." Thats to ensure that no layer gets forgotten when calling an image (since it would be missing). So when something isnt stated (like no head) it will use the default one. So if we want to call eileen's first head, body and expression, we can simply too just say "show eileen" too based on our example.

Also, from what i am aware, the order ofthe attributes doenst matters. Its only important that the image name is first. So after "eileen" everything else can be in a random order.
I hope i could explain it well, if not feel free to ask!

Re: LayeredImage Help

Posted: Sat Jan 12, 2019 6:01 am
by runs
Thanks!

But know I have a problem. When paste body and head (even when overlap) Renpy shows a one-pixel line, cutting the composition. :(
I tested and it is cause of apply a scale to images.

Re: LayeredImage Help

Posted: Sat Jan 12, 2019 6:26 am
by runs
Well, I 've solved it applying another sightly factorscale.