• 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.

[Scripting Question] Error with shadow script

14
Posts
7
Years
  • Hello everyone,

    I'm new here and I was hoping to get some help with some script bug I have.

    I only added those scripts in my game: Overshadow script, Pokémon following script and the intro script. I don't know if custom tilesets count as modification, but I will mention those as well.

    Anyway, now here's the problem: Every time my character goes into a cave, the game decides to crash and I receive this error message (this doesn't happen when entering a building, only in caves):

    ---------------------------
    Pokemon Lucid
    ---------------------------
    Exception: NoMethodError

    Message: undefined method `*' for nil:NilClass

    Game_Character:197:in `screen_z'

    Sprite_Character:148:in `update_or'

    Tilemap_Perspective:429:in `shadow_update'

    DynamicShadows:178:in `update'

    Sprite_Character:40:in `perspectivetilemap_initialize'

    Tilemap_Perspective:423:in `shadow_initialize'

    DynamicShadows:151:in `initialize'

    Spriteset_Map:163:in `new'

    Spriteset_Map:163:in `_animationSprite_initialize'

    Spriteset_Map:162:in `each'



    This exception was logged in

    C:\Users\Zeon\Saved Games/Pokemon Lucid/errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------

    I know that there were some people with the same issue, but when I was trying out their solutions, nothing worked. Compiling the data didn't work, restarting the game file didn't work and replacing the "original" cave tileset with a new one didn't work either. I'm still at the beginning of my game and I really don't want to give up this project just because of this error.

    I want to apologize if I seem like a clueless idiot, but I really sat there for hours trying to fix this error by myself.

    Would really appreciate the help.
     
    Last edited by a moderator:
    14
    Posts
    7
    Years
  • Can you give more infos like, for example, these scripts and the cave event in map?

    Sure thing.

    Here are the scripts I have added to my game:

    Overworld Shadow script (by KleinStudio).

    Pokémon Following script (by Mej71).

    I don't know if the animated intro script (by Luka S.J) has anything to do with it, but I will still mention it.

    I hope the links to those scripts are alright, because posting the whole scripts here would be really tedious.

    Here are the screenshots of the cave events:

    Here's the cave's entrance event.

    831a736d57da75ca783b0908a4b55f9f


    5e9a795f8c9358f1a2c8a8c4d001ad8c



    Now here's the cave, which has two floors:

    04a3b7c08d976131728ebec0c8f77875


    ef2f128d6c8ab9b170759ec9b3ee55e7



    20a2febf97eb7453d6491efab106bc87


    74bbedaec9b7a9bbbd5325ab6fd05187



    The cave's exit event is the same as the entrance one.

    (Hope you can see the images, just open them in a new tab).

    As you can see, I don't have so many events in that cave. I have a slight feeling that the tileset, which I replaced with the older one, has something to do with it too.


    I hope that this information is enough for you to think of why I have this issue. I also tried making duplicates of the maps (as you can see in a few screenshots), so I could change the map's ID's, which didn't help me at all.

    This only happens when I'm entering a cave, I have no issue entering houses and other buildings.
     
    296
    Posts
    9
    Years
  • I think your game gave this error because of the caves entrances' graphics. Try to add "/noShadow/" (without quotes) in the name of these events.
     
    14
    Posts
    7
    Years
  • I just tried this out and I get the same error. :<

    I guess I will have to give up the Shadow script..?

    Edit: Nevermind what I said about giving up this script, even after removing it, I get the same error message.
     
    296
    Posts
    9
    Years
  • I did some researches for you, because this is a strange problem, and I found a possible solution: if you did a copy-paste of the caves' events with different tileset and this last one has a tile with an "ID Number" bigger than the current tileset can contain, this could be the reason of your game's crash. You probably have to change the graphic of these events in "None".
     
    14
    Posts
    7
    Years
  • You were right! I actually forgot to get rid of the event's graphics! I'm such a dummy..! Even though I didn't set a graphic for those events, when I checked out the event, I saw that it was set on "Tileset", but not on an actual graphic tile, so I changed them on "None" and now they work!

    Thank you sooooooooooo much! If I have any other script problem in the future, you will be the first person I'm going to contact with!

    Thank you so much again, I really mean it, I was so close to giving up this project.
     
    Back
    Top