Leaderboard


Popular Content

Showing content with the highest reputation on 05/02/2022 in all areas

  1. 2 points
    With the help of Cortisol over on the discord, we did some sleuthing as to how force powers being restricted by armors work. spells.2da has 2 columns called "requireitemmask" and "forbiditemmask" (these names are hopefully self-explanatory) These are 16-wide bitfields. Some testing confirmed that the 7 least significant bits (right-most) correspond in order from MSB > LSB to: LightSaber, AC9, AC8, AC7, AC6, AC5, AC4 class armors or more specifically they correspond to the following itemtypes in baseitems.2da Bit itemtype 0 31 1 32 2 33 3 34 4 35 5 36 6 39,40,41 I did not find any 2da that creates this mapping. Might be hardcoded in the engine. Have not tested other bits. They may or may not function. Testing that would require pairing every remaining bit with every item type found in baseitems. That's 9*itemtypes (minus the ones we already know about). If someone wants to bother with that be my guest (tho the work could probably efficiently be subdivided if people decide to bother).
  2. 2 points
    Having lurked around the forums a fair bit as of late following a lengthy absence from the community, I've decided to dip my toe back into the waters of KotOR modding. Seeing all of the innovations and changes over the past few years in terms of what we're able to achieve has really given me the itch again! For my first contribution, i've decided to publish this tutorial which I wrote more years ago than i'd care to admit which focusses on the correct way to recruit a new party member and build your own custom dialog tree and quest line for them. I did publish a tutorial soley on the dialog tree aspect of this on LucasForums many moons ago, but I later wrote this more fully fleshed out tutorial and fell off the map before I got around to publishing it. I've gone back to polish this off and tweaked/refined it a little to make things more readable and easier to follow, so hopefully it should be easily understood. I've tried to keep my naming conventions for things as close to the existing ones in the vanilla game files for consistency and so that game files can be easily examined whilst following along if need be. Admittiedly this will mostly be useful to people who are not so familiar with modding the KotOR games and possibly people who are experienced in other areas of modding but haven't dabbled in scripting or anything yet, so if you're already a reasonably well rounded modder in terms of breadth of experience across different areas, this may not be for you. That's enough waffling anyway. Enjoy! Step 1 - Preparing your NPC template: The most logical place to start in my opinion is by creating the template file which contains all of the vital information which the game needs to know about our new party member. Personally, I would start off with the .UTC file from an existing party member and modify it to suit. I personally like to go old school and use K-GFF to modify template files, so the field names I use here may not match whatever is in KotOR Tool, but they'll be similar enough for you to work out which is which. The vast majority of the fields in KotOR Tool or whichever editor you are using are completely self explanatory, so i'll just go over a few of the ones you may not be too familiar with. Here we go: IMPORTANT: When it comes to editing the new party member's scripts, you will need to ensure that the below fields match the values I have given. When it comes to setting your new party member's tag, you need to remember to use the tag of the vanilla party member you are replacing. DO NOT use a custom tag. The vanilla tags are as follows: The TemplateResRef is the unique identifier we assign to the party member's template so that the game can refer to it. In my case, I set it to "p_yuthura" and named the file "p_yuthura.utc" to match. Step 2 - globalcat.2da entries: For this step, all you'll need to do is add a couple of lines to globalcat.2da so that the game can track your progress through your new dialog tree/quest. For my example, I added two new rows: The K_SWG_YUTHURA global will essentially track which stage of the quest you have reached whilst the K_SWG_YUTHURA_LEVEL one will keep track of your PC's level as you progress through the quest. Their values will both be checked and modified by scripts whenver you reach a new stage in the tree, but more on that in the next step! Step 3 - Recruitment: This stage will cover the process of actually recruiting your new NPC and adding them to your party. This tutorial assumes that you will speak to Yuthura Ban in the Dantooine Courtyard before you recruit her. In order to have the conversation end and have Yuthura immediately available for selection, you would use this script: //recruit.nss void main() { RemoveAvailableNPC(5); AddAvailableNPCByTemplate(5, "p_yuthura"); DelayCommand(1.5, ShowPartySelectionGUI()); } If you follow it line by line, it's very simple to follow. It removes whichever NPC is currently occupying slot 5 in your party selection screen. It then adds a new party member to that slot based on the template you have specified. In this case, we have gone with p_yuthura because that's the template we created in Step 1. There will then be a short delay of 1.5 seconds before the party selection screen appears, just like when you recruit a new party member in the vanilla game. This line can be left out if it doesn't suit what you're trying to do. Obviously the number for the party member slot will change depending on which party member you are replacing, so here the different values for each slot in the game: Simply attach this script to an appropriate conversation node in your dialog file and you're good to go. In this case, since we are recruiting an NPC which we have physically encountered, there will now be a duplicate of your NPC still in the location you met them, even if you have recruited them already. This is very easily solved with another simple script attached to the final node in the recruitment dialog: // destroy.nss void main() { object oYuthura = GetObjectByTag("dan13_yuthura"); SetGlobalFadeOut(1.0, 0.5); DelayCommand(1.0, DestroyObject(oYuthura)); DelayCommand(1.0, SetGlobalFadeIn(0.7, 0.0)); } Again, very easy to understand if you go through it line by line. The SetGlobalFadeIn() and SetGlobalFadeOut() commands are used here to fade the screen to black and back to normal again with the disappearance of the NPC taking place in between the two. This adds a nice polished appearance to the affect. For a barebones recruitment mod, you could just stop there. If you've followed everything so far, you'll have a new party member join you and they'll work exactly as any other party member would, just without any sort of quest to follow. Step 3 - Dialog Tree: This is the step where you really flesh out your mod and give your NPC some life. Adding a new quest line based around your new NPC is a great way to not only add exciting new content to the game, but also to bring your new content more in line with the experiences players have with the vanilla party members. This is nowhere near as difficult as you might think when you start out. I'm certainly no programmer, but with a little common sense and applied logic, this who process becomes very simple. The first script we create here is the one which checks whether or not Yuthura's quest line has started yet: //k_swg_yuthura01.nss #include "k_inc_debug" int StartingConditional() { int nResult = GetGlobalNumber("K_SWG_YUTHURA") == 0; return nResult; } As you can see, this script checks that the currently set value of the K_SWG_YUTHURA global we created earlier is 0. If the current value of K_SWG_YUTHURA is indeed 0, then the value of nResult will be positive and the dialog node which this conditional script is attached to will be available. If the value of K_SWG_YUTHURA is anything other than 0, the node will be ignored and the game will move on to the next note in the tree. Once the initial conversation has been completed, we'll need to increase the value of K_SWG_YUTHURA so that a different conversation option becomes available next time. We achieve this by attaching the following script to the final node in the conversation tree: //k_swg_yuthura20.nss #include "k_inc_debug" void main() { int nPlot = GetGlobalNumber("K_SWG_YUTHURA"); int nLevel = GetHitDice(GetFirstPC()); SetGlobalNumber("K_SWG_YUTHURA", (nPlot + 1)); SetGlobalNumber("K_SWG_YUTHURA_LEVEL", nLevel); } Once again, this is simple to follow. We start by assigning values to nPlot and nLevel so that we can reference them later in the script. nPlot is assigned a value equal to the current value of our K_SWG_YUTHURA global and nLevel is assigned a value equal to the PCs current level. K_SWG_YUTHURA then has its value increased by 1 and K_SWG_YUTHURA_LEVEL has its value set to the PC's current level. Moving on to the second stage in the quest/conversation is really simple. All we do is attach this script to the relevant node in the dialog file: //k_swg_yuthura02.nss #include "k_inc_debug" int StartingConditional() { int nResult = GetGlobalNumber("K_SWG_YUTHURA"); int nLevel = GetHitDice(GetFirstPC()); int nLastLevel = GetGlobalNumber("K_SWG_YUTHURA_LEVEL"); if ((nResult == 1) && (nLevel > nLastLevel)) { return TRUE; } return FALSE; } A little more going on here at first glance, so let's break it down. We start by assigning values to nResult, nLevel and nLastLevel. Here, nResult is the current value of K_SWG_YUTHURA, nLevel is the PC's current level and nLastLevel is the current value of K_SWG_YUTHURA_LEVEL. If the value of K_SWG_YUTHURA is 1 and the players current level is greater than the stored value, then the conversation node will be available. You can basically copy and paste this script to cover the rest of the quest line, just by altering the nResult value which the script checks for. Every time you advance a stage in the quest, you increase it by 1. Summary: All in all, this is a fairly simple process to go through and doesn't take too long at all when you consider that the majority of the conditional scripts for your quest are going to end up being copies of eachother with just that one value changed. I've attached my example scripts to save you needing to copy/paste them if you want to use them as a basis for your own. Of course, there's still so much more you could do with your mod to make the experience even more immersive. In terms of dialog, you can make certain conversation options available only if other conditions are met, like needing to have collected a certain number of Star Maps to have been collected or needing to have reached a certain point in another quest. There are so many possibilities and the vast majority of them can be implemented using the same principles outlined in the tutorial above. Get creative with it! mf_recruitment_scripts.zip
  3. 1 point

    Version 1.10.0

    202,910 downloads

    The K1 Community Patch (K1CP) is a compilation of previous bugfix mods and a multitude of new original fixes put together with the intention of resolving the many and various issues that KOTOR has. This includes some well-known game breaking bugs/softlocks, broken quests, inaccessible content, as well as lesser issues such as problems in conversations, visual inconsistencies, player annoyances, etc. The intention is for the changes to be as seamless as possible, fixing and improving things whilst still retaining the original developer intent. A huge thanks to all of the mod authors who created these mods, and allowed them to be included in this patch! Unfortunately, the individual list of changes has grown far too long to be included in this post. However, you can view a detailed breakdown of each author's individual contributions in the included readme file and a summary of the changes the current version has made since the previous release in the changelog file. List of Contributing Authors (alphabetical): A Future Pilot blennus danil-ch darthbdaman DarthParametric Ebmar Frykas Gimmick5000 jc2 JCarter426 Kainzorus Prime Kexikus KOTOR 1 Restoration Team Leilukin Markus Ramikin N-DReW25 ndix UR R2-X2 Red Hessian Salk th3w1zard1 Thrak Farelle WildKarrde Installation: Run INSTALL.exe and navigate to your K1 install folder. Generally speaking, this mod should be installed before anything else, except mods that do hard edits/overwrites of 2DA, TLK or MOD (module) files. Warning: Never run the installer from inside the archive! Always extract the archive onto your hard drive first. N.B.: With the advent of version 1.10.0, K1CP has migrated away from the use of TSLPatcher and switched to HoloPatcher. This allows for additional patching functionality and resolves some bugs encountered with TSLPatcher. HoloPatcher is also multi-platform. The bundled installer is the Windows version, but Mac and Linux users can download the appropriate installer for their system here. It is highly recommended that you do not install the game on your system's C drive, especially in Program Files. Windows can have permissions issues when trying to install the mod to a C drive destination. If you are using the Steam version of the game and have installed Steam in its default Program Files location, we advise creating a new Steam Library on a different drive and moving the game there via the game's Properties pop-up in Steam. Translation: The mod now has translations in French and Russian, available as separate patches. To use, first download the base K1CP v1.10.0 archive and extract it to your harddrive. Download your translation patch of choice and extract its contents into K1CP's tslpatchdata folder. Proceed to install the mod as normal. Traduction (Français - Harlockin): Le mod a maintenant des traductions en français et en russe, disponibles sous forme de patchs séparés. Pour l'utiliser, téléchargez d'abord l'archive de base de K1CP v1.10.0 et extrayez-la sur votre disque dur. Téléchargez le patch de traduction de votre choix et extrayez son contenu dans le dossier tslpatchdata de K1CP. Procédez à l'installation du mod comme d'habitude. Переводы (Русский - olegkuz1997): Мод теперь включает в себя переводы на французский и русский языки, доступные в виде отдельных патчей. Для использования сперва скачайте базовый архив K1CP v1.10.0 и распакуйте его на жесткий диск. Скачайте нужный вам патч с переводом и извлеките его содержимое с заменой в папку tslpatchdata K1CP. После чего приступите к установке мода как обычно. Compatibility/Known Issues: K1CP uses module injection in an attempt to remain as compatible as possible with other mods. This may result in issues with mods that simply put files in the Override folder. It is recommended that you consult the individual authors of any large scale mods, particularly those that edit DLGs and scripts, as to whether their work is compatible with K1CP. Some mods will likely require updates, some may need to be installed in a specific order, whilst others may be fundamentally incompatible. K1CP currently only supports the English language version of the game, and makes a number of edits to the TLK file in English. If anyone is able to provide translations of these changes to other languages, please let us know. The KOTOR 1 Restoration (K1R) mod is incompatible with K1CP, however there is ongoing work to re-create the K1R mod for K1CP: https://deadlystream.com/files/file/2345-restored-content-for-k1cp-demo/ These are the currently known bugs/issues with KOTOR or the mod that the K1CP is looking to resolve: https://github.com/KOTORCommunityPatches/K1_Community_Patch/issues If you find any others, especially with changes/additions K1CP makes, please report them on the Github issue page or here on Deadly Stream so they can be addressed. Be sure to include as much information as possible, including a list of all the other mods you have installed, the order you installed them in, steps to reproduce the problem, along with screenshots and save files, if appropriate. You may also be directed to provide the install log file, a list of the contents of your Override folder, and specific MOD files from your modules folder. Uninstallation: Given the complexity of this mod, a clean install of KOTOR is the recommended approach for uninstalling K1CP. However, HoloPatcher does provide uninstall Shell (Bash) and PowerShell scripts which will work as long as K1CP was the most recent mod installed. Permissions: Due to this mod being a compilation from many different authors, please do not distribute/rehost it. Acknowledgements: All of the mod authors who have helped make this patch a reality - thank you! - especially for agreeing to distribution outside of Deadly Stream Fred Tetra - For KOTOR Tool tk102 - For DLGEditor and K-GFF JdNoa/Dashus - For DeNCS stoffe - For TSLPatcher/ChangeEdit/TalkEd bead-v - For MDLEdit and KOTORMax ndix UR - For TGA2TPC, TPCView, and MDLOps v1.0+ seedhartha - For KOTORBlender fork for Blender 2.8+ Cortisol - For Holocron Toolset and HoloPatcher/PyKotor th3w1zard1 - For additional customisation and feature improvement of HoloPatcher Fair Strides - For various tools and updates to older tools DrMcCoy - For Xoreos Tools Snigaroo - For maintaining mod builds at https://kotor.neocities.org/modding/mod_builds/ danil-ch - For the original info.rtf template Many thanks to ebmar, Salk, and KnifeMaster for providing numerous bug reports and beta testing certain fixes THIS MODIFICATION IS PROVIDED AS-IS AND IS NOT SUPPORTED BY BIOWARE/OBSIDIAN ENTERTAINMENT, LUCASARTS, DISNEY OR ANY LICENSEES/SPONSORS OF THE MENTIONED COMPANIES. USE OF THIS MODIFICATION IS AT YOUR OWN RISK AND NEITHER THE ABOVE MENTIONED COMPANIES NOR THE AUTHORS ARE RESPONSIBLE FOR ANY DAMAGE CAUSED TO YOUR COMPUTER BY THE USAGE OF THIS MODIFICATION.
  4. 1 point
  5. 1 point
    If you download MDLOps, this will be very straightforward for you to do. Just decompile the model to ascii and then recompile as a K1 model. Just make sure you have the supermodel in the same folder as your ascii. You can extract it with KotOR Tool or whicever toolset you want to use. You may need to use JC's ported TSL supermodels, but I don't think so. Give it a go and see!
  6. 1 point

    Version 1.0

    343 downloads

    This mod rewrites all text in the game using the finest machine translation services available. It is intended to offer a new experience to those familiar with the game.
  7. 0 points
    There's a possibility that the "hahaha"s in a lot of your messages are a form of trolling, but I doubt you're stupid. We have a modding tools section that has the tools we talk about. Your post asked about how one would go about doing it, so someone took the time to tell you how you'd go about doing it. At that point, it's up to you if you want to download the tools and read their instructions or ask for more help. If you truly lack a PC to work with the mods, I'd advice rephrasing to instead ask if someone would be willing to make the mod idea.