lachjames

Members
  • Content Count

    18
  • Joined

  • Last visited

Files posted by lachjames

  1. 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.

    253 downloads

       (0 reviews)

    4 comments

    Updated

  2. K2Console - A Console For KOTOR 2

    DESCRIPTION
    This is a little tool that mimics the visible console from K1, in TSL. It's written in Python (I've attached the source code below).
    IMPORTANT NOTES
     - The tool does not work in fullscreen mode (for now). I'd like to fix this in the future, but for now it only works in windowed mode.
     - The tool doesn't connect to TSL at all - it's completely separate. This means that (for example) if you open the console in TSL with tilde, and then alt-tab out of TSL and press tilde again, K2Console will detect this but TSL itself won't (meaning K2Console and TSL will be out of sync).
     - If you get out of sync and/or want to start the program again, you can type "xxxxx" (five x's in a row) into the console while it's open, which will close the program. Then just run the file "k2console.exe" and it'll start up again. No need to restart TSL (but make sure the TSL console is closed when you start K2Console, or you'll still be out of sync).
     - This program works by reading your keyboard inputs and storing them to memory, which is also one way a keylogger might work - so your anti-virus might identify it as such. This code does not connect to the internet at all (you can verify this for yourself if you like). I haven't included the source with the program package to avoid cluttering your TSL installation, but I included it as a separate download below.
    INSTALLATION
    Unzip all three files into the same folder as swkotor2.exe (i.e. C:\SteamLibrary\steamapps\common\Knights of the Old Republic II\, or wherever your TSL installation is located).
    UNINSTALLATION
    Delete the three files "k2console.exe", "console.bat", and "steam_console.bat".
    INITIALIZATION
    If you use Steam: Instead of starting your game through Steam, you can start it by running the file "steam_console.bat", located in your TSL install folder.
    Otherwise: Start the game by running "console.bat", again located in your TSL install folder.
    USAGE
     - Whenever you press ` to open the console in TSL, the mimic console should pop up too. I tried my best to exactly match the behavior of the TSL console (e.g. when it keeps text vs clears it), but if you find any discrepancies please let me know so I can fix them.
     - If I did my job, you shouldn't really be able to tell that the console's not built into TSL, so just use it as normal (with the ability to see what you wrote!)
     - To close the program (not TSL, just the console), type "xxxxx" (5 x's in a row) into the open console (this won't work if the console's not visible). Alternatively, you can close the command line that opens when you run the .bat file.
    INCLUSION IN OTHER MODS
    I'm not sure why you'd want to include this in other mods, but if you want to, you're welcome to do so with appropriate attribution.
    CREDITS
    Thanks to Thor110 for the idea for this tool, and for helping out with testing and ideas (as well as taking the screenshot for me).
    k2console.py

    454 downloads

       (0 reviews)

    1 comment

    Updated

  3. 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.

    747 downloads

       (0 reviews)

    0 comments

    Updated

  4. 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!

    127 downloads

       (0 reviews)

    0 comments

    Updated