• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[PBS Question] PBS files losing it's content

  • 29
    Posts
    6
    Years
    • Seen Feb 27, 2023
    Problem with PBS/trainers.txt

    Using 18.1
    I started the game on debug mode and decided to edit some trainers in-game (not in PBS). About 12 basic edits, like adding an item or changing a move. Saved changes, no issues. After I copied the Data folder (for the scripts which I didn't change any this time) and the PBS folder for the .txt (trainers.txt in this case) to another computer of mine that already had the game in there, I tried to start a battle with a trainer, but resulted in an error. Error details are irrelevant since the problem was found quickly. Since the trainers were edited in-game, it was only obvious to check trainers.txt to since if there was a problem. Well, roughly half of the trainers were gone. I supposed there was some problem while transfering the files to or from my external drive. I went to my other computer where I made the changes to see if I could copy/paste the files again. Curiosity made me check trainers.txt in there. Same - half gone. Started the game, no errors, all trainers available.

    Is the trainers info stored somewhere besides the PBS? Games can be played without the PBS files, so I suppose so. Is there any way to export all the trainer's info to a new trainers.txt? Why did trainers.txt lose half of it's content? Is the problem within Data or PBS folders? Both were copied, so it shouldn't...

    I apologize for my ignorance. Thanks!

    EDIT:

    I remembered that the slow computer where I made those changes hanged while it was compiling everything into the trainers.txt. It didn't have enough time to finish all the compiling, so the text got split in half. I managed to get all back by enabling debug without compiling through RPGXP and doing a minor edit to "edit individual trainers", forcing the game to write all trainers stored in the game into the trainers.txt.

    TLDR: If the script hangs, always check the PBS text file you were editing in-game. If that *.txt got messed up, DON'T COMPILE USING RPGXP. It will compile your messed up file, and it's all over. And dont use "$DEBUG = true" in the Settings script section either! It will still compile. Instead, create an event somewhere and create the script "$DEBUG=true". Save. Saving doesn't compile. I might be wrong but, from my experience, only PBS changes need to be compiled. After saving, close RPGXP and open your game normally (Game.exe). Talk to the event to enable debug mode. Then select "Debug" on start screen and choose "Information editors". From there just select the same script you were compiling before it got hanged, and change a harmless value in it, like the level a pokemon learns an attack. Save changes and let it compile again. You should make sure your computer is fast enough to compile everything. Or you can close all the tasks you don't need to give it a boost. If done correctly, the info your game had untouched (because you didn't compile it) will be written onto the damaged *.txt file, rebuilding it.

    Although the issue is solved, I'm letting this live so anyone who encounters the same problem has a chance of recovery. 1 thing helps - always backing up your game files, and updating them regularly in parallel with your main project.
     
    Last edited:
    Back
    Top