Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Utility for 2DA converting(Text<->V2.b) and merging

Page: 1 of 1
 stoffe
09-29-2005, 6:33 PM
#1
Last version: Click (http://www.starwarsknights.com/tools.php#gmt)

In case someone else would find it useful I have uploaded a modified version of my small 2DA converter utility which now contains a new 2DA file merging function.

It will take two 2DA files (of the same kind) and merge changes they contain and save the combined result as a new 2DA file. It will currently detect changes to existing lines as well as new lines and columns that have been added. It will not handle files where standard lines have been deleted (since the 2DA spec. strongly discourages deleting rows in a 2DA anyway).

Row labels will automatically be updated to be unique, but all other data is just merged together from the files. Thus you'll still need to check/update references to the added rows, and make sure columns that should have unique values (such as the forcehostile/forcefriendly columns in spells.2da) have proper values in their new context. It's intended to save some data entry time when merging 2da's, not to solve all problems with the click of a button. :)

Please note: This is not a mod compatibility-fixing tool for mod users. It's a tool to help mod-makers merge together 2DA data. Use one of the mod installer utilities if you want to reduce mod compatibility problems for users.

From what I have tested it appears to work, though I have only tested it with a few different 2DAs and a fairly small set of changes, so it is possible that I have overlooked something. If anyone is interested you can get it here (http://www.starwarsknights.com/tools.php#gmt).
 Jeff
09-29-2005, 7:26 PM
#2
I think people have been wanting this ever since this place was created. Great job stoffe: I have yet to find a mod or tool of yours that I don't enjoy :)
 Darkkender
09-30-2005, 1:02 AM
#3
Stoffe when it comes to merging fields between 2 2da's does it check versus the ones in the bif files to determine which entries to overwrite?

The reason I ask is how would it handle a situation where 2 mods both change the entries in something like the modeln columns and neither of the entries match the original entrie located in 2da.bif.
 TheOssusKeeper
09-30-2005, 1:44 AM
#4
this tool will come in handy when trying to edit/merge older mods... it'll help with all the .2da editing, way cool... good job ;) keep up the good work...
 stoffe
09-30-2005, 7:52 AM
#5
when it comes to merging fields between 2 2da's does it check versus the ones in the bif files to determine which entries to overwrite?

The reason I ask is how would it handle a situation where 2 mods both change the entries in something like the modeln columns and neither of the entries match the original entrie located in 2da.bif.

Since my KEY/BIF reader class isn't finished yet it will currently ask the user for an unaltered copy of the 2da file (which you'll have to extract manually with KotorTool) in addition to the two files which are to be merged. This file will be used as a reference to determine what has changed, and as a base template for the new, merged file.

When the two files merged alter the exact same value/cell of one of the standard lines in the 2DA file, the changes done in the second selected file will take precedence, and a message will be posted in the progress log box where the user can see what it has done.

When two files that both add new lines are merged, the lines in the first selected file are first added, and are then followed by the lines from the second selected file, which will have the row labels automatically changed if they are already used by the lines added from the first file.

Same with merging two files which both have custom columns, those in the first file are added first, then followed by those in the second file.

When you merge two files where one adds a column and the other adds new rows, the values for the extra rows from the other file will be set to the standard **** in the new column, since they have no values that can be merged (since the column doesn't exist in that file). The standard lines, and any custom lines set in the file with the new column, will have the values properly set for the new column.
 Darkkender
09-30-2005, 10:52 AM
#6
Thank you for that feedback Stoffe. You mentioned your key/bif reader have you downloaded the Source code for Torlacks Tools at his website? The reason I ask is it has given me bounds of insight into further understanding the file formats from a programatic perspective.

*I'm not using his source directly. Instead I'm using it to figure out how to build my own foundation taking a much more generic approach.*
 stoffe
09-30-2005, 11:06 AM
#7
Thank you for that feedback Stoffe. You mentioned your key/bif reader have you downloaded the Source code for Torlacks Tools at his website? The reason I ask is it has given me bounds of insight into further understanding the file formats from a programatic perspective.


No, as I'm a rather poor excuse for a programmer and my knowledge C/C++ is rudimentary at best. I'd probably be more confused than helped by reading code written by a programmer of his caliber. I prefer using higher level languages (Delphi, C#...) to get something done. :)

And half the fun is doing things yourself. I tend to be rather good at needlessly reinventing the wheel only for the satisfaction of (hopefully) managing to do something that actually works in the end. ;)
 Darkkender
09-30-2005, 11:25 AM
#8
No, as I'm a rather poor excuse for a programmer and my knowledge C/C++ is rudimentary at best. I'd probably be more confused than helped by reading code written by a programmer of his caliber. I prefer using higher level languages (Delphi, C#...) to get something done. :)

Hey I'm a poor excuse as well However I can also admit when I'm in over my head. Especially since I'm trying to relearn programming and diving in feet first into Game engine development and ignoring all of the small stuff untill I need to understand it. Delphi = Pascal Which is simply a simplified C++. :D Or at least that is how I came to understand C/C++ easier.
 Lando Griffin
09-30-2005, 12:38 PM
#9
Great tool stoffe!
Can we merg 2 .2da files and then make it into one. THen merg the already merg 2da file with another?
 stoffe
09-30-2005, 3:17 PM
#10
Can we merge two 2da files and then make it into one, then merge the already merged 2da file with another?

There shouldn't be any problem doing so that I can see. The Merge utility wouldn't know the difference between a file that has been created manually or one that has been joined from two other files before. It's just a 2da file as far as it's concerned. :)
 ChAiNz.2da
09-30-2005, 8:33 PM
#11
Simply put... I am in awe :worship:

You do realize that you've made my life 1000% easier right? ;)

I'm going to give this thing a good work out this weekend (I have the perfect project for this), so expect some feedback in the future :D

You're my newest hero stoffe, I'm your forever stalker .. err... fan :D hehehe...
 General Kenobi
09-30-2005, 9:14 PM
#12
Another Wonderful Utility Tool from Stoffe~mkb~ :D :D :D

Absolutely wonderful Stoffe :thumbsup: I can't wait to start another project and give your new utility tool a whirl :D You never cease to amaze us with your wonderful tools and mods!!! Don't know which gaming forums you came from before joining here BUT I'm SOOOOOO glad you did :D

:ben:
General Kenobi
__________________________________________________ _____
@Darth333
Hey how abouts addin' this bad girl to the tools page for us? It would be kewl in case we ever lost the thread here to have it over on StarWarsKnights.com as well. :D
 stoffe
10-01-2005, 8:04 AM
#13
Simply put... I am in awe :worship:
You do realize that you've made my life 1000% easier right? ;)

I'm going to give this thing a good work out this weekend (I have the perfect project for this), so expect some feedback in the future :D

You're my newest hero stoffe, I'm your forever stalker .. err... fan :D hehehe...

:D Thanks for the warm praise, though perhaps it would've be best to wait until you see if the utility actually works. :p If you run into any problems, let me know and I'll see if I can fix them.


@General Kenobi: Thanks! I've been mostly lurking on some forums before. I usually don't participate as much as I have here, most forums aren't this friendly. :) Let me know if things seem to work when/if you try the utility out.
 Dyliak
10-06-2005, 3:16 AM
#14
How much time I would have saved if this utility was made before *sigh*
But now I can merge many other mods easily without losing time and again: thank you Stoffe for sharing ever more useful nice things! :D

P.S. What a shame that I haven't continued programming with Delphi, that was also my favorite tools for making my own small program. ;)
 stoffe
10-06-2005, 7:36 AM
#15
How much time I would have saved if this utility was made before *sigh*
But now I can merge many other mods easily without losing time and again: thank you Stoffe for sharing ever more useful nice things! :D


Well, nobody asked for it before (as far as I know) and I didn't need it myself until recently. :)

Just remember that this isn't the "Ultimate One Click Mod Compatibility Tool". It just merges custom values between the two files. Depending on what kind of files you merge you may still need to do some manual adjustments (such as the forcehostile/forcefriendly columns in spells.2da). But hopefully it will save some typing at least. :)

* * *

If a moderator read this: Since nobody has informed me of any bugs and I haven't spotted any more myself yet, perhaps this thread should be moved to the Tools forum instead for archival? :stick:
 ChAiNz.2da
10-06-2005, 9:34 AM
#16
If a moderator read this: Since nobody has informed me of any bugs and I haven't spotted any more myself yet, perhaps this thread should be moved to the Tools forum instead for archival? :stick:
Done & Done! :D

Wasn't sure if you wanted to leave the title as is.. but I think you can fix that now in here ;)

The tool is working absolutely fabulously. I'm still on the project I was using it for, so hopefully I can give you some better feedback later.. but so far, nothing "negative" to report :)
 Glacius21
05-09-2006, 9:57 PM
#17
Great tool. It's saved me lots of time.
 mongerman
09-22-2006, 4:48 AM
#18
Erm, what exactly does unaltered standard copy of 2da mean? I'm trying to merge USM and greatsabers. Which would be the unaltered standard copy?
 stoffe
09-22-2006, 6:48 AM
#19
Erm, what exactly does unaltered standard copy of 2da mean? I'm trying to merge USM and greatsabers. Which would be the unaltered standard copy?

It means a clean copy of the 2DA file from the game data that has not been modified by any mods. You can extract it from 2da.bif with KotorTool. The utility needs this file to be able to determine which fields have been modified by either of the two modded 2DA files you want to merge.
 murdrax
06-04-2008, 11:36 PM
#20
umm i tryed runni8ng this tool and for some weird reason im not seeing the merge option of tool tryed redownloading still not showing it help please!!
 battery000
01-04-2010, 7:31 PM
#21
Okay I really don't get this. Every time I run the program a command prompt opens for a split second and then disappears, is that what it is suppose to do?
 Bonedragon Jedi
01-20-2012, 2:06 PM
#22
what does the message "invalid row index specified, unable to look up row label" mean? that's as far as I get on things and the merged file never saves.
 Qui-Gon Glenn
01-22-2012, 1:14 PM
#23
^^^ Did you use the vanilla .2da from your vanilla game files, by extracting the .2da you want to merge from 2da.bif?

This is essential... If you did this step, then I am not sure what your issue might be, although I would suspect that you are running Vista or Win7 OS... Could be a rights/privileges thing, make sure that when doing anything KoTOR related on a Vista/7 rig, that you do the same steps for modding things that you did to properly install your game.
 JCarter426
08-24-2012, 3:06 AM
#24
Changing the default font size to 125% in Windows 7 seems to cause problems for ChangeEdit. I've encountered similar problems with other programs before, but with ChangeEdit certain vital buttons are not shown at all and resizing the window in any manner doesn't fix it. Of course, switching back to 100% or even 150% if your eyes can stand it resolves the problem. I just figured I'd post here in case anyone else encounters the same issue and doesn't realize this, and also on the off chance that stoffe decides to address it at some future point, in a rare moment of free time. :)
 instilation00
08-24-2015, 12:30 AM
#25
Last version: Click (http://www.starwarsknights.com/tools.php#gmt)

In case someone else would find it useful I have uploaded a modified version of my small 2DA converter utility which now contains a new 2DA file merging function.

It will take two 2DA files (of the same kind) and merge changes they contain and save the combined result as a new 2DA file. It will currently detect changes to existing lines as well as new lines and columns that have been added. It will not handle files where standard lines have been deleted (since the 2DA spec. strongly discourages deleting rows in a 2DA anyway).

Row labels will automatically be updated to be unique, but all other data is just merged together from the files. Thus you'll still need to check/update references to the added rows, and make sure columns that should have unique values (such as the forcehostile/forcefriendly columns in spells.2da) have proper values in their new context. It's intended to save some data entry time when merging 2da's, not to solve all problems with the click of a button. :)

Please note: This is not a mod compatibility-fixing tool for mod users. It's a tool to help mod-makers merge together 2DA data. Use one of the mod installer utilities if you want to reduce mod compatibility problems for users.

From what I have tested it appears to work, though I have only tested it with a few different 2DAs and a fairly small set of changes, so it is possible that I have overlooked something. If anyone is interested you can get it here (http://www.starwarsknights.com/tools.php#gmt).

As great as this is, it is no longer available. Do you think there is a way you could put in on a new site so that people can download it again.
Page: 1 of 1