Jump to content

Home

placeables.2da error


Xcom

Recommended Posts

I don't really know if that's an error but it took me some time to figure this out. :rolleyes:

 

Apparently, there is row number inconsistency/redundancy in this 2da file.

See image:

 

plcerror7ge.gif

 

 

The 2da still works though with this numbering. LOL.

 

For example, specifying 285 for appearance of the placeable will produce Barrel01, and not Deco_Item01. If you want Deco_Item, you'll need to add 10 to the index, so the actual rownumber becomes 295.

 

ps.. just for the record, this is not related to Kotor Tool's presentation of the file. This 2da was just saved this way. :giveup:

Link to comment
Share on other sites

Originally posted by Xcom

I don't really know if that's an error but it took me some time to figure this out. :rolleyes:

 

Apparently, there is row number inconsistency in this 2da file.

See image:

 

plcerror7ge.gif

 

 

The 2da still works though with this numbering. LOL.

 

For example, specifying 285 for appearance of the placeable will produce Barrel01, and not Deco_Item01. If you want Deco_Item, you'll need to add 10 to the index, so the actual rownumber becomes 295.

 

ps.. just for the record, this is not related to Kotor Tool's presentation of the file. This 2da was just saved this way. :giveup:

 

That looks like a copy&paste error to me. :)

 

Many 2DA files use line number rather than the row label for indexing, thus in those files it doesn't really matter what the row label says since the game never uses it.

 

Appearance.2da, spells.2da and baseitems.2da are other examples of such files, while for example visualeffects.2da use the row label for indexing and not line number.

 

Unfortunately the KotorTool 2da editor doesn't display line numbers so a bit of manual counting or guesswork is needed in files where the row label doesn't match the line number.

 

You can often recognize 2da files using line number indexing by the fact that they contain blank/****-padded or unused junk lines scattered throughout them, since those lines can't be removed without messing up the indexing for all the other entries.

Link to comment
Share on other sites

Originally posted by stoffe -mkb-

That looks like a copy&paste error to me. :)

 

Many 2DA files use line number rather than the row label for indexing, thus in those files it doesn't really matter what the row label says since the game never uses it.

 

Well is this case Xcom I think you could renumber the 2da if you feel like it.

Link to comment
Share on other sites

Originally posted by T7nowhere

Well is this case Xcom I think you could renumber the 2da if you feel like it.

 

I was working once on my own 2da merging tool, but I never got to actual merging. It's okay to view files though. I guess I'll just do what stoffe said: make it display actual array index (until Fred hopefully implements that into KT).

 

tda17iw.gif

Link to comment
Share on other sites

Originally posted by Xcom

I was working once on my own 2da merging tool, but I never got to actual merging. It's okay to view files though. I guess I'll just do what stoffe said: make it display actual array index (until Fred hopefully implements that into KT).

 

tda17iw.gif

 

The row labels are not actually part of the file and are not saved. I display them in the grid just for reference so you can see where the rows' indices are/will be.

 

After you delete or paste a row (or several), just right-click on the row header and choose "Renumber Row Labels".

Link to comment
Share on other sites

Originally posted by Fred Tetra

The row labels are not actually part of the file and are not saved. I display them in the grid just for reference so you can see where the rows' indices are/will be.

 

After you delete or paste a row (or several), just right-click on the row header and choose "Renumber Row Labels".

 

Perhaps obvious, but it is still worth mentioning though that you should never use the "Renumber Row Labels" feature with a 2da file that uses the data in the (Row Label) column for indexing, for example visualeffects.2da. If you do that the game will be unable to find the data and Bad Things will happen. :)

 

(For example, if you mess with the (Row Label) values in above mentioned visualeffects.2da all Force Power visual effects will disappear in-game since they start at index 1001.)

 

 

 

On the flipside, never delete a row in a 2da indexed by line number unless it's the last one, or the indexes of all rows coming after it will be messed up.

 

Also when editing line number indexed 2da's, don't use the "sort by column" feature (clicking on the column header) in KotorTools 2DA editor since the lines are apparently saved in the order they are displayed, which totally messes up the indexing.

 

EDIT: Slight clarifications :)

Link to comment
Share on other sites

Originally posted by Fred Tetra

The row labels are not actually part of the file and are not saved. I display them in the grid just for reference so you can see where the rows' indices are/will be.

 

I'm not sure I follow you here, Fred. :)

From what I can tell, row labels are very much part of the file, because they can technically be anything (not necessarily numbers). It's like a special column, only without header. For example, check plot.2da. And that's what KT's 2da editor is displaying in the (row label) column (otherwise, I wouldn't have noticed this whole thing in the first place; BTW, no copy-pasting was involvled, that's original file in the first screen).

 

However, I'm not sure this is the case in all KT versions because I don't have the latest one.

 

Originally posted by stoffe -mkb-

Also in line number indexed 2da's, never use the "sort by column" feature (clicking on the column header) in KotorTools 2DA editor since the lines are apparently saved in the order they are displayed, which totally messes up the indexing.

 

Personally, I think this is very useful feature. There is nothing wrong in using it UNLESS you're actually editing and planning to save the 2da. However, if you're just looking around, it's okay. :)

Link to comment
Share on other sites

Originally posted by stoffe -mkb-

Also when editing line number indexed 2da's, don't use the "sort by column" feature (clicking on the column header) in KotorTools 2DA editor since the lines are apparently saved in the order they are displayed, which totally messes up the indexing.

 

I have changed this so that the sort criteria is removed before saving so that the data is saved in its original order.

 

This change will be present in a future release.

Link to comment
Share on other sites

Originally posted by Xcom

I'm not sure I follow you here, Fred. :)

From what I can tell, row labels are very much part of the file, because they can technically be anything (not necessarily numbers). It's like a special column, only without header. For example, check plot.2da. And that's what KT's 2da editor is displaying in the (row label) column (otherwise, I wouldn't have noticed this whole thing in the first place; BTW, no copy-pasting was involvled, that's original file in the first screen).

 

However, I'm not sure this is the case in all KT versions because I don't have the latest one.

 

The 2DA editor was the first thing I wrote for Kotor Tool, and it has remained largely unrevisited in it's low-level features. While I took a large sampling of files for its initial tests, I never ran into any files that had other than numbers; that's why there's a "renumber" command. I've added an auto-renumber feature to the editor, but now I realize I want to make it switchable, as some files shouldn't be renumbered.

 

 

 

 

Personally, I think this is very useful feature. There is nothing wrong in using it UNLESS you're actually editing and planning to save the 2da. However, if you're just looking around, it's okay. :)

 

As I mentioned in a prior post, I have changed this so that the sort criteria is removed before saving so that the data is saved in its original order. This will prevent the corruption you've seen in prior releases.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...