Author Topic: How to create a simple Tileset Terrain with nwMAX?  (Read 835 times)

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #15 on: September 22, 2011, 01:14:32 am »


               

Raven_Xantrice wrote...

Too many questions '<img'>, with tileset it is more difficult to tryandtestanderrorandresolve than the other things I've tried: armor making, weapons... ... but I need all for my project^^
One question: Can I make more than 1 walkmesh in a tile? Have think about a bridge and I know you cannot walk on top and under the bridge.. will I let the chasm without any walkmesh under the bridge? Okay maybe dummie question! '<img'>


Only one walkmesh allowed per tile, but you CAN duplicate the tile, rename the duplicate to a variation _02 etc, and adjust the wok for that as you see fit.

That was how the Castle Drawbridges in Castle Rural was done.  Same tiles, renamed/duplicated, but the woks changed to allow either walking UNDER the gateway, or ABOVE the gate using the alternate tiles.
               
               

               
            

Legacy_Estelindis

  • Hero Member
  • *****
  • Posts: 935
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #16 on: September 22, 2011, 02:06:49 am »


               On that theme, personally I'm thinking of getting around the limitations on elven tree cities by making two versions of the same tileset: one with ground-level-walkmesh and the other with tree-platform-level-walkmesh.  (When I have time.  Which will probably be never.  But I think it's a good idea!)  Apart from the differences in walkmesh, the tilesets would be identical.  One would just area-transition between two different versions of the area whenever one wanted to go from lower city to upper city.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #17 on: September 22, 2011, 03:33:38 am »


               

Estelindis wrote...
One would just area-transition between two different versions of the area whenever one wanted to go from lower city to upper city.


Is there a tool that enables you to duplicate an area, but change the tileset?
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #18 on: September 22, 2011, 03:54:08 am »


               GFF editor allows changing of the tileset within the .are file, though I have to assume if any tile names are different between the sets it'd cause some problems doing that.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #19 on: September 22, 2011, 04:22:33 am »


               It could be accomplished via some sort of script-able program.  Essentially you pull the .are file, convert to xml, search/replace the tileset prefix with the new tileset prefix.

So, if your area is built with ttr01, and your exact duplicate tileset is named ttr02 but otherwise all tilenames are identical, you can do a search / replace.

OldMansBeard did things like this for CTP back in the day when he was working with us.  We used his knowledge and utils to generate exact tilename placeables for every tile in a given area, but the idea is basically the same.  Since you would be working with a .xml version of the .are file, a search/replace will work for the tilenames.  Then convert back from .xml to .are, and import the area.

I have some notes, and an open office macro that does a large part of the placeable naming bit.

REM (1) Use NWNExplorer to export the area files from the module into an empty folder
REM     or just load the module into the toolset and take them from modules\\temp0.
REM     You need the .are, .git and .gic files for each area.
REM (2) Using NWNEditor > GFF Data > Tools > GFF -> XML
REM     -- Navigate to the right folder for input and ouput
REM     -- Files *.*
REM     -- Flag Add Extension, Flag Change Extension xml (without the dot)
REM     -- Apply
REM (3) Edit WorkingDirectory$ below to be correct
REM (4) Compile and Run this macro
REM (5) Using NWNEditor > GFF Data > Tools > XML -> GFF
REM     -- Navigate to the right folder for input and ouput
REM     -- Files *.newgit
REM     -- Clear all the flags
REM     -- Apply
REM (6) Using nwhak start a new file and add resources
REM     -- Navigate to the right folder
REM     -- CTRL-Click and add all the .are, .gic and .GIT files (one for each area)
REM     -- but not the .git.original, .newgit or .xml files
REM     -- save As omb_<module name>.hak, attach to the module in the tileset


Anyway, I know it is possible, but someone would have to build the scripts/macros for you.

The tileset would HAVE to be an EXACT duplicate for this to work.  Meaning the only difference being the first 5 characters of the tile name.

IE:  ttr01_a01_01 would mean that ttr01 could be replaced with the new tileset prefix of ttr02 or whatever 5 character prefix you choose.

The macro I have only affects the GIT file, which is the placeable items in a given area, but it should be entirely possible to directly edit the .ARE which is the file that contains the individual tilenames, placement order, direction that those tiles were rotated to be etc...
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #20 on: September 22, 2011, 04:48:32 am »


               I have a text editor that use regular expressions in its find and replace function. Good to know that I can make use of it here. Thanks.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #21 on: September 22, 2011, 05:36:59 am »


               

henesua wrote...

I have a text editor that use regular expressions in its find and replace function. Good to know that I can make use of it here. Thanks.


Yes, you can, provided the following:

1) you export the area first.
2) Use NWNEditor > GFF Data > Tools > GFF -> XML on the exported .are files.
3) do your search replace.
4) Use NWNEditor > GFF Data > Tools > XML -> GFF to convert the xml back to .gff file type.
5) import the files back into the module.  

Some caveats:

Doing a search/replace on filenames can be VERY dangerous if the tilesets are not exact duplicates in layout.  IE tile ttr01_a01_01 is layed out the same as the replacement ttr02_a01_01.  

The engine stores the tile name, position, rotation and elevation positions in the .ARE file.  That data should match the tile being replaced.  IE if tile ttr02_a01_01 is rotated differently, you will get some really bad looking areas, and may crash, and totally screw up your module.

For what Estelindis wants to do, a fairly simple replacement of the woks, it shouldn't be that hard, provided that she is renaming the entire set to the new set name.

Anyway, YMMV as the saying goes.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #22 on: September 23, 2011, 09:49:33 pm »


               Ok, I just found out that the tool I mentioned in the above post "NwNEditor" is no longer found on the vault.  It has no listing anywhere that I can find.  I CAN find lots of posts related to this utility in serveral other game forums, like Star Wars Knights of the Republic, etc, but no valid links to the actual file.

I have a copy of the original but I have no place to host the file right now.  I also do not know who the original author/creator was, and I would hesitate to host such a file without at least attempting to figure out who created this.

Edit: Found author's name, but he/she has nothing live on Vault anymore, and no way to contact them.  "Dawuid" created this util, based off of some coding from Torlack.

I don't have source files, only what was originally released on the vault.
               
               

               


                     Modifié par Bannor Bloodfist, 23 septembre 2011 - 08:54 .
                     
                  


            

Legacy_Raven_Xantrice

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #23 on: September 23, 2011, 11:12:07 pm »


               I don't know this tool. '<img'>

www.lucasforums.com/showthread.php is that the same or near on it?

nwvault.ign.com/View.php should be work too?
               
               

               


                     Modifié par Raven_Xantrice, 23 septembre 2011 - 10:16 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #24 on: September 24, 2011, 01:04:17 am »


               

Raven_Xantrice wrote...

I don't know this tool. '<img'>

www.lucasforums.com/showthread.php is that the same or near on it?

nwvault.ign.com/View.php should be work too?


The GFF editor is not the same.  The other link is invalid so I don't know about whether it works or not.


Ok, finally that link worked, but NO, that file is nothing like the NwNEditor.exe.  NwNEditor has features set to choose by menu, how to handle/export files, it will take a GFF and convert to XML, and vice-versa, which allows you much greater control on the actual data in the GFF. 

By converting the gff to xml, you can then use XML/Search/replace tools etc.  It makes handling the internal GFF data much easier for some things.
               
               

               


                     Modifié par Bannor Bloodfist, 24 septembre 2011 - 03:12 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #25 on: September 24, 2011, 10:26:22 pm »


               Ok, I have created the first of 3 or so tutorials on this subject.  This first tutorial is how to create a working .set file, with a single flat terrain tile.  Creating A single flat tile.

The next tutorial will be a short, simple, tutorial on how to apply a texture to that ground plane.  I should have that finished by the end of the day today.

Finally, the 3rd tutorial will be about how you create a 2nd terrain, and the basic tiles needed to get the two terrains to work in game.  But that may take me a bit of time to create, so please be patient.
               
               

               
            

Legacy_Raven_Xantrice

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #26 on: September 25, 2011, 01:15:14 am »


               He thats cool Bannor Bloodfist! I will read this now! '<img'>
               
               

               
            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #27 on: September 25, 2011, 01:43:05 am »


               

henesua wrote...

Estelindis wrote...
One would just area-transition between two different versions of the area whenever one wanted to go from lower city to upper city.


Is there a tool that enables you to duplicate an area, but change the tileset?


i think you can safely do this with tileset duplicator, once you extracted the area file from the module
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #28 on: September 25, 2011, 02:00:19 am »


               The tileset duplicator will do just that, duplicate and rename the TILESET, it will not touch any .GFF files, nor allow you to edit/change the .ARE etc.  It also won't change woks etc.  All that that has to be accomplished with some other utils.  

Having a renamed set will not work in replacing a tileset in an area, you can't just switch it that way.  Too many details are stored in the .ARE file that contain the specific tile name, it's location in the area by row/column etc, and that specific tile's rotation.

Those changes CAN be made using the NwNEditor I mentioned.  By following the steps I mentioned.  Tileset Duplicator can NOT help with editing the .ARE but it MIGHT affect the converted .XML format of the .ARE.  First, you have to have a file that the duplicator can read.  

Just double checked the tileset duplicator, the only file types it handles are these:  SET;WOK;2DA;INI;MDL;ITP;DWK
               
               

               


                     Modifié par Bannor Bloodfist, 25 septembre 2011 - 01:04 .
                     
                  


            

Legacy_Raven_Xantrice

  • Full Member
  • ***
  • Posts: 151
  • Karma: +0/-0
How to create a simple Tileset Terrain with nwMAX?
« Reply #29 on: September 25, 2011, 02:04:57 am »


               WOW! Awesome tutorial Bannor Bloodfist! TSC don't run... don't know why but I can use SET-Editor instead! Thank you very much for the time you have spend in this! '<img'>