Leaderboard
Popular Content
Showing content with the highest reputation on 01/13/2021 in Posts
-
1 pointHi 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
-
1 pointYeah, I see the problem, the heads.2da isn't referencing the darkside textures. This should do it. heads.2da
-
1 pointI'm not sure about the race condition theory, considering that the game isn't even, AFAIK, multi-threaded. I don't see how the checks could happen out of order. And how that would then persist for the next checks. Likewise, a memory leak also sounds implausible. Not that I have any better idea, mind. I'm pretty sure there's even a lot of legitimate entries that have delay 0 that should be skipped: ones with only developer commentary. TSL has commentary in basically all of its dialogue files, mostly talking about how the camera is moved, the mental state of a character, etc. I think that's meant for the animators and voice actors? The commentary is enclosed in curly brackets and the game filters those out. Likewise, there's entries that exist solely for camera movement. Can't say anything about your proposed changes, though. However, 0xFFFFFFFF is often used as a sentinel value of sorts, so it might be there's some other functional difference between delay 0 and delay 0xFFFFFFFF in the game. In either case, the solution should of course be properly tested. Maybe even cross-checked with a disassembly of the game, or even attaching a debugger like OllyDbg while the game is running (and/or even already in the buggy state). That is, however, time-consuming and complex.
-
1 pointCorrect, nss files do absolutely nothing by themselves. Generally modders will keep theirs around for reference (easier to read an nss than an ncs) and in-case they need to make changes and recompile the script. Some people also consider it polite to upload the nss alongside the rest of the mod so that other modders can learn from it/see what you did. But mechanically speaking, the game will work the same whether you delete them or not, the game is only reading the ncs files.
-
1 pointYes you can, but it's now called "Mouse Look" It's because the whole dialog.tlk is replaced I'd guess
-
1 pointOh goodness, that tutorial can definitely get cleaned up. 😅 But yeah DP hit the nail on the head. Just choose "Add String" and type your text.
-
1 pointThanks for the input, @Malkior and @Salk! @Salk, would you agree with @Malkior's assessment about the fps setting? Also how many frames would you recommend? Edit: For example, this is 104 frames.
-
1 pointHello! I really enjoyed your Animated Cantina Signs for K1, SH. I was glad to test this new version. In short, I like better the cycling in the new version, certainly due to the increased number of frames used. It does make the animation much smoother and natural. Said that, I like much more how the original signs looked, even chromatically. The speed seems to be fine in the newer version while I always felt it was a bit too fast in the original version. I guess that ideally, in my opinion, we should have more frames and slower speed for the original signs to make for the perfect improvement. Cheers!
-
1 point
-
1 pointWell, there's nothing wrong with the script. You might be putting it in the wrong place, here's a basic example for reference. giveexp.ncs convo.dlg
-
1 pointYeah, it's fine, same script file for any placeable that just needs to start a conversation.
-
1 pointIt works for me if I make the files override the default clothing, so model + texture look fine technically. Could it be that you have another appearance.2da somewhere else?
-
0 pointsBy default, mapnotes (like pretty much every other string in a GFF) use a StrRef - i.e. a line from dialog.tlk. If you want to use a local string, in KGFF right click on the Mapnote node in the GIT and choose Add String. That will add a local string child node that will let you type in your description. Make sure the StrRef field in the parent node is set to -1.
-
0 pointsThanks, after some texperiments with the Appearence file, it finally works. 😃
-
0 pointsAfter looking around on the forums, I realized that editing the GUI of KotOR (and possibly TSL) is quite painful and most people use K-GFF (very great tool, but not visual). I then found xoreos-tools (part of xoreos - a very cool open source project). So this weekend, I started up making my own version of a tool which should help a lot with the process of laying out things nicely. The project is not fully complete, but it is ready for some beta testing! A few features so far - Visual display of all images (I think) + bounding boxes - Supports drag + drop / resize - Nested view for only what you care about (cleaner than K-GFF) - Cross-platform - works on linux / windows / mac (with caveats) - Light / Dark Mode for all of you who look at too many bright things (like I do) Getting Started Guide: https://github.com/amcolash/kotor-gui-editor/blob/master/README.md Release Page: https://github.com/amcolash/kotor-gui-editor/releases Source Code: https://github.com/amcolash/kotor-gui-editor Changelog 0.0.4 (9/17/2020): First Public Release