Germania Tileset: Bush tag doesn't work with tall grass.

Discussion in 'RPG Maker VX Ace' started by TheBardKen, Jan 2, 2015.

  1. TheBardKen

    TheBardKen Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    I'm using GermaniaB, for outside tiles. I'm making a forest scene and I wanted the tall grass (Immediately to the right of the "curb" tile) to be treated as a bush to the player's feet were hidden, like any regular bush tile. I have it set to bush in the tileset tags in the system tab, but that doesn't seem to be working.

    Other info that may be important:

    I'm using taller sprites made using Game Character Hub, that were converted into VX sprites.

    The grass tile in question is one of those tiles that merges with itself.

    I've attached a picture of the grass and character my testing map.

    I'd appreciate any help, thank you :)

    Example.png
     
    #1
  2. Susan

    Susan Veteran Veteran

    Messages:
    2,766
    Likes Received:
    8,389
    Location:
    somewhere on this planet~
    First Language:
    No idea...
    Primarily Uses:
    RMMV
    The "bush" feature is working correctly, as evident in your screenshot, where your character's lower 12 pixels are appearing to be translucent, compared to the rest of his sprite.

    It only appears like it is not, because of your character's height.

    In VX Ace, the "bush" features works by making the bottom 12 pixels of a character translucent while that character is standing on that tile.

    Default VX Ace characters are only 32pixels tall, so the translucency appears more natural for them.

    Regardless of your character's height, it will always be 12 pixels high only.

    Edit: typos.
     
    Last edited by a moderator: Jan 2, 2015
    #2
    Marsigne, TheBardKen, Dalph and 2 others like this.
  3. TheBardKen

    TheBardKen Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    Ah ok. Then I'll need to script it in that I want the bush translucence to be 12 pixels. Thank you!
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,921
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    mmm ... my Ace says default bush depth is 8, not 12. Unless I'm looking at the wrong thing? I can't actually see where the bottom pixels are made transparent though.
     
    #4
  5. Susan

    Susan Veteran Veteran

    Messages:
    2,766
    Likes Received:
    8,389
    Location:
    somewhere on this planet~
    First Language:
    No idea...
    Primarily Uses:
    RMMV
    Must be a translation typo. Mine shows 12 pixels (in RMVXAce v1.02). 8 pixels seems right, though. Thanks, Shaz! ^^ :

    [​IMG]
    [SIZE=14.4444446563721px]I have provided a screenshot showing the character while standing on a tile without a bush tag (left), and on a tile with a bush tag (right) :[/SIZE]

    Compared to the character on the right, notice that the colour of the character's feet on the right looks distorted (due to the colour blending with the grass resulting from the translucency).

    [SIZE=14.4444446563721px][​IMG][/SIZE]

    [SIZE=14.4444446563721px][/SIZE]
     
    #5
    Marsigne and Dalph like this.
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,921
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Ah, I'm looking in the script itself. Game_CharacterBase.bush_depth is 12. I'm making the assumption that's what it's used for, but I can't see anything in Sprite_Character or its parent class that actually uses it.


    I mean, Sprite_Character has a bush_depth variable and updates it from the character class, but I don't see where it's actually used to make a portion of the sprite translucent.


    I just pulled your image into paint.net and compared the two. It looks like only the bottom 6 pixels are translucent. Any chance your sprite begins 2 pixels above the base of the frame?


    I suspect the wording on the tool tip is wrong. It's definitely not 12 - for a default-sized Ace sprite, that'd be over a third of the sprite.
     
    Last edited by a moderator: Jan 3, 2015
    #6
    Susan likes this.
  7. Susan

    Susan Veteran Veteran

    Messages:
    2,766
    Likes Received:
    8,389
    Location:
    somewhere on this planet~
    First Language:
    No idea...
    Primarily Uses:
    RMMV
    Wow! Thanks for the information, Shaz! ^^

    Adjusting that parameter changes the row of pixels being made translucent, and even extends past the 32 pixels limit!

    The original bush depth for mine showed 8, despite the help tag stating 12.
     
    #7
    Marsigne and Dalph like this.
  8. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    First Language:
    English
    Primarily Uses:
    RMVXA
    So does changing that line #351 in Game_CharacterBase change the depth of translucence, or set up problems elsewhere?  I'm thinking of wading through water more realistically.
     
    #8
  9. Shaz

    Shaz Veteran Veteran

    Messages:
    37,921
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    haha - did you change it and test it out? I was too lazy to do even that :D


    @ksjp17, it wouldn't cause problems elsewhere.


    Perhaps you could even modify the script so it behaves differently on different terrain - set water to 1, long grass to 2, flowers to 3, something like that, and then make that method smart enough to return a different number depending on the terrain tag. Or a region code, though that would then require that you do a lot of painting with regions on all your maps.
     
    Last edited by a moderator: Jan 3, 2015
    #9
    Susan likes this.
  10. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    First Language:
    English
    Primarily Uses:
    RMVXA
    Me?  Modify scripts?!  I wish!
     
    #10
  11. Shaz

    Shaz Veteran Veteran

    Messages:
    37,921
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Something like this would suffice:

    class Game_CharacterBase def update_bush_depth if normal_priority? && !object_character? && bush? && !jumping? @bush_depth = [0,6,12,0,0,0,0,0][terrain_tag] unless moving? else @bush_depth = 0 end endendThe first one (element 0) should be 0. 6 is in element 1, which represents terrain tag 1 - when the character is on a tile with terrain tag 1, their lower 6 pixels will be translucent. 12 is in element 2, which represents terrain tag 2 - when the character is on a tile with terrain tag 2, their lower 12 pixels will be translucent.There needs to be 8 elements in the array, starting at 0, then representing terrain tags 1 through 7. If you're not using a tag for bush depth, set its corresponding array value to 0.

    This might conflict with other scripts if you use terrain tags for other purposes - in that case, you may just be able to make them dual purpose (terrain tag 3 represents water you can walk through - translucent - AND something else, and always applies to the same tiles) - or reserve some terrain tags for bush depth and others for other purposes (and you'd put 0 as the array element value for those).
     
    Last edited by a moderator: Jan 3, 2015
    #11
    Susan and Kes like this.
  12. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    First Language:
    English
    Primarily Uses:
    RMVXA
    Has anyone ever told you that you're a genius?  Just in case they haven't, you're a genius.

    Thank you very much for this.  I can get my water sorted out now.
     
    Last edited by a moderator: Jan 3, 2015
    #12
  13. Shaz

    Shaz Veteran Veteran

    Messages:
    37,921
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    sorry - that's in Game_CharacterBase. I'll update it so you can put it into a new slot rather than overwriting the existing one.


    I haven't tested it. ;)


    And now that I look more closely, there are some interesting flags in use there.


    normal_priority? ... maybe events set to "below characters" should have translucent bases if they're on bush tiles. Maybe sprites that have ! at the start of their name (chests) should have translucent bases if they're on bush tiles. Room for further expansion and experimentation. (If you wanted to try any of those, just copy that line and paste it with a comment # at the start - so you don't lose the original, and remove the individual tests. You'd want to leave the bush? and !jumping? tests)


    And on that note, I would also have to say that the water tiles where you want the translucent bottom on sprites would have to be flagged with the bush tag.
     
    Last edited by a moderator: Jan 3, 2015
    #13
    Kes likes this.
  14. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thanks for the clarifications.  Yes, there could be some interesting effects here.
     
    #14
  15. Azahoth

    Azahoth Villager Member

    Messages:
    22
    Likes Received:
    10
    First Language:
    English
    Its just counting the 4 pixel offset used by characters the bush flag works on. The ! prefix turns off the four pixel offset but also translucent effect of the bush attribute.

    Has anyone found where it handles the transparency effect in the script editor cause I would really like to know, I can find the 4 pixel offset and the bush depth  but thinking the transparency effect is not handled in the editor  like RPGXP if I remember correctly.
     
    Last edited by a moderator: Jan 3, 2015
    #15
  16. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    First Language:
    English
    Primarily Uses:
    RMVXA
    When I did a test run with the snippet, I got the following error message:

    undefined method 'terrain_tag' for [0,6,12,0,0,0,0,0]:Array
     
    #16
  17. Shaz

    Shaz Veteran Veteran

    Messages:
    37,921
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Sorry - not .terrain_tag but [terrain_tag]


    So

    [0,6,12,0,0,0,0,0][terrain_tag]@Azahoth, that's unrelated again, and we've already strayed from the original topic (which has now been resolved).
    I suggest you ask in the RGSS/Ruby Questions that Don't Deserve Their Own Thread, or start a new thread of your own in RGSSx Script Support.
     
    Last edited by a moderator: Jan 3, 2015
    #17
  18. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    First Language:
    English
    Primarily Uses:
    RMVXA
    That works fine now.  Thanks.
     
    #18

Share This Page