Skip to content

Coding the Modron Maze?

AquadrizztAquadrizzt Member Posts: 1,069
Could the code used for the Modron Maze (e.g. randomly generated modular tiles) be used for something else? I can't seem to find any documentation on how the engine handles it anywhere.

Comments

  • EdvinEdvin Member, Translator (NDA) Posts: 3,244

    Could the code used for the Modron Maze (e.g. randomly generated modular tiles) be used for something else?

    Modron Maze in not random.
    There are about three basic patterns, which changes during passing through the maze.
    So it's stupidly difficult coding, but not random.
  • argent77argent77 Member Posts: 3,478
    Many aspects of the Modron Maze (such as available maps, traps, exits, location of special maps) are indeed randomly generated for each run. In original PST the parameters were stored in the save's TORMENT.GAM. In PST:EE it's a separate file called TORMENT.MAZE which is stored in the save's BALDUR.SAV after the maze has been generated.
  • AquadrizztAquadrizzt Member Posts: 1,069
    @argent77, is there any way to influence how the game engine generates this TORMENT.maze file?
  • argent77argent77 Member Posts: 3,478
    I don't think so. The area codes are probably hardcoded to AR13xx.ARE and the maze itself is initialized by the script action GenerateModronMaze() (and possibly FixEngineRoom()).
  • smeagolheartsmeagolheart Member Posts: 7,963
    argent77 said:

    Many aspects of the Modron Maze (such as available maps, traps, exits, location of special maps) are indeed randomly generated for each run. In original PST the parameters were stored in the save's TORMENT.GAM. In PST:EE it's a separate file called TORMENT.MAZE which is stored in the save's BALDUR.SAV after the maze has been generated.

    @argent77
    So if you generate this torment.maze and then start a new game and get to the maze it will be the same or regenerated? If it's regenerated does that mean if you load your other game, it will have the new maze?
  • argent77argent77 Member Posts: 3,478
    The torment.maze doesn't exist in a new game. You have to call GenerateModronMaze() at least once, although I've never tried entering the maze without calling this script action.

    The actual configuration is loaded from the torment.maze found in the save, so you can explore different mazes when loading different saves. There are actually many calls of GenerateModronMaze() in the game. I guess it's also called whenever you set the difficulty rate of the maze. However, I don't know how it affects the maps you have already explored (since they are also stored in the save).
  • ScourgeScourge Member Posts: 97
    Hello,
    I was lurking when I came upon this thread. I wanted to say that for a moment I thought you wanted to add a cheat to make the maze easier: in my 12+ playthroughs on the original version, I was never and I mean never able to reach the mage (final boss) inside that maze. I was only able to get nordom, so a plugin to make it easier would be appreciated.
  • AquadrizztAquadrizzt Member Posts: 1,069
    Dang, I guess my dreams of an innate engine handling of procedurally generated dungeons will just have to wait...
  • smeagolheartsmeagolheart Member Posts: 7,963

    Dang, I guess my dreams of an innate engine handling of procedurally generated dungeons will just have to wait...

    There's also the maze in watchers keep. I don't know how random it is by itself, but there's a component in some mod that makes the maze random.
  • AquadrizztAquadrizzt Member Posts: 1,069
    @smeagolheart, the maze in Watcher's Keep (before modding) is completely deterministic. There is a fix order of portals to go through, although I don't remember the exact order anymore.
  • inethineth Member Posts: 747
    edited April 2017

    There's also the maze in watchers keep. I don't know how random it is by itself, but there's a component in some mod that makes the maze random.

    You must be thinking of this SCS component:

    Randomize the maze in Watcher's Keep

    This component is for the benefit of people who've now basically got the Watcher's Keep teleport maze memorized. It randomly rearranges the maze to one of three different alternative configurations. Don't install or reinstall this component while you're exploring the maze (before you enter it, or after you've left it, will be fine).
Sign In or Register to comment.