Jump to content

Home

Kotor Tool - v1.0.2210.16738 (2006-1-19 12:38)


Fred Tetra

Recommended Posts

  • Replies 1.6k
  • Created
  • Last Reply
Originally posted by Uchiha Itachi

I've been having an issue with the latest Kotor Tool.

Always when I change and save an item it is ERASING the TemplateResRef node.

When this happens it can be opened but cant be saved again, I had to use the GFF editor to recriate the node and write what was written there.

Anyone else is ahving this issue?

 

I tried opening items from templates.bif for both games and did not observe the problem you are having; the TemplateResRef node is still present after saving.

Link to comment
Share on other sites

A new version of Kotor Tool will be posted today.

 

If you're manually downloading, check that the version number is the one below.

 

v1.0.1889.22000 (20050-3-4 1:30)

 

Features/updates:

 

  • Saving a GFF-based file now records the KotOR game version. Version info is taken from
    the treeview game branch (KotOR I or II) or from the information provided by the user.
  • Open file functions now use embedded KotOR game version info if present.
  • Fixed window location and size persistence code for all UT* editors, text editor and Project Manager.
  • UT* editors now show current file name when saving.
  • Fixed bug in Most Recently Used (MRU) file handler
  • Fixed bug in Project Properties path handling (missing "\")
  • Projects can now optionally record the game version they are targetted for.
  • 2DA editor can now show Dialog.Tlk strings for a column of string-ref values via a menu on the gridview's header for that column. Strings are updated as string-ref values change.
  • Fixed a bug in the 2DA editor that occurred when a 2DA file was opened from the treeview and then again from an external file of the same name. (A long-standing bug!)
  • New GFF text-view format for better readability
  • Creature editor can now adjust UpgradeLevel value for KotOR:TSL
  • Fixed Inventory bug in Merchant editor

Link to comment
Share on other sites

Very nice Fred, thanks.

 

By the way, a little request... Is there any chance you could make it possible to copy and paste 2DA rows from one 2da to another one in a different window?

 

The way I'm thinking it could work coding-wise is basically just have the selection "Copy Row" actually copy something to clipboard in a format that KT recognizes as a 2da row, like:

353|PMB1|And so on...

Just have the | seperate the columns and if the document you're pasting into doesn't have enough rows, than it just pastes everything it can into one row, and if there are too many it just fills all of the columns it can.

 

I'm sure you'd have a better way of doing it though ^^;

But if you could squeeze this in, preferrably AFTER taking a break to play KotOR II, I'd really appreciate it.

 

Thanks again,

Shimaon

Link to comment
Share on other sites

Ok I downloaded this new version and I'm still having the same issue.

It is erasing something, I can't tell what it is anymore cuz once I save the file with Kotor Tool I can't open anymore now, not even with the GFF editor...

Here is the error I get:

 

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
  at System.IO.__Error.EndOfFile()
  at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
  at System.IO.BinaryReader.ReadInt32()
  at kotor_tool.clsGFF.GFFReadStruct(GFFStructEntry& structEntry)
  at kotor_tool.clsGFF.Parse(Byte[] bytes)
  at kotor_tool.clsGFF..ctor(FileStream fs, Int32 KotorVerIndex)
  at kotor_tool.frmMain.GetGFFFileKotorVersionIndex(String filepath)
  at kotor_tool.frmMain.OpenGFFFileInEditor(String filepath, Int32 formLocationOffset)
  at kotor_tool.frmMain.miOpenGFFFile_Click(Object sender, EventArgs e)
  at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
  at System.Windows.Forms.MenuItem.ShortcutClick()
  at System.Windows.Forms.Menu.ProcessCmdKey(Message& msg, Keys keyData)
  at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
  at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
  at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
  at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)

 

Help please...

 

Edit tk102: Trimmed and shrunk font of code

Link to comment
Share on other sites

Originally posted by Uchiha Itachi

Ok I downloaded this new version and I'm still having the same issue.

It is erasing something, I can't tell what it is anymore cuz once I save the file with Kotor Tool I can't open anymore now, not even with the GFF editor...

Here is the error I get:

 

System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
  at System.IO.__Error.EndOfFile()
  at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
  at System.IO.BinaryReader.ReadInt32()
  at kotor_tool.clsGFF.GFFReadStruct(GFFStructEntry& structEntry)
  at kotor_tool.clsGFF.Parse(Byte[] bytes)
  at kotor_tool.clsGFF..ctor(FileStream fs, Int32 KotorVerIndex)
  at kotor_tool.frmMain.GetGFFFileKotorVersionIndex(String filepath)
  at kotor_tool.frmMain.OpenGFFFileInEditor(String filepath, Int32 formLocationOffset)
  at kotor_tool.frmMain.miOpenGFFFile_Click(Object sender, EventArgs e)
  at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
  at System.Windows.Forms.MenuItem.ShortcutClick()
  at System.Windows.Forms.Menu.ProcessCmdKey(Message& msg, Keys keyData)
  at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
  at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
  at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
  at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)

 

Help please...

 

Ok, two requests:

 

1. Please email me two copies of the file that is giving you trouble, one before you open it and one after you opened and saved it.

 

2. As has been said many times before, you only need to post the part of the error details shown above; the loaded assemblies is not useful info.

Link to comment
Share on other sites

Originally posted by Shimaon

Very nice Fred, thanks.

 

By the way, a little request... Is there any chance you could make it possible to copy and paste 2DA rows from one 2da to another one in a different window?

 

.

.

.

 

Thanks again,

Shimaon

 

It's on the to-do list, along with an Appearance wizard (bet you thought I forgot!), a Dialog.Tlk viewer/editor and some other goodies. :)

Link to comment
Share on other sites

Fred, I have been having some troubles with the latest download, It may be me but I would just like you to check some out. First off, I found i could no longer use the Module Editor WIP, when i showed it the directory where the maps were, it just gave me the error message telling me to quit or continue, so i just kind of ignored that. But now it wont let me copy and past rows on the 2da editor it lets me copy fine but when i hit paste, it gives me the same error message. I's there something I have failed to do or will it simply be fixed in the next patch?

Link to comment
Share on other sites

Originally posted by Gsccc

Fred, I have been having some troubles with the latest download, It may be me but I would just like you to check some out. First off, I found i could no longer use the Module Editor WIP, when i showed it the directory where the maps were, it just gave me the error message telling me to quit or continue, so i just kind of ignored that. But now it wont let me copy and past rows on the 2da editor it lets me copy fine but when i hit paste, it gives me the same error message. I's there something I have failed to do or will it simply be fixed in the next patch?

 

I'll take a look into for you. I didn't run into any problems when I tested the Module editor, but I didn't test the copy/paste rows in the 2DA editor....

Link to comment
Share on other sites

Originally posted by Fred Tetra

It's on the to-do list, along with an Appearance wizard (bet you thought I forgot!), a Dialog.Tlk viewer/editor and some other goodies. :)

I did ^^

I thought about it the other day, but I figured you had enough burden on your shoulders that I could just do it manually, heh.

 

Sounds good, thanks all of your help Fred!

Link to comment
Share on other sites

Originally posted by Fred Tetra

  • Saving a GFF-based file now records the KotOR game version. Version info is taken from
    the treeview game branch (KotOR I or II) or from the information provided by the user.

Got the new version!

 

I know it's late and the sleepiness is clouding my sight, but could you point me at how the extractions are being marked? I'm looking for a new field off the main struct but I see nothing.

Link to comment
Share on other sites

Originally posted by Fred Tetra

but I didn't test the copy/paste rows in the 2DA editor....

Fred, if you get this function to work, you'll be an even larger Hero for me to worship :D

 

Next thing you know, we'll be trying to dip you in gold ;) Do you prefer 10kt, 14kt or 18kt heheh....

Link to comment
Share on other sites

Originally posted by Uchiha Itachi

Sent.

I just hope you find out whats wrong :D

 

I think I figured out what's wrong with your files.

 

The field that holds the KTInfoDate, which is a CExoString, indicates a length of 36 bytes and has the following contents:

 

domingo, 6 de mar??o de 2005 18:24:09

 

which is 37 bytes long! This causes one byte of a critical data structure in the file to be overwritten, which makes it unreadable.

 

What I think it should be holding is:

 

domingo, 6 de março de 2005 18:24:09

 

which is 36 bytes long, like the CExoString length field says it should be. (I am not sure that is the right word, março, as my Portuguese is pretty poor.)

 

This is the same sort of problem I ran into with the dialog editor.

 

You see, the C++ that KotOR is written in uses single bytes for each character, even ones like "ç", drawing from a sort or extended ASCII character set.

 

Kotor Tool, being .NET Framework based, uses the more up-to-date double-byte representation for characters outside of the base ASCII set. This causes grief when the programmer "asks" .NET "how long is this string, so I know what to write to this file" and it says "36 bytes", then when you write the string, .NET expands the special characters out to two bytes each!

 

I will have to look into a work around for the international users.

(Other than setting your OS's language to US English!)

 

Sorry for the grief!

Link to comment
Share on other sites

Ok, now it is official.

I hate NOT being american.....

Is there something I could do?

Perhaps changing the month?

No wait... the days count too right?

****... days here are big too like:

Monday = Segunda-feira

Tuesday = Terça-feira

Wednesday = Quarta-feira

and so on and so forth...

But why this is happening now? I never had issues with this....

 

[EDIT] Ok I just made a small test...

Changed month to: May = Maio instead of Março.

Tho I have bigger months here like Setembro, Outubro.

And I was using it before on Fevereiro = February and it worked...

Why only now this happened?

You think there is a way around this fixed by programing?

So, for now, all the time when I use it its better to change my month to a month without the "ç" ?

Link to comment
Share on other sites

Ok Fred, just to make sure, I tested it on another computer as well as my now reformated one, and it still doesnt work, I am unable to copy and paste rows, and when i try to use the Module editor it says access to blah blah blah/Fred Tetra/Kotor Tool/Maps is denyed, Details, Continue, Quit. Is anyone else having this problem, this is with Kotor 2 btw.

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...