• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script for changing tiles

48
Posts
13
Years
    • Seen Jun 16, 2013
    Hey guys,
    I've been trying to imitate the effect from the Seafoam-Islands,
    where when you push a boulder through a hole,
    it falls into the streaming water and creates still, surfable water behind it.
    As the "surfable" effect only affects a few tiles i had no problem implementing that,
    but changing the animated autotiles from streaming to still water for a big area of water was a bigger problem.
    I managed to create a workaround with animated character graphics for the still water,
    but that made the map lag a lot, as it meant to create about 200 animated events for the affected area.
    The perfect solution would be to change the autotile graphic for the affected events scriptwise.

    I already found a general solution for RPGXP (http://save-point.org/thread-4205.html),
    but as the map/tile script was changed in Essentials, the mentioned script produces errors.
    Did anyone of you guys mess with these script sections enough to tell me what i would need to do to achieve
    the desired effect?

    Any hint would be appreciated.

    Cheers, Sichlor
     

    Rayd12smitty

    Shadow Maker
    645
    Posts
    12
    Years
    • Seen Feb 21, 2016
    I have an idea but I'm not sure if you will like it as it isn't what you are looking for. I plan on having a similar place it one of my maps, and I came up with this idea.

    You make different maps for each possible way the map could look. This could be a lot depending on how many boulders you have. If you have 3 boulders, you would need 8 maps, since there are 7 possible combinations and the normal one without any boulders pushed.
    none
    1
    2
    3
    1,2
    1,3
    2,3
    1,2,3

    Each time you push a boulder down the hole, you have it activate a switch. You will need a switch for each boulder. Any entrances to this map will have conditional branches for the transfer player part. If no switches are on, it goes to the normal map, if switch 1 is on, you transport to the first new version, if switches 2 and 3 are on, you transfer to that map.

    This should work fine, but only if all entrances to the map are doors, and not just open connections.
     
    48
    Posts
    13
    Years
    • Seen Jun 16, 2013
    Well, thinking about it, that could actually be an alternative, I wouldn't even need more maps,
    but make the map a little larger. As the change only occurs if the stream is fully blocked (in my map 2 boulders),
    I'd only need to create one more version of the map, right below the original one, and transport to these coordinates, once both boulders are pushed. It's an acceptable workaround (and I might use it until I get the script working) thanks!
    But as you pointed out already, I would love to do it perfectly with the script changes ;)
    So I hope somebody can still help me with it.

    Cheers,
    Sichlor
     

    Rayd12smitty

    Shadow Maker
    645
    Posts
    12
    Years
    • Seen Feb 21, 2016
    Well, thinking about it, that could actually be an alternative, I wouldn't even need more maps,
    but make the map a little larger. As the change only occurs if the stream is fully blocked (in my map 2 boulders),
    I'd only need to create one more version of the map, right below the original one, and transport to these coordinates, once both boulders are pushed. It's an acceptable workaround (and I might use it until I get the script working) thanks!
    But as you pointed out already, I would love to do it perfectly with the script changes ;)
    So I hope somebody can still help me with it.

    Cheers,
    Sichlor


    I didn't even think of that. Yep you could definitely just make the map bigger and have a copy of it below. I hope someone helps you with the script glad i could help in some way
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    I honestly think using copies of the map which display different boulders having been pushed into position is the best way forward. There's no need for scripts, it's just copying/tweaking maps, and it's all-round easy.

    Since you're using switches to decide which boulders have been pushed down holes anyway (see the example maps for... examples), you could even get away with just two different maps - one with flowing water and one with still water. There are "pushed boulder" events on both maps which display accordingly. You only go to the still water map if all boulders are pushed.
     
    48
    Posts
    13
    Years
    • Seen Jun 16, 2013
    True. This specific problem is not as complicated as I thought it to be.

    It would be handy though, to be able to change tile graphics with a simple script call.
    That would make resource-friendly, variable maps child's play.
     
    Back
    Top