• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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.

[Script✓] I've added several pokemon (Kanto+Johto) to Kanto routes. Is this why I'm receiving a compilation error?

  • 3
    Posts
    2
    Years
    • Seen Sep 30, 2022
    *with gravitas*
    Greetings all,

    I am currently stuck on an issue that led me to this site. Prior to this, I had no idea this site existed. I wish I had.

    Anyway, this is from my distro when I try to compile the game:

    Code:
    yada/yada/yada/decomps/pokefirered$ make
    tools/jsonproc/jsonproc src/data/wild_encounters.json src/data/wild_encounters.json.txt src/data/wild_encounters.h
    JSONPROC_ERROR: [inja.exception.render_error] variable 'wild_mon.max_level' not found
    make: *** [json_data_rules.mk:13: src/data/wild_encounters.h] Error 1
    make: *** Deleting file 'src/data/wild_encounters.h'

    Could someone explain to me how I could go about fixing this?
    I'm sorry if this question has been asked before, I'll do some digging in the meantime.

    Cheers
     
    *with gravitas*
    Greetings all,

    I am currently stuck on an issue that led me to this site. Prior to this, I had no idea this site existed. I wish I had.

    Anyway, this is from my distro when I try to compile the game:

    Code:
    yada/yada/yada/decomps/pokefirered$ make
    tools/jsonproc/jsonproc src/data/wild_encounters.json src/data/wild_encounters.json.txt src/data/wild_encounters.h
    JSONPROC_ERROR: [inja.exception.render_error] variable 'wild_mon.max_level' not found
    make: *** [json_data_rules.mk:13: src/data/wild_encounters.h] Error 1
    make: *** Deleting file 'src/data/wild_encounters.h'

    Could someone explain to me how I could go about fixing this?
    I'm sorry if this question has been asked before, I'll do some digging in the meantime.

    Cheers

    Looks like there's some kind of problem in your src/data/wild_encounters.json file.

    If you edited the file with a text editor, you should double check your changes for potential syntax errors or other mistakes. You can also undo your changes and try to do them again, hopefully without making a mistake.
    If you edited the wild encounters with porymap, the issue could be a version mismatch between porymap and pokefirered (newer pokefirered+older porymap or older pokefirered+newer porymap).
    Either way if you want someone to point out the issue, you should post the contents of the file.
     
    I agree, I should have provided the actual code. I apologize.

    I did find the solution, and I thank you for keeping me focused on the src/data/wild_encounters.json file.
    The solution was to increase the amount of possible encounters for land_mons.
    I increased the amount in these two files:

    src/data/wild_encounters.json

    Code:
    "type": "land_mons",
              "encounter_rates": [
                20,
                20, //added
                20,
                10,
                10,
                10,
                10,
                5,
                5,
                4, 
                4,
                4, //added
                1,
                1,
                1, //added
                1 //added
              ]

    include/wild_encounter.h

    Code:
    #define LAND_WILD_COUNT     16 //previously was 12
    #define WATER_WILD_COUNT    5
    #define ROCK_WILD_COUNT     5
    #define FISH_WILD_COUNT     11 //previously was 10

    This solution is really simple, but I think there's a chance this could be helpful to someone. Maybe. Probably.

    I was able to compile my code, and now my games are running just fine.
    Thanks!
     
    I agree, I should have provided the actual code. I apologize.

    I did find the solution, and I thank you for keeping me focused on the src/data/wild_encounters.json file.
    The solution was to increase the amount of possible encounters for land_mons.
    I increased the amount in these two files:

    src/data/wild_encounters.json

    Code:
    "type": "land_mons",
              "encounter_rates": [
                20,
                20, //added
                20,
                10,
                10,
                10,
                10,
                5,
                5,
                4, 
                4,
                4, //added
                1,
                1,
                1, //added
                1 //added
              ]

    include/wild_encounter.h

    Code:
    #define LAND_WILD_COUNT     16 //previously was 12
    #define WATER_WILD_COUNT    5
    #define ROCK_WILD_COUNT     5
    #define FISH_WILD_COUNT     11 //previously was 10

    This solution is really simple, but I think there's a chance this could be helpful to someone. Maybe. Probably.

    I was able to compile my code, and now my games are running just fine.
    Thanks!

    Oh, you added new encounter slots? That's generally not how you would add new Pokemon to routes.

    Each map has the same number of encounter slots, each containing a Pokemon. Most maps will have less different Pokemon than slots, which means that the same Pokemon is placed in multiple slots. You can just replace some of these duplicates with the Pokemon you want to add, as long as the number of different Pokemon is not greater than the number of slots.

    If you do add new encounter slots, you will probably have to change some code too, and make sure that the new slots are filled in every map.
     
    You are absolutely right, the best way to diversify the monsters you encounter in each route is to replace duplicates. I went back to my code and made that change, rather than adding new encounter slots. I appreciate you sharing your knowledge.
     
    Back
    Top