Author Topic: My First Tileset  (Read 4191 times)

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
My First Tileset
« Reply #90 on: December 24, 2010, 06:36:28 am »


               

Renzatic wrote...
 Now from here on out, most of the work required getting my tiles ingame revolves around editing text files, right?


Not only text files.  Yes, the .set file is text and if needed .2da files are text.  However, the other necessary tileset file, xxxxxpalstd file is an .itp file which is GFF (Generic File Format) based.  A binary file format.  There are tools which allow you to easily edit these files, so it won't be too much trouble.  Just learning how to use a new tool ':blink:'.

'Posted
  MDA
               
               

               
            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #91 on: December 24, 2010, 07:10:00 am »


               

Michael DarkAngel wrote...

...allow you to easily edit these files, so it won't be too much trouble.  Just learning how to use a new tool ':blink:'.


Hey, from what I've already slogged through, a couple new tools shouldn't be any problem. '<img'>

And speaking of slogging, I've come upon a little problem here. Out of my four tiles, 2 of them fail the sanity check with this error:

Sanity Check done threw a monkey wrench my way with this...

Checking node tcsw_d04_01
Checking node ignore_NGon01
Checking node tcsw_d04_01ml1
Checking node tcsw_d04_01ml2
Checking node Depot_Tile_4
Checking node D_Walkmesh_4
Bad Edge: 150 Vert pair: [-500.025,0,759.795],[-500.025,-250,759.795]

Bad Edge: 151 Vert pair: [-500.025,65.5,759.795],[-500.025,0,759.795]

Bad Edge: 159 Vert pair: [-500.025,65.5,537.75],[-500.025,65.5,759.795]

Bad Edge: 165 Vert pair: [-500.025,65.5,111.25],[-500.025,65.5,537.75]

Bad Edge: 171 Vert pair: [-500.025,83.5,0],[-500.025,65.5,111.25]

Bad Edge: 177 Vert pair: [-500.025,250,0],[-500.025,83.5,0]

Bad Edge: 178 Vert pair: [-250,500,0],[-500.025,500,0]

Bad Edge: 183 Vert pair: [-500.025,500,0],[-500.025,250,0]

Bad Edge: 195 Vert pair: [-500.025,-500,759.75],[-250,-500,557.563]

Bad Edge: 196 Vert pair: [-500.025,-250,759.795],[-500.025,-500,759.75]


I can't exactly see what it's telling me here, but on a semi-educated guess, I figured it might be the 2cm vert issue I've been warned about. I go back into Modo, check for any unwelded verts, and do a distance weld for any within that range. It did catch a few, and I figured that'd be it...but...it wasn't. It gave me the same error.

With that exhaused, I'm drawing a blank. From the coordinates, it looks like whatever the issue is lies somewhere near the center of the tile, but everything looks pretty good there from what I'm seeing.

Any idea what's going on here?
               
               

               
            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
My First Tileset
« Reply #92 on: December 24, 2010, 07:27:31 am »


               

Renzatic wrote...
And speaking of slogging, I've come upon a little problem here. Out of my four tiles, 2 of them fail the sanity check with this error:

Sanity Check done threw a monkey wrench my way with this...

Checking node tcsw_d04_01
Checking node ignore_NGon01
Checking node tcsw_d04_01ml1
Checking node tcsw_d04_01ml2
Checking node Depot_Tile_4
Checking node D_Walkmesh_4
Bad Edge: 150 Vert pair: [-500.025,0,759.795],[-500.025,-250,759.795]

Bad Edge: 151 Vert pair: [-500.025,65.5,759.795],[-500.025,0,759.795]

Bad Edge: 159 Vert pair: [-500.025,65.5,537.75],[-500.025,65.5,759.795]

Bad Edge: 165 Vert pair: [-500.025,65.5,111.25],[-500.025,65.5,537.75]

Bad Edge: 171 Vert pair: [-500.025,83.5,0],[-500.025,65.5,111.25]

Bad Edge: 177 Vert pair: [-500.025,250,0],[-500.025,83.5,0]

Bad Edge: 178 Vert pair: [-250,500,0],[-500.025,500,0]

Bad Edge: 183 Vert pair: [-500.025,500,0],[-500.025,250,0]

Bad Edge: 195 Vert pair: [-500.025,-500,759.75],[-250,-500,557.563]

Bad Edge: 196 Vert pair: [-500.025,-250,759.795],[-500.025,-500,759.75]

Any idea what's going on here?


That would be the "Weld to Nearest cm" check.  Which, the name is slightly mis-leading.  It really doesn't have anything to do with welding.  But it does check to make sure all of an objects verts are positioned to the nearest full cm (ex. Bad Edge: 196 Vert pair: [-500.025,-250,759.795],[-500.025,-500,759.75] the verts should be positioned at Vert pair: [-500,-250,759],[-500,-500,759])

'Posted
  MDA

More on this later...
               
               

               
            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #93 on: December 24, 2010, 07:51:37 am »


               Hmm. This doesn't sound like something that'd be easy to fix. I'd have to track down each one of these verts, and move them by fractions of a millimeter.

It did give me the option to ignore the error while I was exporting. Is this something I can do? If I can't, I guess I'll have to set each plane of verts to absolute coordinates. It'd almost be quicker (and a helluva lot less messy) just to redo the mesh, if that's the case.

edit: actually, it'd be fairly easy to fix if I had a way to track down each individual vertex point. It gives me a number, so there has to be a way to find it.
               
               

               


                     Modifié par Renzatic, 24 décembre 2010 - 08:03 .
                     
                  


            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
My First Tileset
« Reply #94 on: December 24, 2010, 08:26:33 am »


               

Renzatic wrote...

Hmm. This doesn't sound like something that'd be easy to fix. I'd have to track down each one of these verts, and move them by fractions of a millimeter.

It did give me the option to ignore the error while I was exporting. Is this something I can do? If I can't, I guess I'll have to set each plane of verts to absolute coordinates. It'd almost be quicker (and a helluva lot less messy) just to redo the mesh, if that's the case.

edit: actually, it'd be fairly easy to fix if I had a way to track down each individual vertex point. It gives me a number, so there has to be a way to find it.


There is a button in the "Plus" rollout -->> "Clean Model" with check boxes above it.  At the moment it is kind of broken (as in "Does not work as intended").  However, there is a work-around to make it do what you need.

Turn off shadows for ALL meshes (under the "MDL Trimesh Parameters" of the AuroraTrimesh modifier make sure the "Shadow" option is unchecked).  Uncheck all options under the "Clean Model" group of the "Plus" rollout except "Desparkle".  Select the modelbase of the tile you wish to fix.  Press the "Clean Model" button and it should round all your verts to the nearest cm.  Don't forget to turn shadows back on as necessary.  And check your edge verts on your walkmeshes to make sure they were rounded properly.

'Posted
  MDA

Sorry for the short posts previously, but they were breaks between xmas wrapping and the wifey was keeping me on a short leash.  Now its time for sleep '-_-'
               
               

               
            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #95 on: December 24, 2010, 09:16:07 am »


               Thank God, that did it. Every single one of these evil damn tiles are now exported with walkmeshes.



MDA, I greatly appreciate you waiting up on me. Go to bed knowing you, once again, saved a little bit of my sanity. '<img'>
               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
My First Tileset
« Reply #96 on: December 24, 2010, 10:44:27 am »


               Just a side note, you can also bring up text input for position, rotation and scaling in Max by right clicking on the position, rotation and scaling buttons on the taskbar respectively.
               
               

               
            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #97 on: December 25, 2010, 03:31:28 am »


               

_six wrote...

Just a side note, you can also bring up text input for position, rotation and scaling in Max by right clicking on the position, rotation and scaling buttons on the taskbar respectively.


What I really need to do is read a basic Max tutorial. It looks like I'm gonna be spending a goodly amount of time in it, so I might as well learn to use it for a bit more than setting up scenes.

So here I am. At the last little bit. I'm following Mr. X's tile tutorial Zwerkules linked me to about a week ago. So far, it's all pretty straightfoward stuff. I'm adding the depot into the default NWN forest tileset, so I named the set to ttf01.set into the override folder, guessing that it'll add the extra entries to the default one inside NWN. The entries themselves look something like this...

[TILE168]Model                              =   tcsw_d01_01Walkmesh                      =   msb01TopLeft                            =   ForestTopLeftHeight              =   0TopRight                          =   ForestTopRightHeight            =   0BottomLeft                    =   ForestBottomLeftHeight      =   0BottomRight                 =   ForestBottomRightHeight   =   0Top                                      =Right                                   =Bottom                              =Left                                      =MainLight1                       =   1MainLight2                       =   1SourceLight1                   =   1SourceLight2                   =   1AnimLoop1                       =   1AnimLoop2                       =   1AnimLoop3                       =   1Doors                                   =   0Sounds                                =   0PathNode                          =   AOrientation                       =   0ImageMap2D                   =


(okay, the forum must've had an embolism or threw up or something. I'll post a picture instead).

'Posted

...and the rest follow suit, going up to 169, 170, ect. I added the group in as...

[group28]Name=DepotRows=2Columns=2Tile0=168Tile1=169Tile3=170Tile4=171


(pretend this is in decending order)

Pretty easy so far. Next up, I extracted the .itp file, and opened it with ITP Tools. This is where I start getting vague. The tutorial only has instructions for adding one tile, whereas I've got 4 tiles in my little group. It says to leave the element ID blank, but to put in 2 for Number of Element Data Items. I'm thinking this is to correspond for his tile and walkmesh. So this mean I put in 8 there? I'll try it out, but I'd like to know exactly what I'm doing here for future posterity and all that.
               
               

               


                     Modifié par Renzatic, 25 décembre 2010 - 03:41 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
My First Tileset
« Reply #98 on: December 25, 2010, 03:40:55 am »


               

Pretty easy so far. Next up, I extracted the .itp file, and
opened it with ITP Tools. This is where I start getting vague. The
tutorial only has instructions for adding one tile, whereas I've got 4
tiles in my little group. It says to leave the element ID blank, but to
put in 2 for Number of Element Data Items. I'm thinking this is to
correspond for his tile and walkmesh. So this mean I put in 8 there?
I'll try it out, but I'd like to know exactly what I'm doing here for
future posterity and all that.



Nope, wrong, entirely.


You only add one tile into the itp, and you add it to the specific set of groups/features already in that itp.

Typically, for Bioware standard type tilesets (The new castle rural does NOT count but the forest should) you have 3 main entries.

1st one is for 'features' these are single tile features, that show up in toolset in the features sections.

2nd one is for 'groups' and these also only have a SINGLE entry for each group, regardless of the size of the group.

3rd one is for entire new terrains, or crossers.

Each entry in the actual sub-list for groups, has several lines... Each main line should be numbered, and anything you add to the list should be added to the bottom of the list as a new number..   This is where that bit about adding two for the number of data elements comes from.

Each of those entries has 2 sub entries as well.  One is either a Name or a Strref (Name if you enter your own name, a strref that points to the tlk file if you wish to use the tlk table.)
he second line is the RESREF, Cresref, which is the actual tile mdl name.  In your group case, this would be the mdl of the first tile in your group.


Note:  I use this TlkEdit by EwaldTheUnimaginative, as it will edit any of the gff files, and it is soooo much easier to use.
               
               

               


                     Modifié par Bannor Bloodfist, 25 décembre 2010 - 03:50 .
                     
                  


            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #99 on: December 25, 2010, 04:44:31 am »


               

Bannor Bloodfist wrote...

Note:  I use this TlkEdit by EwaldTheUnimaginative, as it will edit any of the gff files, and it is soooo much easier to use.


Looks like something I'd like to use, but Java isn't cooperating with me at the moment. Since the latest update, I've had garbled text in random java applications. Some work fine, and some don't. TLKEdit looks like it doesn't, and as far as I know, there's no way to easily fix it. I guess I'm stuck with IPTTool for now. : \\\\

Okay, so taking what you said into account, and checking out the folders inside of ITPTool (wish I had another choice here), it looks like the second folder is for groups. The first, according to the tutorial, is for individual tiles, and the 3rd looks like features (opening up element=0/List List gives me a bunch of names such as cliff, stream, road, instead of generic tile names). Going by what you said and the tutorial, my entry should look something like...

'Posted

It looks somewhat flipped upside down compared to the rest. My tile entry is on the bottom, and the top is the name. Dunno if that makes a difference, but it shouldn't be too hard to fix if it does cause problems.

I'm still kinda vague on it, though. The way it looks, UINT32 STRREF = ##### points towards a specific name buried in some table, whereas mine adds the name in regular text. RESREF RESREF points towards the file itself, and adds it to the editor, which then leads to the .set file, and assembles the group from there to put ingame. Sound about right?

edit: I poked around in it a little more, and it doesn't look like the .itp file has entries for every single tile, just the basic archetype. Like say the forest has 50 different cliffs. It only has one cliff entry. So that means all my variations are linked together somehow in the .set file, and the .itp is just there to get the entry "cliff" into the features box.

Man, this crap's harder than calculus. '<img'>
               
               

               


                     Modifié par Renzatic, 25 décembre 2010 - 04:51 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
My First Tileset
« Reply #100 on: December 25, 2010, 04:56:01 am »


               Yep, that sounds pretty close.



I would recommend adjusting the position of the string name to be aboe the resref resref line though, as I think it may make a difference... I seem to remember having issues with that in the past, but I always, ALWAYS copy an existing element (and all of it's sub-stettings) and just apply that to the end of the element list.  This saves issues with placement...



Then again, I am using a different tool and it allows me to copy/paste between files, or within a specific file.  \\



The unit32 STRREF points to a line number in the .tlk table file.  The .tlk file, found in your nwn\\tlk sub-folder is also a 2da file, that you can open and view.  Typically, I can have that open and the specific itp file at the same time in the tool I linked you to, which is why I use it.  Anyway, using the tlk table is NOT required, and is only useful if you can find specific entries that match what you want in text.  Since you are using the NAME option, you don't have to worry about trying to find a matching entry in the .tlk table file.
               
               

               
            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #101 on: December 25, 2010, 05:10:30 am »


               

Bannor Bloodfist wrote...

Yep, that sounds pretty close.

I would recommend adjusting the position of the string name to be aboe the resref resref line though, as I think it may make a difference...


Probably the issue I'm running into now. I've got the depot under the group folder in the editor, but when I go to place it, it just gives me an empty red square, instead of the 2x2 grid showing my tiles.

Let me change it, and see what it does. Be right back.

edit: Nope. Still a red square. I'll check the set file and see if anything's weird there.

edit 2: And yet still no go. I noticed in the .set file that Bioware set it so that the groups go top left, top right, bottom left, bottom right. I tried doing the same by setting _d03 as the tile in the .itp file, then went in and rearraged them under [groups]. Red tile.

I'm now officially stumped as to what to do next.
               
               

               


                     Modifié par Renzatic, 25 décembre 2010 - 05:37 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
My First Tileset
« Reply #102 on: December 25, 2010, 05:54:26 am »


               First, double check that #1 the total tile count is correct, there is a line, directly before the very first tile in the set that gives the total tile count, remember to add 1 to the last number of the tile in the set.  Then, do the same thing in the Groups section, there is a line there with total group count, that number has to be 1 higher than the last entry in the set.

If fixing that does not correct the issue, then you might have to take your group entry, and simply reverse the order of all the tiles. 1 becomes 4, 2 becomes 3, 3 becomes 2, and 4 becomes 1.  

Usually, it is one of those two types of errors.


Edit:  Ohhh, one other thing, earlier on, you were mentioning adding cliff tiles to this group?  Or defining the surrounding tiles to be cliffs?  If you did that, change it so that they are all forest instead.

IE top left = forest, top right = forest, bottom left = forest, bottom righ = forest for ALL 4 Tiles in this gorup.
               
               

               


                     Modifié par Bannor Bloodfist, 25 décembre 2010 - 05:57 .
                     
                  


            

Legacy_Renzatic

  • Full Member
  • ***
  • Posts: 114
  • Karma: +0/-0
My First Tileset
« Reply #103 on: December 25, 2010, 06:11:40 am »


               I changed the group count, but not the tile. I went in, changed, that, and still no go. I reversed the order of the tiles, didn't work. Tried setting them up the way they're done in by Bioware, like 3,4,1,2. Nothing.

If anyone's willing, I could upload everything I have in override and let someone more knowledgeable check it out. Cuz whatever it is I'm missing, it's gotta be something subtle. I've gone over my set and itp files with a fine toothed comb.

edit: cliffs aren't in there yet. Right now, I'm just focusing on the 4 depot tiles.
               
               

               


                     Modifié par Renzatic, 25 décembre 2010 - 06:12 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
My First Tileset
« Reply #104 on: December 25, 2010, 06:46:56 am »


               Well, I would be glad to take a look at it if you wish, but I won't be able to answer any other questions about it tonight.  It's almost 2am on Xmas morning and I have some stuff to get out of hiding and wrapped to put under the tree...

You could email it to me "bannor9 at g m a i l . c o m"  No spaces of course, and the correct @ symbol where appropriate.
               
               

               


                     Modifié par Bannor Bloodfist, 25 décembre 2010 - 06:48 .