Advertisement
czeak6464

Random Dungeon How to use

Jan 21st, 2025
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.88 KB | Source Code | 0 0
  1. How This Script Works!
  2. This script allows users to generate custom random dungeons. Here are some key features:
  3. Event Naming: Events must be named in the format "Move NameOfEvent" to allow for random placement within the dungeon.
  4. Player Placement: The player will be placed in a random room after loading or generating a map.
  5. Terrain Requirements: Ensure that the desired terrain types are present on your map.
  6. Saved Dungeons: The script will create a folder called "SavedDungeons" in the root directory of your game, where it will save generated maps.
  7.  
  8. Warnings!
  9. Ensure that the terrain types are correctly set up; otherwise, you may encounter issues with terrain textures.
  10. Do not use this script in conjunction with "Quick Test Play," as it will overwrite your current map.
  11.  
  12. How to Install the Script!
  13. Place the script in the Script Folder.
  14. Attach the script to an Event.
  15. Create the necessary String Variables (see screenshot).
  16.  
  17. How to Use the Script!
  18. Generate: Generates a basic dungeon (23x23) with default terrain parameters defined in the script.
  19. Save: Saves the current dungeon. (Requires a String Variable for the dungeon name.)
  20. Load: Loads a saved dungeon. (Requires a String Variable for the dungeon name to load it from "SavedDungeons".)
  21. GenerateCustomSize: Generates a custom-sized dungeon using default terrain parameters. (Use a String Variable in the format width_height, e.g., 10_15.)
  22. GenerateCustomTerrain: Generates a dungeon with custom terrain. (Use a String Variable in the format floor_wall_corridor, e.g., 1_15_1.) This uses basic dungeon size parameters defined in the script.
  23. Clear: Clears or resets the current dungeon map (may appear unusual).
  24. ShowTerrains: Displays available terrain types located on the current map, which are used for terrain settings.
  25.  
  26. Notes!
  27. Ensure your map is set up correctly:
  28. Map Y-coordinate: 0.25
  29. Events Y-coordinate: 0.25
  30. Terrain Types on Map: 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement