lachjames
Members-
Content Count
18 -
Joined
-
Last visited
-
View File SaberMaker for KotOR and TSL This is a simple Python utility that lets you create new lightsaber textures for KotOR and TSL. Note that (especially in KotOR) creating a new lightsaber colour requires more steps than this - a future project will make this a one-click process for users, but for now I'm releasing this as a standalone tool for mod developers. Installation You should have Python 3 installed. There are no other dependencies. Just download and unzip the zip archive from this page, and you should be good to go! I'll be releasing a Windows .exe version at some point. If you're not comfortable using the Python script, either wait for that or ask me (or one of the many helpful people on DeadlyStream) to make your lightsaber textures for you. Usage Run the script editor.py using Python, with a command like "python editor.py". This will open up the editor. You can choose the glow and core colours for the saber texture, and then save it using one of the bottom two buttons. The texture will then be saved in the current directory. Bugs There might be some bugs, but it's a pretty simple script and it seems to work fine. FAQ The lightsaber looks dark in-game! For a bright lightsaber, you should select a colour with both Saturation and Brightness parameters set to 100% (in the second tab in the colour picker). Then you can use the Hue slider to choose a colour. Can I use this for my mod? Sure, feel free to use the textures for your own mods! I'd appreciate it if you credit this tool for helping create the lightsaber textures. Can I redistribute this program in its entirety (with or without attribution)? Please don't redistribute this program elsewhere on the internet. I will keep it here, so you can point people to it. How do I take this texture and put it straight in the game (not as part of a mod)? I'm working (along with others on DeadlyStream) to make an "end-user version" of this tool, as part of a larger modding project. Stay tuned! The lightsaber core looks weird! You should probably leave the "Core" colour to its default value (pure white) to get lightsabers that look like the ones from the base game. But if you want to experiment, the option to change the core colour is there! Submitter lachjames Submitted 02/15/2022 Category Modding Tools
-
Version 0.1.0
146 downloads
This is a simple Python utility that lets you create new lightsaber textures for KotOR and TSL. Note that (especially in KotOR) creating a new lightsaber colour requires more steps than this - a future project will make this a one-click process for users, but for now I'm releasing this as a standalone tool for mod developers. Installation You should have Python 3 installed. There are no other dependencies. Just download and unzip the zip archive from this page, and you should be good to go! I'll be releasing a Windows .exe version at some point. If you're not comfortable using the Python script, either wait for that or ask me (or one of the many helpful people on DeadlyStream) to make your lightsaber textures for you. Usage Run the script editor.py using Python, with a command like "python editor.py". This will open up the editor. You can choose the glow and core colours for the saber texture, and then save it using one of the bottom two buttons. The texture will then be saved in the current directory. Bugs There might be some bugs, but it's a pretty simple script and it seems to work fine. FAQ The lightsaber looks dark in-game! For a bright lightsaber, you should select a colour with both Saturation and Brightness parameters set to 100% (in the second tab in the colour picker). Then you can use the Hue slider to choose a colour. Can I use this for my mod? Sure, feel free to use the textures for your own mods! I'd appreciate it if you credit this tool for helping create the lightsaber textures. Can I redistribute this program in its entirety (with or without attribution)? Please don't redistribute this program elsewhere on the internet. I will keep it here, so you can point people to it. How do I take this texture and put it straight in the game (not as part of a mod)? I'm working (along with others on DeadlyStream) to make an "end-user version" of this tool, as part of a larger modding project. Stay tuned! The lightsaber core looks weird! You should probably leave the "Core" colour to its default value (pure white) to get lightsabers that look like the ones from the base game. But if you want to experiment, the option to change the core colour is there! -
Fixing the Dialog Skipping Issue in TSL
lachjames replied to lachjames's topic in General Kotor/TSL Modding
Thanks @DrMcCoy and @Thor110 for the discussion @DrMcCoy I should clarify, when I say race condition I mean that the checks are done in a different ordering on the same thread. The fact that alt-tabbing tends to cause the issue is a clue, since some game systems deactivate when alt-tabbed and others don’t (I think). This is all conjecture though. I’m unsure if 0xFFFFFFFF is a sentinel, the default large value, or even just “-1”, to signify that the delay should be from the audio (making it a sentinel of sorts). The algorithm I suggested could be modified to check for and ignore dialog entries with camera animations, or camera angles (certainly the former, perhaps the latter). As you say, it’ll need some testing. @Thor110 Interesting that you’ve found other dialog issues as well with the base game content - some sort of “automatic dialog fixer” might be useful. Perhaps, if it works, these fixes could be integrated into TSLRCM? I think that 2DA file refers to XP requirements for different levels (so level 51 has the highest possible requirement, making it effectively impossible to reach). Don’t think that in particular is the link, but you and @DrMcCoy are right that it could have a meaning of some kind. -
Hi everyone I've been working on KLE and some mods, and I've come across an interesting discovery: I think that the infamous dialog skipping issue in TSL is due to an issue with the "Delay" field in entries in the DLG file. The Problem It's well known that TSL sometimes skips through dialogs - this problem is historically fixed by restarting the game. Some examples of people reporting this issue include: https://steamcommunity.com/app/208580/discussions/0/882966056936924094/ https://gamefaqs.gamespot.com/pc/920601-star-wars-knights-of-the-old-republic-ii-the-sith-lords/answers/21030-how-do-you-fix-the-dialogue-skipping (originally I thought this issue was related to the Steam version of TSL, but this report is from 11 years ago so clearly it was a problem in the base game too). Plenty of Reddit posts, but I don't want to embed them. To be more specific, here's my train of thought: 1) Dialog entries (which are things NPCs say; contrast this with replies, which are what the PC says) have a Delay field, as well as a VO_ResRef field. My understanding is that, if the delay is set to 0, the entry is supposed to be immediately skipped UNLESS there is also an entry in the VO_ResRef field (or perhaps an entry in the TLK instead corresponding to the sound of the text, I'm not sure on this point yet). 2) For lines which have text and audio, the Delay field is sometimes set to 0, and other times set to 4294967295 (which is 2^32 - 1, or the largest possible 32-bit unsigned integer, aka the longest possible delay). 3) When the Delay field is set to 0, I have found that the dialog skipping occurs. I have found that setting the Dialog field to 4294967295 instead causes the skipping to stop. This is difficult to verify, because the problem appears to happen at random. I've read speculation that this is due to a memory leak, but I'm not yet convinced of that - I think there is some unfortunate combination of events that cause TSL to no longer use the audio clip's length to determine the length of a dialog entry, but to use the Delay field instead. The fact that alt-tabbing can cause the issue leads me to believe this might be some sort of "race condition", where two checks are supposed to be performed (one to stop the dialog if the Delay time has elapsed, and another to stop the dialog if the Audio clip's time has elapsed). I conjecture that these checks need to occur in one order, but due to stuttering/other unintended effects from alt-tabbing, etc., sometimes they happen out of order. Again, this is pure conjecture (and if I'm completely wrong, which I might well be, that doesn't invalidate the findings above and below). The Solution The only way to fix this problem is to go through every DLG file in the game, and set all appropriate Delay=0 entries as Delay=4294967295 instead. It wouldn't be difficult to automate this process using xoreos-tools, Python, and an hour of scripting. However, the issue is setting all "appropriate" entries, as some dialog entries are likely intended to actually have a delay of 0. I am considering the following algorithm to solve this problem, but I'm not sure if it's foolproof: For every DLG file in the game: For every Entry in the DLG: 1) If the delay is non-zero, skip the entry 2) If the VO_ResRef field is not empty, or the text referenced in the .tlk file has no sound, skip the entry 3) If this point is reached, the entry has sound but has a Delay of 0 set. Set the Delay to 4294967295 instead. I'm curious to hear thoughts/suggestions/issues with what I have written. Thanks
-
Hi everyone I know a few of you have been asking about the status of the KotOR Level Editor (KLE) project. I'm happy to announce that it's finally ready for a (very early alpha) release. I've made the KotOR Level Editor GitHub page public - please remember it's in early alpha. That said, hope some of you find it useful Find the repo at https://github.com/lachjames/NorthernLights/ My goal is to post this to DeadlyStream in the near future, but for now you'll need to download and install it via GitHub. If you'd like to try it out, please follow the instructions on the linked GitHub page's README. Feel free to DM me, reply to this post, add an issue, etc. if you have issues. For those who are new to KLE, you can find an introductory video listing the features of KLE on YouTube (included below). There is also a (work in progress) KLE guide, as well as a general KotOR/TSL modding guide, at https://github.com/lachjames/KotOR-Modding-Guide Thanks everyone for your help - hopefully this is just a taste of what is to come regarding both KLE and the Northern Lights project in general - with the amount of support I've received so far from you all, there is no doubt in my mind that this is the case.
- 37 replies
-
- 15
-
This looks great Love the video on KLE as well, it’s a great demonstration of the level editor. I’m definitely prioritising features and bug fixes that are causing issues for RoR. Regarding the writing workflow, I’d suggest that you use DLGEditor to create the base dialogs, and then debug them with KLE’s visual dialog editor (which should reduce the amount of time you have to hop in/out of the actual game). I’ll prioritise adding the ability to open DLG files directly (rather than loading them from a module) for this purpose, if you like. Can’t wait to see how the project continues to develop. Great work
-
Hi I've spent the last month working on a new decompiler for NCS code, and I'm ready to share my work in progress with you all. It works properly on many scripts, but there are still situations where it produces incorrect code (but the issues are usually relatively minor). I started this project both because an updated, open source NCS decompiler would be useful to me, and also to learn more about decompilation theory. It's a fascinating topic - I plan to create a YouTube video series on decompilation, using this code as an example. It's also meant to be a reference for others who want to implement an NCS decompiler for themselves (e.g. in C++ for the xoreos-tools project), or for those who want to learn decompilation in general - although NCS is a relatively simple language to decompile (for many reasons, discussed in the GitHub readme), I use very little in the way of "heuristics" and have based my algorithms mostly on the famous 1994 Cifuentes thesis "Reverse Compilation Techniques". I'll keep you all updated if you're interested in any educational content I produce based on this project. Relative to DeNCS, my code has some new features (some implemented fully, some still in the works), including: - Detecting if-else if-else if-...-else chains and not using nested ifs (done) - Doesn't have any problems with ACTION assignments to global variables (DeNCS fails on this, which is one of the main reasons some K1 scripts don't work in DeNCS) (done) - Handles recursion gracefully using a technique I came up with (which I believe might be novel) (WIP but mostly done) - Detecting includes and using the source code from the game's NSS files rather than the decompiled code (WIP) It works quite well, but it's not perfect yet and there are issues (take a look at the GitHub README for more information). Please be very careful if you want to use this for your mods, and (if possible) decompile scripts with the original DeNCS as well to check for consistency. If in doubt, I'd trust DeNCS over my decompiler for now. You can find the complete source code on GitHub at https://github.com/lachjames/ncs2nss as well as instructions on using the decompiler if you'd like to give it a try. I'd be very grateful for any suggestions or issues anyone would like to raise I'm aware that other decompiler projects are currently in the works, and I'd be more than happy to work with anyone who would like to work with me. I've licensed the code under GPL 3.0; my understanding (I'm not a lawyer) is that you are welcome to use the code for anything as long as you open source that code too. At the very least, this is my intent. This is the same license xoreos-tools uses, so it seems reasonable. This project relies on xoreos-tools for disassembly; Windows binaries are included in the xt/ folder (but I intend to remove this before any official release, or at least work with @DrMcCoy to make this automatically update to the latest version of xoreos-tools).
- 1 reply
-
- 3
-
Thanks Great to meet you too! Thanks for taking a look - my point was not so much that it does anything that your code doesn't, but more that you might be better off joining forces with @DrMcCoy by contributing to xoreos-tools, rather than both of you buliding separate NCS assembly readers (e.g. you suggested previously that you have suggestions for ncsdis). All code has bugs (especially mine...), including ncsdis and (I have to imagine) your assembler as well, so wouldn't it be better to combine the two and learn from each of them rather than keeping the implementations separate? I just submitted a feature request on the xoreos-tools GitHub, discussing compiling xoreos-tools as a DLL rather than as executables. This might help your project too? Sure, I agree with what you said; however, the issue I have is not so much their description of JSR in itself (which I agree from a certain point of view is correct), but rather how that clashes with the description of ACTION - in essence, it says ACTION pops variables and pushes the return value to the stack if there is one, but JSR does not modify the stack. The return value part is clear and true, but this might indicate to the reader (as it did for me) that the JSR calling convention requires the caller to remove arguments after the call. It's because of how ACTION is described that I misinterpreted the description of JSR. There are significant differences between how ACTION and JSR work (the main one being that JSR does not push a return value to the stack but ACTION does) so the section saying that invoking subroutines and engine routines is done "basically in the same manner" is, IMO, incorrect. To be clear, I'm not meaning to rag on the Skywing documentation by any means - it's the only reason I've been able to get this far with my implementation of ncs2nss! It's brilliant and I'm very grateflu that it exists. Anyway, it's not a huge deal now as I figured it out in the end
-
Hi @DrMcCoy thanks for “@ing” me - I rarely post on forums but this has given me motivation to do so I’ve made the GitHub repo for my implementation of “ncs2nss” public at https://github.com/lachjames/ncs2nss. There are a few things to know: - Firstly, it’s a work in progress and isn’t perfect. However, all the fundamental components are implemented and the code runs most of the time without error (as in runtime error - it may well make decompilation errors) - I would be not just happy but “double plus happy” if this were ported into C++ and included in xoreos-tools - I say in the readme that one of my goals is to demonstrate how this can be done in Python (using tools I’m familiar with such as rply) so others can implement the same (e.g. in xoreos-tools). I haven’t put an official license on it yet but like DrMcCoy I’m a big believer in open source so consider it open with attribution. - My version works with ncsdis and I encourage you to do the same (and include your improvements in xoreos-tools) as one perfect library for disassembly is better than two that work most of the time. This is just my opinion and I don’t mean to diminish the work you’ve done on the disassembler (I’m sure it’s great, just like xoreos-tools is great) - I just feel that if we all merge our efforts we can make a better final product @DrMcCoy feel free to post/copy anything from our conversations if you’d like. I’m an open book; just didn’t want to annoy you on GitHub by cluttering up your inbox with posts on issues In particular, let me copy-paste my latest message to him on Discord below: *** BEGIN QUOTE *** Hey so I've realized that this heuristic analysis is not reliable enough to be used properly, but I came up with another solution which works every time. The problem is that the Skywing documentation is incorrect, and JSR does in fact work just like ACTION in that it modifies the stack pointer by popping off arguments. It doesn't push on a return value though (if there is one, space for that must have been allocated by the caller function before calling the callee). Perhaps what they mean is that the JSR does not do anything "intrinsically", but the function calling convention appears to be that functions pop their own arguments (which is more reasonable than making the caller do it every time; this is something I've actually taught before in computer science classes). In any case, what you can do is the following (after constructing a call graph): For each subroutine in the call-graph, iterating with DFS reverse post-order traversal: 1. If the current subroutine is part of a cycle in the call graph: 1.a. Collect all the subroutines in the cycle 1.b. Trace both the final stack pointer and subroutine calls from every possible path from the start block of each subroutine to a block with no successors. 1.c. For each of these paths, we can form an entry in a system of simultaneous equations, where the final stack pointer is on the RHS and the subroutine calls are on the LHS. For example, if a path through subA calls subB 2 times and subC 2 times, and the final stack pointer is -8, our equation would be "0a + 4b + 2c = 8". 1.d. Solve this (potentially overdetermined) system of linear equations for a, b, c, ... which are the number of arguments for subroutines A, B, C, ... respectively. 2. Otherwise, compute the number of arguments as per usual for non-recursive functions. Can then also determine if there's a return value after finding the number of arguments. One issue with this is the problem of vector/struct arguments. This method will tell you the size of the stack space which is popped from the stack after calling each subroutine; however, it does not tell you the structure of said space. However, this is easy to calculate once you know the number of arguments - when you call the function in another subroutine, you can use the state of the stack at that call to determine the types of the sub's arguments (including how much space they take up). *** END QUOTE *** Don’t mean to take over this thread so I’ll make a new one if you want. I’d also be more than happy to talk to anyone on discord about this - feel free to message me (Lachjames#6269 - if you’re on the DS discord server you should be able to message me).
-
Thank you all for your great ideas I think making Revan a bigger part of the story (keeping relationships, the face, etc.) is a great idea and shouldn't be too hard to implement. Perhaps changing the cave scene so Revan takes off their mask is a good start there, as LoneWanderer suggests. Maybe Thor110 can help me with porting animations from K1. Adding interactions with quests is also a great idea (e.g. LoneWanderer's suggestions, Manaan's economy, etc.), and I'd love some more suggestions for those. Before I can start working on this mod, I want to make sure I have adequate TTS models for the K1 characters I'll need (I have one for Bastila, so I need to develop one for Carth, Mission, and HK). It's just a matter of training time now as I've already collected datasets. Once I have these TTS models, I'll be able to create new content for KOTOR 2 using characters from KOTOR 1, which will make a continuity mod a lot more compelling.
- 7 replies
-
- continuity
- tsl
-
(and 1 more)
Tagged with:
-
View File KOTOR Dialog Editor This is a visual dialog editor for KOTOR and TSL. It's currently in alpha, so if you're planning to use it for your mods just be aware that there might be (i.e. will be) bugs. COMPATIBILITY I am unaware of any compatibility issues with the DLGs created by this editor, but that doesn't mean there aren't any because this is an early alpha release. Please let me know if you experience any issues. INSTALLATION STEPS 1. Download the ZIP file, and unzip it into a folder (it doesn't create one on its own - I hate it when zips do that ). 2. Copy your "dialog.tlk" into the folder alongside the file "app.exe" - I included the "dialog.tlk" file for KOTOR (as "kotor.tlk"), and for TSL (as "tsl.tlk"), but if you're using any mods which edit "dialog.tlk" for the game you're working on (e.g. using TSLRCM), you'll need to replace it with your own copy. You can find the "dialog.tlk" file in the same folder as the base executable for your KOTOR/TSL installation. If it's for KOTOR 1, rename the copy of "dialog.tlk" you put into your app folder to "kotor.tlk". If it's for TSL, rename your "dialog.tlk" to "tsl.tlk". Don't change the name of dialog.tlk inside your actual KOTOR/TSL installation, as that will break the game. Only change the name of the version you copied into the KotOR Dialog Editor install directory (alongside "app.exe"). 34 Run "app.exe" UNINSTALLATION Delete all the downloaded files. USAGE INSTRUCTIONS General Usage - Create a new dialog file (for KOTOR 1) by pressing the "New" button, or open an existing DLG file using "Open" - Save dialog files using the "Save" button (there's no auto-save, nor does ctrl-s work - I'll make it work eventually) - Once you open a dialog file, you'll see some panels: - The top-left panel contains the "actions" list, which is a set of actions you can currently take. - The bottom-left panel contains "link" information when you select a response which is linked to the current response. - The top-middle panel contains NPC dialog (entries) - The bottom-middle panel contains player dialog (replies) - The right panel contains metadata for the selected response (strref, text, script, etc.) Some Important Terminology To understand what the actions do, you'll need to know the following terminology (some of which I made up, so please read this even if you're a pro): - Response: A line of dialog, spoken either by an NPC or the player (I sometimes call this a "node" too) - Entry: A line of NPC dialog - Reply: A line of player dialog - Start: A possible entry point for the dialog (always points to an entry, never a reply) - Link: Responses are linked to one another through "links" - Metadata: The general dialog data (things like the script that should run when the dialog ends, etc,.) - Selected response: The response which is highlighted in orange - this is preserved when navigating (until you select something else) - Current response: The response you last navigated into. - Copied response: The response you last selected "Copy Selected Node" on. Actions: The panel in the top-left corner contains a list of actions you can perform to edit your dialog. I'll try to describe the actions as well as I can here, but honestly the best way to learn the software is just to try it out: - Back To Start: Go back to the start of the dialog you're currently in - New Response: Create a new response (either an entry or a reply, depending on context) - Unlink Response: Removes the link between the selected response and the current response - Copy Selected: Sets the selected response as the copied response - Paste Into Start: If you have an entry as your copied response, and have selected a start response, it makes the start response point to the copied response - Paste As Link (Link): Adds a link from the current response to the copied response - Move Selected Up/Down: Moves the selected response up or down (respectively) by one level in the dialog evaluation order (for player dialog, this changes the order of the dialog lines they can choose from; for NPCs, the first line in the evaluation order whose "Active" script is either blank or returns TRUE is selected as the NPC's line) - Step Back/Forward: Move back/forwards in your dialog history (so you can easily go in/out of replies without restarting the dialog) FAQ I did x and it crashed/broke my DLG/set my PC on fire Yeah, this is alpha software and I need some people to test it out. Please let me know what broke the software so I can fix it. I'm clicking responses but nothing's happening You need to select responses for both the player (the bottom screen) and the NPCs they're talking to (the top screen). If this info doesn't fix your problem, let me know so I can look into it. I can navigate through the dialog, but how do I edit things? You left click on dialog lines to navigate through them, or right click on them to "select" them. Once a line is selected, you can edit it in the window to the right, edit the link between it and the current dialog node on the bottom-left panel, or copy it to another node by navigating to that node and pressing "Paste Into Current (Link)". The navigation seems to work, but I can't see the actual dialog text Make sure you have the correct "dialog.tlk" file in the same folder as "app.exe". If this doesn't solve the problem, please let me know so I can look into it. Cool app. Ugly, though... Yeah, I'm working on it, and I'm open to suggestions for making the UI cleaner/better/easier to use. DLGEdit's faster to use/better in some other way This isn't meant to be a replacement for DLGEdit - DLGEdit's power comes from the ease at which you can change an existing DLG into exactly what you want. Although this tool can do that too, it's designed for easily/naturally building DLGs from scratch rather than doing minor edits in existing DLGs, while having to actually run the dialog in KOTOR/TSL as little as possible (to avoid the time it takes to load the games and get to the conversation). FUTURE FEATURES - Flow chart view - Animation selection - More testing, bug fixes, etc. KNOWN ISSUES - If you create a link from node A to node B, and node A already has a link to node B, the dialog editor doesn't know which one you want to select when you right click and does weird things (e.g. always selecting the bottom-most copy, even when you right click on another copy). Will fix this asap. INCLUSION IN OTHER MODS Anyone who wants to use this in their mod is free to do so, with appropriate attribution. CREDITS This mod is created by me (lachjames). Thanks to Thor110 for helping me test it out. Thanks to the Xoreos team for allowing us to include xoreos-tools with this mod. We use the gff2xml and xml2gff tools from xoreos-tools to read and write the DLG files. Xoreos-tools is licensed under the terms of the GNU General Public License v3; more information can be found here. Submitter lachjames Submitted 06/12/2020 Category Modding Tools
-
Hi With the release of the KotOR Save Importer for TSL (found here), making TSL's continuity match what happened in a KotOR game is now possible. I'm hoping to create a mod which adds some continuity features to TSL based on the events in KotOR 1. Thor110 has offered to help with this, and if anyone else would like to contribute I'm very open to that as well. I created this thread to continue a great discussion on the DS modding discord about some possible additions to TSL. If you have any suggestions for things we could add to TSL that depend on the player's actions in KOTOR 1, please respond to this post with them. In that discussion, we came up with the following suggestions (credit given where due; apologies if I missed someone, I did my best): - Atton no longer requiring the player to tell him what happened in KotOR 1 (me) - Cameos in TSL are adjusted based on the events of KotOR 1 (Thor110, Soaring__Sky) - HK-47 is found in a shop on Nar Shaddaa if he wasn't purchased in KotOR 1 (Thor110) - Obligatory Deadeye Duncan appearance (bogpill) - Yuthura (Soaring__Sky) - Elise from Dantooine (yeah... her) (bogpill) - Nikto NPCs referencing swoop gang choices from K1 (134340Goat) - Add some T3 dialog discussing what happened in K1, depending on whether the player repaired T3's memory in K1 (134340Goat) - Mission/Zaalbar/their allies(?) helping Atton in the cantina when he needs it (group effort, with ideas from bogpill, Soaring__Sky, 134340Goat, Thor110, and me) - Griff tries to talk the player into some far-fetched scheme (Soaring__Sky) - A Romeo/Juliet spinoff could make an appearance, if the appropriate quest was completed in KOTOR 1 (bogpill) Looking forward to hearing even more great ideas - thanks everyone
- 7 replies
-
- continuity
- tsl
-
(and 1 more)
Tagged with:
-
Version 0.2.0
859 downloads
This is a visual dialog editor for KOTOR and TSL. It's currently in alpha, so if you're planning to use it for your mods just be aware that there might be (i.e. will be) bugs. COMPATIBILITY I am unaware of any compatibility issues with the DLGs created by this editor, but that doesn't mean there aren't any because this is an early alpha release. Please let me know if you experience any issues. INSTALLATION STEPS 1. Download the ZIP file, and unzip it into a folder (it doesn't create one on its own - I hate it when zips do that ). 2. Copy your "dialog.tlk" into the folder alongside the file "app.exe" - I included the "dialog.tlk" file for KOTOR (as "kotor.tlk"), and for TSL (as "tsl.tlk"), but if you're using any mods which edit "dialog.tlk" for the game you're working on (e.g. using TSLRCM), you'll need to replace it with your own copy. You can find the "dialog.tlk" file in the same folder as the base executable for your KOTOR/TSL installation. If it's for KOTOR 1, rename the copy of "dialog.tlk" you put into your app folder to "kotor.tlk". If it's for TSL, rename your "dialog.tlk" to "tsl.tlk". Don't change the name of dialog.tlk inside your actual KOTOR/TSL installation, as that will break the game. Only change the name of the version you copied into the KotOR Dialog Editor install directory (alongside "app.exe"). 34 Run "app.exe" UNINSTALLATION Delete all the downloaded files. USAGE INSTRUCTIONS General Usage - Create a new dialog file (for KOTOR 1) by pressing the "New" button, or open an existing DLG file using "Open" - Save dialog files using the "Save" button (there's no auto-save, nor does ctrl-s work - I'll make it work eventually) - Once you open a dialog file, you'll see some panels: - The top-left panel contains the "actions" list, which is a set of actions you can currently take. - The bottom-left panel contains "link" information when you select a response which is linked to the current response. - The top-middle panel contains NPC dialog (entries) - The bottom-middle panel contains player dialog (replies) - The right panel contains metadata for the selected response (strref, text, script, etc.) Some Important Terminology To understand what the actions do, you'll need to know the following terminology (some of which I made up, so please read this even if you're a pro): - Response: A line of dialog, spoken either by an NPC or the player (I sometimes call this a "node" too) - Entry: A line of NPC dialog - Reply: A line of player dialog - Start: A possible entry point for the dialog (always points to an entry, never a reply) - Link: Responses are linked to one another through "links" - Metadata: The general dialog data (things like the script that should run when the dialog ends, etc,.) - Selected response: The response which is highlighted in orange - this is preserved when navigating (until you select something else) - Current response: The response you last navigated into. - Copied response: The response you last selected "Copy Selected Node" on. Actions: The panel in the top-left corner contains a list of actions you can perform to edit your dialog. I'll try to describe the actions as well as I can here, but honestly the best way to learn the software is just to try it out: - Back To Start: Go back to the start of the dialog you're currently in - New Response: Create a new response (either an entry or a reply, depending on context) - Unlink Response: Removes the link between the selected response and the current response - Copy Selected: Sets the selected response as the copied response - Paste Into Start: If you have an entry as your copied response, and have selected a start response, it makes the start response point to the copied response - Paste As Link (Link): Adds a link from the current response to the copied response - Move Selected Up/Down: Moves the selected response up or down (respectively) by one level in the dialog evaluation order (for player dialog, this changes the order of the dialog lines they can choose from; for NPCs, the first line in the evaluation order whose "Active" script is either blank or returns TRUE is selected as the NPC's line) - Step Back/Forward: Move back/forwards in your dialog history (so you can easily go in/out of replies without restarting the dialog) FAQ I did x and it crashed/broke my DLG/set my PC on fire Yeah, this is alpha software and I need some people to test it out. Please let me know what broke the software so I can fix it. I'm clicking responses but nothing's happening You need to select responses for both the player (the bottom screen) and the NPCs they're talking to (the top screen). If this info doesn't fix your problem, let me know so I can look into it. I can navigate through the dialog, but how do I edit things? You left click on dialog lines to navigate through them, or right click on them to "select" them. Once a line is selected, you can edit it in the window to the right, edit the link between it and the current dialog node on the bottom-left panel, or copy it to another node by navigating to that node and pressing "Paste Into Current (Link)". The navigation seems to work, but I can't see the actual dialog text Make sure you have the correct "dialog.tlk" file in the same folder as "app.exe". If this doesn't solve the problem, please let me know so I can look into it. Cool app. Ugly, though... Yeah, I'm working on it, and I'm open to suggestions for making the UI cleaner/better/easier to use. DLGEdit's faster to use/better in some other way This isn't meant to be a replacement for DLGEdit - DLGEdit's power comes from the ease at which you can change an existing DLG into exactly what you want. Although this tool can do that too, it's designed for easily/naturally building DLGs from scratch rather than doing minor edits in existing DLGs, while having to actually run the dialog in KOTOR/TSL as little as possible (to avoid the time it takes to load the games and get to the conversation). FUTURE FEATURES - Flow chart view - Animation selection - More testing, bug fixes, etc. KNOWN ISSUES - If you create a link from node A to node B, and node A already has a link to node B, the dialog editor doesn't know which one you want to select when you right click and does weird things (e.g. always selecting the bottom-most copy, even when you right click on another copy). Will fix this asap. INCLUSION IN OTHER MODS Anyone who wants to use this in their mod is free to do so, with appropriate attribution. CREDITS This mod is created by me (lachjames). Thanks to Thor110 for helping me test it out. Thanks to the Xoreos team for allowing us to include xoreos-tools with this mod. We use the gff2xml and xml2gff tools from xoreos-tools to read and write the DLG files. Xoreos-tools is licensed under the terms of the GNU General Public License v3; more information can be found here. -
View File KotOR Save Importer for TSL This is both a mod in itself, and a resource for modders to use. It allows data from KotOR 1 to be imported into TSL. It is extensible, so modders can very easily map variable values from KotOR 1 to KotOR 2 without any scripting required. There are several reasons why it might be useful to allow TSL to load data from a KotOR 1 save. The obvious example of where this would be useful is at the start of TSL when talking to Atton for the first time (where the player's choices determine what the game believes happened in the first game). It would be better if the game were aware of this without asking the player directly. Ideally, this would be TSL itself reading a KotOR 1 save, but for several reasons this is not feasible. Modders might also want to create new content which bridges between KotOR 1 and KotOR 2. For example, a mod which extends the KotOR/TSL storyline might benefit from knowing decisions that the player made in both games. Alongside the app (app.exe) is a folder called "requirements". This contains a yaml file "revan.yaml", which is an example of how you can dynamically tell the save importer which variables to import from KotOR 1, what variables to assign them to, and how to map the variables across. You can optionally install the file "101atton.dlg", which will change the initial conversation with Atton to no longer ask the player for information about KotOR 1 (because the game already knows this information, since you imported the data directly from your KotOR 1 save). IMPORTANT NOTES - You need to have a KotOR save which is far enough into the game that the ending has been determined. A save during the final battle of the game should be sufficient for this. If you don't have such a save, the variable "G_FinalChoice" can be manually set it in the GUI interface to the appropriate value (0 for LS ending, 1 for DS ending). - You can set/change variables within the tool using the GUI. - The mod was tested with TSLRCM; I make no guarantees about whether it would work without it. COMPATIBILITY This mod is compatible with TSLRCM. This mod changes the script "k_kreia_spawn", and (optionally) the DLG 101atton.dlg, and therefore should be compatible with any mod that does not change either of these scripts (except for TSLRCM, whose changes are incorporated into our files). Please ensure you install TSLRCM before installing this mod. INSTALLATION Please ensure you install TSLRCM before installing this mod. To use this tool, please follow these instructions: 1. Extract the compressed files, and run the executable "app.exe". 2. If you want to automatically import data from a KotOR 1 save, press the button "Load from KotOR 1 save". This will open a file selection box; navigate to the KotOR 1 save you wish to load from (it should be a folder). Select the folder and press "Select Folder". You can also manually edit/change the values in the GUI to your liking. Pressing "Create without KotOR 1 save" resets all values to their defaults. 3. Once you've imported and/or set the values to your liking, press "Write Script". The tool will then generate a file "k_kreia_spawn.ncs" in the folder alongside "app.exe". 4. Copy the file "k_kreia_spawn.ncs" into your TSL overrides folder. If you want to include the Atton dialog changes as well, copy the DLG file "101atton.dlg" into the TSL overrides folder too. UNINSTALLATION Delete the files "k_kreia_spawn.ncs", and "101atton.dlg" (if you installed it), from your overrides folder. INCLUSION IN OTHER MODS Anyone who wants to use this in their mod is free to do so, with appropriate attribution. CREDITS This mod is created by me (lachjames), Thor110, and VarsityPuppet. Thanks for VarsityPuppet for the idea for this tool, and our discussions on its implementation. Thanks also to Thor110 for his great advice and assistance with editing the DLG files (which I've never done before as I'm new to KOTOR modding). Thanks to the Xoreos team for allowing us to include xoreos-tools with this mod. We use the unerf and gff2xml tools from xoreos-tools to read data from KotOR 1 saves. Xoreos-tools is licensed under the terms of the GNU General Public License v3; more information can be found here. Thanks also to Fred Tetra for creating the KotOR version of nwnnsscomp.exe, which is also used in this tool for compilation. Submitter lachjames Submitted 06/03/2020 Category Mods TSLRCM Compatible Yes