- 72
- Posts
- 6
- Years
- Seen Jan 24, 2021
I'm trying to create alternate wild encounters. The idea is that when a switch is activated, the game would take encounters from a different file in the PBS than
"encounters.txt". There seemed to have been a tutorial on the Pokémon Essensials Wiki before that explained this, but I can't read it now. Does anyone know how this is done? My first guess at this looked like this
But I get a syntax error that way. I also tried duplicating the section that reads "encounters.txt" and substituting "alternate_encounters.txt", and adding
"if $game_switches[100]" to it. That method doesn't give syntax errors, but nothing happens.
Thanks for any help in advance.
"encounters.txt". There seemed to have been a tutorial on the Pokémon Essensials Wiki before that explained this, but I can't read it now. Does anyone know how this is done? My first guess at this looked like this
Code:
if $game_switches[100]
FileLineData.file = "PBS/alternate_encounters.txt"
File.open("PBS/alternate_encounters.txt","rb"){|f|
else
FileLineData.file = "PBS/encounters.txt"
File.open("PBS/encounters.txt","rb"){|f|
end
But I get a syntax error that way. I also tried duplicating the section that reads "encounters.txt" and substituting "alternate_encounters.txt", and adding
"if $game_switches[100]" to it. That method doesn't give syntax errors, but nothing happens.
Thanks for any help in advance.