OpenXcom Forum

Modding => Tools => Topic started by: volutar on April 21, 2014, 08:23:27 pm

Title: MCD Edit by volutar
Post by: volutar on April 21, 2014, 08:23:27 pm
Old MCDedit is failing to work on win64. Running it with dosbox-win311 is a kind of perversion.
So I tried to make a replacement tool.

https://www.ufopaedia.org/index.php?title=MCDEdit (https://www.ufopaedia.org/index.php?title=MCDEdit)

Features are the same as in original mcdview.
Everything is pretty much the same or better.

Game type /palette (for tftd) are changed at right top corner.
Checker is "checkered" invisible background just to detect holes instead of blacks.
Yellow labbeled MCDs are animated.
Animation frames/LOFT images/SCANG are clickable (and you can change it visually from selector).
Numbers are editable, and totally discarded if you won't push "Save MCD+PCK+TAB" (from File menu). But make sure you have a backup of those.

"Edit" menu works on 100% only for non vanilla tilesets (it doesn't allow for insert/delete/clear of MCD info for vanilla). Non-vanilla tilesets are fully editable: you can either delete or insert extra MCDs (folder+name defines if it's vanilla or not, so you can just make a renamed copy of mcd+pck+tab - and it will be fully editable).

Paths for gamedata IS configurable (set in MCDEdit.txt).
In TFTD (even in steam version) there are 112 LOFTs instead of 114, in this package game data is "vanillified", and uneccesary files are removed.

Recommended image editor which works with indexed images on pixel level - mtPaint (https://mtpaint.sourceforge.net/). Nice palette selection, pixel-precise editing (drawing cursor also can be moved with cursor keys), tile grid (for our needs - 32x40).

P.S. Post is updatable, new versions will be in the same place.

P.P.S. pck clipboard copy/paste - failed to implement. Because it doesn't have any point, windows clipboard is uncapable of handling paletted bmp properly.

history:
2014.04.22 21:05 - added pck export as PNG (particular image, or whole sheet) - by RMB context menu. PNG is saved using current selected palette.
2014.04.22 22:04 - added "orphan" pck color tagging (they are red-yellow). Lots of them can be found in tftd.
2014.04.27 02:00 - added insert of blank pck, and delete of "orphan" pck (when trying to delete used - it will tell you which MCDs are using it). MCD+PCK integrity is kept (pck references in MCDs are updated). Also added import of PNG (particular single tile, not whole sheet). Preferred PNG format - with untouched vanilla palette. PNGs with screwed palette also imported (as RGBA images), but most probably it could cause color ambiguity.
2014.04.29 03:10 - rearranged loft (vertical feels more natural), added palette helper with ambiguous colors, 3d loft/animation image is now "rotatable" with mouse button - rotate 3d loft by steps of 45 degrees (after releasing button - it returns back to 0), also can change angle with trackbar (it will be kept).
2014.04.30 04:00 - fixed working folder change issue (relative paths were changed after getting into other folder in file selector).
2014.05.01 01:55 - added hint box with description; names and hints are in config file; now can open custom mcds (by clicking checkbox or through File menu); when custom mcd is opened - you can choose any palette and gametype(affects on minimap images and lofts). version up to 1.11
Title: Re: MCD Edit by volutar
Post by: Ran on April 22, 2014, 12:05:27 am
Thank you very much!
Having to deal with Win3.11 really was a pain...
Title: Re: MCD Edit by volutar
Post by: volutar on April 22, 2014, 06:15:27 pm
Added pck export as PNG (particular image, or whole sheet) - by RMB context menu. PNG is saved using current selected palette. Color 0 is transparent (as it should).
I didn't find how to make photoshop use color index values instead of RGB. So I don't really know if it even capable of that, it some other picture editor will be needed. Most of TFTD color palettes shares RGB values between different colorgroup, and editing in RGB mode could cause unwanted visual bugs.

Example of exported tftd GRUNGE4 pck sheet. Notice white "templates" - they are in the game, but aren't used for MCDs.
Also 5th row dark blue tiles are actually black (for terrain palette), but getting blue colors when they are in the shades (blacks are actually light, and blue is shadow). Yes, this kind of mess is often happening in tftd. And it's just a beginning.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on April 22, 2014, 06:19:08 pm
First of all, thanks for this invaluable tool! I've been using it since yesterday and my world got a little better. :)

I didn't find how to make photoshop use color index values instead of RGB. So I don't really know if it even capable of that

I'm not a Photoshop master, but for sure it works with indexed palettes as well as RGB. Unless you mean something else?
Title: Re: MCD Edit by volutar
Post by: SupSuper on April 22, 2014, 06:34:50 pm
Yes you can use Photoshop with palettes (Indexed Color mode), and they will be saved into the PNG (if it's 8-bit), though you usually have to switch modes yourself:
(https://www.shortfusecreative.co.uk/learn/wp-content/uploads/2010/01/color-mode.gif)
Title: Re: MCD Edit by volutar
Post by: volutar on April 22, 2014, 06:38:39 pm
I'm not a Photoshop master, but for sure it works with indexed palettes as well as RGB. Unless you mean something else?
I mean - using palette on the screen by choosing colors from "color table". Swatches don't have anything with palette.
How can have this palette (Images->Mode->Color Table) on the screen and use it as INDEX color picker, as genuine palette swatch? There's no way to use it with color picker. I didn't find one.

RGB color [8,36,99] has indexes: 31,63,69,95,111,127,143,175,191,207,223,239 - TWELVE different indexes and same RGB value (in D2 palette).
When you're trying to use color picker tool for any of them - it will simply open RGB color selector, and throw away actual index, which 100% will be messed (it will always pick first color index with that rgb value).

Yes you can use Photoshop with palettes (Indexed Color mode), and they will be saved into the PNG (if it's 8-bit), though you usually have to switch modes yourself:
Switching into RGB is suicide - color indexes must be preserved. You have to consider insane level of RGB ambiguity in tftd palettes.
Title: Re: MCD Edit by volutar
Post by: volutar on April 22, 2014, 11:36:25 pm
I found how to load color table into swatches- just save *.act color table, and then "replace swatches" and change file type from *.aco to  *.act. But it still WILL NOT ALLOW you to draw pixel with index 63 or 79 or 95 - it doesn't keep index info, and will fall into first index 31 just because it's the first index with that RGB color. But indexes are really matter in XCom.

By the way I found a bug in Photoshop. In color picker mode, when Color table is opened - Info window shows colors from wrong coordinates (with offset of x=-4 and y=-4), though when you're clicking - it takes right value. Still, quite a bad behaviour from that expensive product - lack of index preservation and wrong values in Info window.
Title: Re: MCD Edit by volutar
Post by: kkmic on April 25, 2014, 10:01:48 am
Any chance it will run on all patforms OXC officially supports? Windows, Linux, MacOS, etc?
Title: Re: MCD Edit by volutar
Post by: Tarvis on April 25, 2014, 04:26:43 pm
Will an "Open MCD" function be implemented? This program works great, but it's a pain having to copy it out of its UFO folder every time, it would be best if I could open a file and edit directly
Title: Re: MCD Edit by volutar
Post by: volutar on April 25, 2014, 04:50:31 pm
Any chance it will run on all patforms OXC officially supports? Windows, Linux, MacOS, etc?
Linux/MacOS,etc? Not from me. It's written in Delphi7. So, wine, perhaps?
It's a tool, it doesn't need to be run on 100% of user's PCs. It just need to be run on 0.1% of users, called "modders".

Quote
Will an "Open MCD" function be implemented? This program works great, but it's a pain having to copy it out of its UFO folder every time, it would be best if I could open a file and edit directly
Not now, because mcds of tftd and mcds of xcom1 are slightly different, and can't be opened just like that.
MCD is not just some standalone file, it's part of game infrastructure, including referred palettes, loftemps and scangs.
So unless I find out how to tie them properly into game type, it won't be possible. Making mess by allowing everything is not my way.

P.S. There's mtPaint - tool, preserving palettes, having palette color selection, working both with gifs and pngs, and can load+apply palette from another gif/png to current. It also can use tile grid (32x40 in our case). So it's exactly what is needed.
And next update (I hope) will be about importing of pngs into pcks (replacing or inserting) and deleting particular images from pcks (preserving mcd integrity). Spritesheet import also might be be implemented soon. Though it will be tricky for 24bit images due to palette ambiguity, and different palettes used for import.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on April 25, 2014, 04:55:11 pm
So unless I find out how to tie them properly into game type, it won't be possible. Making mess by allowing everything is not my way.

I would be perfectly fine having two separate tools. :)
Title: Re: MCD Edit by volutar
Post by: volutar on April 25, 2014, 05:16:35 pm
I would be perfectly fine having two separate tools. :)
I won't be making two tools for each game type, and support both of them. They are practically the same by 95% or more. Copypasting changes, catching bug for one but not catching on another - save me from that. Game paths will follow at some point, as opening of mcd from "custom" folder, just later. It's not that essential.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on April 25, 2014, 05:28:43 pm
Fair enough.
Title: Re: MCD Edit by volutar
Post by: Tarvis on April 26, 2014, 10:35:56 pm
What about the ability to set the base directories, then? I know you said in the first post that you won't, but I honestly see no reason not to
Title: Re: MCD Edit by volutar
Post by: volutar on April 26, 2014, 11:17:02 pm
Added PCK import capabilities (from PNG files) - description/history is updated.

Tarvis, can you describe your work sequence? Why does it worry you so much?

I can put a config with tftd=path and ufo=path parameters, but I definately don't want to mess with palette/scang/loft folders and locations.
Title: Re: MCD Edit by volutar
Post by: volutar on April 29, 2014, 12:30:21 am
- rearranged main screen - moved loft to the right, in  vertical manner (it feels more natural).
- added palette helper with ambiguous colors highlighted.
- 3d loft/animation image is now "rotatable" with mouse button - rotate 3d loft by steps of 45 degrees (after releasing button - it returns back to 0), also can change angle with trackbar (it will be kept).
- added gamedata path config file.
Title: Re: MCD Edit by volutar
Post by: kkmic on April 29, 2014, 02:04:26 pm
Linux/MacOS,etc? Not from me. It's written in Delphi7. So, wine, perhaps?
It's a tool, it doesn't need to be run on 100% of user's PCs. It just need to be run on 0.1% of users, called "modders".

What makes you think that modders use only Windows as their OS? :)

Listen, since you've written it using Borland (and that means Pascal), why not port it to Free Pascal/ Object Pascal and use Lazarus as IDE? It cross-compiles, so you can develop/build/test in Windows and just run a VirtualBox to test in on Linux/MacOS.

I, for one, will give you feedback on how it runs on Linux. Think about it, this is your chance to learn Linux :D
Title: Re: MCD Edit by volutar
Post by: volutar on April 29, 2014, 02:17:47 pm
kkmic, I tried lazarus once, and found it awful. If you want - you can try to convert this project to freepascal, but as for me? Na-ah, I don't want to waste time on this, as on learning linux. I'd better try to make unit/handob/floorob editor.

Quote
What makes you think that modders use only Windows as their OS? :)

Modders are not just ordinary users, they know how to run different tools already. I don't think it will be problem for smart people to run mcdedit.exe with wine.
Title: Re: MCD Edit by volutar
Post by: TurkishSwede on April 29, 2014, 10:34:42 pm
Hi, there.  I am just a user that wants to mod but is not a long-time X-COM veteran, nor am I familiar with well-known modding tools, "high tier" computer jargon, or coding techniques.  I try to decipher your cryptic messages (wizard riddles) using what (little/geeky) smarts I have, and I think I've been mostly able to understand you so far.  You speak with pure genius, and you obviously know what you're talking about.  I have huge respect for your efforts for OXC and I hope my typical American confusion doesn't bother you. 

I love your program, it (mostly) works great for me and it's the only one of its kind that has worked at all on my Windows 7, it's pretty straight-forward and easy to use.  Thanks very much for making it.  MTPaint, on the other hand, is not at all user friendly (but probably very modder friendly), and even though it is the EXACT program I've been looking for (and indeed, the ONLY program I've found) that lets me do what I want to do with regards to pixels and palettes, it has been a huge source of frustration for me trying to figure out how to do very simple things (that I still managed to get done anyway).

The problem I have, however, is this: I want to add 3 tiles to the UFOL83 tileset that should prevent any see through walls in my Dark UFOs mod, but I can't. Your program won't save when I need it to and I don't know why.  I saves fine if I only edit some tile properties or LOFTs (I could finally fix the tiles like I wanted to), and I can insert new MCDs fine, but I can't import .PNG files, because if I try to save after I import any to the .PCK it gives me an "Invalid Filename" error and then the program goes BLANK for all intents and purposes. Until it's reloaded, it won't load any tilesets (it thinks every tileset that is loaded is blank), and until another tileset load is attempted it will uselessly display the work I've done (but can't save), while allowing me to change variables for no reason anymore.

I can put .bmp files (added with PckView) into animation frames and it saves just fine, but it just looks dumb (because as you say, windows clipboard apparently can't copy .bmp right).  If the .PNG copy/paste doesn't work either, I can't see myself having much use for this program besides fixing errors.

0, modder guru, what is my problem?  Please help me.

I included the files I'm using.  You should be able to see what I'm dealing with.
Title: Re: MCD Edit by volutar
Post by: volutar on April 30, 2014, 12:48:45 am
First of all thank you for a feedback TurkishSwede.
Second of all - some nice tiles you have there, cheers!

I didn't have any problem with setting StopLOS to 1. It saved perfectly.
I just think you were changing that field without pressing Enter or switching focus to other control. It doesn't keep changes when you're switching editable tile. Perhaps I'd need to change that behaviour. ATM it "corrects" actual MCD data only when you pushed enter, or switched to another control (you can check that out by changing Elevation Shift value - it affects image after actual value changed).
BTW those 3 last tiles look weird, to say the most - half of diagonal. And it won't be possible to make a proper LOFT for them. You probably should reconsider doing it that way, whatever you want... About invalid Filename error.. Fixed.
Title: Re: MCD Edit by volutar
Post by: TurkishSwede on April 30, 2014, 01:12:14 am
The last three files in the .PCK look weird because they were imported as .bmp files (using PckView by Ben Ratzlaff). If I correct them by importing the .png files that correspond to what I'm trying for, it looks really good, but I get the filename error when I save changes..

The reason I'm adding these exact tiles (and why they don't really need any kind of LOFTs) is because all I need it to do is black out the 'interior side' of the NE facing diagonal walls from outside, until a soldier can actually see the pillars on the inside of the ship.  If a blaster bomb hits there, the extra tile would be destroyed like a normal West-Wall pillar, replaced by the "broken pillar" tile and showing the interior side of those diagonal walls like normal.  That's my plan anyway.

Thanks for looking into this.

Edit: And it works now! Awesome!!
Title: Re: MCD Edit by volutar
Post by: kkmic on April 30, 2014, 01:53:23 pm
kkmic, I tried lazarus once, and found it awful. If you want - you can try to convert this project to freepascal, but as for me? Na-ah, I don't want to waste time on this, as on learning linux. I'd better try to make unit/handob/floorob editor.

Modders are not just ordinary users, they know how to run different tools already. I don't think it will be problem for smart people to run mcdedit.exe with wine.

Of course Lazarus it's awful. It's OSS :) It's designed by programmers ("smart people") who already know how to use it, so why bother making it user friendly or easy to use?

And that's exactly why I asked if you are interested to make a port. Why settle with "good enough" when you can do "the best there is"?



Considering that my Pascal days were ages ago, I doubt it that I can manage the port myself, but I won't mind taking a look at the code. I hope that the comments are in English :D
Title: Re: MCD Edit by volutar
Post by: volutar on April 30, 2014, 11:02:48 pm
- Added custom MCD open (Menu->Open MCD or with checkbox "Custom").
- In Custom mode you can freely choose gametype, and palette for opened TileSet (because it doesn't know what game this tileset for).
- MCD values list externalized into MCDEdit.txt, and value discription is given for current field.
- Vanilla tilesets are marked with * in the list.
- Added "Add MCD" item (adds new mcd at the end).
- "Checkered" background also affects on mcd list view.

todo: Copy/paste MCD to ClipBoard instead of internal data (so you could copy/paste data between two or more opened MCDEdits), also copy-paste of PCK, for the same reason (they won't be "pastable" into graphics editors).
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on May 01, 2014, 06:04:03 pm
I can't download the file now - says "Page not found".
Title: Re: MCD Edit by volutar
Post by: SupSuper on May 01, 2014, 08:32:49 pm
Don't hold your breath.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on May 01, 2014, 09:40:49 pm
Don't hold your breath.

Well, this sounded bad.
Title: Re: MCD Edit by volutar
Post by: luke83 on May 02, 2014, 12:43:37 pm
That was quick, i only just noticed Volutar was back and then he wasn't, again :-\
Title: Re: MCD Edit by volutar
Post by: kkmic on May 05, 2014, 12:09:47 pm
Damn. This seemed to be like a nice piece of software.

Anyone got the source code by chance?

Or better yet, Volutar's email?
Title: Re: MCD Edit by volutar
Post by: redv on May 05, 2014, 12:42:14 pm
Or better yet, Volutar's email?

You can comment a code in the branch https://github.com/Volutar/OpenXcom
Then he will get the message.
Title: Re: MCD Edit by volutar
Post by: Warboy1982 on May 05, 2014, 12:48:44 pm
... unless he has notification emails disabled. i wouldn't recommend that method.

i'd suggest sharing whatever versions you have for the time being, and give him kudos and thanks here.
don't bother with bug reports or feature requests.

Edit: i've added a mirror here (https://dl.dropboxusercontent.com/u/47596892/OXCStuff/MCDEdit.rar) with the version i have
Title: Re: MCD Edit by volutar
Post by: kkmic on May 05, 2014, 01:27:15 pm
How about the address he used to register his forum account?

After all, he did register twice :)

Warboy? Or should I ask SupSuper?
Title: Re: MCD Edit by volutar
Post by: Falko on May 05, 2014, 01:30:50 pm
i hope the forum guys dont give out email adresses of the users for any reason
Title: Re: MCD Edit by volutar
Post by: Warboy1982 on May 05, 2014, 01:37:42 pm
i hope the forum guys dont give out email adresses of the users for any reason

this.
Title: Re: MCD Edit by volutar
Post by: redv on May 05, 2014, 01:40:07 pm
i hope the forum guys dont give out email adresses of the users for any reason

Agree. Use private data for any reason is not a good idea.
Title: Re: MCD Edit by volutar
Post by: kkmic on May 05, 2014, 02:02:31 pm
Agree. Use private data for any reason is not a good idea.

I'm sure the NSA guys are 100% with you on this :)

Well, I would PM him (and that message would have been sent to his email) but sadly, his account is suspended/deleted/etc...

I'll see if I can find another way of getting to him.
Title: Re: MCD Edit by volutar
Post by: Warboy1982 on May 20, 2014, 02:51:10 pm
here's a mirror (https://dl.dropboxusercontent.com/u/47596892/OXCStuff/MCDEdit.rar)
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on May 20, 2014, 03:18:26 pm
here's a mirror (https://dl.dropboxusercontent.com/u/47596892/OXCStuff/MCDEdit.rar)

May you live long and prosper, Warboy.
Title: Re: MCD Edit by volutar
Post by: davide on June 14, 2014, 04:02:17 pm
Volutar come back  ;)

https://github.com/SupSuper/OpenXcom/commit/46af33d9b031e4295f9401279ef1734a698c02f9#commitcomment-6645568

Here someone could try to contact MCDEdit author
 ::)


Title: Re: MCD Edit by volutar
Post by: kkmic on June 16, 2014, 06:00:47 pm
We already had a chat on IRC. The Windows editor is available, you can run it on other platforms for the time being using something like WINE. The source code is not public. At least, not for now.
Title: Re: MCD Edit by volutar
Post by: robin on July 15, 2014, 12:37:57 pm
here's a mirror (https://dl.dropboxusercontent.com/u/47596892/OXCStuff/MCDEdit.rar)
Is this the latest version?
Otherwise, where can I find it?
Title: Re: MCD Edit by volutar
Post by: CloseProximity on July 20, 2014, 06:44:25 am
I have spent some time playing with MCDEdit, I have version 1.1 from volutar,  and PckView version 1.5, downloaded from github and compiled.

MCDEdit seemed to work fine if all I do is replace the image with PckView and the MCD data with MCDEdit.

I ran into a problem when I tried deleting images and MCD data with MCDEdit.

1. I copied the mcd/pck/tab files for U_Walls02
2. I deleted items which were not walls, including the navigation terminals which are treated like walls
3. I saved the files with MCDEdit  (mcdedit_window.png)
4. I opened the modified file with PckView and all of the images of the original file were still there (pckview_window.png)

Is there a step I'm missing with MCDEdit?


Ignore this post please, I figured it out.
Title: Re: MCD Edit by volutar
Post by: TheBigSot on July 23, 2014, 09:31:37 am
I'll try to put it together in a MapView + PckView + MCD Edit  app
Title: Re: MCD Edit by volutar
Post by: Warboy1982 on July 27, 2014, 06:39:51 pm
There's a user guide and download here (https://www.ufopaedia.org/index.php?title=MCDEdit)
Title: Re: MCD Edit by volutar
Post by: volutar on November 07, 2014, 04:09:06 pm
WIP v1.17
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on November 08, 2014, 11:08:11 am
OK, it looks very promising, Volutar. I'm intrigued.
Title: Re: MCD Edit by volutar
Post by: volutar on December 11, 2014, 05:39:36 pm
background/foreground experiments

It's not very intuitive, and i'm kinda stuck with how to display it.
Title: Re: MCD Edit by volutar
Post by: volutar on December 12, 2014, 12:58:59 pm
Ok, I think I'm gonna settle with this
(https://volutar.eu5.org/mcdedit117-141212.png)

Blue frame is drawn around CURRENT editable PCK, red/orange frame represents foreground graphics (current is rendered UNDER it). Dots in the center are "underlying" pixels (not seen in the sprite, but still exists, being overlapped).
Title: Re: MCD Edit by volutar
Post by: kkmic on December 12, 2014, 01:25:29 pm
So you can now get a preview of the whole stuff, not only the bit you're editing? Niiiice!
Title: Re: MCD Edit by volutar
Post by: volutar on December 12, 2014, 03:39:09 pm
Yes, basically it becomes able to show neighbour graphics, with slight help of what's drawn behind.
Made "q" shortcut key switching that. If you will turn ON that mode with mouse (this button at left of the palette dropdown), "q" will disable that mode (when pressed), and vice versa. I found it quite helpful.
Can edit 4,4,1 map area, save it, and load. No "map" import yet (it's quite difficult, considering it's in MCD-IDs, while this preview is in PCK-IDs and limited with single MCD set).

Undo is still limited with current tile, after switching it's reset (it will require lots of work to make it all around).
Still not able to work with preview area of size other than 4,4,1 (in todo).
Still no preview cursor of currently selected tile (in long todo, no really need of that).
Title: Re: MCD Edit by volutar
Post by: volutar on December 19, 2014, 02:12:45 pm
(https://volutar.eu5.org/mcdedit117-141219.png)

Ok.. MAP import now works. After importing need to adjust MCD Offset to convert it into PCK# properly. Pretty easy thing.
Scrolling in the preview also works.. Just need to adjust Z level changing, and preview map resize/clear functions, and it will be... almost ready.
Title: Re: MCD Edit by volutar
Post by: volutar on December 20, 2014, 08:43:22 am
(https://volutar.eu5.org/mcdedit117-141220.png)

Todo:
DONE: showing contours of visible tiles in the zoomed view, so you'll see how they are joined together, and easily switch to the neighbour tile.
DONE: selecting neighbour tile with some "shortcut" button, by pointing into its pixel in the zoomed view.
--- another button to switch back (switch to previous) --- decided that it doesn't needed, since switching back and forth is really easy even without.

I wonder, if any other graphics editor capable of doing all this stuff I ALREADY  made?
Title: Re: MCD Edit by volutar
Post by: volutar on December 23, 2014, 02:53:41 pm
v1.17 has been released. The URL as always https://www.ufopaedia.org/index.php?title=MCDEdit
Title: Re: MCD Edit by volutar
Post by: volutar on December 25, 2014, 10:30:27 pm
Unexpected application.
Using PCK editor preview area with surroundings as "unit combiner".
How to edit PCKs? just make dummie MCD file for unit PCK, and put it into /terrain.
There are plans of making advanced PCK editor without MCD part though.
(https://volutar.eu5.org/mcdedit117-unit.png)
Title: Re: MCD Edit by volutar
Post by: Yankes on December 26, 2014, 02:05:08 am
This is more and more powerful editor for Xcom. I'm impressed by work you do there. I you have time you could steal drawing offsets form OXC to allow testing animations too.
Title: Re: MCD Edit by volutar
Post by: bladum on January 03, 2015, 07:14:05 pm
@volutar

Could you add feature to move color group / color light for ALL tiles at the same time ? Just add a check box with label "global". Thanks.

Tom
Title: Re: MCD Edit by volutar
Post by: volutar on January 03, 2015, 08:05:29 pm
I'm affraid "batch" operations are not supported by engine and concept. You can't make selection through the PCK list.
Only one per time. And UNDO is working for current sprite (cleared when switching), and I can't make it work between sprites.

And besides, it's not the way how sprite graphics should be handled by the artist. You should see each sprite, see what you're selecting, see what you gonna change, see each change and control each side effect you action could cause. It's manual action. It's not batchable.
Title: Re: MCD Edit by volutar
Post by: bladum on January 03, 2015, 08:11:42 pm
ok thanks for explanation ;) still we can use Falko site to convert sprite and then import
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 14, 2015, 06:03:29 am
Am I correct that there's no way to do an export of one MCD's pck files as an image and then import that set into a custom file? I'm mainly looking at mash ups using TFTD and xcom graphics, selecting certain mcd's and combine and export for color correction is what I'm trying to do.

I can import the png file to the pck screen but don't see a way to assign them to the MCD section? I add a new MCD frame and it's just a duplicate of the first one.
Title: Re: MCD Edit by volutar
Post by: volutar on January 14, 2015, 08:10:02 am
You can freely import png in the pckedit. And to use them correctly in mcd, just choose proper sprite in animation stripe or by number editing. It's pretty obvious.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 14, 2015, 02:57:09 pm
I see, I didn't understand that I needed to type the number of the PCK frame into the mcd window below the section that displays the row of frames in different lighting conditions.
Title: Re: MCD Edit by volutar
Post by: volutar on January 14, 2015, 07:56:57 pm
You may click the image itself(whichever you want to change) and choose pck from the selection sheet. Transparent images are just mean "as previous". You can change them to creating "key frame".
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 15, 2015, 02:45:08 am
For some reason selecting the frame in the mcd and then clicking the pck frame I want to use doesn't work, but I'm running in wine on OS X so that might be why. At least I can manually assign the number below. I might try running in virtualbox to see if it's better.
Title: Re: MCD Edit by volutar
Post by: robin on January 26, 2015, 08:53:03 pm
I have some questions about the PCK Edit part:
- is there a way to draw straight lines? IE in Photoshop you can hold the Shift key to do so.
- the "paint bucket" tool functionality is intended to be replaced by "select color" + push around "Color group"/"Color light".. right?

Title: Re: MCD Edit by volutar
Post by: volutar on January 26, 2015, 10:03:08 pm
- no. Straight lines tool within 32x40 sprite doesn't make too much sense. Lines are better to be drawn by hand, with antialiasing-like technique. All automatically drawn lines look ugly.
- there is no paint bucket tool. It's tricky because this small sprites have different kind of "area" selection. 4 connected or 8 connected, with or without tolerance. I thought that there are not such big areas to bother with implementing tricky tools which anyways will require pixel-by-pixel tuning after. Color and group change is palette level tool for quick modifying of any selected areas, not only color-picked. If you want to fill selection just press Ins. It works like Del, but filling with foreground (LMB) color.
Title: Re: MCD Edit by volutar
Post by: volutar on January 27, 2015, 04:13:08 pm
I could make the line drawing, but I don't know how to deal with line widths, and aliasing.
Sometimes I felt kind of need of "magic wand" thing, but still, this 4/8 connections things... There's need of bucket. It's just selecting and filling with pen color with Insert key.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 27, 2015, 04:53:49 pm
if there was a line tool I think 1 pixel width would be enough for now. I wouldn't do anti-aliasing, at least in the way that adobe does it. at this scale aliasing has unintended visual effects sometimes.
Title: Re: MCD Edit by volutar
Post by: volutar on January 27, 2015, 05:36:45 pm
(https://volutar.eu5.org/alias39.png)
Yellow is how photoshop drawing line with 3/9 angle. It's not really isometric-friendly type of line.
Red is one which is actually preferred, but I really need to make some study about that.

I noticed photoshop has this weird straight line when shift is down. Is it really needed? I think robin mentioned exactly that mode, not shift->click line.

And what about "magic-wand" type? Is it needed, and which mode - 4 or 8?
Title: Re: MCD Edit by volutar
Post by: robin on January 27, 2015, 06:20:17 pm
By straight lines I meant horizontal and vertical; this is what photoshop draws if you: click, then hold shift, then drag the mouse: the main direction of your motion is "detected" and the line is drawn perfectly vertical or horizontal.

I think it's useful, walls for examples use vertical lines, even though you're using the mouse instead of the pen (I use a tablet with photoshop, so the whole functionality is even more useful and natural).

Title: Re: MCD Edit by volutar
Post by: volutar on January 27, 2015, 06:58:40 pm
Ok I got that. What about the rest?
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 27, 2015, 07:34:58 pm
Magic wand would be nice, but being able to invert selected pixels might be easier and pretty useful. Not sure about what you mean on 4 vs 8 on magic wand
Title: Re: MCD Edit by volutar
Post by: volutar on January 27, 2015, 08:10:44 pm
(https://www.codeproject.com/KB/GDI-plus/floodfillincsharp/floodfilltypes.png)
Basically with 8-connected algorithm it can jump through diagonals, with 4 - it can't.
https://derek.dkit.ie/graphics/regionFilling/regionFilling.html

I didn't hear the thoughts about the rest.
1. Straight | or -- with shift down - needed
2. Shift-Click (from the last drawn point) - ???? And what about issue from the image of reply #66.
3. Area selection - ????
Title: Re: MCD Edit by volutar
Post by: robin on January 27, 2015, 09:46:50 pm
2. Shift+click, as you said, the line drawn is "wrong looking"; the only reliable angle for shift+click are 45° and.. if you click carefully you can also get the correct line for the tile angle (26.6° should be?). But I almost always draw lines with that angle by hand, because it's easy to get a "wrong" line so I just draw it. I wouldn't miss this functionality; I think that it could be left out if it requires effort to implement, unless there's an explicit demand for it.

3. If by area selection you mean the "Select colors" tool in contiguous mode, then it could be useful. I think it shouldn't jump diagonals because that is the behavior I'm used to (provided I understand the thing correctly).


But don't listen to me alone, a lot of my feedback is "I use photshop in this manner so it should be the same", which isn't exactly the best thing.
We should really page XOps because he uses more software and knows photoshop better than me, and Ryskeliini who is a better pixel artist than me (I cheat).
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 27, 2015, 10:53:16 pm
(https://www.codeproject.com/KB/GDI-plus/floodfillincsharp/floodfilltypes.png)
Basically with 8-connected algorithm it can jump through diagonals, with 4 - it can't.
https://derek.dkit.ie/graphics/regionFilling/regionFilling.html

I didn't hear the thoughts about the rest.
1. Straight | or -- with shift down - needed
2. Shift-Click (from the last drawn point) - ???? And what about issue from the image of reply #66.
3. Area selection - ????

1 I'd say useful to have
2 I have been using this behavior to make 45 degree pattern fills in photoshop so I say yes. i.e. i draw one point, hold down control and the next place it tries to draw a straight line. I don't think it has to conform necessarily to xcom perspective. The artist may not want it that way.
3. Area selection would be nice, 4 way probably more than 8, but if it could be toggled that would be ideal.
Title: Re: MCD Edit by volutar
Post by: volutar on January 28, 2015, 04:47:23 am
1. instead of straight lines, i will make it work in "additional" layer mode (like as it pasted), with rollback ability (not immediate drawing), plus, i would like ot detect angles: straight, diagonals, and 2:1 (isometric), draw will be applied on mouse release.
2. won't do.
3. will try to make 4neighbour fill selection.

added to todo.
Title: Re: MCD Edit by volutar
Post by: volutar on January 28, 2015, 02:36:47 pm
Updated to 1.17a.
What's new (https://www.ufopaedia.org/index.php?title=Talk:MCDEdit#2015-01-28_v1.17a)

Download page (https://www.ufopaedia.org/index.php?title=MCDEdit#Download)

Instead of click with shift for diagonals - this line mode is work with fixed angles. Straight or diagonals or isometric (1:2).
Hope you'll like it.
Title: Re: MCD Edit by volutar
Post by: davide on January 28, 2015, 03:38:34 pm
i wish a feature for import a png true color and automaically convert to a pck by selection a specific UFO/TFTD palette
The color could be convert by minimum distance from allowed selected palette's color
[min sqrt2( sqr(tileColor.r - paletteColor.r) +  sqr(tileColor.g - paletteColor.g)   +  sqr(tileColor.b - paletteColor.b) ) ]

The reason is here:
https://openxcom.org/forum/index.php/topic,2980.msg35842.html#msg35842 (https://openxcom.org/forum/index.php/topic,2980.msg35842.html#msg35842)

Title: Re: MCD Edit by volutar
Post by: volutar on January 28, 2015, 03:51:52 pm
It already works. with transparent PNG color for 0.
Just remove those purple gap lines.
Edit->Import PNG Sheet.

Btw, I noticed semi transparent things in the "lamp shaft".
It won't work. Better remove all transparency values except for 0 and 255.
Title: Re: MCD Edit by volutar
Post by: davide on January 28, 2015, 06:16:23 pm
I will try it
thanks
Title: Re: MCD Edit by volutar
Post by: volutar on January 29, 2015, 03:32:03 pm
Did these updates of 1.17a make it better? Any feedback? Please?
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 29, 2015, 04:35:38 pm
Sorry haven't had a chance to load it up yet. Hopefully tonight or by the weekend.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on January 31, 2015, 10:55:19 pm
Probably because I'm running in wine, but the area select highlights the pixels but after I release the mouse does not select the pixels. Line draw looks great. More info as I have it.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 01, 2015, 03:33:05 am
preview map resizing stopped working for me.
Title: Re: MCD Edit by volutar
Post by: volutar on February 01, 2015, 06:23:18 am
It's really weird, but the code responsible for resize has simply GONE from the source... I've been developing this thing in 3 different places, and I must have been messed with the proper actualization badly.
Area selection tho should be working. You may cover multiple pixels while holding LMB, and it should increase "orange" pre-selection area, which should become "white" upon LMB release. With Shift/Alt/Shift+Alt it should work as usual - add/sub/cross.

I've found that "dropped" resizing code and put it back in. Quickfix is in place.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 01, 2015, 07:28:50 pm
I also have gotten a strange error since the last version, that sometimes when I use the select color tool and click on a color in the pallet, that it highlights the correct pixels, and then when I release the mouse button the selection shifts over to the left. But again, that's not consistent so I don't know that there's enough info for you to look into that yet.

Clarification on magic wand. If I click and release on a single pixel it doesn't select on release. If I click, hold, and then drag over one pixel the selection will happen on release, so as long as I'm dragging into the already highlighted area works as expected. Otherwise it will add to the magic wand selection, which is desired behavior.

I thought shortcuts were broken, but I was holding down Command key instead of CTRL since that's how adobe handles on osx, so user error on my part.

Is there a new download link for the fixed version or are you working on a newer version now?
Title: Re: MCD Edit by volutar
Post by: volutar on February 01, 2015, 08:06:53 pm
Is there a new download link for the fixed version or are you working on a newer version now?
Quote
I also have gotten a strange error since the last version, that sometimes when I use the select color tool and click on a color in the pallet, that it highlights the correct pixels, and then when I release the mouse button the selection shifts over to the left. But again, that's not consistent so I don't know that there's enough info for you to look into that yet.
Yeah I found the reason of that. Thank you. Forgot to bake selection on palette selecting. Updated same download file. Since it's stupid minor oversight, I didn't make new version.
Quote
Clarification on magic wand. If I click and release on a single pixel it doesn't select on release.
I can replicate same behaviour only when ALT key is pressed. But in this case cursor is with "-" sign.
Quote
If I click, hold, and then drag over one pixel the selection will happen on release, so as long as I'm dragging into the already highlighted area works as expected. Otherwise it will add to the magic wand selection, which is desired behavior.
I couldn't figure what's going on here. Can it be related to wine? Under which environment are you running it?
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 01, 2015, 08:14:43 pm
Yeah I found the reason of that. Thank you. Forgot to bake selection on palette selecting. Updated same download file. Since it's stupid minor oversight, I didn't make new version.I can replicate same behaviour only when ALT key is pressed. But in this case cursor is with "-" sign.I couldn't figure what's going on here. Can it be related to wine? Under which environment are you running it?

Running Wine on OSX Yosemite. My guess would be wine issue, but maybe the right click function is different between windows and OSX, similar to Command vs CTRL key.
Title: Re: MCD Edit by volutar
Post by: volutar on February 01, 2015, 08:23:26 pm
Running Wine on OSX Yosemite. My guess would be wine issue, but maybe the right click function is different between windows and OSX, similar to Command vs CTRL key.
If it be RMB click difference, I doubt any RMB action could be possible, including menu and RMB drawing and colodpicking (btw, does it work?).

The difference between area and color selection shouldn't be that big. It's essentially the same with slight difference. Are you sure color selection works as intended even on single pixel click, and area - not?
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 01, 2015, 09:23:31 pm
It's not all the time for the eyedropper color area selection going bad, so having a hard time testing to isolate the issue that causes it. Sometimes mcd selection menu becomes unresponsive, so i have to switch windows to get it back.

the magic wand preview of selection matches up so long as i move the cursor 1 pixel before releasing. I sort of agree that the mouse being different probably isn't the culprit since menus etc work fine as does secondary color for pen tool.
Title: Re: MCD Edit by volutar
Post by: volutar on February 01, 2015, 09:32:40 pm
So I guess wine for OSX casts mouse events somehow "wrong" comparing to the order and values of native win32. I doubt I could test it, since in my case it could be only win7(vmware(OSX(wine(mcdedit))), so events initiator still be win32. But I'll give it all try, tho it's a Maverics, not Yosemite. But I doubt they changed the way mouse events work.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 02, 2015, 05:04:01 am
My current workflow is
Create Images
Import as PNG's to Volutar's MCD edit (In Wind)  and try to work with map preview to make sure things line up.
Copy terrain file exports to my original xcom directory for map view, my git directory, and my testing directory for the nightly.
Edit map files using xcom directory (Virtualbox windows XP)
move map files and RMP files to git directory, openxcom directory.
Test in openxcom (OSX native)
revise as needed.

There's a lot of basic file loading/saving that could be improved and would make new files more streamlined.
Also kitbashing existing MCD/PCK files would be a big time savings.
Title: Re: MCD Edit by volutar
Post by: volutar on February 02, 2015, 07:39:07 am
Ok, I made full project recompile. There was some weird bug caused by constant partial synchronizing. Couple of bugs figured and fixed. Same URL.
Title: Re: MCD Edit by volutar
Post by: volutar on February 02, 2015, 11:15:44 pm
OK, I managed to replicate this issue. And found couple of others. Will try to find a workaround.
But if you're already using virtualbox for the map editing, why not to use MCDEdit under same environment?
Title: Re: MCD Edit by volutar
Post by: volutar on February 03, 2015, 10:17:47 am
These issues was found and fixed (uploaded with same url). Also fixed this "OpenInputDesktop" spam. Reason is not proper multidesktop functions realization under wine, i simply detect it's a wine, and using different way.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 03, 2015, 03:19:38 pm
OK, I managed to replicate this issue. And found couple of others. Will try to find a workaround.
But if you're already using virtualbox for the map editing, why not to use MCDEdit under same environment?

Virtualbox is a lot of system resources to load, and so far MCDEdit runs well enough for me in Wine that I don't have to run in virtualbox most of the time. Mapedit doesn't really run in wine so I don't have any option there.
Title: Re: MCD Edit by volutar
Post by: volutar on February 05, 2015, 05:09:42 pm
Well? Any feedback, please?
Thank you.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 06, 2015, 03:34:58 am
Sorry haven't had a chance to test yet as I've been troubleshooting some rule files and play testing my mod. planning on doing some MCD work tomorrow night though.
Title: Re: MCD Edit by volutar
Post by: robin on February 07, 2015, 10:42:01 am
When I activate "show surroundings", I'd like to deactivate the "dashed outlines" around the tiles, the ones in the main drawing windows including the blue one around the main tile. Attached screen to avoid misunderstanding.
Title: Re: MCD Edit by volutar
Post by: volutar on February 07, 2015, 01:34:05 pm
Updated to 1.17b
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 07, 2015, 04:04:47 pm
When I activate "show surroundings", I'd like to deactivate the "dashed outlines" around the tiles, the ones in the main drawing windows including the blue one around the main tile. Attached screen to avoid misunderstanding.

Can that be a toggle? I like having it when I'm trying to edit down a set of tiles that overlap because they contain the same content. i.e. take a 4x4 graphic from photoshop and laying those into the grid with the correct offsets etc.
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 07, 2015, 04:55:20 pm
I've started again using MCDEdit since I'm creating some new terrains. One functionality that would be useful is the ability to select entire blocks of MCD entries and copy them to another MCD file. It gets time consuming if I want to copy 20 entries that are next to one another and I have to copy/paste them one by one.

The PCK editor is really useful for quick edits.
Title: Re: MCD Edit by volutar
Post by: volutar on February 07, 2015, 06:48:40 pm
Multiple MCD selection gonna be really tricky.
Plus, when pasting, it will override MCDs you don't observe, and references to PCKs gonna be wasted (Since MCD copy makes clone of the MCD data, not images).
I'm not sure if that gonna be useful.
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 07, 2015, 07:22:22 pm
Plus, when pasting, it will override MCDs you don't observe, and references to PCKs gonna be wasted (Since MCD copy makes clone of the MCD data, not images).
I'm not sure if that gonna be useful.

I'm aware of the first one (simply a matter of learning to be careful after you've done that mistake a couple of times).

The second issue with the PCK entries being wrong already happens when copying single MCD entries but that can't really be fixed. But to fix this issue it would be better to have an additional box where you could define an image to be used on all 8 frames (instead of having to enter the same value 8 times on each individual frame's box) and then use the individual frame boxes in case you need to change something. 
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 07, 2015, 11:39:09 pm
Could there be a command to just combine two mcd/pck sets? It would be pretty easy then to delete the unneeded bits.

Great work, lots of excellent enhancements and looks like it's running pretty stable under wine.  :D I like the additional hover details on the mini map. makes selecting items on the grid much easier. eyedropper selector and magic wand both look like they are working great!

Would it be possible to be able to highlight a group of MCD's and apply the same set of flags,bits, values etc to them? I.E. set all the floor tiles to the same LOF's and the same footstep sound? That could also speed up cases where we're copying together sets manually.

Anyhow great work again!
Title: Re: MCD Edit by volutar
Post by: volutar on February 08, 2015, 12:51:10 am
Could there be a command to just combine two mcd/pck sets? It would be pretty easy then to delete the unneeded bits.
Ok. Added "appending" MCDset in "file" menu (it was disabled function).
Quote
Would it be possible to be able to highlight a group of MCD's and apply the same set of flags,bits, values etc to them? I.E. set all the floor tiles to the same LOF's and the same footstep sound? That could also speed up cases where we're copying together sets manually.
You can copy MCD and paste it multiple times. If you don't want to copy all values, it's a problem. Program can't know what values you want to copy and what - don't. Like, this time you want to copy LOFT, another time you don't want.

Selecting multiple MCDs to copy them, or to paste AT them is not possible right now (multiple selection is really tricky). But since there are already multiple requests for similar thing, I think I could try to make something with it.

Quote
Anyhow great work again!
Cheers.;)
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 08, 2015, 01:01:26 am
I was thinking something like itunes used to do. you could select several tracks at once and edit all data for them at once. It wasn't very smart but if you wanted to set all the tracks to have the same artist name you could do that.

So, MCDEdit could pop up an MCD values window for the selected set and would write all values that were filled in to all of the selected MCD files, overwriting what was already there. So the user would have to be careful, but I think this would be powerful. I could make a new terrain set and I can set them all to footstep sound "grass" and "fuel: 4" without having to enter those exact same values on dozens of tiles, and then set more specific values for the couple of tiles that might be exceptions to that standard.

Thanks again!
Title: Re: MCD Edit by volutar
Post by: volutar on February 08, 2015, 09:24:37 pm
Uploaded 1.17c.
Remind me if I missed something from your requests.
(multiple MCD values change won't work for sprite#/LOFT/SCANg values)
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 09, 2015, 04:20:10 pm
Works great. Lots of productivity enhancements. Small request I hope. In the next release, in the pck edit window can I select multiple pck's to delete by holding down shift key?

Thanks again for this great tool.
Title: Re: MCD Edit by volutar
Post by: volutar on February 09, 2015, 05:27:42 pm
Small request I hope. In the next release, in the pck edit window can I select multiple pck's to delete by holding down shift key?
I'm currently working on it (both Shift as range and Ctrl as single entry switch are working).
And I hope I could be able to make export as PNG through the selection (into single file) and import from PNG "sheet" within selection. So single export/import gonna be just sort of "mini sheet".
And planning to make paste/import work as with MCDs - can copy 1 and clone it to multiple.

Also planning to cover sprite and LOFT and scang values aggregation (similar to data, which is already aggregated).

I don't know if it needed to make "add/insert MCD" and "add/insert PCK" with a request window, or not.
Title: Re: MCD Edit by volutar
Post by: volutar on February 09, 2015, 09:53:23 pm
1.17d uploaded.
Just multiple selections of PCK and delete of them. Nothing more.
I'll settle with this version for indefinite time. Feel free to use and fix ufopaedia's manual/description.
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 10, 2015, 04:22:27 pm
Great work Volutar. :)

I've come up with another request but it's totally cool if you're done with MCDEdit for now. The request would be to be able to open and work on several MCD files at the same time by having tabs. Then it would be even more easy to copy/paste MCD entries between files. But for the moment I'm basically done with the major copy/pastes for the new terrains, so this isn't that important but an idea for later.
Title: Re: MCD Edit by volutar
Post by: volutar on February 10, 2015, 05:00:07 pm
You can run multiple MCDEdits. Copy paste works between them.
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 11, 2015, 02:21:25 am
You can run multiple MCDEdits. Copy paste works between them.

Ah thanks.

I think there might be an issue with copy/paste MCDs on version 1.17d since I can't seen to be able to do it anymore.
Title: Re: MCD Edit by volutar
Post by: volutar on February 11, 2015, 06:08:12 am
I think there might be an issue with copy/paste MCDs on version 1.17d since I can't seen to be able to do it anymore.
ah, you were right. it was typo mistake there. now its fixed and reuploaded with same name. thanks for report.
Title: Re: MCD Edit by volutar
Post by: volutar on February 17, 2015, 10:53:45 pm
About pasting multiple MCDs.
It works two possible ways if multiple MCDs are copied to buffer.
1. If only one MCD is selected  - it applies the MCDs starting from the selected MCD, affecting as many MCDs, as stored in the buffer.
2. If multiple MCDs are selected - it affects only the MCDs which are selected.

I was thinking of changing that. Perhaps I don't need to make it work in scenario 1 at all. Perhaps it'd be more predictable and solid if PASTE action would work only on selected MCDs, even if there are more in the buffer.

What do you think?
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 18, 2015, 12:37:14 am
About pasting multiple MCDs.
It works two possible ways if multiple MCDs are copied to buffer.
1. If only one MCD is selected  - it applies the MCDs starting from the selected MCD, affecting as many MCDs, as stored in the buffer.
2. If multiple MCDs are selected - it affects only the MCDs which are selected.

I was thinking of changing that. Perhaps I don't need to make it work in scenario 1 at all. Perhaps it'd be more predictable and solid if PASTE action would work only on selected MCDs, even if there are more in the buffer.

What do you think?

I agree with you. Solution 2 prevents the time-consuming mistakes you can make with solution 1.
Title: Re: MCD Edit by volutar
Post by: kikimoristan on February 18, 2015, 01:13:37 pm
volutar,

thanks for MCD Edit really handy. In fact I use it a lot . I created my custom MCD custom target objectives higher than 11 and it works.

I also created custom ufo tiles and also works.

I was wondering if is possible at all to change the map scan textures or add custom ones. In my mod the tiles for the ufo are yellow but on the map scanner  they show as purple as the default ufo map scanner look was the only thing I could pick. All other options were not matching my LOF/ufo tiles. I wish it would show as yellow on the map scanner too. Is no big deal though. Just wondering.  Great work though thank you.
Title: Re: MCD Edit by volutar
Post by: volutar on February 18, 2015, 02:30:22 pm
Updated to 1.17e.

@tollworkout, unfortunately, scan data is referred to not modifiable scang.dat file, consisting of 4x4 pixeled data. There's no other way of adding custom scanner sprites, except for editing scang.dat stored (as well as loft.dat). MCD data (62bytes) can't store 16 bytes of scanner sprite.

It is possible to modify engine of openxcom, to use "custom" scang sheets for values, say, beyond 1024. But engine should be able to support it. And I guess there was no hard request of this.
Title: Re: MCD Edit by volutar
Post by: kikimoristan on February 18, 2015, 03:06:29 pm
Updated to 1.17e.

@tollworkout, unfortunately, scan data is referred to not modifiable scang.dat file, consisting of 4x4 pixeled data. There's no other way of adding custom scanner sprites, except for editing scang.dat stored (as well as loft.dat). MCD data (62bytes) can't store 16 bytes of scanner sprite.

It is possible to modify engine of openxcom, to use "custom" scang sheets for values, say, beyond 1024. But engine should be able to support it. And I guess there was no hard request of this.

Gotcha. Thanks volutar. Is no big deal as on the scanner all UFOs look the same and in a way is easier to identify them.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on February 18, 2015, 06:06:37 pm
Would it technically be possible to sample each tile on the fly and use its mean colour for the minimap?
Title: Re: MCD Edit by volutar
Post by: kikimoristan on February 18, 2015, 07:15:42 pm
Volutar. would it be possible to load unit pck using mcedit's built in pck editor? Is much nicer than having to use photoshop + other stuff.
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 18, 2015, 07:43:13 pm
Would it technically be possible to sample each tile on the fly and use its mean colour for the minimap?

I don't know but you'd also need a basic representation of its shape for the Scang entry, otherwise the minimap would simply display colored squares.

Allowing for additional entries to be added to SCANG.DAT is probably more practical.
Title: Re: MCD Edit by volutar
Post by: volutar on February 18, 2015, 07:58:50 pm
Would it technically be possible to sample each tile on the fly and use its mean colour for the minimap?
Yea, technically we can use one of unused bytes for that, and use it like XXXXYYYYb (binary form), where X is which colorgroup to replace, and Y is with which. But these bytes should be either 0x00 or 0x11 or 0x22 etc for every vanilla MCD. Otherwise all of scangs gonna be modified.
And it's not really elegant way. Better to tie some additional custom file for the MCD/PCK/TAB triplet (SCN for instance), in the format of vanilla SCANg, working just for this particular MCDset.
In the same style we COULD tie modded "LFT" file for additional custom LOFTs. It's quite feasible.
(I reconsidered the way of making them totally free - there's no need for that really).

Volutar. would it be possible to load unit pck using mcedit's built in pck editor? Is much nicer than having to use photoshop + other stuff.
Yes and I already mentioned that. https://openxcom.org/forum/index.php/topic,2028.msg36982.html#msg36982
But it won't work for animation. Just for static frames, and without additionals like hand objects. It just isn't meant to work like that.
Title: Re: MCD Edit by volutar
Post by: jackstraw2323 on February 19, 2015, 04:10:38 am
Hopefully small request, for add PCK or MCD it currently adds one frame. Would it be possible to add an additional command or have a dialog that asks how many frames? Sometimes you want to add 20 or 30 frames at a time.

It would be nice if there was some way to append a custom sprite sheet for scang, but I assume that's on warboy and subsuper's plate if they wanted to do it. Honestly the map resolution is pretty low so there are lots of close enough images that work.
Title: Re: MCD Edit by volutar
Post by: volutar on February 19, 2015, 06:36:18 am
uploaded 1.17f

About adding custom scang/lofts - afaik it's not on SupSuper's plate. battlescape is up to Warboy.
And it's not really needed until tftd is in the past.
Title: Re: MCD Edit by volutar
Post by: volutar on February 19, 2015, 08:19:29 pm
uploaded 1.17f

About adding custom scang/lofts - afaik it's not on SupSuper's plate. battlescape is up to Warboy.
And it's not really needed until tftd is in the past.
Title: Re: MCD Edit by volutar
Post by: kikimoristan on February 19, 2015, 09:41:18 pm
uploaded 1.17f

About adding custom scang/lofts - afaik it's not on SupSuper's plate. battlescape is up to Warboy.
And it's not really needed until tftd is in the past.

thanks volutar. also is not something necessary more like a bonus feature .
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 24, 2015, 04:06:30 am
uploaded 1.17f

I can't seem to be able to export PNG sheets using the PCK viewer. They can be imported just not exported.
Title: Re: MCD Edit by volutar
Post by: volutar on February 24, 2015, 06:50:48 am
Yeah. Not only sheet but >=10 selected pcks. Error was fixed and 7z reuploaded.
Title: Re: MCD Edit by volutar
Post by: Hobbes on February 24, 2015, 08:26:34 pm
Yeah. Not only sheet but >=10 selected pcks. Error was fixed and 7z reuploaded.

Thanks.
Title: Re: MCD Edit by volutar
Post by: volutar on March 12, 2015, 01:23:09 pm
Any issues?
Title: Re: MCD Edit by volutar
Post by: kikimoristan on March 12, 2015, 01:29:40 pm
not so far i mean haven't bumped into anything
Title: Re: MCD Edit by volutar
Post by: kikimoristan on March 12, 2015, 01:32:23 pm
can mcedit edit pck files directly ? is that gonnaa be implemented? also for png sheets is it possible to make it so it automatically adds new MCDs for each of the tiles in the png sheet that are OVER the MCDs in current .mcd file

like for ex if you import a sheet with 10 and your current text1.mcd has 5 ..it should automatically add 5 more than you can erase etc
Title: Re: MCD Edit by volutar
Post by: volutar on March 12, 2015, 02:08:13 pm
can mcedit edit pck files directly ?  is that gonnaa be implemented?
Just make fake .mcd file for the PCK. It's the way how I edited units.
Quote
also for png sheets is it possible to make it so it automatically adds new MCDs for each of the tiles in the png sheet that are OVER the MCDs in current .mcd file
MCD has nothing with PCKs. PCKs can be either frames from the animation, or different MCDs can refer to same PCK multiple times. It's unguessible thing, so the answer is "no".
Quote
like for ex if you import a sheet with 10 and your current text1.mcd has 5 ..it should automatically add 5 more than you can erase etc
No, it shouldn't. You do want this, others do not (because it's animation frames). You wish computers could guess what you want, without manual work but it's simply impossible. It intentionally doesn't do any guess work, because it will fail.
Title: Re: MCD Edit by volutar
Post by: kikimoristan on March 12, 2015, 02:28:50 pm
i find it easier to erase mcds than to make new ones/assign each frame is more efficient to do it that way when starting a fresh mcd.. simply tun all imaged into tiles then edit them down..rather than start from zero and edit them up twice the work
Title: Re: MCD Edit by volutar
Post by: Hobbes on March 12, 2015, 02:50:37 pm
i find it easier to erase mcds than to make new ones/assign each frame is more efficient to do it that way when starting a fresh mcd.. simply tun all imaged into tiles then edit them down..rather than start from zero and edit them up twice the work

Assigning PCKs to MCDs is very easy on the latest versions - you only need to enter the PCK reference number on the first frame and the other 7 frames are assigned the same number automatically. This was already a major improvement made by volutar over previous versions but you still need to edit/check a ton of other settings for each MCD entry (LOF settings, DieMCD, armor, sound, light block, etc.), so what you'd gain from your suggestion is actually minimal compared to the rest.

I had considered asking volutar so that you could do with the LOF settings the same as the frames (editing the first one changes all the others to that value) but I realized that it would actually increase the work load, since a lot of tiles only require editing a few LOF entries.

MCD editing takes a lot of work because you need to edit/check all those settings. One tip I give you is precisely not to create new MCD files but copy and rename instead the existing ones. Then you can simply recheck all the settings and edit the values you need, rather than creating a new MCD file and having to introduce values for every needed setting.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on March 31, 2015, 11:52:35 pm
Impressive work, Volutar. Truly impressive. I've started working with your latest version recently and it's a great step forwards. Great job.

I have two questions though:
1) Is it possible to copy .mcds between tilesets, with all the properties? I'm guessing no, judging from the thread. It would be enormously helpful when moving tiles between tilesets.
2) How do you pick a colour when editing? Using the colour pick highlights all instances of that colour, but doesn't make it active colour.
Title: Re: MCD Edit by volutar
Post by: Hobbes on March 31, 2015, 11:54:41 pm
Volutar,

Just a little thing: Insert PCK doesn't seem to be working
Title: Re: MCD Edit by volutar
Post by: volutar on April 01, 2015, 07:01:24 am
1) Is it possible to copy .mcds between tilesets, with all the properties? I'm guessing no, judging from the thread. It would be enormously helpful when moving tiles between tilesets.
You can copy MCDs (number of) into clipboard (they are copied as text), and then paste them into another mcdset, if you want, or even in text file. I guess you didn't read the thread properly. :P
Quote
2) How do you pick a colour when editing? Using the colour pick highlights all instances of that colour, but doesn't make it active colour.
Please refer this (https://www.ufopaedia.org/index.php?title=MCDEdit#PCK_editor)
In short - either from the palette just with rmb/lmb, or in draw mode with "alt" and rmb/lmb (besides highlighting it also switches to colorpick mode).

Quote from: Hobbes
Just a little thing: Insert PCK doesn't seem to be working
Confirmed. Weird thing. Guess it's some unfinished version, just recompiled and it became fine. Reuploaded.

Title: Re: MCD Edit by volutar
Post by: x60mmx on April 02, 2015, 09:07:16 am
I just used MCD Edit to do a lot of graphics work on the tank graphics, exported the png, and it runs all jacked because MCD Edit put the images in rows of 10.  :-/  Anyway to have it export in rows of 8, or any tool out there to do it?
Title: Re: MCD Edit by volutar
Post by: Hobbes on April 02, 2015, 04:35:30 pm
I just used MCD Edit to do a lot of graphics work on the tank graphics, exported the png, and it runs all jacked because MCD Edit put the images in rows of 10.  :-/  Anyway to have it export in rows of 8, or any tool out there to do it?

You can define the ruleset so that it accepts images in rows of 10.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on April 02, 2015, 06:23:31 pm
You can copy MCDs (number of) into clipboard (they are copied as text), and then paste them into another mcdset, if you want, or even in text file. I guess you didn't read the thread properly. :P

I guess. :P To my defence, I tried it and failed a couple times before it worked properly and never noticed the improvement.

Please refer this (https://www.ufopaedia.org/index.php?title=MCDEdit#PCK_editor)
In short - either from the palette just with rmb/lmb, or in draw mode with "alt" and rmb/lmb (besides highlighting it also switches to colorpick mode).

Ah, of course...

Confirmed. Weird thing. Guess it's some unfinished version, just recompiled and it became fine. Reuploaded.

I tried downloading again, and it's the same file size. Was it changed?

Title: Re: MCD Edit by volutar
Post by: x60mmx on April 03, 2015, 05:44:31 am
You can define the ruleset so that it accepts images in rows of 10.

All I had to do was define the image size in the ruleset.  Derp.  :P  Thanks Hobbes.
Title: Re: MCD Edit by volutar
Post by: volutar on April 03, 2015, 02:11:42 pm
Well, theoretically I could make this value (sprites per row) externalized (in the config). I just didn't see important reason for that. Yet.
Hobbes, can you confirm working PCK insert now?
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on April 03, 2015, 02:20:25 pm
Well, theoretically I could make this value (sprites per row) externalized (in the config). I just didn't see important reason for that. Yet.

I think it would be very beneficial for the simple reason that Falko's tool has it, and therefore the population (which means me) is used to having this feature. Sure, you don't really need it, but I feel it is kind of a must. :)
Title: Re: MCD Edit by volutar
Post by: Hobbes on April 03, 2015, 06:26:30 pm
Well, theoretically I could make this value (sprites per row) externalized (in the config). I just didn't see important reason for that. Yet.
Hobbes, can you confirm working PCK insert now?

What I meant was this:
Code: [Select]
extraSprites:
  - type: INTICON.PCK
    width: 352
    height: 80
    subX: 32
    subY: 40
    files:
      26: Resources/Redux/Craft/DARKSTAR_geoscape.png
  - type: INTICON.PCK
    files:
      27: Resources/Redux/Craft/THUNDERSTORM_GEOSCAPE1.gif

First entry has different .png dimensions than the vanilla INTICON.PCK but you don't need to convert the .png to vanilla dimensions if you specify the different dimensions on a separate entry.
Title: Re: MCD Edit by volutar
Post by: davide on April 04, 2015, 04:50:19 pm
I get an access violation importing this PNG

I apologize but my skill on format images are poor

Title: Re: MCD Edit by volutar
Post by: volutar on April 04, 2015, 08:02:16 pm
davide, first thing, you made your sheets with 1 pixels between neighbours. Sheets used by MCDedit are not using any spaces.
Second thing, you're using RGB with alpha, the format, which haven't been used for sheets before. So it can't import sheets of this RGBA format properly.

I've reuploaded fixed exe.
But as for "pixel space", and number of tiles per row - it's the thing which I believe would require for some "settings" menu. And for now, you have to change your sheets by removing any spaces, and using exact grid 32x40 pixels.
Title: Re: MCD Edit by volutar
Post by: davide on April 04, 2015, 10:55:38 pm
Thank you very much
Title: Re: MCD Edit by volutar
Post by: volutar on April 06, 2015, 10:13:23 am
1.17g uploaded.
PNG spacing/margins (for import/export) and sprites per row (for export) through the Edit->Settings.

Please check it and report if anything wrong.
Title: Re: MCD Edit by volutar
Post by: davide on April 06, 2015, 09:33:55 pm
Thank you for your kindness

...

It work very well,  ;D
I am working on compress the tileset
tomorrow I will begin to convert the five maps

I know that it is only an experiment because moonbase was in a very early stage
but it could be a test to start a more complicate scenarious
Title: Re: MCD Edit by volutar
Post by: hellrazor on June 18, 2015, 11:50:20 pm
Since there isn't any fucking direct download link in this entire thread...

MCDEDITv1.17g (https://volutar.eu5.org/_mcdedit117g.7z)

Anyway i have a few questions on how to use this editor, how can i copy stuff from one MCD file to another?
How can i remove entries?
How can i add entries etc...?

The manual isn't really helpfull in this regard, since my files keep unchanged (and yes i have write permissions)
Also the loading times of this editor are way to long. i presume it comes from those LOFT entries, can't we have those as tabs?
And how should i work on multiple files? (for C&P)

Questions Questions...
Title: Re: MCD Edit by volutar
Post by: davide on June 19, 2015, 08:43:03 am
There are some info on this link:

https://www.ufopaedia.org/index.php?title=MCDEdit (https://www.ufopaedia.org/index.php?title=MCDEdit)

Volutar read the forum sometimes ...

and after some new requests he improved the tool

Polite request are better ...  ;)


Title: Re: MCD Edit by volutar
Post by: kkmic on June 19, 2015, 11:41:15 am
This tool could use better documentation, indeed.

Volunteers? :)
Title: Re: MCD Edit by volutar
Post by: XOps on June 19, 2015, 05:37:27 pm
Since there isn't any fucking direct download link in this entire thread...

MCDEDITv1.17g (https://volutar.eu5.org/_mcdedit117g.7z)

Anyway i have a few questions on how to use this editor, how can i copy stuff from one MCD file to another?
How can i remove entries?
How can i add entries etc...?

Right click on the entries themselves. The options allow you to add, insert, delete. Etc. Tip: Inserting or removing entries can be problematic because the program doesn't automatically adjust Die_MCD references. Be sure to fix those if you rearrange entry positions.

(https://www.openxcom.com/content/modimages/WTVVDSGN061920151023.png)

The manual isn't really helpfull in this regard, since my files keep unchanged (and yes i have write permissions)
Also the loading times of this editor are way to long. i presume it comes from those LOFT entries, can't we have those as tabs?
And how should i work on multiple files? (for C&P)
Don't know about the file write permissions. I've never had that problem. Same with the long loading times (though I have an i7 with 8 gigs of ram, so my system is pretty powerful).  Working on multiple files is fairly easy. You can have multiple instances of the MCD editor open at the same time and can copy and paste between them freely. Just be sure to save one before working on the other since have two editors open with pending changes makes the whole thing act kind of strange (it won't save or close).

I can help you with specific questions if needed. It's a pretty complex program, but it's fairly intuitive once you get the hang of it. It just takes some playing around with and a bit of patience.
Title: Re: MCD Edit by volutar
Post by: Hobbes on June 20, 2015, 01:05:52 am
Tip: Inserting or removing entries can be problematic because the program doesn't automatically adjust Die_MCD references. Be sure to fix those if you rearrange entry positions.

Corollary: always check and recheck fields that refer to other MCD entries, such as Die_MCD or the doors.
Title: Re: MCD Edit by volutar
Post by: kkmic on June 22, 2015, 10:37:13 am
Tip: Inserting or removing entries can be problematic because the program doesn't automatically adjust Die_MCD references.

Hey Volutar, people are delighted by your application and they want more!

It's just that they're just more vocal about the latter part :)
Title: Re: MCD Edit by volutar
Post by: kikimoristan on August 12, 2015, 03:15:01 am
hey volutar

would it be possible to add a 3rd 4th (etc) games to mcd edit like
xcom1path ufo
xcom2path tftd
xcom3path customFolder
...

or can i change  tftd pallette.dat to make it look different?
Title: Re: MCD Edit by volutar
Post by: niculinux on September 24, 2015, 07:36:29 pm
*Cough* , no linux version yet? *cough*
Title: Re: MCD Edit by volutar
Post by: kkmic on September 28, 2015, 03:51:43 pm
I asked Volutar for a cross-platform version some time ago and the answer was no.

I've suggested to Volutar that he should try to port it using Lazarus (MCD Edit is written using Borland Delphi 7),  but one particular Delphi  component that deals with the PNG files/format is not portable/not available for Lazarus.
Title: Re: MCD Edit by volutar
Post by: hellrazor on December 21, 2015, 12:07:05 am
I would prefer the source code of the editor so in the future we can implement further changes.
Or attempt to port it to linux.
Title: Re: MCD Edit by volutar
Post by: davide on December 21, 2015, 01:07:40 am
actually when a people join an open source project,
drive by logic,
his contributes should be open too .. :-X
Title: MCD Edit by volutar version 1.17j
Post by: ivandogovich on August 29, 2016, 04:38:53 pm
Just a quick update. 

volutar has released a new version of this tool with a new feature that I requested.  The tool now also allows for editing pcks that are 48 px high. 
This makes it very handy for working on BigObs

Download version 1.17j from the wiki site here: https://www.ufopaedia.org/index.php?title=MCDEdit#Download

Extract, and run mcdedit.exe.  Click Edit PCKs > View > Height 48. 

When exporting sheets, they will be in the taller resolution.
Title: Re: MCD Edit by volutar
Post by: Solarius Scorch on August 30, 2016, 01:11:58 pm
The great Volutar is still alive! Rejoice! :)
Seriously, I'm missing his talent and ambition a lot.
Title: Re: MCD Edit by volutar
Post by: luke83 on November 18, 2018, 11:40:12 am
Inside the pck editor, there is a grid on the right hand side under the colour change buttons, whay are these for?
Title: Re: MCD Edit by volutar
Post by: Hobbes on November 18, 2018, 08:55:19 pm
Inside the pck editor, there is a grid on the right hand side under the colour change buttons, whay are these for?

To visualize how tiles combine together. Click on a square of the grid, there are 4 boxes above it where you can select Ground/WWall/NWall/Object for that square.
Title: Re: MCD Edit by volutar
Post by: luke83 on November 20, 2018, 08:20:50 am
To visualize how tiles combine together. Click on a square of the grid, there are 4 boxes above it where you can select Ground/WWall/NWall/Object for that square.
BUMMER, i was hoping this was a tile splitter ( so i could model something in 3d and split it into tiles easily.

Update: so  i tried using this and it seams to place items on there and random like ( i am guessing i am doign it wrong), can anyone make a 30 sec video of how this features should work?

FIGURED IT OUT, WHAT A COOL FEATURE
Title: Re: MCD Edit by volutar
Post by: misterx on November 28, 2019, 10:32:21 am
Please, any video/yotube video/ tutorials and/or demo?
Title: Re: MCD Edit by volutar
Post by: luke83 on November 28, 2019, 10:57:01 am
Of course there is, i try to cover the main topics : http://openxcommods.weebly.com/mcdedit.html