Randomized map creation+randomized enemy/chest placement system.

● ARCHIVED · READ-ONLY
Started by Zoltor 3 posts View original ↗
  1. Initially I was gonna modify one of the combining map scripts, to beable to combine them randomly, since I want to create a module based random map generator for one of me side quest dungeons.

    However that would be trickier to create with a modification of another script then I originally thought, because then I would also need to define the ways each individual module can be attached to the map(otherwise you may end up with doorways that go nowhere, dead ends that shouldn't be dead ends, ect, it would look sloppy).

    To make matters even worse, the encounter system works differently. Everywhere else in the game, the game uses random encounters, but in this dungeon, not only are enemies visible on the map, they are completely randomized, as to what enemies could be where or even if a enemy is there at all(Think Lufia 2's Ancient Cave)

    Now how to pull this off, is tricky to say the least, nevermind the randomization trigger.

    Using a common event would be sloppy, and you would have to redefine alot of features that the editor has as a "option" as well as when to implement such based on the randomization outcome..

    Short from paying Hime or Yanfly(there probally aren't many others around who can even make such a script, so even if I had the extra money to pay them, if they didn't want to take part in such a job, I would be screwed) thousands to create a custom script that needs to literally calculate a million, and one variable with random outcomes, doing this via script, would pretty much be impossible.

    I never imagined I would be creating such a huge randomized dungeon this way, but it would seem eventing it all out, would be infinitely easier.

    The key to it being possible, is It's module map design, even though It's a 100 floor dungeon(99 of which are randomized), It's not gonna require even 100 maps, let alone the thousands one might expect.

    The key it the doors/transfer events, I'll just have them handle the randomization, then using a switch so the randomization only happens once for each door you walk through while on a give floor(leaving the floor resets all the switches(I'll have to turn on switches from the other end automatically, based on the location that the player starts the map at+have it fixed to the correct transport location, but that's easy enough to do).

    Also to take care of of enemy random spawn location, the map being module based, creates the solution, every cell of the map that can be walked on, will effectively be an event, which based on another randomized calc run when you pass through the door the first time on each floor.

    It's a lot of work for sure, but It's a hell of a lot more viable then coming up with a script that does "everything" I need it to do(oh btw did I mention, each enemy has its own custom move route as well).

    This is gonna be one crazy thing to event, but when done, It's gonna all come together beautifully. I'm thinking I should wait until atleast 3/4 of the game is complete, before I fully implement this though or I'll be having too much fun doing dungeon runs, to actually develop the game lol.

    .
  2. Saving the difficult stuff may not be the best idea. 

    Usually I like to get those done first.
    Scripting wise this can certainly be done without being to insane to code. 

    It would be pretty neat I like the idea, the concept sort've reminds me of Persona 3.
    Less boring then traditional dungeons. If you have decent replayablity and/or a new game+ feature it'd be really cool.

    Doing it all in events however would be tricky.
    Plus an event on every walk-able tile? That may cause a bit of lag everytime you take a step. VX Ace engine is like this, sometimes I'll make a complex system and even on my beast development PC I use for work.

    If you want my novice humble advice on the matter here's what I'd recommend to help.
    I'd recommend two scripts to help you out.
    Tsukihime's encounter update: http://www.rpgmakervxace.net/topic/5176-encounter-update/

    and
    Vlue's Copy/Paste Map Data: http://forums.rpgmakerweb.com/index.php?/topic/18173-copypaste-map-data/

    Perhaps use Vlue's script with preset map parts on another map to generate a random map when you enter the floor.
    Issue is, to make 99 random maps, you'd need to store the 'map data' of each floor somewhere like a hashmap, this requires a wee bit of scripting knowledge.
    Plus also a simple variable to track the current floor. Or of course you could just regenerate everytime you enter the floor depending on the nature of the dungeon (say a weird dream world or magic illusion or something to that effect).
    Once you have that squared away once you generate a dungeon use hime's encounter update to reset the floors.

    But if successful it may be a bit more simple and elegant in my opinion and only use 1 map for 99 floors.

    Of course you could just make one massive map and make 99 small floors within the map and generate all the floors within it spaced out evenly, but that would probably be kinda ugly in my opinion and cause lag whenever the map is loaded and massive lag when generating the first time (Like need a loading screen lag).
    Though you wouldn't even need Hime's encounter update as you only need to set it up once before you make the game with regional tiles.

    Either way best of luck.
  3. Actually so do I, infact that's why I don't have much of the main game implemented at all(not even the beginning scenes, even though I know what they entail), because I'm too busy making all these awesome complex systems/features.

    The reason why I want to hold off on making the Ancient Cave, is because when It's up, and running, I'll be likely wasting hundreds of hours away playing, doing dungeon runs(no exaggeration.

    Here's a rundown of everything I would need the script to do(It's insane, not impossible persey, because Lufia 2 did it, but outside of paying someone thousands for it, a script is not the option, besides there's very few scripters around here, that could pull this type of thing off) :

    Randomly put together map pieces properly, randomly generate one set of stairs goning down(with a 99 fl counter variable, so floor 100 doesn't have stairs),randomized enemies/chests on map,pulled from a list of possible enemies/item drops, which changes every 10 levels. Every enemy in this dungeon has a custom move route, if touch player, they enter battle. 

    Plus there's probally some item, and level handling procedures I want as well, but haven't finalized how I want that to work yet.

    Nah that not needed for the way I'm gonna do it, in hopes of cutting down the usage of switches, most events most likely wont be identicle copies of one another.

    Also nah, the way I'm doing it, I wont need a 100 maps for 100 floors.

    I'm personally liking the number 66(as in 66 map modules). 2/3rds or so of that will be rooms with multiple entry ways, while the rest will rooms with only 1 doorway.

    When you first enter a doorway, it will randomly generate the next room. 

    In short  I am going to create a random map generator that can potentially create millions of different maps, yet it won't even require a noticeable fraction of that many maps in the game file..

    My goal is to make sure the player has to explore each floor all over again, every time they enter the dungeon, It's gonna feel different. This way people will never get bored treasure hunting in the dungeon, It's gonna be a treasure hunter's dream come true :)