Quantcast
Channel: Modding — Beamdog Forums
Viewing all articles
Browse latest Browse all 11774

Simple Journal Fixes (BG1EE, SoD, BG2EE)

$
0
0
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"
}

Viewing all articles
Browse latest Browse all 11774

Latest Images

Trending Articles



Latest Images