orphu / mcdungeon

A procedural dungeon generator for Minecraft
Other
84 stars 18 forks source link

Add treasure hunts as well as dungeons (feature request) #214

Closed sshipway closed 10 years ago

sshipway commented 10 years ago

Similar to the 'Plunder Rummage' mod, have MCDungeon also add treasure maps, giving a point to point search with rewards at the end.

I'm working on a patch to achieve this, by adding feature.py (the waypoints in the treaurehunt, similar to room.py) and thunt.py (similar to dungeon.py). The existing chest and object creation classes can be used; then add new treasure hunts with "addth "

A custom book can be used to hold the clues, so no special objects are required. Varying methods for the start position and initial map location can be used.

Once I have it working I'll submit the patch back to the project.

orphu commented 10 years ago

Sounds great!

Please, please, please be sure you are working in the development branch. Some major changes in there since the last release.

sshipway commented 10 years ago

Will do. Currently am just working on the features.py (suppose it should be waypoints.py really...) so no conflicts as yet. There are a lot of useful utility functions in dungeon.py so might make the TreatureHunt class inherit from that... Learning Python as I go, but fortunately it's not too different from Perl, Ruby, C, and the rest. This was supposed to save me time when the kids ask me to build a treasure hunt for them in Minecraft... and ends up taking me longer. Fun project though :)

sshipway commented 10 years ago

Seems that the dev branch only supports Minecraft 1.8.x, and we're using 1.7.10 and can't upgrade. Fortunately my bits are just new classes rather than changes to existing ones so I'll work in the stable branch for now. I put in another suggestion for a 1.7 compatibility mode but...

sshipway commented 10 years ago

I have a partially working version of this now. Still need to add the actual treasure maps (books) and a larger variety of landmarks than "clearing" and "clearing with skulls on stucks"; however I now have the working structure.

This has meant adding a few new functions to utils.py, a materialById function to materials.py, and rather a lot of stuff to mcdungeon.py, as well as a new landmark.py and treasure-hunt.py. The changes to mcdungeon.py may be hard to merge in.

Names are pulled from the existing name generator; however it would be cool to have a 'pirate' name generation module, if I can work out how to add to it.

I will post a pull request when I have something that works.

JiFish commented 10 years ago

Argh, I accidentally deleted my comment... Here goes again.

I tried training the name generator with a list of pirate names from the golden age. The results aren't perfect, but I think they are nicely piratey. Just throw in a title like "Captain" or "Commander".

I put the name file here: http://files.jifish.co.uk/pirate.txt

Benjamico Lowtherngs Condenmes Samueam Bella Gatheer Condoery Christoow Bootse Bonn Tholomerd Bowenhn Johnsar Quelchher Levasohn Francead Willlm Stedeidd Jamesohn Cullians Barthhn Edwarohn Olivelas Woodesede Rownla Henhed Richaidd Quel Henhielm Richarlemes Belliamohn Roger Thomas Tholoery Bonnetlch Henhieam Worlenn Wynn Gillivinr Ningmas Levasseuel Halsein Taylomewer Sted Jamesas Calic Boot Lant Miguenry Worle Englaohn Nathaam Robenjth Migueane Northoas John Georg Harrismas Nathaor Edwarlm Howarck Johnly Thomas Johnead Blackbeiam Barthent Nathall Englaer Lome Quelch Jamelch Oliveryngs Benjanny Sprigg Everyla Planhn Willamenn Tayles Howardher Dalzeehn Emanurt Every Edwawen Will Williamdes Francisles Davisas Ande Ansti Alexaco Geor Bootheel Edwar Quelc Charleyon James Rackhairk Barth Henhohn

sshipway commented 10 years ago

Ooh, nice. I'll modify namegenerator.py slightly to allow a theme to be passed on creation so that I can get piratey names without affecting all the biome-related name stuff, and maybe do a pull req.

sshipway commented 10 years ago

Very cool, easily added. I now have "Dread Pirate Westley's Hidden Gold" as my Treasure hunt name

(*) OK , not Westley. Nobody would surrender to him. But it is a possible outcome.

sshipway commented 10 years ago

I can't work out how to do a pull request for only a subset of my changes, so it will have to wait for the huge pull request that adds treasure hunts. Not sure how this can integrate wit other pending changes.

orphu commented 10 years ago

I can cherry pick changes when I merge.

sshipway commented 10 years ago

This can now be closed I think?