lfnetwork.com mark read register faq members calendar

Thread: How to add Journal entries
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 01-24-2005, 06:48 PM   #1
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
How to add Journal entries

You'll need to edit two files:
A) The *.dlg file(s) to which you want to attach the journal entries or use a script if you want the journal entry to be added from an event other than a dialogue (example death of a creature)

B)the journal file located in BIFs>_newbif>journalFile>global.jrl

editing the global.jrl file

* you can edit this file with a GFF editor * ( we recommend tk102's K-GFF - see instructions in the second post below)

When you open it, you will see a list below "Categories".

Here is an explanation of each field you'll find:
  • Comment: what you type here does not have any effect on the game. Type whatever comments you want to rememebr what you are doing or leave it blank.
  • EntryList: this field contains the description for the quest itself. It is divided as follows:

    -> End: Set it to 0 as long as the quest is active so that it appears in the game's "Active Quests". When the quest is completed, set it to 1 to remove it from the Active Quests and put it in the Completed Quests.

    -> ID: This field field refers to the advancement of the plot (10, 20, 25, 35, 40, etc.). Each number corresponds to a journal entry. Refrence the number in your .dlg QuestEntry field to change the Journal Text.(you can use whatever numbers you want i.e. you could use 1, 2, 3, 4, etc.)

    -> Text: This is the text you want for a particular stage in the quest.It will apeear in your journal in game.

    ->XP_Percentage: this is a multiplicator for the amount of XP you type in the PlotXPPercentage field of your .dlg file.
  • Name: this is the name of the quest that will appear in your in game journal.

    - in the STRREF box, type -1 to enter custom text (it means that you do not refer to any entry in the .tlk file).
    - in the Language ID box, type 0 for English, 1 for French, 2 for German, 3 for Italian, 4 for Spanish 5 for Polish.
  • PlanetID: This is when the quest is related to a specific planet only. Put one of the following numbers:


    Kotor 1:
    PLANET_ENDAR_SPIRE = 0;
    PLANET_TARIS = 1;
    PLANET_EBON_HAWK = 2;
    PLANET_DANTOOINE = 3;
    PLANET_TATOOINE = 4;
    PLANET_KASHYYYK = 5;
    PLANET_MANAAN = 6;
    PLANET_KORRIBAN = 7;
    PLANET_LEVIATHAN = 8;
    PLANET_UNKNOWN_WORLD = 9;
    PLANET_STAR_FORGE = 10;
    PLANET_LIVE_01 = 11; (Yavin Station)

    Kotor 2:
    int PLANET_DANTOOINE = 0;
    int PLANET_DXUN = 1;
    int PLANET_EBON_HAWK = 2;
    int PLANET_KORRIBAN = 3;
    int PLANET_M4_78 = 4;
    int PLANET_MALACHOR_V = 5;
    int PLANET_NAR_SHADDAA = 6;
    int PLANET_ONDERON = 7;
    int PLANET_PERAGUS = 8;
    int PLANET_TELOS = 9;
    int PLANET_HARBINGER = 10;
    int PLANET_LIVE_01 = 11;//The 'live' planets are just space fillers
    int PLANET_LIVE_02 = 12;
    int PLANET_LIVE_03 = 13;
    int PLANET_LIVE_04 = 14;
    int PLANET_LIVE_05 = 15;
    int PLANET_LIVE_06 = 16;

    If the quest is not linked to a specific planet, then type -1
  • PlotIndex: not too sure what the numbers refer to here. I made journal entries in one of my mods but did not used this field (if someone figures out, pls PM me so I can add it to this tutorial)
  • Priority: The priority of the quest in the in game Journal (order in which it will appear).

    0 = Highest
    1 = High
    2 = Medium
    3 = Low
    4 = Lowest

  • Tag = the refrence text to be referred to in your .dlg file Quest field or in your scripts.
    There should not be more than one Journal Category with the same Tag. The tag is an Identifier for the Quest. Per example kor35_findingdustil for the Dustil Quest.


editing the DLG file

In the DLG file, in the Reply list, there is a filed called "Quest": in this field you type the reference to the quest, in other words, what you wrote in the Tag field in global.jrl (in the above example, it was "kor35_findingdustil"). Then, in QuestEntry you mark the value that refers to the plot advancement (10, 20, 25, 30 ,40, etc. - what you typed in the ID field in the jrl file ) to keep track of it.


Adding a journal entry using a script

You can also add a journal entry by using a script instead of attaching it to a .dlg file. This method can be practical when you want, per example, add a journal entry when a certain npc dies or when you get a certain item from a container (Using the OnDeath event or or the OnOpen event).

The syntax is as follows:
Code:
AddJournalQuestEntry (string szPlotID, int nState);
and an example would be:
Code:
void main() 
{ 
  AddJournalQuestEntry("my_quest",40);
}
Giving XP points for the plot

If you want to give xp to your party, then attach a script similar to this one in the script field of the dlg file:

Code:
void main()
{
    GivePlotXP("kor35_findingdustil",35);
}
(note: the 35 value gives 350 XP)

or type the amount of xp you want in the PlotXPPercentage field of the .dlg filed. Scripts are quite useful if you want the XP to be given to you upon defeating a specific npc in battle, per example.



Keeping track of your plot with Globals
Now, if you want the game to remember plot adavancement, you will have to set Globals. Here is a sample script:
Code:
{
    SetGlobalNumber("MY_PLOT", 7);
}
and edit globalcat.2da by adding a line for your plot.

Last edited by Darth333; 07-23-2006 at 03:16 PM.
Darth333 is offline   you may: quote & reply,
Old 05-15-2006, 01:36 PM   #2
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Quote:
Local strings in K-GFF don't work for the descriptions of a quest. I don't understand why...
K-GFF makes editing the journal pretty easy, IMO. After opening the global.jrl file in K-GFF, turn on TLK file dereferencing(Tools: Use TLK file for StringRefs or Ctrl-T) so you can see everything that's already there. To make a new journal entry, I suggest copying an existing Struct from the Categories list and pasting it back into the Categories List. Then in EntryList, Text fields, change the StringRef from ##### to -1.

Now here's the trick. Right click on the Text field in the Treeview and select Add String. This will create a local string that you can edit.






(don't worry about the Type field when editing a local string... it means nothing. )



Last edited by tk102; 08-29-2006 at 12:53 PM.
tk102 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Tutorials: General Tutorials + Tools > How to add Journal entries

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:19 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.