Jump to content


Member Since 14 Oct 2014
Offline Last Active Today, 01:32 PM

Topics I've Started

Area model issues

19 December 2017 - 09:36 AM

I'm currently trying to add a new model to an area, but for some reason that doesn't really work at all and I can't figure out where I'm going wrong. So I'll just tell you what I did and maybe someone can tell me where the issue comes from.


First of all I created the model in 3ds Max obviously.

Then I used KOTOR Max to create an Odyssey Base, named it 504ONDk (the intended model name), placed it at 0,0,0 and set it's type to "other". Later I also tried "effect" as that's apparently the type of the skybox in this module but that changed nothing.

Next I added the Odyssey Trimesh modifier to my model, trying both with the model being converted to an Editable Mesh and without that step, in both cases applying a "Reset X Form" before adding the modifier.

Finally I linked my mesh as a child to the base and exported the geometry only.


Then I opened the ASCII in mdledit and saved it as a binary file.

To get it ingame, I opened the .lyt and .vis file of my module (504OND) and added my model to them. In the .lyt, I added it to the room list with coordinates 0,0,0 (and later other coordinates as well) and also increased the room count by 1. In the .vis I added it to every room, once again increasing the number of adjacent/visible rooms by 1 each time. I also added itself as another room at the very end with no visible rooms, as you won't enter that room ingame and it's only background.


Then I dropped the 504ond.lyt, 504ond.vis and my 504ondk.mdl/.mdx into the Override and saw nothing. No changes at all. I thought that maybe I need to load an older save where I had not entered the module before, so I did that and still saw no changes.


As I didn't know where the problem comes from, I tried to determine whether it's in the model itself or in the .lyt/.vis by hex-editing my binary model to be 504ondc instead. I also renamed the files accordingly and dropped them into my Override. And now the model actually appeared, but only when I'm inside the (now invisible) original room 504ondc. So I tried replacing some other models and the same thing happened.


That left me somewhat confused as I've no idea what's causing this but I figured that I probably screwed something up in the process of getting my model from Max to the game. So I compared it's ASCII to the ASCII of a similar model, the skybox of the same module, namely 504ondg. There I saw that the skybox models type is "effect" which is why I tried changing that but that made no difference. I also noticed that the skybox has a walkmesh. So I copied its walkmesh over to my model, changed the supermodel and created the binary. But my model still wouldn't show up ingame. So once again, I renamed it to another model and there it was in all its glory, visible from all rooms. But now it moves sometimes when going from one room to another...


And that leaves me with the conclusion that I really don't know what I'm doing and need some help instead. Thank you very much :)

Block "Item Lost/Received" message

12 May 2017 - 08:40 PM

I'm working on a script that swaps a hidden item on a partymember. So what I'm doing is basically this (sItem is a string with the item's tag):

object oNewItem = CreateItemOnObject(sItem, OBJECT_SELF);

if (GetIsObjectValid(oOldItem)) {
DelayCommand(0.2, ActionEquipItem(oNewItem, INVENTORY_SLOT_CARMOUR, TRUE));

And that's working perfectly fine. However, when I run this script in a dialog, I always get the pop-up message that I lost and gained an item. I'd very much prefer it this message did not appear as these Creature Hide items are a hidden game mechanic that the player shouldn't be informed about. Is there any way to do that?


Edit: Oh, and a second question: Are there switch-cases possible in KotOR / TSL or do I have to use if-else statements all the time?

Sorting droid armor into tiers

29 April 2017 - 02:29 PM

I'm working on a small mod that requires me to sort TSL's droid armor into three tiers. For most armor items that's easy as they exist in Mark I, II and III. But there are some exceptions, so I was wondering where you'd sort those in. I'm just really bad when it comes to rating items, skills, etc. so that's why I'm asking for help :)


The armors in question are:

Droid Desh Plating

Droid Agrinium Armor

Droid Quadranium Armor

Droid Diatum Plating

Droid Capacitor Armor (HK's special armor. Where do you get that one by the way?)


Any help would be very appreciated. Thank you :)

Fog and Speed Blur Fix for the 2016 TSL patch

29 April 2017 - 09:46 AM

As you might know, fog is not working or at least not working properly in Aspyr's 2016 Steam patch for KotOR 2: TSL. An official fix for this issue doesn't seem to be in sight but luckily HappyFunTimes101 wrote a fix himself.


To show the issue with the 2016 patch, here's a comparison between the Steam and the GOG version:


Attached File  20170429110154_1.jpg   190.56KB   2 downloads   Attached File  Star Wars Knights of the Old Republic 2 04.29.2017 -   3.05MB   5 downloads


As you can see, the fog is really screwed up in the latest Steam version while all other versions (4CD, DVD, gog, Steam legacy) look the same as the "gog picture". In other areas, the issue is not as visible when the fog is completely missing in the Steam version, but if you compare the two versions it's easy to see.


And finally, here's what it looks like with HappyFunTImes101's fix applied:


Attached File  20170429110919_1.jpg   180.49KB   2 downloads


One more comparison, taken from the Ravager where the fog is not present at all in the Steam version:


Attached File  20170429111104_1.jpg   206KB   2 downloads   Attached File  20170429111034_1.jpg   193.06KB   2 downloads


Additionally HappyFunTimes101 provides a completely new speed blur effect to get rid of that headache causing blur in the vanilla game while keeping some visual effect:


Attached File  20170429111309_1.jpg   86.21KB   2 downloads   Attached File  20170429112034_1.jpg   141.58KB   3 downloads   Attached File  20170429112037_1.jpg   147.58KB   3 downloads


It's a little hard to see on a still frame but if you compare the last two pictures, you can see that the edges of the screen are warped while running with Force Speed active. I really like that new effect, but it's optional when installing the fog fix, so it's up to you to decide whether you want it or not.


Which brings me to the important part: How to install the fix

First of all, here's the Read-Me. But I'll provide easier to follow instructions, originally taken from a reddit post by TonyKaku but slightly edited:


  1. Go here and download the contents of the Release folder. Copy them in your main KotOR 2 directory. If you don't want the changed speed effect, go to KotOR 2 directory \ shaders_override and delete fp_speedblur.txt.
  2. Start the game
  3. You should now have two folders called shaders_original and shadow_override in your KOTOR folder.
  4. Go into the shaders_original folder and open the first file with a program like Notepad++
  5. locate the line that says "MOV result.color, r0" (second to last line usually)
  6. right above that line paste the content of the quote under "Fog Issue" that starts with PARAM p =.... Your file should look like this.
  7. Repeat this step for every text file in the folder that has the MOV result.color, r0 line (these are all files starting with fp). That can take some time and there might be ways to automate the process but explaining it might take so long that you're probably just better off doing the whole thing manually.
  8. After you pasted this into every file that has the MOV result.color, r0 line near the end, copy all text files into the shader_override folder.
  9. Launch the game, the fog should now be fixed

This fix is definitely a big step forward for the usability of the Steam patch, which I always avoided due to issues like these. It's up to you to decide if it's easier to fix the fog in the Steam version or to get widescreen support in a different version but it's definitely a good thing to have this patch available. Maybe this fix can even be expanded to include the missing saber hilt textures (if that's even a shader issue).

A big thanks to TonyKaku for posting this on the kotor reddit or I wouldn't have found it. :D


To the moderators: I wasn't sure if that qualifies as a tutorial, so I posted it in the general section. If it is, please just move it or maybe just pin it so that the information doesn't get lost. Thank you :D


Edit: I tried to apply the speed effect change to the older TSL version and to K1, but it's not as easy as I hoped it would be. The shader identified as the speed shader in shader_ident.txt just doesn't exist in these versions of K1/TSL so it can't be overwritten that way either. I assume it would be possible by editing the OpenGL32.dll file but I just don't know how to do that.

TSLPatcher: Only modify file if it's present

28 April 2017 - 02:21 PM

I'm currently setting up the installer for my Full Jedi Council mod v2.0 and I've run into a problem.


My mod edits holorec.dlg and since this file is also modified by several other mods (TSLRCM, TSLRCM No Overlay, PartySwap to name a few) I use TSLPatcher to apply my changes to a file already present in the Override. The problem is that TSLRCM places its edited holorec.dlg in 950COR.mod and not in the Override. So there are two options:

Apply my changes to the holorec.dlg in 950COR.mod which could be either from TSLRCM or from the 950COR.mod that I install if it's not present. But then any of the other mods that places holorec.dlg in the Override would override my changes.

The other option would be to make my changes to holorec.dlg in the Override. That way I could apply them to a holorec.dlg already installed there by other mods but that results in an issue when installing on a vanilla installation or with only TSLRCM. Then I'd have to provide a holorec.dlg that these changes could be applied to. So either I'd use the vanilla holorec.dlg for that, overriding TSLRCM's changes or the TSLRCM file, installing TSLRCM changes for a user who probably doesn't want them or he'd have installed TSLRCM before doing so.


I could of course just put TSLRCM as a requirement in my read-me but I'd rather avoid that. Ideally I'd just tell TSLPatcher to modify the holorec.dlg in 950COR.mod and if holorec.dlg is present in the Override folder modify that as well. The first part is no problem but so far I've not been able to tell TSLPatcher to do the latter. Is this even possible? And if it is, how?