using artviewer to change art files

Discussion in 'Modding and Scripting Support' started by theorel, May 19, 2008.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    Hey everybody.
    So, I decided to start working on some new art for Arcanum, specifically I wanted a Hobbit Hole, with the correct perspective that would work like a regular building. Anyways, I'm pretty well under way although it's not the best quality. However I learned quite a lot about editing art files, and for those not afraid to get a little dirty, it's really not so bad. So I thought I would post a little tutorial. Anyways, it might take me a little while to get it all up on here, but let's start with the things you'll need:
    A hex editor, I used XVI32, as the first hex editor that came up on a google search.
    Artview by Blacky v0.4.a I got this from a forum post...I'll put a link here or something if I can find it again.
    Something with which to edit bitmaps, which allows you to save them in indexed color mode(you'll need this to make any art files for Arcanum) I used GIMP.
    One nice thing about all of these programs? they're free :)
    So, I'll give a brief rundown in the next post, and then I'll do a step-by-step tutorial probably starting tomorrow, I'll detail exactly how to create your own building, assuming you don't want to do anything too crazy.
    NOTE: you can actually use this to create anything, even properly sized schematics, opening chests, beds with people sleeping in them, really: anything.
     
  2. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    Okay, here's the brief rundown of what to do.
    Make a copy of whatever art file type you might like to create. Make sure it's big enough to be what you want.(in terms of image height and width).
    Open this file in artview, and click save for each piece of the art file(or save all).
    Now using your bmp editing software create your bmps that will be replacing these pictures. Make sure your images are smaller than(or equal in size to) the ones you're replacing.
    Make sure that anything you want to be clear is that pretty color of blue in the background of most of these images.(or whatever color is in the background of the image you're replacing, black, red, white, etc.)
    change your image to indexed color mode, then put the background color first, pay attention/find to its hex code(for the blue it's 0000ff or 1b00ff usually), you can do this in GIMP by going to Colors->Map->Rearrange color map(to put it first), then Dialogs->Colormap to find the code.
    Okay now start up XVI32 twice(it may be possible to do this in a single window of it, I've not tried). In one window open the art file that you'll be replacing in the other open up the bitmap.
    Make your bmps the same size as the ones you saved before if they aren't already.
    Do a search for the color code, in reverse, by pairs.(maybe you can do it in proper order if you do the correct big-endian little-endian thing, I can't get it to work though). What I mean is search for ff0000 or ff001b.
    Do this in both files.(for bmp it should be around 33, for art around
    77). Now in XVI do block <n> chars(under edit) for 1024 characters(the size of the colormap(256*4)). in the bmp file hit edit->clipboard->copy, in the art do delete and then clipboard-paste.
    Now reopen your copy of the art file that you'll be replacing images of, the one that you just changed the palette for. Unless the palette is freakishly similar, the images should have the same shape and general idea, but be in some crazy whacked-out colors. Now hit the load bmp button and load in your new images. Finally click save art, and save it in the appropriate place. Now link to it with the appropriate mes file, and all should be great.
     
  3. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    You have my complete attention.
     
  4. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    I can address questions more or less whenever, but I'm going to take my time with the step-by-step. So if somebody tries this and is having difficulty I'm happy to answer questions.
     
  5. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    If you didn't already do this for schematics, I just tried it out, and it does indeed work.
     
  6. DarkFool

    DarkFool Nemesis of the Ancients

    Messages:
    4,006
    Likes Received:
    5
    Joined:
    Jan 28, 2005
    I commend you. You just turned one of the most impossible portions of modding this game into something actually feasible.
     
  7. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    theorel, you are a fuckin' genius. I knew from blacky's artview that there was some kind of particular significance to the header type stuff at the beginning of art files, but i haven't looked into it. I'm glad other people are still trying to figure out the nuts and bolts of this.

    For my experience, there is a lot of important data held somewhere in that header or wherever, and it needs playing around with hex editors to figure it out. I think the hps of a scenery object, the blocking tile, and other things might also be contained there. Some people have done serious work in the animation frames as well (Tekkus McDwarf) but I haven't seen an exposition on this.

    I have my own way of doing art, although I haven't done too much yet, mostly fixing art that's already been made. most of my problems have come from how long it took me to save things in photoshop cs2 as indexed, which i didn't figure out how to do right until a few nights ago. artview can allow you to save art with the same dimensions, blocking tiles, etc. as existing art, but the image format has to be perfect.

    EDIT: I'd also like to suggest using art2bmp to check your .art files.
     
Our Host!