Author Topic: Changing Tileset in an old module.  (Read 835 times)

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Changing Tileset in an old module.
« on: September 13, 2010, 10:05:50 am »


               So here I am, going about my business, when sudenly a bunch of new updates to the tilesets created by Sixesthrice (I've heard that if you say his nick out loud three times, as "six_", he will appear through a mirror and gut you like a fish!) are uploaded to the Vault. As usual, his work is disgustingly amazing, causing me an epiphany and a stomachache at the same time.

So, I come to the final, ultimate and...uh... final, realization that none of my favorite modules of old, whose authors have long abandoned NWN (or even their mortal coils) will ever use such wonderful-yet-painful tilesets. I've waited long years for builders to actually work with these masterpieces, but there has been no joy. So, seeing as it will never happen, and the author doesn't seem interested in making overriding versions of his tilesets to spice the original Bioware models, I've decided to fix the modules, by myself, on my own, with no one but me.

So, the question: Is it possible to "exchange" a given tileset for another, without losing any other elements in an area, like placeables, creatures, triggers, etc. or is it strictly necessary to build each area anew, from scratch? I'm thinking this is an idea so absurd and far-fetched Tarantino could make a movie out of it... but I thought it best to ask those who know their way in the modding harsh lands.

Thanks in advance!  ':mellow:'
               
               

               
            

Legacy_Eradrain

  • Sr. Member
  • ****
  • Posts: 365
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #1 on: September 13, 2010, 10:24:36 am »


               Nope, not possible at all.

You'd have to rebuild everything from scratch, which means essentially remaking the modules from scratch.

And if you're gonna do that, why not make your own, instead?
               
               

               


                     Modifié par Eradrain, 13 septembre 2010 - 09:30 .
                     
                  


            

Legacy_Inayity

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #2 on: September 13, 2010, 04:07:14 pm »


               The only way I think you might be able to actually pull this off (and this is still a hypothetical) is if the tileset you wanted to convert to was a reskin or based off of the tileset you wanted to convert from.  Why?  Because this method would rely on the Tile_ID in the .SET files for each of the tilesets to have similarly-designed tiles.  So, something like a Rural -> Rural Winter conversion.

In a case like that, you might be able to use a GFF editor to edit the Tag, Name, ResRef and Tileset fields in the .ARE file so they reflect the new tileset.  I'm not sure if you'd have to do any more than that, at least in something like a Rural -> Rural Winter conversion.  There's a good chance even the "easiest" type of conversion like this would have other complexities which could cause it to spiral out of control, time-wise.

Purely hypothetical, though.
               
               

               


                     Modifié par Inayity, 13 septembre 2010 - 03:32 .
                     
                  


            

Legacy_Invisig0th

  • Sr. Member
  • ****
  • Posts: 279
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #3 on: September 13, 2010, 04:11:02 pm »


               Six does have a few reskins of previous tilesets, but I seriously doubt those are the tilesets we are talking about here. If we are indeed talking about his all-new tilesets, then the short answer is no, you can't easily replace the tileset in existing modules with one of those. It would take a lot of work to do so.
               
               

               


                     Modifié par Invisig0th, 13 septembre 2010 - 03:16 .
                     
                  


            

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #4 on: September 13, 2010, 06:55:15 pm »


               I recently re-did a number of maps from the old Rural Tileset to Worm's Seasonal Forest.  The process went like this: Create new area in the new tileset, customize it so it is a copy of the old area as much as possible (roads, streams, hills etc).  Next, select groups of moveables (placeables, triggers, sounds, creatures etc) from the old map and copy them.  Open the new map, paste, and adjust each element as needed.  It's a bit involved, but it's quicker than creating a new area from scratch.
               
               

               
            

Legacy_Invisig0th

  • Sr. Member
  • ****
  • Posts: 279
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #5 on: September 13, 2010, 07:07:08 pm »


               That's pretty much how I would do it. You would also want to ensure that your new area uses all the same scripts for the area events, and has all the same variables set. Finally, after everything else is done, it's probably a good idea to ensure that the new area has the same resref, tag and name as the old area. That will require a little juggling (carefully copying and deleting areas), but it's the only way to know for sure that your new area will work 100% properly.

It does take a lot of work to make sure everything is correct, but this kind of thing can indeed be done if you are very careful. And as long as you keep a backup of the original module, you should be able to go back to it and find anything you might have missed.
               
               

               


                     Modifié par Invisig0th, 13 septembre 2010 - 06:09 .
                     
                  


            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #6 on: September 13, 2010, 08:07:12 pm »


               It's also worth pointing out that using Bubba McThudd's method all placeables not placed at ground height on the walkmesh will be move there when copy/pasting. So anything set on a table or raised up a wall, for instance, will be dropped onto the floor and need repositioning.
               
               

               
            

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #7 on: September 13, 2010, 08:44:19 pm »


               Another thing - when transferring triggers from a very flat tileset (like Rural) to a tileset with lots of relief (like Worms Seasonal Forest), you will want to "reshape polygon" each of them to fit the terrain.
               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #8 on: September 13, 2010, 11:03:38 pm »


               Oh, well!... I thought as much, but it doesn't hurt to ask, right?



So, maaaaybe I will put that on hold... indefinetely.



Thanks everyone; once again, your aid has been most useful.



You know, I'm still amazed there's such a helpful community of modders and builders for NWN. It is truly inspiring... and humbling... and out-right depressing, seeing as I doubt I'll ever be knowledgeable enough to be a part of it.



Anyway, cheers!
               
               

               
            

Legacy_Calvinthesneak

  • Hero Member
  • *****
  • Posts: 1159
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #9 on: September 14, 2010, 09:03:23 am »


               If you're here asking questions, you're already a part of it.  Knowledge level doesn't matter so long as you're willing to share, and learn.
               
               

               
            

Legacy_Eradrain

  • Sr. Member
  • ****
  • Posts: 365
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #10 on: September 14, 2010, 10:09:52 am »


               

Calvinthesneak wrote...

If you're here asking questions, you're already a part of it.  Knowledge level doesn't matter so long as you're willing to share, and learn.


This.

People thinking they aren't able to learn this stuff, or otherwise do it, is the greatest threat to the continued growth of the modding community.

Each and every single one of us started out knowing absolutely nothing.  For example -  _Six, who is making some of the loveliest tilesets on the vault right now, didn't know very much/anything about 3D Modeling before 2007 (5 years after NWN had first come out), at least based on the fact that he hadn't yet submitted anything to the vault (Don't yell at me if I'm wrong, Six).  His earliest submissions, in partnership with the late, departed S030363L, were just retextures of the default NWN City with patch 1.69 textures and a few basic polygon buildings that were little more than rectangles and pyramids.  Now look at him, he's making professional-quality material that looks better than some premium/for-pay work, and he's still improving, all the time!  I shudder to imagine the kinds of mind-exploding stuff he'll be making a year from now.  Perhaps I'll need special goggles to enable my feeble, mortal mind to fully comprehend it.

I didn't know anything about custom content until that same year, and I've only considerably expanded my own knowledge in 2010.  My very first attempt at modeling anything, ever, was in 2009.

Every one of us starts out clueless and helpless.  My first experience with custom content was seeing that all the existing city tilesets disappointed me, and deciding that I could do better.  I knew nothing at all about anything except how to use photoshop decently well, and I didn't know the community at the time so I had no one to ask for help.  I downloaded a tutorial, and just got to work, and it was an immensely eye-opening experience.

The biggest, bravest step, and the one the community will most thank you for, is just trying to learn.  No one will ever say, "This stuff sucks, you should just GIVE UP" (Unless you start trashing other people's work and tarnishing the overall atmosphere of helpfulness and support, anyway).

There isn't a single person here who doesn't want to see more CC authors making more stuff for the community, and we'll all happily help you to learn how.  Project Q has an IRC channel where pros like Morikhan will happily take questions.  Some folks are working on tutorials.  _Six has mentioned in the CC Challenge thread that he's happy to talk to anyone and help them get started on stuff.  There is a Custom Content Guide available on the vault.  Ben Harrison, the author of the sticky thread at the top of the forum, is probably the most helpful person I've ever met in my life and always answers anyone's questions.

There's no reason you can't learn this stuff, give it a try.
               
               

               


                     Modifié par Eradrain, 14 septembre 2010 - 09:35 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #11 on: September 14, 2010, 11:11:55 am »


               Technically, it CAN be accomplished, it is just a really major task.

You first have to export all the areas into a .erf

extract 3 files from the erf using erf.exe or nwhak.exe, that is, 3 files per area.  They will be named according to area name in toolset.

One of those files will end in .git (this is the items file)
2nd file will end in .gic (creatures / npcs)
3rd is the .are (which is the physical layout of the area).

ALL 3 are in a binary format on export to the .erf, so they must be converted to human editable form, say .xml. and this is where it begins to get really difficult though.  Now, you have to convert the 3 files into xml format, then do search/replace on tilenames in those 3 files.

ALL 3 files will have references to the actual tile in a specific area, so you have to do a search/replace on those.  

Now convert back to the binary format from the xml, and then replace the files in the original erf with the new ones...

It CAN be done.  I may not be remembering all the steps here though, and I can tell you from personal experience, that it is just not worth the effort.  It ends up being more time consuming than just re-creating the area from scratch using the new tileset.

you would have to search for and replace all tilename references to the new tilenames used in your new/replacement tileset.  (Best way to get those, is to rebuild your old area, minus all placeables and doors etc, just the area, in exactly same format.  Then export that one too and convert the .are file to xml so you can read it.

Anyway, it CAN be done, it just truly is not worth the effort, and as others have mentioned, if the tilesets are not specifically flat, then your positions on all the placeables / doors / creatures etc, will have to be adjusted.

I think that re-importing the are file also locks the area, so it can no longer be edited, but I am not 100% positive on that, as I have not done this for about 4 years.

I have some scripts that I use to do most of the work for me to help CTP build our test areas, these scripts are run from within open office, and I think they may require some prolog to complete correctly.  They also do NOT change tilenames, they were designed by OMB to help us generate tilename placeables on every single tile in an area that allows us to auto-generate test modules for our tilesets... well, semi-auto, a large amount of human interaction is still required.

Best bet would just be to put your energy into re-creating the area with a new tileset.  Besides, that would also allow you to modify the area somewhat, as most of us end up with things that we might have wanted slightly different if we had thought about it before we 'completed' the area.
               
               

               


                     Modifié par Bannor Bloodfist, 14 septembre 2010 - 10:12 .
                     
                  


            

Legacy_AndarianTD

  • Hero Member
  • *****
  • Posts: 725
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #12 on: September 14, 2010, 01:57:40 pm »


               It may be that I approach area building a little differently from others, but I wouldn't even consider this unless the new tileset was designed specifically as a drop-in replacement for the old one.

I've just finished doing exactly that in preparing an update to the Sanctum modules to use NWNCQ. And even in that case I had to go through each area, review the result to see if it still works, and make a number of adjustments. To give one example: I had to move and in some cases re-work placeables in some areas that use the "Ruins" tileset because of the addition of random ferns to it in NWNCQ. These can't be completely eliminated even with variations, and they were causing some objects that the player has to interact with to become unreachable.

If you take building areas with artistic seriousness, then I don't think you can separate the product from the tools -- that is, how you make the area from the actual palette of resources you have to work with when you make it. I would build an area in a very different way, for example, if I were working with the NWN Rural Tileset on the one hand, and Six's Wildlands on the other. So the idea of trying to make "the same area with a different tileset" seems a bit contradictory to me. If I were going to try what the OP suggests, I would just create a new take on the area from scratch using the new tileset.
               
               

               


                     Modifié par AndarianTD, 14 septembre 2010 - 03:23 .
                     
                  


            

Legacy_Inayity

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #13 on: September 14, 2010, 04:49:12 pm »


               As a footnote to something Bannor mentioned, about converting the GFF files to XML and back again.  That conversion can be accomplished by using one of PSpeed's tools called ModPacker.  You can download that tool from this page.  Between PSpeed's Modpacker, Tero Kivinen's tools or Dragonsong/Ben Harrison's Leto there is not much you can't get at/modify when it comes to GFF files or NWN files in general.
               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Changing Tileset in an old module.
« Reply #14 on: October 01, 2010, 05:49:43 am »


               Oh my god!! So many posts since last I checked!... This is great! Thanks, everyone! Now, it seems I have much to try out, and it comes at a very good moment, for I was just considering changing a TTR area into a TNO one...