that'snotAces 0 Posted November 3, 2023 hello everyone, pardon me for a (possibly) stupid post but- i have been looking for a guide to help me learn how to WRITE a mod for kotor1, but have had little success. can anyone recommend the programs/techniques that people have used? i'm not trying to steal anyone's work, i'd just appreciate some help. this is my first time here, so sorry if this is a bad post. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted November 3, 2023 That's far too vague. How you go about creating a mod depends entirely on what sort of mod it is. Detail exactly what it is you want the mod to do. Quote Share this post Link to post Share on other sites
that'snotAces 0 Posted November 3, 2023 right now? i'd like to edit some of the dialogue and its corresponding audio files. eventually, i'd love to get to the point where i could write in additional scenes (not just conversations) but that seems so far off/idk even know if it's reasonable and i don't have any experience so i don't know what the limitations are. fyi i'm trying to use the holocron toolset to mod the game. don't know if you need more info than that.... Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted November 4, 2023 Creating completely new conversations and cutscenes is entirely practical. Aside from your own personal skill, the only real limiting factor is generating entirely new custom VO for existing characters like party members. Although that is becoming a far more realistic prospect now with the advent of AI generated audio. As far as more entry-level stuff goes, to start with I'd suggest grabbing DLGEditor. While HT has many laudable features, its inbuilt DLG editor leaves a bit to be desired in my opinion. All conversations and cutscenes in the game are handled by DLG files, so DLGEditor is going to be your primary tool. That said, they are reliant on some external resources like scripts, static and animated cameras, stunt animations, VO, etc., so you will have to use some other tools. Scripting especially will be a major component of anything more complex than very simple conversations where the PC walks up to and clicks on an NPC or placeable (computer interactions are also DLGs). I'd suggest you extract some DLGs to have a look at in DLGEditor so you can get an idea of how their tree structure, the entry/reply system, and the concept of speaker and listener works, plus the general layout of DLGEditor itself. Start with simple ones like those for minor ambient NPCs wandering around modules before getting into the more meaty DLGs of major NPCs and party members. As to actually editing a DLG, it can be a little tricky to wrap your brain around the logic of where new entries and replies have to go, how multiple reply choices for the player work, and wrangling DLGEditor to actually do what you want. A good starting point would be taking a simple DLG, like for one of the aforementioned ambient NPCs, and experimenting with adding new nodes to an existing branch. Find somewhere in the game like Taris or Dantooine where you can easily test out your changes in-game. Once you have managed your first edit of an existing branch, you'll want to learn how multiple branches work, which means understanding starting conditional scripts. These scripts are just a simple true or false check, which tells the DLG whether or not that branch can be accessed. Basically a DLG will always start at the first branch at the top of the file, unless its first entry has a starting conditional requirement it doesn't meet. If that's the case it will fall through to the second branch, and so on. This is how you build large DLG trees which account for multiple different scenarios. For example, some of those aforementioned ambient NPCs reacting with different dialogue depending on the specific point you're at in the game (e.g. reacting to events on Kashyyyk or Manaan). A starting conditional (typically "k_con_talkedto") is often used to have a unique first-time branch with introductory dialogue, which will only be accessed the first time the player speaks to that NPC. Any subsequent conversations will then start on a different, lower branch. Of course you don't always need to have large, complex DLGs housing every conceivable conversation. You can use a script to initiate a specific custom DLG that handles a one-off conversation or cutscene when required. The other major component of conversations is VO. There are two main types, actual unique dialogue, which DLGEditor calls a "VO_ResRef" (e.g. nglobedavi05008_), and generic alien or droid VO, which DLGEditor calls a "Sound" (e.g. n_gendro_sads1). If you are creating custom unique VO then you are also going to have to create matching lip sync files for it. Typically this is done with the CSLU Toolkit and LipSynchEditor, although various people have tried to create replacements. You'll also want SithCodec so you can convert audio to and from the format the game requires. Here's a guide to creating new lip sync files. Edit: I should also mention the other major element of a DLG, which is the actual text. All text in the game is contained within dialog.tlk, so what you'll see in a DLG is a StrRef - the ID of a particular string in dialog.tlk (e.g. 25157 - "Are you threatening me? "). None of the vanilla DLGs will contain any text themselves, just the external StrRefs. The idea is that having all the game's text centralised makes translation easier. You can swap out just one file to translate all text in the game to another language, rather than having to edit thousands of individual files. However, most mods have typically avoided adding new strings to dialog.tlk for custom lines and have instead used what are referred to as "local strings", text stored within a DLG (or other file) directly. To do this, you'll need to change the StrRef for a given entry/reply to -1 first to make the text box editable. Quote Share this post Link to post Share on other sites
that'snotAces 0 Posted November 6, 2023 do you have any recs for a decompiler for .ncs? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted November 6, 2023 You can use DeNCS which requires Java. However, you can get almost all of K1's scripts and most of TSL's vanilla scripts (no TSLRCM yet) here - https://github.com/KOTORCommunityPatches/Vanilla_KOTOR_Script_Source Quote Share this post Link to post Share on other sites
that'snotAces 0 Posted November 6, 2023 wow thanks! you rock Quote Share this post Link to post Share on other sites
that'snotAces 0 Posted November 30, 2023 @DarthParametric, since you seem to know a lot about modding, perhaps you can help me with this.... i'm trying to mod the sith embassy on manaan. more specifically, i'm trying to mod the cutscene that is scripted to begin upon entering the door. as i'm sure you know, you have to either get a passcode to the base (by torturing a sith prisoner) or cracking the encryption on one of their passcards. for clarification: i'm not trying to change the effect of the third option which uses the ship in the sith docking bay. now, upon entering the base, you trigger a cutscene. in the cutscene, no matter what convo options you choose, the sith always turn hostile. even the force persuade option which is of course set to be impossible. however, i'd like to change that. i want to make it so that you CAN force persuade your way inside without all the sith causing you problems. i know that in order to complete the mission for roland wand (the republic diplomat), you need to obtain the footage from the probe, but i'd like to implement the mod in such a way that you can just "sneak" in and out. so i've done a couple things so far. i know the .dlg file i need to edit is 'man27_sithlieu.dlg', which i have already done and added new script. i've also changed the conditional on the force persuade option from 'k_con_fperslow', to 'k_con_fpershigh', which i believe makes the force persuade actually possible. i put the file into override just to see the progress of what i had done so far. naturally, it didn't change anything. of course, DUH, i didn't do anything with the scripts. so i pulled up the .git file to see what scripts are activated upon entry. this led me to the trigger 'man27_enter.utt' which fires the script 'k_pman_27_init01.nss'. i see that it wants to activate the conversation cutscene/dialogue "man27_sithlieu" ('man27_sithlieu.dlg'), but not any way to change the cutscene itself. this script just triggers the cutscene itself. my only thought is that i need to write a completely new script that would be triggered, but i'd honestly have no clue where to begin. is there any help you could give me? i don't mind working for the answer, but if you could/would point me in the right direction, i'd really appreciate it. as i've said before, i am completely ignorant on most of modding/programming, because this is my first time, so any assistance would be greatly appreciated. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted December 1, 2023 3 hours ago, that'snotAces said: i've also changed the conditional on the force persuade option from 'k_con_fperslow', to 'k_con_fpershigh', which i believe makes the force persuade actually possible. The starting conditional sets whether the branch is available or not. But k_con_fperslow is actually easier, since it checks for the PC having either FORCE_POWER_AFFECT_MIND or FORCE_POWER_DOMINATE, whereas k_con_fpershigh requires FORCE_POWER_DOMINATE. In other words, the two scripts should really have been labelled "easy" rather than "low" and "hard" rather than "high". Unlike with skill-based Persuade, there's no DC check with Force persuade. You can either do it or you can't. The outcome is entirely dependent on the DLG itself. In this case, it's one of those "illusion of choice" type situations. There's no branch for success because you were always being railroaded into a fight. The only option to do what you want would be to replace that branch with all new custom VO that leads to a new exit node. Quote Share this post Link to post Share on other sites