Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Simple Journal Fixes (BG1EE, SoD, BG2EE)

lefreutlefreut Member Posts: 1,315
edited March 2017 in UI Modding
Hello,

The new journal in the EEs is not yet fixed and even if my UI mod fix most of the issues, some people may want to use another UI setup. So I decided to extract and post here all the fixes I have.

I will focus only on fixes, no usability or graphical changes. This way, anyone will be able to use them in their own mod.

Tagging @AncientCowboy to see if he can include these in EEUITweaks :)

Fix for information entries

This first fix will ensure that information entries are always show in the journal.



Search for:
table.sort(quest.objectives,compareByRecvTime)
And after this line, add :
if stateType == const.ENTRY_TYPE_INFO then
	local entry = buildEntry(journalId, recvTime, stateType, chapter, timeStamp)
	table.insert(looseEntries,entry)
end

Fix for No Objective Text

This fix the infamous bug where some entries start with 'No Objective Text'.




For BG1EE or BG2EE, search for:
if(objective.text == Infinity_FetchString(quest.text)) then
And replace the line with:
if(objective.text == Infinity_FetchString(quest.text) or objective.text == nil) then

For SoD, you need to add this:
if(objective.text == Infinity_FetchString(quest.text) or objective.text == nil) then
	objective.text = objective.entries[1].timeStamp
end
Before this line:
if(objective.stateType ~= const.ENTRY_TYPE_INFO) then

Fix for empty entries

This fix will hide quest entries that contains no objective.




Search for:
return (questDisplay[row] and questDisplay[row].quest and containsChapter(questDisplay[row].chapters,chapter) and (#questDisplay[row].children > 0))

And replace the line with:
return (questDisplay[row] and questDisplay[row].quest and containsChapter(questDisplay[row].chapters,chapter) and childrenContainsChapter(questDisplay[row].children))

And before the function 'questEnabled', add:
function childrenContainsChapter(children)
	for k,v in pairs(children) do
		if containsChapter(questDisplay[v].chapters,chapter) then
			return true
		end
	end
	return nil
end

Fix for journal popup

This fix will only display the first few lines in the journal popup so that the text is always readable.




Search for:
label
{
	area 92 36 348 26
	text lua "getSubtitleString()"
	text style "label"
	text align left center
	text point 14
	text color D
}

label
{
	area 20 64 472 62
	text lua "getBodyString()"
	text style "normal"
	text align left center
}
And replace these lines with:
text
{
	area 92 36 348 26
	text lua "getSubtitleString()"
	text style "label"
	text align left top
	text point 14
	text color D
	scrollbar 'GUISCRC'
	scrollbar hide lua "1"
}

text
{
	area 20 64 468 62
	text lua "getBodyString()"
	text style "normal"
	text align left top
	scrollbar 'GUISCRC'
	scrollbar hide lua "1"
}

Post edited by lefreut on
AstroBryGuyKilivitzMelicampCrevsDaakbob_vengAvenger_teambg

Comments

  • AncientCowboyAncientCowboy Member Posts: 199
    Not a problem :smile: - A few regular expressions to write, a little WeiDU, bit of testing...poof! I'll add it to my in-progress 2.3 update.

    AstroBryGuyMelicampCrevsDaak
  • AstroBryGuyAstroBryGuy Member Posts: 3,404
    @lefreut - This line doesn't exist in the vanilla SoD UI.MENU:
    lefreut said:


    Fix for No Objective Text

    This fix the infamous bug where some entries start with 'No Objective Text'.

    Search for:
    if(objective.text == Infinity_FetchString(quest.text)) then
    And replace the line with:
    if(objective.text == Infinity_FetchString(quest.text) or objective.text == nil) then
    Should the replacement line be added to the UI.MENU file? I can find the appropriate location by looking for the surrounding lines from the BG2EE UI.MENU file.

  • lefreutlefreut Member Posts: 1,315
    edited March 2017
    @AstroBryGuy I didn't realize that the entire block is missing in SoD UI.menu.

    In this case you need to add this:
    if(objective.text == Infinity_FetchString(quest.text) or objective.text == nil) then
    	objective.text = objective.entries[1].timeStamp
    end
    Before this line:
    if(objective.stateType ~= const.ENTRY_TYPE_INFO) then

    CrevsDaak
  • MelicampMelicamp Member Posts: 231
    This is awesome! Thanks for your hard work!

    CrevsDaak
  • HaHaCharadeHaHaCharade Member Posts: 1,504
    @lefreut

    Would it be possible to further modify the journal so that when a quest is complete, it shows not only the completion dialogue, but the clues which came before it? I ask this because some journal entries are tricky to get - you have to charm a commoner, etc. All this vanishes though upon completion of the quest. I would think if you expand out a finished quest, it would show all entries -- including the conclusion.

    But maybe that's just me?

  • HaHaCharadeHaHaCharade Member Posts: 1,504
    edited March 2017
    Also with the fix, there seems to be an "issue" (?) Where rumors don't show in Temples. But maybe its just not ones I've already gotten. I'll do some testing.

    UPDATE: I checked. You still get the entries, it just doesn't show them in the preview window of the temple.

  • HaHaCharadeHaHaCharade Member Posts: 1,504
    Also the quest closure piece you created works great. The only quest I'm seeing as staying out there forever now is "Murder Most Foul" which should really be informational as it has no finish. Its the piece of information you get from the Flaming Fist soldier who is pursuing Viconia (if you charm him).

  • lefreutlefreut Member Posts: 1,315

    Would it be possible to further modify the journal so that when a quest is complete, it shows not only the completion dialogue, but the clues which came before it? I ask this because some journal entries are tricky to get - you have to charm a commoner, etc. All this vanishes though upon completion of the quest. I would think if you expand out a finished quest, it would show all entries -- including the conclusion.

    I don't think that's possible.

    Also with the fix, there seems to be an "issue" (?) Where rumors don't show in Temples. But maybe its just not ones I've already gotten. I'll do some testing.

    UPDATE: I checked. You still get the entries, it just doesn't show them in the preview window of the temple.

    I tried a little and it seems to work fine for me :/

    Also the quest closure piece you created works great. The only quest I'm seeing as staying out there forever now is "Murder Most Foul" which should really be informational as it has no finish. Its the piece of information you get from the Flaming Fist soldier who is pursuing Viconia (if you charm him).

    This quest should be fixed or changed into information. I don't think I can do that from the UI.

    HaHaCharade
  • HaHaCharadeHaHaCharade Member Posts: 1,504
    edited March 2017
    Weird the temple thing is working now... Sorry about that. Kind of a fluke I guess.

    I changed the Murder Most Foul quest in EEKeeper to info. Worked.

  • VafeelVafeel Member Posts: 3
    all this looks promesing, but as a simple end-user.. how can I fix my journal with all that codelines? :D

  • lefreutlefreut Member Posts: 1,315
    @Vafeel you can use EEUITweaks to easily install this tweak (and more if you want).

Sign In or Register to comment.