{"id":30514238,"url":"https://github.com/tramshy/sts-map-generator","last_synced_at":"2026-05-05T08:32:56.529Z","repository":{"id":310341560,"uuid":"1038625925","full_name":"Tramshy/sts-map-generator","owner":"Tramshy","description":"This package allows developers to create engaging, procedurally generated maps similar to those found in the game Slay the Spire in Unity.","archived":false,"fork":false,"pushed_at":"2025-08-18T12:21:43.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T07:28:32.610Z","etag":null,"topics":["card-game","map","procedural-generation","slay-the-spire","slaythespire","sts","ui","unity","unity-ui"],"latest_commit_sha":null,"homepage":"https://big-trashy.itch.io/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tramshy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-15T14:44:58.000Z","updated_at":"2025-08-18T12:21:46.000Z","dependencies_parsed_at":"2025-08-17T14:12:13.604Z","dependency_job_id":"10e587d6-b561-4d05-a3c0-3c4a4ba942d3","html_url":"https://github.com/Tramshy/sts-map-generator","commit_stats":null,"previous_names":["tramshy/sts-map-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tramshy/sts-map-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tramshy%2Fsts-map-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tramshy%2Fsts-map-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tramshy%2Fsts-map-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tramshy%2Fsts-map-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tramshy","download_url":"https://codeload.github.com/Tramshy/sts-map-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tramshy%2Fsts-map-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32642007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["card-game","map","procedural-generation","slay-the-spire","slaythespire","sts","ui","unity","unity-ui"],"created_at":"2025-08-26T07:18:56.376Z","updated_at":"2026-05-05T08:32:56.495Z","avatar_url":"https://github.com/Tramshy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slay the Spire-like Map Generator\nThis package allows developers to create engaging, procedurally generated maps similar to those found in the game Slay the Spire in Unity.\n\nThe basic generation logic was created by [Roican](https://github.com/Roican), then modified by me.\n\n## Features\n* Easily created StS-like maps\n* Full control over map layout using `MapConfig`\n* Fully functioning seed system\n* Easy use and setup\n\n## Installation\nThis repository is installed as a package for Unity.\n1. `Open Window` \u003e `Package Manager`.\n2. Click `+`.\n3. Select Add Package from git URL.\n4. Paste `https://github.com/Tramshy/sts-map-generator.git`.\n5. Click Add.\n\nNOTE: To do this you need Git installed on your computer.\n\n## Editor Usage\n### Creating POIs\nIn order to use this package, you must first create a new script deriving from `PointOfInterest`. Then you must create a few point of interest (`POI`) prefabs. A `POI` is a UI element with an `Image` component and a component deriving the script `PointOfInterest`.\n\n### MapConfig Fields\nYou must also create a new `MapConfig` scriptable object, found under \"StS Map Generation/Map Config\" of the create asset menu. This new scriptable object will let you fully control map generation using the following settings:\n* LayerLayout\n  - An array of the serializable class `MapLayer`. This array allows you to define the length of the map (for example: 5 elements for a length of 5) as well as the layout of each layer on the map.\n* PrefabsForLayerTypes\n  - An array of the serializable class `POIPrefabs`. This array defines what POI's can spawn on the map. The array size matches the available `LayerTypes`.\n* ChancePathMiddle\n  - The chance for a path to spawn in the middle.\n* ChancePathSide\n  - The chance for a path to spawn to the side.\n* MultiplicativeSpaceBetweenLines\n  - The space between path lines.\n* MultiplicativeNumberOfMinimumConnections\n  - The multiplicative minimum allowed connection for a map. This value is multiplied by the map length to determine the minimum number of connections.\n* MaxWidth\n  -  The max expected nodes per layer.\n* CustomNodeTypes\n  - An array of string that allows you to easily add custom layer types. Simply add an element and give it a name, you will then find the new custom layer type under PrefabsForLayerTypes.\n* AllowPathCrossing\n\n### MapLayer Fields\n* LayerType\n  - Determines the nodes that spawn on this layer.\n* RandomizePosition\n  - Multiplier determining how much randomness to add to the position of each node.\n* UseRandomRange\n  - Determines whether or not to use a random range when spawning nodes for this layer.\n* _amountOfNodes\n  - If `UseRandomRange` is false, this value will determine how many nodes to spawn. Set to -1 for total randomness.\n* _randomNodeRange\n  - If `UseRandomRange` is true, this value will determine the random range.\n* LayerID\n  - A string determining which custom layer type for this layer to use. This field is set using a dropdown menu.\n* YPaddingFromPreviousLayer\n\n### POIPrefabs Fields\n* PointsOfInterestForThisLayerType\n  - The prefabs to spawn for this layer type.\n\n### MapGeneration Fields\n* _pathPrefab\n  - The prefab for the path used between nodes on the map. The system can handle both a `LineRenderer` and `UI` approach. This means that if this prefab has a `LineRenderer` component, the path will be created using it, otherwise the system will copy this prefab several times and space out as individual path objects.\n* _xPadding\n  - The padding between the left and right edges of the map background in pixel units.\n* The remaining fields can be ignored.\n\n### MapContentResizer Fields\n* _finalLayerHeightPadding\n  - The extra padding to apply to the final layer of the map in pixel units.\n* The remaining fields can be ignored.\n\n### Creating Base Setup\nNavigate to `Tools/StS-Like Generation/Create Basic Setup for Scene` in the top menu. This will create a basic setup for you to adjust. You must create a UI `EventSystem` for this to work. It is also recommended to set the scene's main camera to the `Render Camera` of the `Map Canvas`. \n\n## Runtime Usage\n### PointOfInterest Class\nThis class handles things like hovering over (using the `OnHoverEnter` and `OnHoverExit` methods) and selecting a node (using the abstract `OnNodeEnter` method).\n\n#### Methods\n* Awake\n  - The `Awake` method is being used by the class to initialize some values. If the `Awake` method is needed, call `base.Awake` in the override method, unless you want to handle initialization yourself.\n* SetAvailability\n  - Determines whether or not the node is available to be selected. Simply sets the `isAvailable` field and calls `SetAvailabilityVisuals`.\n* SetAvailabilityVisuals\n  - By default changes node color based on `isAvailable`; however, this can be overridden.\n* OnHoverEnter \u0026 OnHoverExit\n  - Determines behavior when pointer enters and exits the node. By default, it changes scale. Can be overridden.\n* OnNodeEnter\n  - Determines behavior when node is clicked while available. Is `abstract` and must be set by the user.\n\n#### Fields\n* rnd\n  - Field of type `System.Random`, created based on `subSeed`. Use this for ALL randomness in a node. This will ensure that all random generation is the same on a per-seed basis.\n* deactivatedColor \u0026 activatedColor\n  - Colors used for the basic animation if a node is available. Can be completely ignored if the `SetAvailability` method has been overridden and now does not use them.\n* FloorIndex\n  - The layer the node spawned on.\n* subSeed\n  - The seed created by the master seed during map generation.\n* Weight\n  - A lower value means lower chance for this node to spawn during map generation.\n* isAvailable\n  - A bool describing if a node is available. Set in `SetAvailability` methods and used in default `OnHoverEnter` and `OnHoverExit` implementation, as well as in `OnPointerClick` to determine whether or not to let calls pass through. Be sure to set this properly if `SetAvailability` is overridden.\n* thisImage\n\n### MapPlayerTracker Class\nThis class handles the player's position on the map. This class calls `SetAvailability` for all relevant nodes. This class is a `Singleton`\n\n#### Methods\n* Awake\n  - The `Awake` method is being used by the class to initialize some values and set up `Singleton`. If the `Awake` method is needed, call `base.Awake` in the override method, unless you want to handle initialization yourself.\n* OnNewMapGenerated\n  - Called from `_onMapGenerated` `UnityEvent` from `MapGeneration`\n* UpdateCurrentPOI\n  - Updates what nodes are selectable by the player by calling `SetAvailability` on relevant nodes. By default, calls `SetAvailability` of the previous floor to false, before moving up to the next node and calling `SetAvailability` to true for next nodes. By default, calls `UpdateCurrentPOIVisuals` right after updating `currentNode`. Can be overridden.\n* UpdateCurrentPOIVisuals\n  - By default changes the `currentNode`s `deactivatedColor` to white. This results in a line of white POI's along the selected path. Can be overridden.\n\n#### Fields\n* Instance\n  - The `Singleton` instance of this class.\n* currentNode\n  - The current POI selected by the player.\n\n## License\nThis package is licensed under the MIT License. For more information read: `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftramshy%2Fsts-map-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftramshy%2Fsts-map-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftramshy%2Fsts-map-generator/lists"}