• 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] Always Day Toggle Script?

5
Posts
3
Years
    • Seen Oct 4, 2021
    I remember playing a few games (can't remember which ones) that had the option to force daytime. I'd like to have something like that in my options list but I haven't found anything like that.
     
    658
    Posts
    7
    Years
  • There should ne be something in the settings script section called ENABLETIMESHADING ro something along those lines which will force the game to day only.
     
    286
    Posts
    5
    Years
    • Seen May 15, 2024
    I remember playing a few games (can't remember which ones) that had the option to force daytime. I'd like to have something like that in my options list but I haven't found anything like that.

    Check out ENABLESHADING in Settings. Maybe you could set this to a game switch instead of just either true or false.
     
    286
    Posts
    5
    Years
    • Seen May 15, 2024
    I have absolutely zero idea how to make a new switch.
    Oops didn't see that Golisopod User already replied

    Game switches can most easily be made in the events page under "Control Switches...". Set a name for the switch like "Always Day". Here's how you'll have to change the scripts for this to work (Use Ctrl+Shift+F to find code sections and replace "x" with the number of the switch you made):

    Find "return @cachedTone if !ENABLESHADING" and replace it with "return @cachedTone if $game_switches[x]".

    Find "@sprite.visible = !ENABLESHADING # Can't time-tone a colored sprite" and replace it with "@sprite.visible = $game_switches[x] # Can't time-tone a colored sprite".

    Find "if ENABLESHADING && $game_map && pbGetMetadata($game_map.map_id,MetadataOutdoor)" and replace it with
    "if !$game_switches[x] && $game_map && pbGetMetadata($game_map.map_id,MetadataOutdoor)"

    Find this section and paste the bolded code so that the switch can be changed from the Options menu:
    Code:
           EnumOption.new(_INTL("Text Speed"),[_INTL("Slow"),_INTL("Normal"),_INTL("Fast")],
             proc { $PokemonSystem.textspeed },
             proc {|value|
               $PokemonSystem.textspeed = value 
               MessageConfig.pbSetTextSpeed(pbSettingToTextSpeed(value)) 
             }
           ),
           EnumOption.new(_INTL("Battle Effects"),[_INTL("On"),_INTL("Off")],
             proc { $PokemonSystem.battlescene },
             proc {|value| $PokemonSystem.battlescene = value }
           ),
    [B]       EnumOption.new(_INTL("Map Shading"),[_INTL("Normal"),_INTL("Always Day")],
             proc { $game_switches[x] },
             proc {|value| $game_switches[x] = value }
           ),[/B]
     
    5
    Posts
    3
    Years
    • Seen Oct 4, 2021
    Oops didn't see that Golisopod User already replied

    Game switches can most easily be made in the events page under "Control Switches...". Set a name for the switch like "Always Day". Here's how you'll have to change the scripts for this to work (Use Ctrl+Shift+F to find code sections and replace "x" with the number of the switch you made):

    Find "return @cachedTone if !ENABLESHADING" and replace it with "return @cachedTone if $game_switches[x]".

    Find "@sprite.visible = !ENABLESHADING # Can't time-tone a colored sprite" and replace it with "@sprite.visible = $game_switches[x] # Can't time-tone a colored sprite".

    Find "if ENABLESHADING && $game_map && pbGetMetadata($game_map.map_id,MetadataOutdoor)" and replace it with
    "if !$game_switches[x] && $game_map && pbGetMetadata($game_map.map_id,MetadataOutdoor)"

    Find this section and paste the bolded code so that the switch can be changed from the Options menu:
    Code:
           EnumOption.new(_INTL("Text Speed"),[_INTL("Slow"),_INTL("Normal"),_INTL("Fast")],
             proc { $PokemonSystem.textspeed },
             proc {|value|
               $PokemonSystem.textspeed = value 
               MessageConfig.pbSetTextSpeed(pbSettingToTextSpeed(value)) 
             }
           ),
           EnumOption.new(_INTL("Battle Effects"),[_INTL("On"),_INTL("Off")],
             proc { $PokemonSystem.battlescene },
             proc {|value| $PokemonSystem.battlescene = value }
           ),
    [B]       EnumOption.new(_INTL("Map Shading"),[_INTL("Normal"),_INTL("Always Day")],
             proc { $game_switches[x] },
             proc {|value| $game_switches[x] = value }
           ),[/B]


    I added in everything , except I wasn't able to find
    "if ENABLESHADING && $game_map && pbGetMetadata($game_map.map_id,MetadataOutdoor)".

    The option shows up but without that last bit it won't work.
     
    Back
    Top