• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Pokemon Region Generator

139
Posts
7
Years
Do you hate the tedious process of mapping? Looking for a starting point for a new Pokemon region that you can tweak to your preferences, or maybe just want some maps to use for other purposes?

Introducing "Cartographer" Alpha version 1.3 (updated 9/20/2023)!

This tool will generate the overworld for an entire Pokemon region, and export it into files that can be used in RMXP with just a few hoops to jump through. This is the first update to the tool since early 2022, as I've been busy with other things in life, but still hope to continue slowly adding features.

Generated maps include:
-Fully textured towns & routes.
-Premade interiors for pokemon centers, marts, gyms, and the pokemon lab
-map_connections.txt data for seamlessly connected region
-encounters.txt data with level-scaled, biome-based Pokemon placement chosen. You can configure what pokemon can be placed in each biome using the "biomes.txt" file in the CartographerConfiguration folder.
-map_metadata.txt designating the dimensions of each area, and basic info such as whether it's outdoor, if the area name should display when entering, and weather
-town_map.txt data paired with a generated world map .png file
-Region contains 8 gyms (building exterior only), and a suggested progression order which matches the pokemon encounter's level scaling
-Optional creation of Events for left and right facing stairs
-Item balls and their corresponding events containing random items. (The placement for these is still totally random, both location and the type of item. Plan to add some weighting to this eventually.)
-trainers.txt data and trainer events of various trainer classes with appropriate pokemon (optional)

INSTRUCTIONS FOR HOW TO USE THIS PROGRAM ARE INCLUDED IN THE README.TXT FILE WITHIN THE DOWNLOAD
Please also note that, as several people have discovered, the 'rvpacker' gem needed to import generated maps into RPGMaker's .rxdata files does not work on Ruby versions 3.2 and higher. Recommend to try with Ruby version 3.1.4.

Below is the changelog for 1.3, which is primarily meant to support Pokemon Essentials v20 and v21, though there are a few small new things.

1.3
General Changes

⦁ Support for v20.x* and v21.x of Pokemon Essentials (v19 and prior are not directly supported, though maps may still work with some fiddling)
⦁ Added map "tag" system which assigns certain attributes that influence the features & appearance of areas beyond just the base biome. For example urban, rural, etc. This is a backend feature which will be expanded in the future.
⦁ Utilized more of existing tileset to increase diversity a bit, mainly in cities.
⦁ Added caves
⦁ Small adjustments to generation parameters
⦁ Metadata additions
Version Support
⦁ Revised code for reading various PBS files that have changed format. I did not retain support for older formats for the most part, since Cartographer is meant to be used on a new project anyways.
⦁ Renamed generated PBS data files to match new conventions:
- metadata > map_metadata
- connections > map_connections
- townmap > town_map
⦁ Changed various BGM names to match new where required (i.e. intro music)
⦁ Revised trainertypesconfig.txt to use trainer_types names instead of IDs, since they are no longer present in the trainer_types.txt PBS file
⦁ Modified trainers.txt output to the newer format
⦁ Changed worldmap.png (generated town map image) to be placed in Graphics/UI/Town Map. [* this is where it should go in v21.x. If you are using v20.x, jut move it to Graphics/Pictures]
Map Generation
⦁ Simple caves have been added, currently only have 1 floor and 1 entrance. Includes appropriate metadata & encounters. These have a chance to spawn in Desert and Mountain biomes currently.
⦁ Simplified elevation changes. Previously these generated in 4x4 tile squares, but I felt it looked ugly in most situations and made pathing/placement more complicated. For now these have been reduced to straight lines near area borders, but I will be adding more cliffs etc in different ways in the future.
⦁ "CAVE" added in biome.txt for cave pokemon spawns
⦁ Added "ShowArea = true" to metadata for outdoor maps.
⦁ Added default music to overworld maps.
⦁ Small fenced gardens and tree groves can now spawn in cities/towns.
⦁ Cities can now have one of two fence types running along their borders.
⦁ Towns/cities can now be urban, suburban, or rural which affects the types of paths and buildings as well as the number of buildings which can potentially spawn
⦁ Slightly constrained building placement in large cities to make them a little less sprawling
⦁ Hoppable ledges added to towns & routes.
⦁ Added weather metadata to some areas depending upon biome
⦁ Rainy areas or Jungles can sometimes have puddles on the ground
⦁ Added interior map & base events for Pokemon Lab in the starting town, including the default professor oak events and starter selection.
Texture Updates
⦁ Texture improvements to the custom poofy 2x3 trees used in Forest biomes (thanks to Jester for the adjustments!)
⦁ Added two more existing path types from the tileset to the generator - these can appear in 'urban' cities.
⦁ Additional roof colors (yellow, blue, red, green) can generate for houses.
Bug Fixes
⦁ Added a popup message which should display if Cartogropher does not have permissions needed to create the log file
⦁ Fixed an issue where an error could occur if the log file tried to generate prior to the CartographerOutput folder existing.
⦁ Fixed an issue in which the map selection cursor was included in the region map's image output
⦁ Fixed an issue introduced in 1.2.7 in which using the same world seed multiple times resulted in the same region layout, but different placement of buildings/trees/paths/etc. Reusing the same seed with the same settings will once again produce the exact same result.
⦁ Fixed an issue in which generated Gyms exit doors were still linked to the tutorial map instead of their corresponding generated city map
⦁ Ensured generated YAML files are using UTF-8 encoding so rvpacker can properly pack unicode characters (such as é in Pokémon)

Screenshots:
Spoiler:


Previous Versions
Spoiler:


Version 1.2.7 changelog:
Spoiler:

--------------------------
Version 1.2.6 changelog:
Spoiler:

Version 1.2.5 changelog:
Spoiler:


Version 1.2.4 changelog:
Spoiler:


Version 1.2.3 changelog:
Spoiler:


Version 1.2.2 changelog:
Spoiler:


Version 1.2.1 changelog:
Spoiler:


Version 1.2 changelog:
Spoiler:


Version 1.1 screenshots:
Spoiler:


Original Alpha 1.0 screenshots:
Spoiler:


Discord Server
As always, I am still open to feedback and suggestions - in fact, I've made Discord server in order to better facilitate answering questions, helping with issues or just sharing generated maps.
It's not a very fancy server by any means, but I've put up an FAQ there as well as a space for suggestions or reporting issues.

Link: https://discord.gg/JRBHWQCmSb

My eventual goal with this project would be to export a "complete" game in this manner, including interiors, trainers, and basic events. Originally, I started this project as my own engine, the idea of which being that you would just start a new game and have an entirely ready-to-play region generated, but switched gears into just exporting the output to RPGMaker XP where a much better engine already exists.

I do not require credit be given for use of this tool (although you can give it if you want :D). If you do make a game out of it, I would love for you to share, either here or on Discord - I'm very interested to see what people come up with!

There are a few known issues to be aware of:

⦁ Generator may use 1-2 GB RAM, which these days shouldn't present an issue for most.
⦁ Texturing does have a couple small errors that might need manual adjustment, though it's overall pretty good. In particular ponds and puddles need the layer 2 outline added on top, so the player's reflection isn't visible on the corners where there is technically grass.
⦁ You will probably need to add a few extra stairs manually to ensure all map areas can be reached. I'm working on a way to hopefully improve this in the future.
⦁ Stair events will place the player on top of an item ball if it rests on the ending position of the stair. This is more of a placement issue, as the item placement has not yet been refined.
⦁ Swimming trainers can currently also spawn in ponds. I probably will remove this in the future unless it makes sense for the specific area.
⦁ Occasionally, cliffs can generate 2 tiles high which can't be pathed through correctly by the algorithm, which can result in a map being blocked off along one of it's connecting sides. You'll see an error mentioning this in log.txt if any of your region maps has this happen, though it isn't too common.

I'm sure there are probably other issues I've yet to discover, so if you find a bug or issue please let me know.

Here are some things I'm tentatively thinking about for the future versions - it's unlikely I will implement all of them, and may add things that aren't even on the list depending on what I feel like working on. But, let me know if you have any opinions!

⦁ More options for the region's landmass generation (e.g. more of a peninsula or land-locked region instead of an island/islands)
⦁ Configuration of which items can appear based on the area's level, e.g. lower level areas would have Pokeballs/Potions, while higher level ones may have Hyper Potions/Ultra Balls/etc.
⦁ Generally better item placement
⦁ More biomes
⦁ Further enhance city generation with different landmarks and features, etc
⦁ Add more building styles & types
⦁ Improve caves with more textures, varying types, multi-level caves, and tunnels connecting 2 areas.
⦁ Add other types of side areas such as forests
⦁ More building interiors
⦁ Add more features to route generation (more urban-looking routes, berry trees, etc)
⦁ Add some more decorative textures to the generation
⦁ Add fishing spawns for encounters.txt
⦁ Add more gens of pokemon species to the default biomes.txt and trainer pools (it's mostly gen 1 at the moment)

I know a lot of people want support for multiple tilesets, e.g. generation IV, etc. However this isn't really high on my priority list since if you want to you can just edit tiles on the existing tileset, replacing them with your own textures (as long as they are in the same location as the texture(s) they replace and generally tile with one another in the same way). The generator assigns tiles based on their position in the tileset image, so it will still function with modified tilesets if you set it up just right.

Which things would you like to see? Let me know what you think!

Download link:
https://www.dropbox.com/sh/ipyif1iloqx5laf/AAAc8CNvGdPMni0U-ivDQ9Hca?dl=0
 
Last edited:

Zeak6464

Zeak #3205 - Discord
1,101
Posts
10
Years
  • Age 31
  • USA
  • Seen Oct 9, 2023
-Possibly a custom tileset specifically for this tool?

Yes i would love this !
I personally don't like Gen 3 style stuff.

-Make the region generation more configurable (specify number of cities or gyms, for example)
That would be really cool , like 4 Cities but 8 Gyms :D routes can get gyms.
 
1,669
Posts
8
Years
  • Age 23
  • Seen today
This is a really neat tool, especially since it also generates the connections and encounters to boot.

The generated maps occasionally have tile errors and the unconnected sides of the maps don't have the buffer that prevents you from seeing the black edge, but that's nothing a once over can't fix! After all, the heavy work was all done already.

It would be pretty nice if it also exported the image of the region map.

But yeah, great tool, I had fun messing with it.

As an aside, rvpacker gave me trouble setting up, you need to update your ruby version and install a copy that come with the devtools. You'll also have to upgrade gem and may need to add the installed path to the PATH.
 
139
Posts
7
Years
I was a little afraid the extra step of ruby & rvpaker would present a barrier to use - I didn't have much issue installing it, but I've used ruby before in the past. Would love it if I could find a way to handle that automatically, or figure out how to pack/unpack the files myself and not need it.

Honestly this was a pretty quick "hack" of my own engine I threw together as kind of a prototype, and a lot of the texture issues stem from either differences in the tiles I was using or differences in how the layers work in my engine. Hope to fix some of those in the next update, possibly even redoing some of my layer handling code.

I did think about being able to see the black out-of-map areas but decided to table it for later in the interest of getting something out. Thing is, tiles already exist beyond that in my engine and would be simple to just expand the boundaries, but some maps only connect over part of an edge, so they would need to overlap in some cases or have some other code written to determine which edges to expand. I read there's a way to connect overlapping maps in conncetions.txt, but not sure if there's downsides to doing that, will have to do some more research.

But, I am excited to keep improving this, for the time being - really hope I can make it more user-friendly!
 
115
Posts
11
Years
  • Seen May 17, 2023
this took a while to set up, but the maps are interesting.
some maps are almost identical, but otherwise, it looks good.
if anyone is unsure how to set it up, and just wants a random map file (rxdata), PM me, and I'll send you one. the tool creates 50 maps, and I won't use them all anyway.
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Thanks for sharing! And look forward to see Gen. IV graphics here.
I really like it!
 
20
Posts
10
Years
  • Seen Mar 1, 2023
Thanks, as a user I appreciate you taking the time to create such a tool for users like me that stress over map making. The following features you've suggested as an example for future updates are good and I hope to see more updates!!!
 
139
Posts
7
Years
I did find that after the fact. However, it doesn't seem that much different in principle, you still have to install the ruby devkit I think. I guess it avoids the command line though, and gem installation.

I did more research to see if it's something I could do on my own, but unfortunately the conversion is actually just marshalling/unmarshalling Ruby objects, so I don't think it's realistic to it without ruby being involved. I could probably call a batch file or something to run the ruby functions automatically, but considering some files like mapinfos.yaml have to be merged with existing contents it might be better to let the user do it themselves. Unless anyone has a better idea
 
1
Posts
4
Years
Hey, I've been participating in a Pokemon tabletop game using Pokemon Tabletop United and literally last night I started to code a map generator in java. I saw this and literally joined the forum on the spot to reply. We're using the existing regions connections but with larger maps and it looks like you've already figured out a lot of the algorithmic stuff I'd have to tackle. I understand that personal projects like this tend to be nearly illegible from a code perspective, but if there is any chance at all I could get a look at your code I would really appreciate it. I would of course be happy to share whatever I create with you, I won't monetize it and it would really help me out. Please let me know if you're at all willing to discuss this. Thanks!
 
139
Posts
7
Years
Hey! I'd be happy to explain whatever algorithmic thing you want some ideas about. Did you have any specific questions? It's probably going to be easier to just discuss, and I have no problem yammering on about how my generator works. I have never played any kind of Pokemon tabletop game, although it sounds interesting - I'm guessing your map needs are going to be a bit different than an actual RPGMaker game?

As an aside to the thread in general, I'm working on a smallish update to this tool which I'm hoping to get out by this weekend. Progress is quite glacial but I'm working on it when I can.
 
139
Posts
7
Years
Few days late, but I've released the first update: 1.1!

The update mostly focuses on refining what was already there, I still haven't even adjusted the wild pokemon spawns, lol. Some QoL stuff and better texturing, and a lot of reworking some of my own internal code to make future updates a little smoother for me. Ran into several snags that took way longer than expected to resolve, but hope the improvements are appreciated!

I have edited the original post with the changelog & some screenshots of what's new. Check it out!
 
350
Posts
5
Years
Well, I have a region map Ready.. but I have not done Mapping and Eventing yet... So can this make Routes and Cities for a present region map?
It would be grateful of you if is there a way
 
139
Posts
7
Years
Well, I have a region map Ready.. but I have not done Mapping and Eventing yet... So can this make Routes and Cities for a present region map?
It would be grateful of you if is there a way

Nope, sorry - there's no way to input an existing region map.
 
139
Posts
7
Years
There are instructions in the readme file - you will have to install Ruby in order to convert them. If you run into problems I would be happy to help!
 

Snooper16

The Bionic Man
133
Posts
9
Years
This tool is great! It'll be a timesaver for new projects for sure!

My only complaint is that the map connections are apparently not in a coherent order once I got to actually see the connections in-editor. It seems to be a random mishmash of the maps in the general shape of the region, if you catch my drift? Hopefully there's a solution for this so I can take the guesswork out of correcting the connections.

EDIT: Here's what I'm referring to:
https://gyazo.com/825b7f0eb237c7e58d20dd8f670ab455
 
Last edited:
139
Posts
7
Years
Hey Snooper, glad you like the tool! Looking at your connections I'm not sure what happened but I'm not getting output like that. A couple guesses:

1. Could be an undiscovered bug in the generator (unlikely but possible)
2. Did you forget to replace the old connections from a previous run of the tool? The IDs will get reused.
3. What version of essentials are you using? I've only tested in 17.
 

Snooper16

The Bionic Man
133
Posts
9
Years
Hey Snooper, glad you like the tool! Looking at your connections I'm not sure what happened but I'm not getting output like that. A couple guesses:

1. Could be an undiscovered bug in the generator (unlikely but possible)
2. Did you forget to replace the old connections from a previous run of the tool? The IDs will get reused.
3. What version of essentials are you using? I've only tested in 17.

I'm using v17.2 of essentials, though I kept the test maps so I could be reference them as I populate the new maps with NPCs and the like. I don't recall any of the IDs overlapping between the test maps and the new region though (The test maps go up to ID 075, whereas the new region maps start at ID 100). I'll try removing the test maps and see what happens.
 
139
Posts
7
Years
Yeah the test maps shouldn't conflict at all, I've done all my testing with them still in place. But I've never seen the maps be all "shuffled" like that. Which makes me think it could be the connection data from 1 output being used with the map data from a different output
 
Back
Top