Char Ell Posted September 22, 2006 Share Posted September 22, 2006 I'm working on a very simple mod that will make Bao-Dur a Sentinel instead of a Guardian. The script portion was quite easy and took me 10 minutes. What I'm struggling with is making this mod compatible with other mods, specifically USM since it uses baodur.dlg. What I'm trying to figure out is how to get TSLPatcher to change existing dialog entries. I'm not trying to add entries to baodur.dlg, just change a couple of entries. Any pointers on how I should go about doing this? Link to comment Share on other sites More sharing options...
stoffe Posted September 22, 2006 Author Share Posted September 22, 2006 What I'm struggling with is making this mod compatible with other mods, specifically USM since it uses baodur.dlg. What I'm trying to figure out is how to get TSLPatcher to change existing dialog entries. I'm not trying to add entries to baodur.dlg, just change a couple of entries. Any pointers on how I should go about doing this? If you aren't adding any new entries or replies and only modifying something for existing entries the easiest way if you aren't too familiar with the GFF layout of a DLG file would be to use the Compare button in ChangeEdit to automatically generate the needed modifiers: Make a new folder for your mod, copy TSLPatcher.exe to this folder (rename it if you wish) and create a folder named tslpatchdata inside this folder as well. Extract an unaltered baodur.dlg file from dialogs.bif with KotorTool and save it in the tslpatchdata folder. Make a copy of this baodur.dlg file as well and save it elsewhere. Modify it with tk102's DLGEditor to apply the changes needed for your mod.* Start ChangeEdit.exe, create a new config file and save it as changes.ini inside the tslpatchdata folder you created in step 1 above. Fill in the name of your mod on the Settings panel and click the Save button. Select the GFF Files section in the treeview, rightclick on it and pick "Add GFF File" in the context menu. In the window that opens, click the folder icon to the right of the input box and select the baodur.dlg file and click the OK button. Expand the GFF Files section and select baodur.dlg which should now appear under it to open the right panel for it. Above the modifier list in the right panel click the "GFF Compare" button (it's the one with a finger pointing at a red blob). Two standard "Open" dialog boxes will open. In the first, select the unaltered baodur.dlg file you saved in the tslpatchdata folder. In the second, select the copy of baodur.dlg you modified for your mod. ChangeEdit should now compare the two files for differences and create modifiers for any differences it finds. If your mod contains any new NCS files or other files that needs to be installed in a specific location for it to work but won't need to be modified, click the "Install files" section in the treeview and add them there. Copy the files that needs to be installed into the tslpatchdata folder as well. Open WordPad and create a new RTF format document and save it as info.rtf in the tslpatchdata folder. The content of this document will be displayed in the main installer window when the installer is started, so you may put any special instructions, or the readme file of your mod here, as you like. * = It's important you use a clean dialog file for this to apply your changes to. If you use a file already modified for another mod those changes will be found by ChangeEdit when it compares the files and modifiers will be created for them as well, which is not desired. Link to comment Share on other sites More sharing options...
Lit Ridl Posted September 30, 2006 Share Posted September 30, 2006 It may sounds really stupid... May you release source code of your TSLpatcher, please??? Link to comment Share on other sites More sharing options...
stoffe Posted September 30, 2006 Author Share Posted September 30, 2006 It may sounds really stupid... May you release source code of your TSLpatcher, please??? No, that's too embarrassing. When I started writing the TSLPatcher and its support tool I hadn't written a line of code in 4 years, so it's an understatement to say my programming and design skills were rusty. And I didn't do much design or make it scaleable since it originally only was meant as a small app to install my high level force powers mod. But it has grown beyond anything I originally imagined for it since, and I've been too lazy to rewrite it from scratch by the book instead. The end result is that the code is one big tangled mess without much in the way of design or over-arching structure. Not pretty. Not something you'd want on display and let others have a look it if you can help it. Besides, it's written in Delphi7 (as evidenced by the bloated EXE size), so the source code would be of little use to anyone who don't have that RAD environment (which is hideously expensive if you don't get a student discount). What would you want it for? Link to comment Share on other sites More sharing options...
Lit Ridl Posted September 30, 2006 Share Posted September 30, 2006 I want to translate it to Russian, German and French. That is all. And one bug: sometimes, especially when I use non-English languages, it gives me error (it don't want to create backup folder, so I have to do it sometimes.). Link to comment Share on other sites More sharing options...
stoffe Posted September 30, 2006 Author Share Posted September 30, 2006 I want to translate it to Russian, German and French. That is all. Hmm, I could try to put all the text strings in the TSLPatcher into a resource file instead, that might make translating it a bit easier, if there aren't any other changes than the language required for different locales. And one bug: sometimes, especially when I use non-English languages, it gives me error (it don't want to create backup folder, so I have to do it sometimes.). Hmm, if this just happened in recent versions and you haven't downloaded v1.2.8b4 that could be a bug not related to language. hen I moved the sequence things were made so the InstallList part happened earlier I forgot to move the part where the Backup folder was created as well, which would result in an error similar to what you describe. Link to comment Share on other sites More sharing options...
Lit Ridl Posted October 1, 2006 Share Posted October 1, 2006 Yeah, Resource file is great idea! Also I'm sure YOU may release v1.2.8b5, I like this progress bar and other things, it will be great to see it released. Link to comment Share on other sites More sharing options...
stoffe Posted October 3, 2006 Author Share Posted October 3, 2006 I have just uploaded version 1.2.8b6 of TSLPatcher. While I had originally intended to update ChangeEdit as well to handle all the new settings and keys added, a fairly serious bug was discovered that this version fixes. I thought it more important to get the bug-fix version out first, even if it doesn't quite include all I had planned. The next version, which hopefully will be released within a few weeks, should contain an updated ChangeEdit as well, so this can be considered a bugfix-version primarily. (Unless you enjoy editing INI config file by hand. If that's the case, ask and I'll describe in more detail how the new keys are used. ) Anyway, these things are new or changed in version 1.2.8b6: Fixed bug where the Backup folder might not yet have been created when backing up files from the Install List, after the list was moved to earlier in the install sequence. Added a progress bar to the main TSLPatcher window to give the user a better idea of how far along the installation progress is when installing larger mods. Fixed word wrap bug when toggling between the Configuration Summary display and the mod information text in the main TSLPatcher window. Added the HackList modifiers to the Configuration Summary display. Also added name of source file if different from the destination file name (configured with the !SourceFile and !SaveAs keys). Added an optional !OverrideType key to the [filename] sections of files to be saved into ERF or RIM files. If set it can determine how TSLPatcher should react if a file with the same name already exists in the override folder (and thus would make the game not use the one in the ERF/RIM). This key can hold one of three values: ignore (default behavior, do nothing special), warn (post a warning in the progress log) or rename (add a old_ prefix to the name of the file in the override folder to deactivate it). Added an optional !DefaultDestination key to the [CompileList] section which will determine where the NCS files should be put if no specific destination has been set. Default value if the key is left out is the override folder as before. In addition to override it can be set the the relative path (from the game folder) and name of an ERF or RIM file to insert the scripts into. This value can then be overridden with the !Destination key for individual files as before. This key is just a timesaver to avoid having to set !Destination keys for lots of files if most of them shouldn't be put in the override folder. Optimized speed and efficiency of storing many recompiled NCS files into an ERF or RIM file. Before the ERF/RIM was saved, closed and reopened between each file that was inserted, now it's kept open until another destination is encountered. Thus if you insert scripts into multiple ERF/RIM files it's a good idea to keep them grouped by destination in the [CompileList] modifier list. Added optional !SourceFile and !SourceFileF keys to the [TLKList] section. If present they can be used to set an alternative name of the TLK file to use to add strings into dialog.tlk from. If those keys are left out the default values are append.tlk and appendf.tlk, as before. This can be used to have different namespaces/setup lists residing in the same folder but using different append.tlk files (for example to provide different selectable language versions of a mod). Fixed bug with TLK file handling that prevented TSLPatcher from properly handling individual TLK entries with strings longer than 4096 characters. It can now handle strings of any size properly. Moved most text strings in the TSLPatcher application into the Resource StringTable instead of having them in the code. While this makes the application marginally larger it makes it easier to translate it to other languages, if so desired, by using a resource editor. Link to comment Share on other sites More sharing options...
CaptainWhyNot Posted October 9, 2006 Share Posted October 9, 2006 Is there currently, or is there a plan to add soon, a function in TSLPatcher to insert a reply or entry into a pre-existing list of others in a DLG file (such that the new entry/reply appears at a certain location causing any and all pre-existing ones to be shoved down, instead of just adding one to the bottom of the list)? If not, I'd like to request that such a function be added in, so that something like the following is possible: starting with the entry: E42: What do you want to know? R69: Who? R67: What? R58: Where? R63: Why? R46: Nevermind. a new reply (next available number being 71) is inserted between R58 & R63 like so: E42: What do you want to know? R69: Who? R67: What? R58: Where? R71: When? R63: Why? R46: Nevermind. Link to comment Share on other sites More sharing options...
stoffe Posted October 11, 2006 Author Share Posted October 11, 2006 Is there currently, or is there a plan to add soon, a function in TSLPatcher to insert a reply or entry into a pre-existing list of others in a DLG file (such that the new entry/reply appears at a certain location causing any and all pre-existing ones to be shoved down, instead of just adding one to the bottom of the list)? It currently always puts new fields at the end of the Lists/Structs when adding new fields to a GFF file. It can perhaps currently be accomplished by some convoluted use of tokens to shuffle the list, but I'm not sure if all the required functionality for that is there since I haven't looked into it. I suppose I could add it to the todo-list to be able to insert were in a list new structs are inserted, if I can think of a way to specify the list index in the config INI file. It'd have to fall back to inserting it last if the specified listindex is invalid though, to be safe. Link to comment Share on other sites More sharing options...
CaptainWhyNot Posted October 12, 2006 Share Posted October 12, 2006 I suppose I could add it to the todo-list to be able to insert were in a list new structs are inserted, if I can think of a way to specify the list index in the config INI file. It'd have to fall back to inserting it last if the specified listindex is invalid though, to be safe. I would appreciate that. It would make sense, to me, to give a search index and flag to say whether the new one should appear either immediately before or just after the given index, and then fall back to adding at the end of the list if that index is not found (or even allowing multiple search indices [along with their before/after flags] to be given in order of preference before falling back to appending). Link to comment Share on other sites More sharing options...
Darth Reign Posted November 26, 2006 Share Posted November 26, 2006 Please do not shoot me. I hope I am not repeating another question. The only file I cannot alter with TSL Patcher is global.jrl. Did I happen to miss something? Link to comment Share on other sites More sharing options...
stoffe Posted November 26, 2006 Author Share Posted November 26, 2006 Please do not shoot me. I hope I am not repeating another question. The only file I cannot alter with TSL Patcher is global.jrl. Did I happen to miss something? The global.jrl file is a GFF format file and you'll have to configure the patcher to modify it as such. There is no special "JRL" patcher functionality especially for that purpose. Unless I remember incorrectly there should be a post somewhere in this thread that describes how you can use the TSLPatcher to insert new journal entries in an existing global.jrl file. It shouldn't be too much work if you use the GFF compare button in ChangeEdit to do most of the grunt work for you. Link to comment Share on other sites More sharing options...
Darth Reign Posted November 26, 2006 Share Posted November 26, 2006 Thanks Stoffe -mkb- I thought I overlooked something. Link to comment Share on other sites More sharing options...
The Source Posted November 29, 2006 Share Posted November 29, 2006 Lady Stoffe, Thanks for developing the TSL Patcher. All I needed was to find the time to shift through it. I just downloaded your latest version, and I am very glad you kept up with it's development. This program has helped me in so many way. If I didn't have this program, I wouldn't have found the error in one of my files. Durring the installation process, I noticed I accidently created an error that was in my original version. For the life of me, I coouldn't figure out what was causing the problem. After hearing a mess of complaints, I was determined to find the error. I ran a test to see how the Patcher executes installations, and BANG there it was plain as day. Your installation log pulled out the issue right away, and I was able to fix the problem in no time. People can rest assured that my mod is now compatible with the best of them. I was also able to cut the installation instructions down to a few lines in my readme. Since the Patcher does all of the work, I only had to add a few troubleshooting tips. Thank you, MacCorp Link to comment Share on other sites More sharing options...
Darkkender Posted November 29, 2006 Share Posted November 29, 2006 Hey Stoffe I haven't download the recent versions of the patcher but would you consider adding all of your various tutorials and tricks listed in this thread into a help file that comes with the patcher. Of course this is assuming you aren't doing this already. Link to comment Share on other sites More sharing options...
stoffe Posted December 2, 2006 Author Share Posted December 2, 2006 Hey Stoffe I haven't download the recent versions of the patcher but would you consider adding all of your various tutorials and tricks listed in this thread into a help file that comes with the patcher. Of course this is assuming you aren't doing this already. I could, provided that anyone ever reads that thing. Otherwise it would just be a dreary waste of time. People (yours truly included) do have a strange tendency of subconsciously filtering out anything with "readme" in the filename whenever browsing for new files to click on. * * * On another note I've uploaded another minor bugfix version of the TSLPatcher, v1.2.8b8. It fixes two serious new bugs that managed to sneak into version v1.2.8b6 undetected. Those bugs would cause installation to abort if the dialog.tlk file was write protected, or when copying a 2DA line using the high() token to assign a new value to one of the columns of the new row. Thanks to DarthCyclopsRLZ for pointing out these bugs. The new version can be downloaded via the link in the first post in this thread, as usual. Link to comment Share on other sites More sharing options...
Darkkender Posted December 4, 2006 Share Posted December 4, 2006 I could, provided that anyone ever reads that thing. Otherwise it would just be a dreary waste of time. People (yours truly included) do have a strange tendency of subconsciously filtering out anything with "readme" in the filename whenever browsing for new files to click on. That's why you put the tutorials in a seperate text file labeled tip's & tricks or tutorials. Link to comment Share on other sites More sharing options...
Darkkender Posted December 6, 2006 Share Posted December 6, 2006 Hey stoffe I encountered a problem or maybe I'm asking the patcher to do something it can't. I was trying to read files in from a subfolder within the tslpatchdata folder. If I manually set it within the install portion to read something like launcher\background.wav the installation reports an error about the game directories path. If I just browse to the folder for the file and save it in the list it continues to look in the tslpatchdata folder. So I'm wondering if it's possible to add the capability to support subfolders in the tslpatchdata folder. If it's already there then I guess this is a glitch. Link to comment Share on other sites More sharing options...
stoffe Posted December 7, 2006 Author Share Posted December 7, 2006 Hey stoffe I encountered a problem or maybe I'm asking the patcher to do something it can't. I was trying to read files in from a subfolder within the tslpatchdata folder. If I manually set it within the install portion to read something like launcher\background.wav the installation reports an error about the game directories path. Hmm, I'm not sure I understand what you are trying to do. All files the patcher works with (that don't already exist within the game folder) must be directly in the data folder. This is usually tslpatchdata, unless you use multiple namespaces, in which case you may optionally specify a subfolder within tslpatchdata that must then contain all files used by that namespace config (nwnnsscomp.exe and nwscript.nss excluded). Link to comment Share on other sites More sharing options...
Darkkender Posted December 8, 2006 Share Posted December 8, 2006 Ahh, that would explain. Would it be to much to ask to have the patcher be able to handle subfolders without the namespacing? I ask because I have discovered it is difficult to keep track of files with testing of the mod that I'm using this for. Maybe it's cause I'm trying to build a massive mod with it. Link to comment Share on other sites More sharing options...
stoffe Posted December 9, 2006 Author Share Posted December 9, 2006 Ahh, that would explain. Would it be to much to ask to have the patcher be able to handle subfolders without the namespacing? I ask because I have discovered it is difficult to keep track of files with testing of the mod that I'm using this for. Maybe it's cause I'm trying to build a massive mod with it. I suppose I could change it, but it would be a fair deal of work to change all the places files are accessed to make sure it can handle a more dynamic file path, and it would introduce the problem of ambiguity if there are several files named the same in different sub-folders. I'll add it to the to-do list, but since the amount of work and risk of introducing new bugs outweigh the apparent benefits (unless I'm overlooking something) it will have fairly low priority. Link to comment Share on other sites More sharing options...
Darkkender Posted December 10, 2006 Share Posted December 10, 2006 Not a problem. Now that I'm getting the hang of the namespace.ini feature I may not need the subfolders. Even though having it on a long term to-do list would still be nice. Edit: ARRGGHH!!! I have found a glitch that is likely to put me on your hit list. I'm setting up the multi-installer option. On all but one of the packages I'm setting them to require a file be present in override prior to installation. However everytime I try to install the optional packages without the required file present it never prompts that I'm missing a required file. As I understand it this kind of defeats the required file part of the patcher. On the same topic would/could you consider a option from the namespaces settings list to require a particular namespace be installed first? Link to comment Share on other sites More sharing options...
stoffe Posted December 10, 2006 Author Share Posted December 10, 2006 Edit: ARRGGHH!!! I have found a glitch that is likely to put me on your hit list. I'm setting up the multi-installer option. On all but one of the packages I'm setting them to require a file be present in override prior to installation. However everytime I try to install the optional packages without the required file present it never prompts that I'm missing a required file. As I understand it this kind of defeats the required file part of the patcher. Hmm, that seems to be a bug which at a quick glance seems to skip the Required file check when you use namespaces and have the patcher fetch the install location from the registry. I've done a quick fix for this and uploaded version 1.2.8b9. Hopefully that should take care of this problem. On the same topic would/could you consider a option from the namespaces settings list to require a particular namespace be installed first? Hmm, I suppose I could. Though if you have no other required files listed you can currently do this the hard way by having the namespace config in question install a blank text file in the override folder and then have the other namespace put that text file as its Required file. Though that's a bit clunky since the user would have to start the installation before noticing they can't proceed. I could add a Required key in namespaces.ini as well which lists a file that must be present in the override folder for that Setup to be selectable in the menu, though that would only work if the installer auto-detects the install location since the user hasn't been prompted to pick where the game is at that stage. Link to comment Share on other sites More sharing options...
Darkkender Posted December 10, 2006 Share Posted December 10, 2006 Well it worked partially there Stoffe however it still copies files into the overide. Then it tries to patch the 2da files. When it gives it's error it also leaves the files in override. here is the installlog. • Installation started 12/10/2006 13:21:11... • Installing unmodified files... • Copying file P_T3M4_0404.tga to the Override folder... • Copying file d_armor_02.uti to the Override folder... • Copying file d_armor_03.uti to the Override folder... • Copying file d_armor_04.uti to the Override folder... • Copying file d_armor_05.uti to the Override folder... • Copying file d_armor_06.uti to the Override folder... • Copying file d_armor_07.uti to the Override folder... • Copying file d_armor_08.uti to the Override folder... • Copying file d_armor_09.uti to the Override folder... • Copying file d_armor_10.uti to the Override folder... • Copying file d_armor_11.uti to the Override folder... • Copying file d_armor_12.uti to the Override folder... • Copying file d_armor_13.uti to the Override folder... • Copying file d_armor_14.uti to the Override folder... • Copying file d_armor_15.uti to the Override folder... • Copying file d_hk47_02.uti to the Override folder... • Copying file darkkendersitems.2da to the Override folder... • Copying file dk_drdarm_01.uti to the Override folder... • Copying file dk_drdarm_02.uti to the Override folder... • Copying file dk_drdarm_03.uti to the Override folder... • Copying file dk_ebo_workbench.ncs to the Override folder... • Copying file dk_workbench.ncs to the Override folder... • Copying file dk_workbench.utp to the Override folder... • Copying file ii_drdhvplat_005.tga to the Override folder... • Copying file ii_drdltplat_005.tga to the Override folder... • Copying file ii_drdmdplat_005.tga to the Override folder... • Copying file k_003ebo_enter.ncs to the Override folder... • Copying file P_hk47_0201.tga to the Override folder... • Copying file P_hk47_0202.tga to the Override folder... • Copying file P_HK47_0203.tga to the Override folder... • Copying file P_HK47_0204.tga to the Override folder... • Copying file P_hk47_0205.tga to the Override folder... • Copying file P_hk47_0301.tga to the Override folder... • Copying file P_hk47_0302.tga to the Override folder... • Copying file P_HK47_0303.tga to the Override folder... • Copying file P_HK47_0304.tga to the Override folder... • Copying file P_hk47_0305.tga to the Override folder... • Copying file P_hk47_0401.tga to the Override folder... • Copying file P_hk47_0402.tga to the Override folder... • Copying file P_hk47_0403.tga to the Override folder... • Copying file P_hk47_0404.tga to the Override folder... • Copying file P_hk47_0405.tga to the Override folder... • Copying file P_t3m4_0201.tga to the Override folder... • Copying file P_t3m4_0202.tga to the Override folder... • Copying file P_t3m4_0203.tga to the Override folder... • Copying file P_t3m4_0204.tga to the Override folder... • Copying file P_t3m4_0205.tga to the Override folder... • Copying file P_T3M4_0301.tga to the Override folder... • Copying file P_T3M4_0302.tga to the Override folder... • Copying file P_t3m4_0303.tga to the Override folder... • Copying file P_T3M4_0304.tga to the Override folder... • Copying file P_t3m4_0305.tga to the Override folder... • Copying file P_T3M4_0401.tga to the Override folder... • Copying file P_T3M4_0402.tga to the Override folder... • Copying file P_T3M4_0403.tga to the Override folder... • Copying file d_armor_01.uti to the Override folder... • Copying file P_T3M4_0405.tga to the Override folder... • Copying file P_T3M4_0406.tga to the Override folder... • Copying file po_pt3m4.tga to the Override folder... • Error: You have not installed the Core files for the Holowan Plugin. Please do so then install this option. (GEN-99) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.