• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Release] [Essentials v18] StCooler's debugging tools (log array and hashes, search into events)

StCooler

Mayst thou thy peace discover.
  • 9,892
    Posts
    5
    Years
    • Seen today
    Hello people of PokéCommunity,

    I am releasing one of my scripts, as is, to help fangame developpers debug their games.
    The most important functions are the following two:
    • scLog(d) which logs the input d into a file "errorlog.txt". Why is it useful? It's because, if d is an array (a list) or a hash (a dictionary), then the content will also be logged. This allows for an almost-readable logging of nested dictionaries or arrays.
    • scSearchMenu() lets you search some dialogues, scripts, map transfers, switches and variables into ALL of your events. It will log the results into "errorlog.txt", at the root of your project (in the same place as your Game.exe).
    • Then, the functions scSearchDialogue(), scSearchInScripts(), scSearchSwitches(), scSearchVariables(), scSearchMapTransfers() can be used individually so you can search and replace. Don't worry, a backup is automatically made!
    Installation:
    • Copy/paste this script into one of the files above "Main".
    • Put all the map IDs of the maps you want to search into MAPS_OF_INTEREST. MAPS_OF_INTEREST should look like MAPS_OF_INTEREST = [12, 26, 35, 36, 37], where the numbers [12, 26, 35, 36, 37] are the IDs of the maps of your game, that you can find at the bottom right of RPG Maker XP when you're displaying that map.
    Use:
    • scLog(d) is meant to be use anywhere you need in your code to check the content of your variables.
    • def scSearchMenu() is meant to be put in an event. Then, talk to the even in game.
    As always, this is for Essentials v18. I haven't tested this script for newer versions, but I suspect they should work well. If it doesn't work, it's probably because the input class ChooseNumberParams was renamed. Otherwise, this script is basically a standalone.

    The script:

    Spoiler:



    Credits:
    These scripts are made by me and only me. As always, I don't care about credits, so do as you wish. The credits are included in the script, though.
    You are free to use and modify this script as you wish.
     

    Attachments

    • [PokeCommunity.com] [Essentials v18] StCooler's debugging tools (log array and hashes, search into events)
      Screen 001.png
      20.5 KB · Views: 0
    • [PokeCommunity.com] [Essentials v18] StCooler's debugging tools (log array and hashes, search into events)
      Screen 002.png
      20.6 KB · Views: 0
    • [PokeCommunity.com] [Essentials v18] StCooler's debugging tools (log array and hashes, search into events)
      Screen 003.png
      19.5 KB · Views: 0
    • [PokeCommunity.com] [Essentials v18] StCooler's debugging tools (log array and hashes, search into events)
      Screen 004.png
      18.3 KB · Views: 0
    Last edited:
    Back
    Top