mendonca Posted January 10, 2014 Share Posted January 10, 2014 (edited) Random Mapzoid: UNFORTUNATE SUBTITLE v0.60 Mapzoid is a little utility provided for the purposes of generating arbitrary, organic looking BMP files to use as the input for the WorldEd BMPtoTMX feature. It works alongside EasyPickins' Mapping Tools, hopefully fairly well. It's currently in a fairly workable state, but I would appreciate some feedback, bug reports and general feature requests that anybody can think of. I'm personally not exactly swimming in spare time, but I will do what I can to fix any bugs or anything that may be raised. The Python Code, or Windows Executable Package, can be found in the links below. SOURCE (Python 2.7)EXECUTABLE SOURCE NOTES: Spoiler The source files should allow you to run this on Linux machines, although you will need to download the relevant libtcod.so from http://doryen.eptalys.net/libtcod/download/ for libtcod 1.5.0 (sorry that I'm using an older version ) If you want to run from source you will also need the following Python Libraries: Numpy http://www.numpy.org Scipy http://www.scipy.org Python Imaging Library http://www.pythonware.com/products/pil/ in addition to Libtcod. Current Change List: Spoiler v0.20 - Town Algorithm Changed. Works a little better. - Minor and Major Grids shifted out a little. - Towns can now be generated in a world with but a single region. - Some data externalised, in a text file called init.cfg, keyed to the Program variable name. Allows tweaking of certain things when compiled. - Can now set file names. - Can now set a seed. Believed to be deterministic (for noise at least). - Add noise function changed to work more gentler-er on 2nd / 3rd / 4th uses. 1st still makes a large random mess. - Support for non-square island maps. v0.30 - Fixed crash with non-square maps, and towns - Fixed some other bugs that came up - Zoom and Overview preview maps. WSAD and Arrow keys to scroll. - Externalised a lot more data - generalised the approach to graphics types. Can now use own rules for contour lines, colours, map references etc. by editing the init.cfg file. Not very well laid out at the minute, but it can be done. (needs a better parsing system, really). - Fixed up the region preview mode, of a fashion. v0.50 - Fixed scroll crash error when first starting and map size > 300 - More error handling (none of it detailed) - Added TRUNK ROAD function - Separated streets from the map data - can now preview and clear before 'committing'. - Toggle the display of streets. Now show up in all modes. - Re-ordered UI arrangement slightly - JSON output for setup.cfg - a deal more readable by non-mechanical sentients - Rewrote Readme and setup_about.cfg to give a little more help beyond the tooltips - Outputs PNG file as well as BMP v0.51 - bug where you can't ESC from town selection, scrolling keys buffers and all sorts of weirdness. Now right click to cancel, it makes a little bit more sense (I think). Can now scroll map whilst selecting position. - Tidied up the levels on the JSON outputs so they are in order - Removed redundant and commented out code from source script to tidy it up a bit - Now draws in 'urban regions' and pavements. Width of pavements, and colours for all regions (picks random from a list) and pavements defined in setup.cfg. - Fixed some more 'non-square' bugs associated with mixing up map_height and map_width occasionally in the script. - Added 'Invert Heightmap' option - Added 'Dress Roads' function. Adds smattering of textures around roads, texture and pattern defined in setup.cfg - UI tidied up and re-ordered slightly again. - Added help.txt tutorial v0.60 - Help text updated - Disassociated graphics and colour schemes from init data to help generally with 'modding' values - Included weird example_gfx colour scheme - to overwrite if necessary - Externalised autotown size and density modifiers for experimentation if required - Externalised street_no_veg modifier around streets and allowed general whole numbers to be used Read the readme.txt for some instructions on how to work the program, or just ask here. Alternatively check out the following youtube video: EXAMPLE OUTPUT: Spoiler IN WORLDED: Spoiler This program is released open source under a permissive BSD license. Contributions or wholesale rip-offs are more than welcome, if you should so desire to join in. Edited May 4, 2017 by mendonca turbotutone, Pjuux, RoboMat and 10 others 13 Link to comment Share on other sites More sharing options...
Dark_Author Posted January 12, 2014 Share Posted January 12, 2014 Hey, I figured out how to use the program and its awesome! That said, I can't figure out how to scroll around and view the map in the generator. Once I get in into WorldEd its fine and I can use that to check it out, but using WASD and the arrow keys to view the map in the generator doesn't work for me at all. It even caused it to crash once (because I got frusterated trying to figure it out and was pushing the arrow keys to quickly, I think). Link to comment Share on other sites More sharing options...
mendonca Posted January 13, 2014 Author Share Posted January 13, 2014 Hmmm ... I haven't had that problem myself. Have you generated a map greater than 1 cell x 1 cell? Have you added something to the map so that you can actually tell that it is scrolling? Are you in 'overview' mode? Overview gives a general overview of the whole map in the preview pane, there is no chance to scroll as each side of the map is the very edge of that particular map. 'Zoomed' mode gives a 1 cell x 1 cell preview in the view box - and it's not a pixel by pixel account of the map, more like a 10x zoom / general summary of the map. Works okay at default settings to show general noise pattern and most roads, but doesn't identify each pixel. Also WSAD is case sensitive, something that I should possibly change - but it will currently only accept little letters as input. Also I guess its possible that if you hit too many keys too fast it will struggle, but again I haven't been able to recreate this problem - and if I understand correctly the keypresses should be buffered or ignored, so I'm not sure if something else isn't going on ... Sorry if these are a bit obvious, but they are my best thoughts at the moment! Also out of interest are you running the .exe or from the Python script? Did any pop-up box appear when it crashed elaborating on why? edit: Also you can't scroll if the program is 'thinking' - generating roads / noise, filling in zones or dressing the pavements etc. You'll have to wait for the particular process to finish (reported in the little text display at the bottom) Link to comment Share on other sites More sharing options...
turbotutone Posted January 13, 2014 Share Posted January 13, 2014 Very nice program!Im guessing with proper prefab buildings (or segments even) it would be possible to populate the towns as well? mendonca 1 Link to comment Share on other sites More sharing options...
mendonca Posted January 13, 2014 Author Share Posted January 13, 2014 Very nice program!Im guessing with proper prefab buildings (or segments even) it would be possible to populate the towns as well? Yeah, it would! I think it would be fairly straightforward to add a button that assigns buildings to the sub-zoned regions built as part of the 'pave the world' function. However, I never got round to figuring out the way the files read in all the relevant information for the world / building lots etc. so I never even tried to get it working. Fancy a crack at it? turbotutone 1 Link to comment Share on other sites More sharing options...
Dark_Author Posted January 14, 2014 Share Posted January 14, 2014 Mendoca, I figured out the problem...and I feel like an idiot for it, but just in case any one else has the same issue, here it is: I was holding the WASD keys (like you would in a game to scroll) instead of just pressing them and waiting half a second for the image to scroll. It works fine when you press them properly. I'm sorry about that. Link to comment Share on other sites More sharing options...
rsdworker Posted January 14, 2014 Share Posted January 14, 2014 thanks that's very useful for my cities mendonca 1 Link to comment Share on other sites More sharing options...
mendonca Posted January 14, 2014 Author Share Posted January 14, 2014 Hey Dark_Author no need to apologise Glad you can work within the limitations of the program! Link to comment Share on other sites More sharing options...
Breathe Posted January 14, 2014 Share Posted January 14, 2014 Amazing nice tool, works ok here, with win8 64bitThanks Link to comment Share on other sites More sharing options...
turbotutone Posted January 14, 2014 Share Posted January 14, 2014 Fancy a crack at it? If i had more time on my hands i would have given it a shot, but atm im a tad bit preoccupied so sadly i must decline Perhaps some time later if its still not picked up by anyone at that time. Painkins 1 Link to comment Share on other sites More sharing options...
PsychoEliteNZ Posted January 15, 2014 Share Posted January 15, 2014 So can I edit the output Image and it should be fine before I add it to TileZed? Link to comment Share on other sites More sharing options...
mendonca Posted January 15, 2014 Author Share Posted January 15, 2014 So can I edit the output Image and it should be fine before I add it to TileZed?Oh yeah, this is to be encouraged. There's nothing special about the .png files that this program generates.Just make sure you use VERY SPECIFIC colours, don't blend things, don't jpeg-> png or anything like that.Basically colours need to exactly match those in the bmp->tmx rules. PsychoEliteNZ 1 Link to comment Share on other sites More sharing options...
Pjuux Posted January 21, 2014 Share Posted January 21, 2014 I use this program alot, and it´s Nice and easy to understand. Is it okey if i link this post on a Tutorial video? Link to comment Share on other sites More sharing options...
mendonca Posted January 21, 2014 Author Share Posted January 21, 2014 I use this program alot, and it´s Nice and easy to understand. Is it okey if i link this post on a Tutorial video?Great to hear! And yeah, that would be really cool! Link to comment Share on other sites More sharing options...
Ciber Ninja Posted January 25, 2014 Share Posted January 25, 2014 Two questions:1. Can you suggest any good tutorials for packaging python programs as executables?2. Why did you use a library for making rougelike games as your GUI instead of Tkinter which comes with python? Link to comment Share on other sites More sharing options...
Hrolgar Posted April 9, 2014 Share Posted April 9, 2014 Hello, I just recently found out about this program. And I like it a lot. I have one problem though, when I have dragged the PNG file generated by MapZoid, into WorldEd and klick on BMP to TMX. Nothing happens. Link to comment Share on other sites More sharing options...
Thuztor Posted April 9, 2014 Share Posted April 9, 2014 The problem of Hrolgar is solved with PMs. I've explained it in the video "Simple Start". Open Edit -> Preferences -> 2. Check-box in "Interface" (Display map thumbnail images) to ON (but you can edit your cell also without this option) Hrolgar 1 Link to comment Share on other sites More sharing options...
mendonca Posted April 14, 2014 Author Share Posted April 14, 2014 Two questions:1. Can you suggest any good tutorials for packaging python programs as executables?2. Why did you use a library for making rougelike games as your GUI instead of Tkinter which comes with python?Sorry about the delay, I missed this question previously. 1. No. It is a ***** nightmare, I can't even remember how this thing works (the script I have set up to package this works, and that's all I can tell you about it). I'm not saying that to be difficult, I'm just saying that I struggled to understand what I was doing when I was doing it - and it was very hit and miss for me to get py2exe to reliably work (I might have even 'frigged' some of the dependencies in the Python standard library to actually make it work, if I recall correctly).2. Familiarity - personally I do not know what tkinter is - or what it does. On the other hand I have spent a long time messing with libtcod, and can reasonably quickly carry out the sorts of tasks I want to do. Link to comment Share on other sites More sharing options...
TheCautiousOne Posted November 19, 2015 Share Posted November 19, 2015 After I create the Random Map, Add Towns, Roads Etc. It won't save the .veg or .bmp files. Keeps Saying "Have You Made a Map Yet? Created a 3x3 tile in World ed and saved. What am I missing? TCO EDIT: Solved Link to comment Share on other sites More sharing options...
Jab Posted December 4, 2015 Share Posted December 4, 2015 Why did you do this in Python 2? Preference? I feel like I may actually attempt to do something like this, with the actual save file format if I ever get the spark of the moment for PZ again. Good job though. EUDOXIO 1 Link to comment Share on other sites More sharing options...
mendonca Posted March 2, 2016 Author Share Posted March 2, 2016 Sorry for the delay in response ... I seem to still have not figured out this forum when I visit (and now it's changed again .. ha!) ... I didn't realise this thread had a couple of extra replies. On 04/12/2015 at 6:52 PM, Jab said: Why did you do this in Python 2? Preference? I feel like I may actually attempt to do something like this, with the actual save file format if I ever get the spark of the moment for PZ again. Good job though. Thanks! Python 2 was a bit of a non-choice as that's pretty much all I can (could) do, including the use of Libtcod as the library. Basically toyed about a few years back with making a sort-of-roguelike, got used to the various bits, and then in a fit of inspiration created this one week whilst I was getting paid by my work to do something else entirely unrelated ... Link to comment Share on other sites More sharing options...
Jab Posted March 3, 2016 Share Posted March 3, 2016 2 hours ago, mendonca said: Sorry for the delay in response ... I seem to still have not figured out this forum when I visit (and now it's changed again .. ha!) ... I didn't realise this thread had a couple of extra replies. Thanks! Python 2 was a bit of a non-choice as that's pretty much all I can (could) do, including the use of Libtcod as the library. Basically toyed about a few years back with making a sort-of-roguelike, got used to the various bits, and then in a fit of inspiration created this one week whilst I was getting paid by my work to do something else entirely unrelated ... Lucky getting paid to work on something unrelated (Sounds like Google). That's cool. My preference from Python 3 came from Blender's move from 2.4x to 2.5x series with an upgrade to Python 3. Link to comment Share on other sites More sharing options...
Happyteacup Posted April 1, 2016 Share Posted April 1, 2016 Hi mendonca, Thank you for this tutorial!, I have now got it mostly sorted. I just have hit a snag in my line, pretty much I have got everything you have there but: Now I am unsure what to do with this when I am done; How do I add this to my Project Zomboid game?; Thanks - Shay (Happyteacup) Link to comment Share on other sites More sharing options...
mendonca Posted April 19, 2016 Author Share Posted April 19, 2016 Hi Happyteacup; Apologies but I'm not really up to speed with the current processes of getting a functional Worlded map implemented in to the game. I'd suggest heading on over to the general map modding section where more specific - and current - advice would be better sought. Sorry I can't be more help, and thanks for your interest in this little program Kenny780 1 Link to comment Share on other sites More sharing options...
MOX313 Posted March 23, 2017 Share Posted March 23, 2017 The download link is (un)dead, can you reanimate it? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now