- 29
- Posts
- 14
- Years
- Seen Jan 28, 2024
I'm looking for a 100% working full screen script for Essentials v15. I tried porting over the functionality from Essentials v17.2 (I found every mention of the work words (darn autocorrect) 'fullscreen' and 'setresize', applied a 'fix' in Sprite_Resizer to remedy the v17.2 "saving in fullscreen bugs the display when reloading the save" issue), and reimplemented the border system in Options (I don't know if the border is implemented in v15, but the fan game I'm working on lacks it, and due to its integration with fullscreen, I felt it was easier to just implement it), but get this error when launching the game in Debug:
This is my PokemonSystem file:
If this error is unfixable, is there a better version of fullscreen available that does NOT come from Essentials v17.2 or v16.2? I say this because there is a bug with it when loading a game saved in fullscreen (which I alluded to that I found a fix for above; Pokemon Reborn's code MAY have been copied for that :slyface:) in those versions.
Spoiler:
Code:
---------------------------
Fire Ash
---------------------------
Script 'PokemonSystem' line 74: TypeError occurred.
no implicit conversion from nil to integer
---------------------------
OK
---------------------------
This is my PokemonSystem file:
Spoiler:
Code:
# Loads data from a file "safely", similar to load_data. If an encrypted archive
# exists, the real file is deleted to ensure that the file is loaded from the
# encrypted archive.
def pbSafeLoad(file)
if (safeExists?("./Game.rgssad") || safeExists?("./Game.rgss2a")) && safeExists?(file)
File.delete(file) rescue nil
end
return load_data(file)
end
def pbLoadRxData(file) # :nodoc:
if $RPGVX
return load_data(file+".rvdata")
else
return load_data(file+".rxdata")
end
end
def pbChooseLanguage
commands=[]
for lang in LANGUAGES
commands.push(lang[0])
end
return Kernel.pbShowCommands(nil,commands)
end
if !Kernel.respond_to?("pbSetResizeFactor")
def pbSetResizeFactor(dummy); end
def setScreenBorderName(border); end
$ResizeFactor=1.0
$ResizeFactorMul=100
$ResizeOffsetX=0
$ResizeOffsetY=0
$ResizeFactorSet=false
module Graphics
def self.snap_to_bitmap; return nil; end
end
end
#############
#############
def pbSetUpSystem
begin
trainer=nil
framecount=0
havedata=false
game_system=nil
pokemonSystem=nil
File.open(RTP.getSaveFileName("Game.rxdata")){|f|
trainer=Marshal.load(f)
framecount=Marshal.load(f)
game_system=Marshal.load(f)
pokemonSystem=Marshal.load(f)
}
raise "Corrupted file" if !trainer.is_a?(PokeBattle_Trainer)
raise "Corrupted file" if !framecount.is_a?(Numeric)
raise "Corrupted file" if !game_system.is_a?(Game_System)
raise "Corrupted file" if !pokemonSystem.is_a?(PokemonSystem)
havedata=true
rescue
pokemonSystem=PokemonSystem.new
game_system=Game_System.new
end
if !$INEDITOR
$PokemonSystem=pokemonSystem
$game_system=Game_System
$ResizeOffsetX=0 #[0,0][$PokemonSystem.screensize]
$ResizeOffsetY=0 #[0,0][$PokemonSystem.screensize]
resizefactor=[0.5,1.0,2.0][$PokemonSystem.screensize]
pbSetResizeFactor(resizefactor)
else
pbSetResizeFactor(1.0)
end
# Load constants
begin
consts=pbSafeLoad("Data/Constants.rxdata")
consts=[] if !consts
rescue
consts=[]
end
for script in consts
next if !script
eval(Zlib::Inflate.inflate(script[2]),nil,script[1])
end
if LANGUAGES.length>=2
if !havedata
pokemonSystem.language=pbChooseLanguage
end
pbLoadMessages("Data/"+LANGUAGES[pokemonSystem.language][1])
end
end
def pbScreenCapture
capturefile=nil
5000.times {|i|
filename=RTP.getSaveFileName(sprintf("capture%03d.bmp",i))
if !safeExists?(filename)
capturefile=filename
break
end
i+=1
}
if capturefile && safeExists?("rubyscreen.dll")
takescreen=Win32API.new("rubyscreen.dll","TakeScreenshot","%w(p)","i")
takescreen.call(capturefile)
if safeExists?(capturefile)
pbSEPlay("expfull") if FileTest.audio_exist?("Audio/SE/expfull")
end
end
end
module Input
unless defined?(update_KGC_ScreenCapture)
class << Input
alias update_KGC_ScreenCapture update
end
end
def self.update
update_KGC_ScreenCapture
if trigger?(Input::F8)
pbScreenCapture
end
if trigger?(Input::F7)
pbDebugF7
end
end
end
def pbDebugF7
if $DEBUG
Console::setup_console
begin
debugBitmaps
rescue
end
pbSEPlay("expfull") if FileTest.audio_exist?("Audio/SE/expfull")
end
end
pbSetUpSystem()
If this error is unfixable, is there a better version of fullscreen available that does NOT come from Essentials v17.2 or v16.2? I say this because there is a bug with it when loading a game saved in fullscreen (which I alluded to that I found a fix for above; Pokemon Reborn's code MAY have been copied for that :slyface:) in those versions.