Author Topic: Building Editor  (Read 15010 times)

Offline vache

  • Survivor
  • ***
  • Posts: 867
    • View Profile
Building Editor
« on: September 16, 2015, 04:27:43 AM »
For the past couple weeks I have been working on a building editor for Cataclysm.  I feel like it's at a point now where I can unleash it upon the world.

Cataclysm Building Editor for Windows
Linux build coming soon.

Keep in mind this is like the early access alpha 0.1 version, and it's very rough around the edges right now.

On first load, you will have to select your cataclysm-dda\data directory.  After that, it will select this directory automatically (but you still have to hit select folder to continue).  It will scan the data folder for json files and load whatever it finds into the toolbox on the right side.  From there, just select what you want to paint and click on the building area.  Item Groups, Monster Groups, and Vehicles each open a special area for inputting extra information, pay close attention to this!  Also, like all mapgen json, the upward direction is the direction that will face the road.  There are three brush type tools that can be selected at the top right, and the "Write" button will write the building out to json.

Currently supports placing terrain, furniture, traps, items, monsters, item groups, monster groups, vehicles, and toilets.

If you have a bug report or questions post them here or GitHub.  You can also check out the GitHub for an idea of planned features or to look at my horrible horrible code. 
« Last Edit: September 16, 2015, 04:38:55 AM by vache »

Offline King_of_Baboons

  • Zombie Food
  • *
  • Posts: 16
    • View Profile
Re: Building Editor
« Reply #1 on: October 10, 2015, 10:15:39 PM »
That's.....awesome!If only there was a simple tool like this one to make creatures and items....

I just have 2 questions about it:how do I make bigger buildings?And will it be able to make basements in the future?

Offline vache

  • Survivor
  • ***
  • Posts: 867
    • View Profile
Re: Building Editor
« Reply #2 on: October 12, 2015, 02:51:23 PM »
Bigger buildings you have to put together the old way for now, eventually the plan is to support creating them in the editor.  Basements you just have to export it with overmap terrain of basement.  Right now though, it's impossible to associate a particular basement with a particular house in the game. 

Offline stone94

  • NPC
  • **
  • Posts: 152
  • Life is far too overpowered
    • View Profile
Re: Building Editor
« Reply #3 on: October 21, 2015, 03:01:50 AM »
That's.....awesome!If only there was a simple tool like this one to make creatures and items....

I just have 2 questions about it:how do I make bigger buildings?And will it be able to make basements in the future?

Making creatures and items are really easy if i have time sometime this week ill post a barebones tutorial on how i do it (json only though i cant code worth a damn lol)
You can call me anything you like, just don't call me late for supper.

Offline Trihook

  • Zombie Food
  • *
  • Posts: 13
    • View Profile
Re: Building Editor
« Reply #4 on: November 04, 2015, 10:41:56 PM »
Can you elaborate more on how vehicles are placed? Placing a vehicle in the editor paints one tile dark blue. What actually happens if the map is loaded in the game?
« Last Edit: November 04, 2015, 10:44:06 PM by Trihook »

Offline vache

  • Survivor
  • ***
  • Posts: 867
    • View Profile
Re: Building Editor
« Reply #5 on: November 04, 2015, 10:56:13 PM »
Vehicles are a bit of a sticky point right now.  I recommend testing it out while you're working on it as far as vehicles are concerned.  I have plans to make it read in the size and shape of vehicles and using that to gauge exactly where the vehicle is going to appear, but for some things, like vehicle groups, it's not going to be feasible right now.

Offline Trihook

  • Zombie Food
  • *
  • Posts: 13
    • View Profile
Re: Building Editor
« Reply #6 on: November 04, 2015, 11:52:51 PM »
I've been mucking around with the editor a bit, and I think this thing has some real potential!
I'm very excited about the prospect of easy mapping for the game, and I can see people mapping things out to give the game more content in the future.

I looked through the github files, but couldn't find any roadmaps or to do lists, or even a readme.
I know this is just a very early alpha version (0.1), so this is to be expected. On that note, I'll list some things I would like to see in the editor. Please note this is just a wish list, not a "I-demand-you-make-all-these-things-by-tomorrow-morning" list.

-In-editor help file/documentation.

-Undo/multiple undo

-Select/copy/paste

-Right click eye dropper; like a color picker in a gfx drawing program, it changes the currently drawing tile to whatever you right clicked based on active category. i.e. if you're editing furniture, it picks up furniture, not floors. This makes editing much faster than manually selecting everything from the category view.

-Tree view for categories on the right; as it is, some categories are huge, just scrolling to find what you need is a task eating time. A tree list that sorts stuff by some type would be nice, like ammo/CBM/clothing etc.

-Search; find specific terrain/furniture/item etc. by typing in a name in a search box.

-Layers; display and edit the map through layers by category, i.e. display and edit only terrain/furniture/monsters etc.This is useful if I need to check is I placed floors under furniture for instance.

-Zoom; zoom the map editor so it's easier to map on larger/smaller screens.

-Tileset support; the difference between grass and dirt is just a different color of the "." (dot) symbol now. it's like 2x2 pixels, really hard to see. Tilesets would make it easier to map.

-Grid and background color editing; sometimes it's easier to see things on a non black BG or with a muted grid.

-Map commands: rotate 90°, shift left/right/up/down, invert by x/y axis; standard fare

-Used list; list all tiles that have been used in the current map by name and category, check a box to make everything else invisible. This is useful if you're trying to find where did you put that one thing on a cluttered map.

-Tile info; mousing over a tile in the editor lists all things in the tile, for instance a tile could hold a floor a table and items on the table, while the editor only shows one letter/icon as it is now. Being able to check what is on a tile is useful.

-General info; middle click an item in the category view to bring up more info about it, specifically, grab the info from the game files. For instance, Item group>lab_torso. If you didn't code the game, you prolly don't know what is this used for. Sometimes names are descriptive enough, but sometimes they are not. Bringing out any info on a specific item would help a lot. Even if it just pops open a .json file in a text editor where the name is mentioned.

-Blank tile finder; finds and highlights all the tiles you forgot to edit in. Helps to check if you forgot something.

Anyway, this project is awesome, and I wish you all the best with it!

Offline vache

  • Survivor
  • ***
  • Posts: 867
    • View Profile
Re: Building Editor
« Reply #7 on: November 05, 2015, 03:24:26 PM »
A lot of good ideas there, some of these I already have implemented in my next version (which should be out... soonish), and some others I have planned.  My roadmap is collected in github issues right now at https://github.com/vache/BuildingEditor/issues, but it's mostly short term things.  Long term, I would like to get most of these changes in, particularly the json explorer, undo, and tileset support.  Zoom is something I'd like to get in as well, but I'm really skeptical that I'll be able to right now. 

Offline jokermatt999

  • Survivor
  • ***
  • Posts: 329
    • View Profile
Re: Building Editor
« Reply #8 on: November 07, 2015, 07:41:54 PM »
Oh, this looks excellent! I enjoy coming up with concepts for new buildings, but I hate the tedium of getting the tile list and item spots just right. Thanks for making this.

Haven't poked around too much, but I will say on my computer the numbers in the grids above 9 don't display correctly (cut off). Edit: likely because my system font is set to medium.

Offline Dampe

  • Survivor
  • ***
  • Posts: 264
    • View Profile
Re: Building Editor
« Reply #9 on: November 09, 2015, 04:56:03 AM »
This is pretty cool, keep up the good work!
:D

Offline Trihook

  • Zombie Food
  • *
  • Posts: 13
    • View Profile
Re: Building Editor
« Reply #10 on: November 09, 2015, 05:32:31 PM »
Can you put up a short tut on how to get the z levels editing please? (for the v2)
I've tried prolly a dozen ways, and I still can't manage it.

I just want to make a new 24x24 piece of map with connected z levels.

Offline Jericoshost

  • Zombie Food
  • *
  • Posts: 96
    • View Profile
Re: Building Editor
« Reply #11 on: November 29, 2015, 11:42:04 PM »
I made a map but it won't load up or allow me to spawn it manually using the debug menu? I am using the stable version, should I be using experimental?

Offline vache

  • Survivor
  • ***
  • Posts: 867
    • View Profile
Re: Building Editor
« Reply #12 on: November 30, 2015, 07:33:40 PM »
I made a map but it won't load up or allow me to spawn it manually using the debug menu? I am using the stable version, should I be using experimental?

If you tried to make a brand new building (and not a new type of an existing building) you have to make an overmap_terrain as well, and then edit the regional settings json to include the building.  Right now the editor doesn't support building the overmap_terrain, but the future version will. 

Offline natsumehack

  • Zombie Food
  • *
  • Posts: 36
  • Crazy Changeling.
    • View Profile
Re: Building Editor
« Reply #13 on: December 07, 2015, 05:53:27 AM »
I really can't wait for tile set support, and such.

Good work so far on this Vache.

Offline Born_tobe_Mild

  • Zombie Food
  • *
  • Posts: 73
  • Something something personal text
    • View Profile
Re: Building Editor
« Reply #14 on: January 05, 2016, 09:30:54 PM »
Dude this thing is dope, I have been trying to get a building for my mod working with just the confusing as hell .Json files, this is a huge help!
"Thats like, my 4th case of vehicular self defense today." - Said from the cockpit of the Ghetto Mad Max Tank