Skip to content

[Tools] Wall's and search map in Gimp/Inkscape

viaderviader Member, Translator (NDA) Posts: 875
edited March 2013 in General Modding
Hey guys!
Walls and search maps - it is 95% work on area, so I spent nice few hours on creating it in few huge areas.
I like quick and fast work as all people, but creating wall's and search maps in DLTCEP or IETME is strenuous...

I make way to work on it in GIMP or Inkscape or any graphic editor - you know, I like zoom, layers, ctr-z, ctr-y, ctr-c, ctr-v

I make video - hmm, something as how to (sorry for polish GIMP ;/) -
VIDEO - http://dl.dropbox.com/u/87796468/film.rar

To make it oneself you need:

My little programs:
http://dl.dropbox.com/u/87796468/bg/biblioteki.zip
http://dl.dropbox.com/u/87796468/bg/from_search.zip
http://dl.dropbox.com/u/87796468/bg/to_search.zip

Graphics editor
- gimp http://sourceforge.net/projects/gimp-win/files/GIMP + GTK+ (stable release)/GIMP 2.8.4/gimp-2.8.4-setup.exe/download?accel_key=71:1362259804:http%3A//gimp-win.sourceforge.net/stable.html:d6cabee2$e3f0fb9395c239fe6c0d415ba376ec8c0fcaef11&click_id=58a47280-8380-11e2-83bc-0200ac1d1d8e&source=accel

DLTCEP
- dltcep http://sourceforge.net/projects/gemrb/files/Utilities/DLTCEP 7.5c/

And map exported from BGEE :)
http://dl.dropbox.com/u/87796468/mapa01.bmp.zip

Small description:
biblioteki.zip - it is library for program's, must be in this same directory
from_search.zip - we need write: filename with extension (bitmap.bmp), orginal width and height our area
to_search.zip - we need only drop bitmap, all with extension .bmp will be converted to big .bmp

I have program which add poligons to wed from .svg but I must enhance it.

Small aditional. Program which generate all wall's from .wed to .svg How it work? Easy, drop file with extension .wed and run program, you will get .svg
http://athkatla.cob-bg.pl/download.php?id=2158

Some screenshot:



Comments

  • MilochMiloch Member Posts: 863
    Great work. Any ETA on when you might have a SVG-to-WED converter? You might also be interested in this, if you haven't seen it:

    http://www.shsforums.net/topic/32402-lionheart-extracting-the-maps/?p=395312
  • viaderviader Member, Translator (NDA) Posts: 875
    edited March 2013
    @Miloch Thanks, I hadn't seen it ;) Hmm soon, ETA - 16.03.2013
    Post edited by viader on
  • viaderviader Member, Translator (NDA) Posts: 875
    edited March 2013
    Program SVG-to-WED done.
    http://dl.dropbox.com/u/87796468/to_wed.zip
    Example work:
    Run program, write "svg.svg", write "wed.wed", new wed will be create in directory "\out".
    Svg format should be "plain svg", all paths should be ungrouped and close.
    @Miloch check it.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    edited March 2013
    I gave this a check. Great start, and a noble effort!

    Was working with the WED->SVG and SVG->WED tools. The tools work fine when converting an existing WED to SVG, and then back to WED. However, when I used Inkscape to make a custom wallgroup in SVG and converted it to WED--neither the game nor any editor would recognize it as a WED file. I noticed that this new WED file comes out much smaller than the same WED file made in IETME (about 20% of the size). Much of that was probably the absence of door overlays.

    Also, I tried taking the custom WED I had set up in IETME, then convert it to SVG and fine-tune the path nodes. When saved and reconverted to WED, the number of polygons doubled from 9 to 18. Converting the uneditted WED to SVG and back to WED only gave me 9 polys. Looks like it stores both the old changed data as well as the new data.

    The from_wed tool works fine in making SVG files, but only seems to recognize the file name prefix of "AR". I tried a custom prefix (from a custom area)and ithe file was ignored.
  • viaderviader Member, Translator (NDA) Posts: 875
    edited March 2013
    @horredtheplague Thanks! So, I will fix program SVG->WED. Could you upload your .wed and .svg?

    I don't know nothing about prefix AR, but if extension is diffrent than ".Wed *.WED *.wed that program won't recognize it. I tested it and name file shouldn't have first char as "*". Why? I don't know yet. I think that it is vestigial problem.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    http://atlaswarehouse.net/misc/svg_fromscratch.zip
    http://atlaswarehouse.net/misc/ietme_svg-edit.zip

    The one pack is the SVG I made from scratch, and the wed file it yielded. The other is the original IETME wed file TS1703, changed to SVG and editted, then saved as TS4848.wed.

    As for the naming problem I reported in WED-->SVG, I originally tried to use the name TS1703.wed, but there was no SVG file made. When I renamed the file to AR1703.wed, it gave me a SVG file.

    SVG file format was a great choice for working on WED files by the way; the Edit Path Nodes tool in Inkscape is a priceless timesaver for getting quality work. Hopefully the bugs don't prove too major; I think you're have a useful tool here.
  • viaderviader Member, Translator (NDA) Posts: 875
    @horredtheplague I fixed SVG->WED and your svg file :) (have shift layer, my program doesn't check set layer and group for paths). Test it :) (additional 4 poligons are hide in doors.) I checked it on 10 random wed, ah and now program differentiates old poligons as new poligons, but if you need clear wed from poligon and vertices just:

    Open IE -> open your wed. Set number poligon as '0'
    Open DLTCEP: create area with name as your '.wed'. Save area.
    Replace dltcep's wed to your wed.
    Open DLTCEP, open area, edit something in *.wed, save area. DLTCEP doesn't save all unused poligons and vertices, so new wed will be 'clear'.

    I think that I will add some options soon.
    http://dl.dropbox.com/u/87796468/to_wed_fix.zip
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    edited March 2013
    I found time for some more testing this morning. It's still not doing what I had hoped for. Let me outline my procedure, so you understand what I'm trying to do, better.

    1) I made a custom area in IETME. Made some rough wallgroups, added doors. I hit Save Area.
    2) I import the area files into the override, add things like triggers, fire overlays, etc. Save Area
    3) Test area in game. It runs fine. But the wallgroups were sloppy, and there's no neat way to edit them. (Thats where your tools come in)
    4) I take that fully functional WED file, "rename it", and convert it to SVG with "from_wed". (More on the naming bug in a bit)
    5) I open the SVG in Inkscape, and make some fine tuning adjustments to the nodes with the Edit Path Nodes tool. It's looking nice. I Save the SVG
    6) I Use the "to_wed" tool to make the editted SVG file back into a WED.
    7) (BOOM!!!) --Broken WED file, no editor will recognize it

    The naming bug--I noticed in your tests you used all letter names. Try a combination of letters and numbers, like RS1408.wed, GY1905N.wed, G3R2D2.wed for example. The tool would not make SVG files for me, with file names of this format, unless the name started with 'AR' or 'ar'. I tried a good half-dozen variations, none of them made a file.


    Here's the WED files in question, and the SVG that I made and then altered in
    Inkscape: <url>http://atlaswarehouse.net/misc/ts1703_bugreport_2.zip</url>


    EDIT: It looks like the forums are having a problem with linked URL's at the moment; it worked fine when I previewed the post. Even w/ paragraphs. I didn't type a big blob, honest!
    Post edited by horredtheplague on
  • viaderviader Member, Translator (NDA) Posts: 875
    edited March 2013
    @horredtheplague I downloaded your files and droped in folder with program. I run my program:
    http://dl.dropbox.com/u/87796468/to_wed_fix.zip

    Write:
    ts1703_ietme.svg
    ts1703_original.wed

    I got this file:
    http://dl.dropbox.com/u/87796468/ts1703_original.wed

    Near Infinity run this .wed without warning, it seems good and this file have >4kB, so it isn't file 'ts1703_ietme_your-tools.wed' You are sure that you wrote in my_program first ts1703_ietme.svg and later ts1703_original.wed?

    @horredtheplague I have experience that if I mistake 1 letter(name input files) program will generate wrong wed. Video from this job!
    http://dl.dropbox.com/u/87796468/test.avi.zip

    The program 'from_wed.exe' doesn't recognize some names because it works automatical. The program 'to_wed.exe' use identical name as you write to choose correct files in directory, so you mustn't 'tried a good half-dozen variations name's files', you must only put correct name. :) Maybe this same program on my computer works diffrent than on your computer like BGEE :). Could you redo my steps from video?
    Post edited by viader on
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    Viader: You have it backwards. TS1703_original.wed was from a working custom area I made, TS1703.are. It had wallgroups, doors, fire vfx, triggers--everything you'd expect in a good area. There's no reason your tools would not make a good svg and a good wed from that svg, if it can do same with in-game areas.

    But I wanted to adjust the wallgroups in this file, so I generated an SVG file with "from_wed". "from_wed" did not recognize the name TS1703.wed when I ran it--gave me no SVG. I tried naming it RS1703.wed. No SVG file. A couple other names--didn't work.. Finally I name it AR1703.wed. "from_wed" recognizes the name and makes an SVG (AR1703.svg). That is exactly how it happened on my Win XP Home SP3 32-bit OS, tthree times now---I repeated the test again today.

    So, anyways I open Inkscape, open the SVG I just made, and adjust my wallgroup nodes. I save that file as TS1703_iteme.svg. I open "to_wed" and type TS1703_ietme.svg and TS1703_ietme_your-tools.wed. I then test this brand new WED file in DLTCEP and NI. Doesn't work, big error.

    The names of the files I sent to you were made right before I made a package for you. Whenever I used your tools, except for the naming problem with "from_wed" I noted, I always used a file with name TS1703. TS1703.svg was changed to TS1703.wed by your tool, and gave me the broken file renamed to TS1703_ietme_your-tools.wed. I didn't try such long clumbsy names in your tools nor in-game of course.

    It's not that much more difficult to post-edit wallgroups in DLTCEP, so I may have to just stick with that as the tool of choice. That was the one job I had hoped your program could handle--post-editting of nearly-finished area wallgroups.

    A test you can run w/o files from me:

    Try taking an in-game area, and converting its WED file to SVG. Say, AR0020 (a small interior).
    Convert AR0020.WED into AR0020.SVG.
    Then, open that AR0020.svg file in Inkscape. Just move the path nodes around a little bit on a few shapes, it's all I did in my area test. Save the edited file.
    Then, run your "to_wed" tool and convert the edited SVG file back into ar0020.wed.
    Then, try running the AR0020 area in-game, and also try opening the WED file in NI and in DLTCEP.
    I'm guessing your new AR0020.WED will be very small in size, will crash in-game and won't open in any editor.
  • viaderviader Member, Translator (NDA) Posts: 875
    edited March 2013
    TS1703_ietme_your-tools.wed this file is broken if you use broken .wed as module you get broken wed.

    @horredtheplague Ok, I did it. New AR0020.WED have 10kB and 103 walls, original .wed have 51 but this area have 1 doors - 2 doors poligon and my program save all poligons as walls - temporary bug. It isn't huge bug because enough delete 2 poligons in any BG editor. Near Infinity run it wed without errors/warnings.

    Video from your steps, I have hope.
    Post edited by viader on
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    @viader: Yes, that's the bug I'm talking about, exactly. I also noticed that doors were being converted to walls, but I guessed that doubling the polygons was a much bigger issue to tackle.
  • viaderviader Member, Translator (NDA) Posts: 875
    I will update video how to change some walls, without doubling the polygons.
  • viaderviader Member, Translator (NDA) Posts: 875
    @horredtheplague I think that enough cut poligons in NI but it doesn't work ;/ Doors are responsible for all bugs, I think that I mustn't change offset in each doors but I am not seeing alternatives ;/ I re-build program. It should work with new .wed now ;(
  • viaderviader Member, Translator (NDA) Posts: 875
    @horredtheplague next version program I have hope that last. I remove bugs with double poligons - add option to remove it, and with additional poligons from doors. Could you check it?
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    I tried the TS1703_ietme.svg file I sent you, and the tool blazed through its display and gave me a zero-byte wed file. Same results when repeated. (Yet I'm wondering why a zipped 0-byte file makes a 154kb attachment, ehe)
  • viaderviader Member, Translator (NDA) Posts: 875
    edited April 2013
    @horredtheplague Eh, based on wrong .wed we got a random file - I can add veryfication .wed.
    I tried generate .wed from TS1703.svg and ts1703.wed and everything works good. Did you work on this same files? Did you get any correct .wed?
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    @viader: Sorry, been swamped with work for a few days. If I can find the time this weekend (the week doesn't ever really "end" for me) I'll give it a fair testing.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    the file you included worked fine. But when I made a brand new area it gave me a zero-byte wed at the end. First I made new area in IETME, saved the files, and checked them in DLTCEP. The 3 walls I added were fine. I use from_wed to make an svg. I see 3 walls in Inkscape. Cool, so I move them around a bit. Save SVG. Then, use your latest to_wed to make identical name wed file. I look in the out folder, it is there but at zero bytes.
  • viaderviader Member, Translator (NDA) Posts: 875
    edited April 2013
    @horredtheplague I add verification files and few small fix.

    "Try taking an in-game area, and converting its WED file to SVG. Say, AR0020 (a small interior).
    Convert AR0020.WED into AR0020.SVG.
    Then, open that AR0020.svg file in Inkscape. Just move the path nodes around a little bit on a few shapes, it's all I did in my area test. Save the edited file.
    Then, run your "to_wed" tool and convert the edited SVG file back into ar0020.wed.
    Then, try running the AR0020 area in-game, and also try opening the WED file in NI and in DLTCEP.
    I'm guessing your new AR0020.WED will be very small in size, will crash in-game and won't open in any editor. "

    video
    https://dl.dropboxusercontent.com/u/87796468/to_wed.rar



    programs
    https://dl.dropboxusercontent.com/u/87796468/work.rar

    UPDATE: 26.04 7:42
    Next small fix - tileset door and boundinx box
    https://dl.dropboxusercontent.com/u/87796468/to_wed_1.1.zip
    Post edited by viader on
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    edited May 2013
    Sorry for the wait, been busy at the studio. This new version looks promising! So far I only tampered w/ AR0020 like in the test we described, but it yielded a clean WED file all said and done. I'll still have to try with doors and other overlays, like an interior e.g. but so far, so good! :)


    EDIT: Worked on a custom area too. I still had problems with from_wed. It won't make svg from wed unless I changed the name from ts1703 to ar1703. Minor quirk, but to_wed handles the TS1703 names for svg and wed both, just fine. Good idea you had, in using the original wed to extract the other overlay data.
    Post edited by horredtheplague on
  • viaderviader Member, Translator (NDA) Posts: 875
    edited May 2013
    @horredtheplague Nice to see you :) I don't know why name TS1703 doesn't work, but I will fix it. I'm working on simple GUI application now.

    Does you get clean wed without any poligons (should you check in any editor) or you go to this locations and poligons doesn't work? Ehh, I forgot to set wallgroups, so in game any poligons can't work... to fix it in v1.1 just open .wed in DLTCEP and save, but recently version shouldn't have this mistake.

    The current version (to_wed) - no tested (I check only one wed), but should be okay...
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    I never just took the wed straight from to_wed into the game and hit play. Always opened it in DLTCEP to check what happened during conversion (and usually hit save, just on instinct). Every time I first opened the area it 'reorders file to official standard'-- is this what you meant by DLTCEP making changes to the file? Is it adding the wallgroups flag(s)?

    Never saw the 'no wallgroups' bug because of my testing process, so I'm glad that you caught it. GUI sounds interesting--what do you have planned for it to do?
  • viaderviader Member, Translator (NDA) Posts: 875
    edited May 2013
    Yes, if something is bad, DLTCEP should fix it - it's useful. It's bad to preview changes - you can't see some things (if file is broken you see in DLTCEP a 'fix' version), the best editor to preview is Near Infinity.
    I'm going to group 4 conversions in one program, to-wed, from-wed, to-map, from-map for now. One window - 4 tabs and some buttons. I'm pretty sure that version from yesterday works without any problems.
Sign In or Register to comment.