Jump to content


Photo

TSL Patcher, TLKEd, and Accessories

TSLPatcher Patcher TLKEd ChangeEdit Stoffe

  • Please log in to reply
8 replies to this topic

#1 Fair Strides

Fair Strides

    Aurora Engine Operator

  • Administrators
  • 2,233 posts
  • LocationOregon, USA

Posted 06 March 2017 - 11:41 PM

File Name: TSL Patcher, TLKEd, and Accessories

File Submitter: Fair Strides

File Submitted: 06 Mar 2017

File Category: Modding Tools


Inside this download, you will find several VERY useful tools. Almost all of these were made by stoffe originally and the only alteration I made was to make sure TSL Patcher did NOT check for the presence of the dialog.tlk file to verify the path you're installing the mod to. This was done to allow installing mods to the Workshop folders.

Of note in this package are three files:
1. ReadMe, really.pdf - A read-me file that really should be read if you want to understand how to do something with the TSL Patcher.
2. nwnnsscomp.exe - A modified script compiler that TSL Patcher uses to substitute tokens (such as .2da row pieces) in source scripts (.nss files) and then compile the scripts.
3. nwscript.nss - As far as I'm aware, the nwscript.nss file from KotOR 2, required by nwnnsscomp.exe to compile scripts.

Below are the original release thread descriptions for stoffe's work and I honestly don't think I could put it better than she already did years ago. :D

TLK Ed:

Spoiler



TSL Patcher (along with ChangeEdit):
Spoiler



A few quick "how to" examples:
Insert new branches into DLG files.
( http://web.archive.org/web/20150911133933/http://www.lucasforums.com/showpost.php?p=2135535&postcount=177 )

 

Install a New Player Appearance mod.
( http://web.archive.org/web/20150929073207/http://www.lucasforums.com/showpost.php?p=2168405&postcount=201 )

Troubleshooting:

  • Q: I get a RichEdit line insertion error when trying to install mods. What's wrong?


    A: It seems a few people have odd versions of the RichEdit DLL files installed in their system that doesn't play nice with the colored text box component TSLPatcher uses. To work around this you could try to replace the RichEd DLL files with versions that should work. Extract the two DLL files from this archive and put them in your Windows\Windows32 folder. Move existing files with those names to a safe location first so you can restore them if this causes other problems! Do not overwrite them!

    Alternatively, if you don't want to mess with your DLL files, you could force TSLPatcher to use a plain text box for status messages rather than the colored/formatted one. To do this, use Notepad to open the changes.ini file found inside the tslpatchdata folder that came with the mod you wish to install. Under the [Settings] section, change the value of the key PlaintextLog from 0 to 1.
  • Q: I'm not seeing any Install Mod button, and the text field in the TSLPatcher window seems to extend behind the window boundraries.


    A: This odd problem some people experience seems to be tied to what screen resolution and pixel density is being used in your monitor settings, but I have been unable to replicate it or figure out exactly what's going on. As a workaround you can "click" on the Install button by using it's quick keyboard command. Pressing the [ALT] [s] keys on your keyboard should start the installation process.
  • Q: When trying to install a mod it complains that it's not a valid installation location. What's wrong?


    A: Make sure you are selecting the folder the game is installed in, not the override folder, when the TSLPatcher asks you where to install the mod.
  • Q: When trying to install a mod it complains that access was denied to the dialog.tlk file.


    A: Make sure that your dialog.tlk file is not write protected. This file is found in the same folder as the swkotor.exe binary. To check if it's write protected and undo it, right-click on the file, pick Properties in the context menu and uncheck the write protected checkbox.
Original update history (ordered newest change first):

Spoiler


Click here to download this file


(By the way, if you ever want to ask about one of the quotes, feel free to send me a PM)

 

My personal, made-up quote: "To know is good, but to act is better."

"Words are just words, thoughts thoughts, but actions...actions are progress." - Fair Strides

"Intelligence and respect are all it takes to get along fine. Not a bad trade off, huh?" - EwigD from GameFaqs

"And regarding butchering the language, I have been to the internet. The language is well butchered regularly." - Malkior

 

"You can either live with the lies or die with the truth. Who would rather lie to live than die for telling the truth?" - Fair Strides


#2 jc2

jc2

    Kyramud

  • Members
  • PipPipPipPip
  • 379 posts
  • LocationAlderaan 19 BBY

Posted 08 March 2017 - 07:59 AM

I think I just might end up using this in the next day or so... thanks for posting this FS! (and thanks Stoffe ^^)


  • jc2 likes this

KOTOR FOR LIFE

"To ponder and find relevance, one must seek out a quote," because his own words lack the credibility to endeavor to explain his rather odd disposition.

 

Grey Jedi "Shanilia" > http://deadlystream..../1044-shanilia/

 

Thank you FS for past and current modding help! 


#3 Fair Strides

Fair Strides

    Aurora Engine Operator

  • Administrators
  • 2,233 posts
  • LocationOregon, USA

Posted 08 April 2017 - 04:12 PM

@Hashishin: What are you trying to write? You can enter it in the Fast Reply box at the bottom of the page without quoting the entire first post.


(By the way, if you ever want to ask about one of the quotes, feel free to send me a PM)

 

My personal, made-up quote: "To know is good, but to act is better."

"Words are just words, thoughts thoughts, but actions...actions are progress." - Fair Strides

"Intelligence and respect are all it takes to get along fine. Not a bad trade off, huh?" - EwigD from GameFaqs

"And regarding butchering the language, I have been to the internet. The language is well butchered regularly." - Malkior

 

"You can either live with the lies or die with the truth. Who would rather lie to live than die for telling the truth?" - Fair Strides


#4 Kexikus

Kexikus

    Jedi Master

  • Members
  • PipPipPipPipPip
  • 1,476 posts

Posted 19 May 2017 - 05:06 PM

I've run into an issue when using TSLPatcher to edit .dlg files that I hope you guys might help me out with.

The dialog I want to edit has this form:

 

Entry 1

  > Reply 1

     > Entry 2 (conditional script)

     > Entry 3 (conditional script)

 

I want to change it to this:

 

Entry 1

   > Reply 1

      > NEW Entry (NO conditional)

         > Entry 2 (conditional)

         > Entry 3 (conditional)

 

The problem here is that this requires a modification of "Reply 1"'s entry list which originally consisted of "Entry 2" and "Entry 3". For one I can't remove the second entry from the list, but I don't actually mind it staying there since my "NEW Entry" has no conditional anyway so any entry listed afterwards won't show up ingame. But the other problem is to actually remove those conditionals. Since they're stored in the entry list as well (which I didn't actually know until today), I'd have to change the "Active" field to be empty. And it seems that TSLPatcher can't do that. So my question is this: Is there are way in which TSLPatcher can do it but I just haven't found it yet? And if not, is there a better way around that than to simply add a script that always returns true?

 

Thanks for any help :)



#5 pepoluan

pepoluan

    Jedi Apprentice

  • Members
  • PipPip
  • 18 posts
  • LocationIndonesia

Posted 26 December 2017 - 05:19 PM

Where can I get the source code to TSLPatcher?

 

I'm in the midst of installing a bunch of mods, and it's... mind-deadening tedium to keep selecting the Kotor2 folder under steam...

 

So, I want to patch the tool to be able to read a "config file" telling where the Kotor2 folder is.

 

And, if I have the time to do it, probably modify the tool enough to be able to tell it which mods to install (all, or a subset), so it can iterate over the list of mods to install rather than having the user running the TSLPatcher tool TENS of times (Example: The "TSL NPC Overhaul" mod which contains 60+ mods inside of it -- mind-numbingly tedious :ouch: ).

 

I might even expand the tool to be a full-fledged "Patch Manager" ... but that's more the long-term personal wish of mine :blush:


Nobody is Perfect.

I am Nobody.


#6 Fair Strides

Fair Strides

    Aurora Engine Operator

  • Administrators
  • 2,233 posts
  • LocationOregon, USA

Posted 26 December 2017 - 05:37 PM

@Pepoluan: As it turns out, I'm rebuilding the TSLPatcher in a different language (from Delphi Pascal to Perl) due to some annoying issues with it.

Most of your list I've already been implementing.

I can probably allow a "modinstall.ini" in the same folder as the .exe, with a sub-folder called "moss". The "modlist.ini" would then have a list of installs to run back-to-back, with paths to the .ini files to run and the name of the Info file. The paths would be relative to the mods folder.
  • jc2 likes this

(By the way, if you ever want to ask about one of the quotes, feel free to send me a PM)

 

My personal, made-up quote: "To know is good, but to act is better."

"Words are just words, thoughts thoughts, but actions...actions are progress." - Fair Strides

"Intelligence and respect are all it takes to get along fine. Not a bad trade off, huh?" - EwigD from GameFaqs

"And regarding butchering the language, I have been to the internet. The language is well butchered regularly." - Malkior

 

"You can either live with the lies or die with the truth. Who would rather lie to live than die for telling the truth?" - Fair Strides


#7 pepoluan

pepoluan

    Jedi Apprentice

  • Members
  • PipPip
  • 18 posts
  • LocationIndonesia

Posted 27 December 2017 - 05:35 PM

@Pepoluan: As it turns out, I'm rebuilding the TSLPatcher in a different language (from Delphi Pascal to Perl) due to some annoying issues with it.

Most of your list I've already been implementing.

I can probably allow a "modinstall.ini" in the same folder as the .exe, with a sub-folder called "moss". The "modlist.ini" would then have a list of installs to run back-to-back, with paths to the .ini files to run and the name of the Info file. The paths would be relative to the mods folder.

That's awesome!

 

I'm not a Perl programmer, though, so if you release the source code, I might not be able to assist much (not well versed in Perl :blush: )

 

Just some thoughts, hopefully can inspire you:

  • My plan was to make the installer config optional, so if the installer config is not found in the same directory as the TSLPatcher.exe file, it will revert to the 'normal' behavior
  • For the "modlist", I originally plan on simply creating a filter prior to the loop; the "modlist" would specify exactly the name of the sub-mod to install (the name comes from the "namespaces.ini" file?)
  • The filter syntax I envisioned is 'glob-based' (instead of regex-based) with one prefix character indicating install or not, processed in order, e.g.:
    • +*  = install all sub-mods
    • -*NAR  = remove all sub-mods that end with the letters "NAR" (case-insensitive)
    • +101NAR  = install sub-mod with the exact name "101NAR"
    • These three lines will result in installation of all sub-mods, except mods ending with "NAR", but will install "101NAR"
  • I want to patch it also to unconditionally append to the installation log, recording the time of installation and which sub-mod got installed
    • If it installs multiple sub-mods in one go, it will first record the time of start and the list of mods after being filtered (see above), then for each submod installation record the time of installation and which sub-mod got installed

Anyways, glad to hear that the TSLPatcher is not abandoned, yay!

 

Feel free to hit me up if you need my help; I'll try to assist the best I can.


Nobody is Perfect.

I am Nobody.


#8 ndix UR

ndix UR

    Jedi Padawan

  • Members
  • PipPipPip
  • 77 posts
  • Locationca, usa

Posted 07 January 2018 - 09:24 AM

I think I might have identified a bug in TSLPatcher. The problem seems related to files within .mod files (probably any ERF archive) that end with minus '-' or plus '+' before the extension (maybe anywhere in the filename?). Basically, the trailing minus and plus are getting removed. It doesn't depend on modifying the +/- files directly, just unpackaging and repackaging of the .mod file in order to add files or alter GFF files does it.

 

The place this seems to come up is with danm14ac.mod in K1. It has two scripts called k_pdan_state1-.ncs and k_pdan_state1+.ncs which are part of the 'Murdered Settler' quest you get from Bolook on Dantooine. After you run a TSLPatcher based installation that modifies danm14ac.mod ... the resulting .mod file only contains k_pdan_state1.ncs. The file sizes of state1- and state1+ are the same so I'm not sure which one is winning out, but either way, the script name no longer matches the DLG file, and the quest becomes impassable.

 

Not sure if this is fixable in existing code (with available time), but it's something to check in a newly written codebase. In the short term maybe it makes sense for mod-makers to manually include any affected files in their mods so that they are installed directly to Override/.



#9 Fair Strides

Fair Strides

    Aurora Engine Operator

  • Administrators
  • 2,233 posts
  • LocationOregon, USA

Posted 07 January 2018 - 09:37 AM

Ndix_UR: I had completely forgotten about this. I fixed this bug in ERFEdit, but forgot that TSLPatcher uses a copy of this library. In either case, I'm mostly done translating TSLPatcher to Perl, where I don't even bother with the check on the filename's contents.


(By the way, if you ever want to ask about one of the quotes, feel free to send me a PM)

 

My personal, made-up quote: "To know is good, but to act is better."

"Words are just words, thoughts thoughts, but actions...actions are progress." - Fair Strides

"Intelligence and respect are all it takes to get along fine. Not a bad trade off, huh?" - EwigD from GameFaqs

"And regarding butchering the language, I have been to the internet. The language is well butchered regularly." - Malkior

 

"You can either live with the lies or die with the truth. Who would rather lie to live than die for telling the truth?" - Fair Strides






Also tagged with one or more of these keywords: TSLPatcher, Patcher, TLKEd, ChangeEdit, Stoffe

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users