Slay the Spire

Slay the Spire

48 ratings
Map Generation in Slay the Spire
By jomami
In this brief guide I will try to explain the relevant information regarding Map Generation and maybe some new ways to look at the game.
4
3
   
Award
Favorite
Favorited
Unfavorite
Important Note
In the game, all decisions you make are based on a myriad of factors. So many in-fact that it is almost impossible to quantify.
Just remember nothing is set in stone and there are no cure-alls. Almost any situation you will find yourself in will be unique and will require you consult may factor other than just the map.

In order to finish the game (without the Heart) you are expected to traverse the Map 3 Consecutive times In Acts I, II & III. For all of the 3 Acts the Map Generation is identical only the Locations content changes.

Generation is identical to in all ascensions accept for 1 factor: After A1 Elites Location rates go from 8% to 16% and to compensate Monster Locations go from 53% to 45%. I am going to assume we are playing on A20.
Map Layout
The map is composed of:
  • Map Template: A predetermined set of positions where Rooms can be generated or not. (A Grid)
  • Rooms: Each individual place you can visit. (Also known as a Nodes).
  • Paths: Lines connecting Rooms. (A connection between two Nodes).
  • Floors: Rooms on the same horizontal level. (Nodes on the same X Axis).
  • Locations: Specifies what can be expected when visited.
  • Boss Room: Additional Room (or Node) added to the top post generation.






Initially the game generates a 7x15 Irregular Isometric Grid (a Grid formed by triangles). Then it randomly chooses one of the Rooms on the 1st Floor (at the bottom of the Grid). It then connects it with a Path to one of the 3 closest Rooms on the 2nd Floor. It continues this pattern to the next Floor Floor.









It repeats this procces 6 time obeying the following rules 2:
  • The First 2 Rooms randomly chosen at the 1rst Floor cannot be the same. Ensuring that there are always at least 2 different starting locations.

  • Paths Cannot cross over each other.

Each colour represents a generation of Rooms and Paths.













Afterwards the remaining unpaired (Pathless) Rooms are removed and it will start assigning each room with a Map Location.
Assigning Map Locations
For starters the game will fill in:
  • all the Rooms on the 1st Floor with Monsters.
  • Then all the Rooms on the 9th Floor with Treasure.
  • And all the Rooms on the 15th Floor with Rest Sites.
Then it will take every remaining unassigned Room and randomly determine a Location based on the following odds:



During the assigning proces the following rules override the determined outcome:
  1. Elite and Rest Sites can’t be assigned below the 6th Floor.

  2. Elite, Merchant and Rest Site cannot be consecutive. (eg. you cant have 2 Rest Sites connected with a Path)

  3. A Room that that has 2 or more Paths going out must have all destinations be unique. 2 destinations originating form the same Room cannot share the same Location.

  4. Rest Site cannot be on the 14th Floor.


If on of the rules is broken it will reassign a Location based on the previously mentioned odds until it obeys by all the above rules.
Allocating Boss Room









At the end it simply randomly selects 1 of the 3 a bosses for that Act and connects all of the Rooms on the 15th Floor (Rest Sites) to it.
Game Play Applications
Although interesting there is very little practical application for this knowledge, but hey, now you know.

Elites start spawning at the 6th Floor. You can try to defeat one with Meow’s Lament if Pathing allows.
Apart you will always have 5 Floors free of Elites. However the lack of Rest Sites and the lack of Gold forces you to add cards to your deck at the very beginning of the game since there is very little way of improving your Hero thru other methods.

Of note I find point 3. under Rules Override. Knowing this increases the value of crossroads. Not just for planing for multiple options but also in adding value to the seed you are playing. The more splinting occurs the more varied your Map Locations will be.
On the first 5 Floors for example a 3 way split will always have 1 Monster, 1 Event & 1 Merchant Simply because the other options are unavailable on those Floors and the destined Locations must be different. Passed the 6th Floor Spiting will increase the odds for generating Elites and Rest Sites.

Based solely on Assigning %, and assuming that Event Location involves Combat about 50% of the time, you will be in combat about 75% of the time.
Is that a lot? I don’t know. you wont see combat ¼ of every Room you visit. It would mean that out of 15 Rooms, 11 would be combat related and 4 not.
This is without putting the Pathing into consideration that number could be drastically higher or lower depending on the Paths you choose.

Since combat is usually your main source if Gold income id like to make some calculations for the Cash to Shop Ratio i just made up.
Monsters = 10 to 20 Gold (Av. 15)
Elites = 25 to 35 Gold (Av. 30)
Boss = 95 to 105 Gold. (Av. 100)
From the 75% combat encounter 75% of the time will be Monsters (that’s 75% of 75 or 8 out of 11 Rooms) and the remaining 25% (3 out of 11 Rooms) will be Elites giving you an average of 210 Gold (120 Gold from Monsters and 90 Gold from Elites), not including Boss Reward (+100 Average). Meaning that on average you can expect each floor to be worth, or give you, 14 Gold.
Don’t know what you want to do with that information but next time you see a shop 4 Rooms away you should arrive there with a hypothetical increase of + 56 Gold.
I might be wrong but who’s gonna prove me wrong ¯\_(ツ)_/¯ .

7 Comments
Hotklou 17 Feb @ 4:55am 
As a game developer I find this fascinating. Thank you for compiling this information.
Kookoobutter 23 Jun, 2023 @ 11:01am 
be a chad and go balls deep with no plan
Kookoobutter 23 Jun, 2023 @ 11:00am 
🤓
jomami  [author] 17 Aug, 2022 @ 5:23am 
@LHGreen -Yes, as you say, from A1 and on-wards when the elites placement becomes more frequent.

Thank you all for the kind words :).
LHGreen 16 Aug, 2022 @ 8:21pm 
Love this and the work you put into it, thanks. One quick note. When you say the elite placement changes after A1, did you mean to say that it changes after A0, and from A1 onward?
Hakajisai 12 Jul, 2022 @ 3:49pm 
Amazing, thanks!
Sal Vulcano 5 Jul, 2022 @ 4:03pm 
Thank you, this was very informative