I was unable to reproduce this bug, not because it worked fine when I tried it, but because when I compressed and encrypted a copy of v16.1, the resultant file refused to run for me. I couldn't even get a compressed game to run, let alone try to reproduce this bug.
Turns out my problems were related to this bug. I fixed it, and now I can open compressed files!
Here's the solution:
In the script section
Compiler, find
def pbCompileTrainers. Spy the string of random letters (in the line beginning
record=pbGetCsvRecord) and change the last letter (
s) to a capital (
S):
Code:
records=[]
trainernames=[]
count=0
maxValue=0
pbCompilerEachPreppedLine("PBS/trainertypes.txt"){|line,lineno|
record=pbGetCsvRecord(line,lineno,[0,"unsUSSSeU[COLOR=Red]s[/COLOR]", # ID can be 0
nil,nil,nil,nil,nil,nil,nil,{
""=>2,"Male"=>0,"M"=>0,"0"=>0,"Female"=>1,"F"=>1,"1"=>1,"Mixed"=>2,"X"=>2,"2"=>2
},nil,nil]
)
A little further down, find and delete this line:
Code:
record[9]="" if !record[9]
Games will now work. However, there will be an error when checking for a particular skill code. To fix that, go into the script section
PokeBattle_Trainer, and find
def hasSkillCode(code) and replace it with the following:
Code:
def hasSkillCode(code)
c=skillCode
return true if c!=nil && c!="" && c[/#{code}/]
return false
end
Resolved!