mcdungeon icon indicating copy to clipboard operation
mcdungeon copied to clipboard

Specify a range for regenerating/repopulating dungeons

Open DrakDragon opened this issue 8 years ago • 10 comments

A feature request:

I have several tiers of dungeons that all use different settings in McDungeon, and I would like to be able to regenerate/reroll the dungeons periodically. Right now, you can only choose to do either a single dungeon or All dungeons, but it only lets you use one config at a time (which is understandable). I am requesting the ability to specify a range of dungeons (say, from dungeons 1-100) to be chosen when re-generating. (If you can already do this, please let me know!)

DrakDragon avatar Aug 14 '16 16:08 DrakDragon

When you say range, are we talking about a positional range on the map? (the first X dungeons nearest this coordinate) or just first X dungeons it finds, the next X and so on? I think both would make it tricky to reliably 'target' specific dungeons.

If I am understanding your request correctly, I think a better way to go would be to 'tag' dungeons using a configuration setting. If the setting is present, all generated dungeons would be tagged with it. And if you used that same configuration for regenerating, it would only target dungeons with a matching tag.

JiFish avatar Aug 14 '16 16:08 JiFish

Well, I actually meant when you choose the option R from the menu it scans the world for existing dungeons then presents you to input a choice (A for all, or # for that one dungeon). I was wanting the ability to type "15-77" so that only dungeons 15 to 77 were affected, but your comment about allowing 'tags' on dungeons would actually make things a lot better! You could put a "tag" on them when you generate the dungeon, then when you are regenerating you could specify A for all dungeons, # for which individual dungeon you want to regenerate, or the Tag name for all dungeons matching that tag.

Your idea for dungeon tags is fantastic and I'd really like that to be a thing now.

DrakDragon avatar Aug 14 '16 19:08 DrakDragon

Well, regenerate actually accepts multiple -d options, it's just that interactive mode doesn't deal with it.

For example, if you want to regen three specific dungeons in one pass with a certain config, you do this:

mcdungeon.py regenerate -c myconfig.cfg -d 128 128 -d 100 100 -d 150 150

orphu avatar Aug 14 '16 19:08 orphu

Oh neat. I haven't really played with non-interactive mode that much, but that will be useful now that I know about it, thanks!

edit: whoops hit the wrong button!

DrakDragon avatar Aug 14 '16 19:08 DrakDragon

I like the tags idea; if a dungeon could have multiple tags, and some tags (such as: biome, dungeon type, entrance type etc) were automatically assigned, then you could have a lot of control over it. Possibly other functions could in the future be tied to tags as well, such as delete

sshipway avatar Aug 14 '16 20:08 sshipway

Any news if this can be a thing? Also, how do I save the list of all dungeons currently in the world to a .txt file? I have about 300 standing so when I choose to (L)ist them they actually push off the top of the command prompt window and I can't read them all. I'd like to have it in text too so I can parse the list and sort my dungeons by their tiers (currently based on max dungeon depth) and regenerate them that way since you can do multiple regeneration in noninteractive.

By the way thank you again for making this fantastic software. McDungeon is absolutely amazing and my players are enjoying the dungeons quite a lot.

DrakDragon avatar Aug 25 '16 14:08 DrakDragon

I'm sure this can be a thing. But, like every other feature request, I wouldn't hold your breath. It'll get added when someone has the free time. We are open to people submitting patches too. :) Mostly, I am spending my limited free time trying to keep up with the changes introduced by new versions of Minecraft.

As for your dungeon list question, you can get that with a little work in the command line.

JiFish avatar Aug 26 '16 20:08 JiFish

I know very little about python, just played around with it in the past before, but this could give me an excuse to take some time and learn it. I probably don't remember this right, but doesn't python have a hard time playing well with other versions of python? (As in, python's changed enough that older versions aren't supported by newer versions, so you'd need to use a specific version to build with?) If that's the case, what version should I get for playing around with adding features to McDungeon (and maybe submitting if they work and are of good quality?)

Also thanks for the help in your post, I appreciate it.

DrakDragon avatar Aug 26 '16 21:08 DrakDragon

Also, as of a recent version, there is a YAML formatted list of all dungeons in:

(worldname)\mcdungeon_cache\dungeon_scan_cache.yaml

- dungeon_name: Defiled Ruins
  entrance_height: 10
  entrance_pos: !!python/object:utils.Vec
    x: 0
    y: 0
    z: 0
  fill_caves: false
  full_name: Defiled Ruins
  levels: 4
  portal_exit: !!python/object:utils.Vec
    x: 31
    y: -39
    z: 30
  position: !!python/object:utils.Vec
    x: 320
    y: 53
    z: 272
  timestamp: 1461983857
  version: 0.15.1
  xsize: 4
  zsize: 4

orphu avatar Aug 26 '16 22:08 orphu

As far as requirements, they are the same to run it.

from: http://mcdungeon-docs.bubblemod.org/en/latest/downloading-running/#requirements

Python 2.7 (not 2.6 or 3. Tested with 2.7.11) numpy (Tested with 1.11.0) futures (Only on non-Windows systems. Tested with 3.0.5)

orphu avatar Aug 26 '16 22:08 orphu