Dylanrockin
That guy
- 275
- Posts
- 14
- Years
- Seen Jun 9, 2016
I used this tutorial:https://pokemonessentials.wikia.com/wiki/Tutorial:Adding_Additional_Resolution_Options, so that I could add additional resolutions. I did everything in the tutorial and it worked fine, but two things happened: one was an error message the other when I full screen the game it isn't really full screened but focused on one part of the screen. I noticed that whenever I closed my game and reloaded it, the games resolution would go back to the normal 512 resolution. So I decided to save my game, hoping my settings would save, but upon opening the game this happened.
The error message that I got said: Script 'ScriptResizer' line 149: NoMethodError occured.
undefined method '*' for nil:NilClass
Here's the part of the script I have edited:
The below script is the script it's asking me to change or something, I'm not sure if it knows "factor" or something?
The error message that I got said: Script 'ScriptResizer' line 149: NoMethodError occured.
undefined method '*' for nil:NilClass
Here's the part of the script I have edited:
Spoiler:
screensize1=_INTL("Small")
screensize2=_INTL("Medium")
screensize3=_INTL("Large")
# These are the different options in the game. To add an option, define a
# setter and a getter for that option. To delete an option, comment it out
# or delete it. The game's options may be placed in any order.
@PokemonOptions=[
EnumOption.new(_INTL("Text Speed"),[_INTL("Slow"),_INTL("Mid"),_INTL("Fast")],
proc { $PokemonSystem.textspeed },
proc {|value|
$PokemonSystem.textspeed=value
MessageConfig.pbSetTextSpeed(pbSettingToTextSpeed(value))
}
),
EnumOption.new(_INTL("Battle Scene"),[_INTL("On"),_INTL("Off")],
proc { $PokemonSystem.battlescene },
proc {|value| $PokemonSystem.battlescene=value }
),
EnumOption.new(_INTL("Battle Style"),[_INTL("Shift"),_INTL("Set")],
proc { $PokemonSystem.battlestyle },
proc {|value| $PokemonSystem.battlestyle=value }
),
NumberOption.new(_INTL("Frame"),_INTL("Type %d"),1,$TextFrames.length,
proc { $PokemonSystem.frame },
proc {|value|
$PokemonSystem.frame=value
MessageConfig.pbSetSystemFrame($TextFrames[value])
}
),
NumberOption.new(_INTL("Speech Frame"),_INTL("Type %d"),1,$SpeechFrames.length,
proc { $PokemonSystem.textskin },
proc {|value| $PokemonSystem.textskin=value;
MessageConfig.pbSetSpeechFrame(
"Graphics/Windowskins/"+$SpeechFrames[value]) }
),
EnumOption.new(_INTL("Font Style"),[_INTL("Em"),_INTL("R/S"),_INTL("FRLG"),_INTL("DP")],
proc { $PokemonSystem.font },
proc {|value|
$PokemonSystem.font=value
MessageConfig.pbSetSystemFontName($VersionStyles[value])
}
),
# Quote this section out if you don't want to allow players to change the screen
# size.
EnumOption.new(_INTL("Screen Size"),[screensize1,screensize2,screensize3],
proc { $PokemonSystem.screensize },
proc {|value|
oldvalue=$PokemonSystem.screensize
$PokemonSystem.screensize=value
$ResizeOffsetX=0
$ResizeOffsetY=0
pbSetResizeFactor([0.5,1.0,2.0][value])
if value!=oldvalue
ObjectSpace.each_object(TilemapLoader){|o| next if o.disposed?; o.updateClass }
end
}
)
screensize2=_INTL("Medium")
screensize3=_INTL("Large")
# These are the different options in the game. To add an option, define a
# setter and a getter for that option. To delete an option, comment it out
# or delete it. The game's options may be placed in any order.
@PokemonOptions=[
EnumOption.new(_INTL("Text Speed"),[_INTL("Slow"),_INTL("Mid"),_INTL("Fast")],
proc { $PokemonSystem.textspeed },
proc {|value|
$PokemonSystem.textspeed=value
MessageConfig.pbSetTextSpeed(pbSettingToTextSpeed(value))
}
),
EnumOption.new(_INTL("Battle Scene"),[_INTL("On"),_INTL("Off")],
proc { $PokemonSystem.battlescene },
proc {|value| $PokemonSystem.battlescene=value }
),
EnumOption.new(_INTL("Battle Style"),[_INTL("Shift"),_INTL("Set")],
proc { $PokemonSystem.battlestyle },
proc {|value| $PokemonSystem.battlestyle=value }
),
NumberOption.new(_INTL("Frame"),_INTL("Type %d"),1,$TextFrames.length,
proc { $PokemonSystem.frame },
proc {|value|
$PokemonSystem.frame=value
MessageConfig.pbSetSystemFrame($TextFrames[value])
}
),
NumberOption.new(_INTL("Speech Frame"),_INTL("Type %d"),1,$SpeechFrames.length,
proc { $PokemonSystem.textskin },
proc {|value| $PokemonSystem.textskin=value;
MessageConfig.pbSetSpeechFrame(
"Graphics/Windowskins/"+$SpeechFrames[value]) }
),
EnumOption.new(_INTL("Font Style"),[_INTL("Em"),_INTL("R/S"),_INTL("FRLG"),_INTL("DP")],
proc { $PokemonSystem.font },
proc {|value|
$PokemonSystem.font=value
MessageConfig.pbSetSystemFontName($VersionStyles[value])
}
),
# Quote this section out if you don't want to allow players to change the screen
# size.
EnumOption.new(_INTL("Screen Size"),[screensize1,screensize2,screensize3],
proc { $PokemonSystem.screensize },
proc {|value|
oldvalue=$PokemonSystem.screensize
$PokemonSystem.screensize=value
$ResizeOffsetX=0
$ResizeOffsetY=0
pbSetResizeFactor([0.5,1.0,2.0][value])
if value!=oldvalue
ObjectSpace.each_object(TilemapLoader){|o| next if o.disposed?; o.updateClass }
end
}
)
The below script is the script it's asking me to change or something, I'm not sure if it knows "factor" or something?
Spoiler:
def pbSetResizeFactor(factor)
if $ResizeFactor!=factor
$ResizeFactorMul=(factor*100).to_i
$ResizeFactor=factor
$ResizeFactorMul=100.to_i
if $ResizeFactorSet!=false
ObjectSpace.each_object(Sprite){|o|
next if o.disposed?
o.x=o.x
o.y=o.y
o.ox=o.ox
o.oy=o.oy
o.zoom_x=o.zoom_x
o.zoom_y=o.zoom_y
}
if $ResizeFactor!=factor
$ResizeFactorMul=(factor*100).to_i
$ResizeFactor=factor
$ResizeFactorMul=100.to_i
if $ResizeFactorSet!=false
ObjectSpace.each_object(Sprite){|o|
next if o.disposed?
o.x=o.x
o.y=o.y
o.ox=o.ox
o.oy=o.oy
o.zoom_x=o.zoom_x
o.zoom_y=o.zoom_y
}
Last edited: