Fair Strides

JRLEdit - The Graphica Journal Editor

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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 :D

 

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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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... :)

Share this post


Link to post
Share on other sites

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 :D

Share this post


Link to post
Share on other sites

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 :D

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.

Share this post


Link to post
Share on other sites

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 :D

Share this post


Link to post
Share on other sites

For the "override", you'd just need to add ", TRUE" at the end of the AddJournalQuestEntry function.

I prefer using '1' myself :P

 

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)

Share this post


Link to post
Share on other sites

I prefer using '1' myself :P

 

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 ( :D) 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... :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.