Kexikus 994 Posted June 2, 2015 Almost correct: Some languages have Male and Female tenses/grammar rules, and so the male ones are stored in dialog.tlk and the female ones in dialogf.tlk. I don't honestly know if it matters much, and we could both be right. As to fixing it, the only way you could fix it is to add the strings to the dialog.tlk file, make an un-edited copy of the global.jrl file, make your JRLEdit edits in the NON-copy version, and then use TLKEd and make an append.tlk file to use with the TSLPatcher... That part I could help with if necessary, though. That sounds like an aweful lot of work :/ But I'll try once I have the time. And if I have questions, I'll just ask^^ Two more questions about journal entries however: What happens when I modify a quest entry with a dialogue option, while the quest was already completed? (I only want to end certain quests with new entries, if that makes a difference.) Or to be more general, is it possible to have a quest update only if certain conditions for its current state are met? And is there a way to advance several quests at once with the same line of dialogue? Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted June 2, 2015 That sounds like an aweful lot of work :/ But I'll try once I have the time. And if I have questions, I'll just ask^^ Two more questions about journal entries however: What happens when I modify a quest entry with a dialogue option, while the quest was already completed? (I only want to end certain quests with new entries, if that makes a difference.) Or to be more general, is it possible to have a quest update only if certain conditions for its current state are met? And is there a way to advance several quests at once with the same line of dialogue? Assuming you're referring to either scripts or the Quest fields in the DLG Editor... If the Quest fields, those only work forwards, meaning that you can only increase a quest's progress to a higher state. To go lower would require scripting. To do multiple quests would require scripting. I can tell you the scripting if you need it. Quote Share this post Link to post Share on other sites
Kexikus 994 Posted June 2, 2015 Assuming you're referring to either scripts or the Quest fields in the DLG Editor... If the Quest fields, those only work forwards, meaning that you can only increase a quest's progress to a higher state. To go lower would require scripting. To do multiple quests would require scripting. I can tell you the scripting if you need it. That's perfect. Thanks for the info. And yes, it'd be really cool if you could tell me the needed scripts to advance several quests at once and even better if those would also only work forwards Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted June 2, 2015 That's perfect. Thanks for the info. And yes, it'd be really cool if you could tell me the needed scripts to advance several quests at once and even better if those would also only work forwards Okay, is this for K1 or K2? If it's KotOR 1, this will work: void main() { // Change the 0 to whatever the ID is of the quest entry. AddJournalQuestEntry("tag of quest", 0); // Repeat the above line for each of the quests you need to update. } For KotOR 2, I got a little crafty with the engine...: void main() { int iNumber = GetScriptParameter(1); string sQuestString = GetScriptStringParameter(); int iCounter; int iPosition; int iLength; string sQuest; int iState; for(iCounter = 1; iCounter <= iNumber; iCounter++) { SendMessageToPC(GetFirstPC(), "=============================="); SendMessageToPC(GetFirstPC(), "Updating Quest #" + IntToString(iCounter)); iPosition = FindSubString(sQuestString, ";"); iLength = GetStringLength(sQuestString); iLength -= iPosition; sQuest = GetSubString(sQuestString, 0, iPosition - 1); SendMessageToPC(GetFirstPC(), "Tag: " + sQuest); sQuestString = GetSubString(sQuestString, iPosition + 1, iLength); iPosition = FindSubString(sQuestString, ";"); iLength = GetStringLength(sQuestString); iLength -= iPosition; iState = StringToInt(GetSubString(sQuestString, 0, iPosition - 1)); SendMessageToPC(GetFirstPC(), "State: " + IntToString(iState)); sQuestString = GetSubString(sQuestString, iPosition + 1, iLength); AddJournalQuestEntry(sQuest, iState); SendMessageToPC(GetFirstPC(), "=============================="); } } NOTE: In the DLG Editor, you'll need to put the number of quests you are updating into the first Script Parameter box (as a number). In the Script String Parameter box in DLG Editor, for each quest you'll need to put the tag of the quest followed by a ; then the ID of the quest entry, again followed by a ;. An example would be: "tutorial_garage;89;" without the quotes. This is the Tutorial Garage mission and the last entry in the quest. Please note also that the above hasn't been fully tested, so it could use some tweaking. If so, please contact me via PM. You'll also need to put the name of the script (I have it saved as "k2_quest_update") in the Script slot that you put the parameters in. And all of those SendMessageToPC messages will be found on your Feedback screen in-game. Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted June 3, 2015 If the Quest fields, those only work forwards, meaning that you can only increase a quest's progress to a higher state. To go lower would require scripting.There's already a pre-existing script ingame however that does this. You just don't want it to be executed all the time (since it will run journal updated each and every time even with no change if triggered). Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted June 3, 2015 There's already a pre-existing script ingame however that does this. You just don't want it to be executed all the time (since it will run journal updated each and every time even with no change if triggered). I don't know which game Klexikus is referring to, but wouldn't this script you mentioned require the ScriptStringParameter from the TSL DLG Format? Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted June 3, 2015 Yeah, it would be just for KOTOR2: a_quest_set Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted June 3, 2015 Yeah, it would be just for KOTOR2: a_quest_set Normally, I would be inclined to agree with you, HH, but my version should do the same thing but allow for doing multiple quests in the same script with the bar minimum of effort on the modder's part. Offhand, the only way it works is because the GFF Field for the Script String Parameter is a CEXOSTRING, so it doesn't have a real limit on length... Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted June 3, 2015 It doesn't seem to hold an 'override' function though, so you can't go lower? If multiple quests or more delicate updates I pretty much write another script anyway, but of course got quite accostumed to that over the years Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted June 3, 2015 It doesn't seem to hold an 'override' function though, so you can't go lower? If multiple quests or more delicate updates I pretty much write another script anyway, but of course got quite accostumed to that over the years For the "override", you'd just need to add ", TRUE" at the end of the AddJournalQuestEntry function. I originally had added that, but Klexikus had asked about that not happening, so I made it not able to occur. Quote Share this post Link to post Share on other sites
Kexikus 994 Posted June 3, 2015 I don't know which game Klexikus is referring to, but wouldn't this script you mentioned require the ScriptStringParameter from the TSL DLG Format? Oups, thought I had mentioned that earlier, but it seems I haven't, sorry. It's K1 for now, but I'll keep your TSL script in mind in case I need it for some other mod. Thank you Quote Share this post Link to post Share on other sites
Hassat Hunter 571 Posted June 4, 2015 For the "override", you'd just need to add ", TRUE" at the end of the AddJournalQuestEntry function.I prefer using '1' myself But yeah, that would require another script, so you need 2, 1 for override, 1 for not. And who befoe if you wanna mix it up (but then again, you're probably doing more than just setting something simple anyway) Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted June 4, 2015 I prefer using '1' myself But yeah, that would require another script, so you need 2, 1 for override, 1 for not. And who befoe if you wanna mix it up (but then again, you're probably doing more than just setting something simple anyway) Well, if we're going to be technical and cover all of our bases, this ought do it, and in ONE ( ) script: void main() { int iNumber = GetScriptParameter(1); string sQuestString = GetScriptStringParameter(); int iCounter; int iPosition; int iLength; string sQuest; int iState; int iOverride; for(iCounter = 1; iCounter <= iNumber; iCounter++) { SendMessageToPC(GetFirstPC(), "=============================="); SendMessageToPC(GetFirstPC(), "Updating Quest #" + IntToString(iCounter)); iPosition = FindSubString(sQuestString, ";"); iLength = GetStringLength(sQuestString); iLength -= iPosition; sQuest = GetSubString(sQuestString, 0, iPosition - 1); SendMessageToPC(GetFirstPC(), "Tag: " + sQuest); sQuestString = GetSubString(sQuestString, iPosition + 1, iLength); iPosition = FindSubString(sQuestString, ";"); iLength = GetStringLength(sQuestString); iLength -= iPosition; iState = StringToInt(GetSubString(sQuestString, 0, iPosition - 1)); SendMessageToPC(GetFirstPC(), "State: " + IntToString(iState)); sQuestString = GetSubString(sQuestString, iPosition + 1, iLength); iPosition = FindSubString(sQuestString, ";"); iLength = GetStringLength(sQuestString); iLength -= iPosition; iOverride = GetSubString(sQuestString, 0, iPosition - 1); SendMessageToPC(GetFirstPC(), "Override: " + IntToString(iOverride)); sQuestString = GetSubString(sQuestString, iPosition + 1, iLength); AddJournalQuestEntry(sQuest, iState, iOverride); SendMessageToPC(GetFirstPC(), "=============================="); } } Though, this will require you putting the Override value in as well, so an example is: "tutorial_garage;89;0;" Again, I'd actually have to test it, as I'm almost certain I'm screwing everything up with the iPosition -1 and iPosition + 1 pieces... Quote Share this post Link to post Share on other sites