Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Axu

An open-world graphical roguelike. Still in development. · By Cynapse

Custom Towers/Dungeons: Comments, Requests

A topic by flosincapite created Oct 19, 2017 Views: 537 Replies: 2
Viewing posts 1 to 3

So, I have been building a mod with custom locations. The way I've found to do this is by

  1. deleting all tiles of the original location's type (e.g. "Arena") in the Map Editor;
  2. creating a new tile of that type.

I used the Arena because it doesn't disrupt the plot, but there are some quirks there. First, any NPC I want to spawn there has to have the Arena_Master flag. Second, if I want to add more floors there, they're just generic cave floors.

With respect to that second point, it seems locations like Arena, Ensis_Interior, etc. are hard-coded. Would it be possible to add a few more "dummy" locations for modders to play with? Also, would it be possible to support "towers" in addition to dungeons, i.e. floors with elevations greater than 0?



(1 edit)

Sorry for the late reply! I wanted to make sure this was possible in a feasible amount of time. I'm happy to say that creating new areas will be possible. (COMING SOON!) I'm now reading local/world tiles from the StreamingAssets folder, so you can edit and add those as you wish. The basic workflow will go like such:

1) Edit the world map image to add the 16x16 sprite used for the new location. There's an empty row at the top, but you can always expand it. If you need more than 10. The index is read left to right, bottom to top, so place the newest tiles as far down and left as you can. The first available one would have the index of 80, just above the tent-looking tile.

2) Create a new local map, and change the Map Type to "Custom" (At the bottom of the drop down), name it whatever you want.

3) Edit WorldTiles.json, putting in the small amount of data needed by the system to determine how to place the new location. This includes the names of all possible local maps, the amount of times this area should be placed, and the tile index (from the image).

4) That's it! The system will automatically place the specified amount of this location on forest or plains tiles. If you need desert, swamp, tundra, etc, I'll need to create some new logic for finding open valid locations.

An example of the data file:

"Blurble1" is the name of the map, minus the extension (full name would be "Blurble1.map") This would place a single location called "Blurble" in a random position with the tile ID of 80. When entered, the map "Blurble1.map" would be loaded. If more names are specified, it'll pick a random one.
Right now, I'm working on sending static NPCs directly to a Tile ID instead of giving it a name for locations. Areas below this would be the cave as per usual, unfortunately. I'll have to do something similar with underground areas.

Positive elevations are stupidly hard-coded out, but I'll do my best to make it possible. Old code made silly constraints.

That is awesome!!! I am really looking forward to that :).