-
Notifications
You must be signed in to change notification settings - Fork 79
Creating a new map
To add a new map and make it available to everyone that wants to use RedMew, make a Pull Request on github to request adding your map to the repository.
Maps are added into /map_gen/maps/
and each map can have an associated sub-directory inside maps
.
If you're not experienced with git, it's advised to read up on how git works first or ask someone else to help out. To get your change into the repository, you need to fork the repository and eventually make your Pull Request from there. Clone the fork to your local environment and get your favorite IDE or Editor ready.
The map_gen/maps/your_scenario_file.lua
file will be the entry point for your map and will be
loaded via map_selection.lua
.
Addendum on modules: If you want to add more than 1 entity or terrain module to a map there are special considerations:
-
Entity modules must be added before terrain modules.
-
Multiple modules of the same type should be acted on all at once as a table.
To illustrate both concepts at once:
-- Your module tables can be created anywhere in the map file, though usually near the top.
local entity_modules = {
require "map_gen.entity.loot_items",
require "map_gen.entity.mines",
require "map_gen.entity.deathworld",
require "map_gen.entity.glitter_ores",
}
local terrain_modules = {
require "map_gen.terrain.tris_chunk_grid",
}
-- Applying the modules should be done immediately before the "return map" line,
-- after all other modifications to "map" have been made.
map = b.apply_entities(shape, entity_modules) -- applying entities first as a table
for _, m in pairs(terrain_modules) do -- applying terrain modules second as a table
map = b.overlay_tile_land(map, m)
end
return map -- return map immediately after applying entities and terrain modules
Having issues? Reach out on discord
Got a bug report, feature request or map idea? Open an issue
Looking to download maps? See releases or the public save directory
Interested in Localization? Check out the progress at Crowdin