Darkest Dungeon®

Darkest Dungeon®

81 ratings
Glossary Compatibility Fix
   
Award
Favorite
Favorited
Unfavorite
General: UI
File Size
Posted
Updated
2.733 MB
2 May, 2024 @ 7:05am
5 May, 2024 @ 1:21am
3 Change Notes ( view )

Subscribe to download
Glossary Compatibility Fix

Description
--------------------
Summary:

The display of newly added glossary terms from some mods requires support from this mod to be seen, please remember to place this mod at the bottom of mod list.
This mod will generate numerous blank terms at the bottom of the Glossary. If scrolling them makes you feel inconvenient, please consider using the mouse wheel or clicking the arrows on the edge of scrollbar to navigate them faster.


--------------------
Q&A For Players:

Q1: What does this mod do?
A1: This mod grant compatibility to the in-game Glossary, leading to allow modders to use any glossary term number in the range from 0 to 9999. (Of course they should not use the same number that already occupied by vanilla game or other modders, in order to avoid conflict, otherwise they will overwrite each other)

Q2: Why does this mod do that?
A2: Redhook has a complex mechanism on retrieving the glossary term number.
For example: the vanilla game (including all official DLCs) has used glossary term numbers as follows: 1~62, 1001~1006, 2001~2010.
If a modder want to use a set of glossary term numbers which begins from 63, all shall be fine.
BUT, if the modder want to begin from 73, or even from 100, 200, 300... Then they will find themselves unable to see these glossary terms, as Redhook will not retrieve these numbers at all.

Q3: How does this mod fix that?
A3: To force Redhook to retrieve any non-continuous glossary term numbers within the range 0~9999, this mod has put an empty glossary term in EVERY 10 numbers of the range 0~9999.
This fix way might seem to be similar to "Clair's Journal Compatibility Fix" that used to fix Journals, but there is no way to hide empty glossary terms, so there is something more:
To avoid so many empty glossary terms obstructing players from viewing the normal glossary terms, all empty glossary terms have the first letter of title set to "EF BF BF" in hexadecimal, which is the last letter in 3-byte form of UTF-8.
So that all these empty glossary terms will ALWAYS be shown at the bottom of the whole Glossary, NO MATTER which language players are using.

Q4: How do I use this mod?
A4: If you are a normal player, just sort this mod at the bottom of your mod list, which in other words, BELOW ALL OTHER MODS.
If you are a modder who want to make your own glossary terms, select any proper glossary term numbers within the range 0~9999 (Of course they should not be used by vanilla game or other modders, in order to avoid conflict, otherwise yours and others will overwrite each other), then tell your players to use this mod as above mentioned.

Q5: There are too many empty glossary terms, how do I search the one I need to view?
A5: All these empty glossary terms will ALWAYS be shown at the bottom of the whole Glossary, no matter which language players are using.
So if you scroll to empty glossary terms, you should stop scrolling down at once, and try to scroll up back to the normal terms.
Find yourself tired to slowly scroll all these terms? You can click on the two arrows at the top and bottom of the scrollbar, each click on the arrows will scroll one single page of the glossary, which will help you find the certain terms much easier.

----------
For Modders:

(1) How does Redhook perform the retrieve mechanism on Glossary?

This is a bit complex. Redhook perform the retrieve mechanism on Glossary according to the algorithm below:

Start by appending the number 0 to "str_glossary_term_".
Search for this term in the loaded localized text. If found, increase the appended number by 1 and reset the "miss counter". Repeat this process.
If the term is not found, increase the "miss counter" by 1, and increase the appended number by 1. Repeat this process.
If the "miss counter" equals 10, change the appended number to the next multiple of one thousand (which means all unretrieved numbers are abandoned until the next multiple of one thousand) and repeat the process.
Once processing begins from a multiple of one thousand, if the number of searches and the "miss counter" both equal 10, increase the "termination counter" by 1, and change the appended number to the next multiple of one thousand (from section 1000+ jump to 2000, from section 2000+ jump to 3000, etc); otherwise, reset the "termination counter" to 0.
If the "termination counter" equals 3, terminate all "str_glossary_term_" processing flows, so that the whole retrieve mechanism on Glossary ends.

(2) Redhook do have many overflows, so is there a similar limit on Glossary?

Unfortunately, in my test, there is a limit on Glossary, it is about the text length of the whole Glossary.
When this limit on Glossary happens, Redhook will inform us through a blackscreen about text length overflow if we click and open the Glossary page, then the blackscreen crashes after ESC.
But it should be very large thus we might not need to worry too much about it right now.
Let's just use Glossary freely until we actually encounter this problem.

(3) Glossary term numbers that already in-use by vanilla game or existing mods are as follows:

Note:
The list below is only gathered from what I know, surely there should be more than that.
If anyone wanna to add glossary term numbers which has not been included in the list below, you are welcomed to inform me, thank you.
If any modder wanna to use some not-in-use glossary term numbers, please leave a comment to me, so that I can list them here to tell other modders avoid conflicts on these numbers, thank you.
If any modder find your glossary term numbers conflict with this list, please leave a comment to me, I shall inform the creators of those mods to change their numbers if necessary, and thank you too.

Vanilla Game (including official DLCs):
1~62, 1001~1006, 2001~2010

Scarlet Ruins:
63~99
("Scarlet Ruins" has fixed its glossary number conflict, thank Phasmy for the update!)

The Mountain - Updated Version:
1007, 1008, 1009
("The Mountain" has fixed its glossary number conflict, thank Grim_Reaper for the update!)

The Voivode - Reworked:
101~105
(Without this mod to fix Redhook's retrieve mechanism, the glossary terms of this mod will not be seen if there are no other mods filling the numbers from 72~91.)

Grunt's Modded Fallen Heroes:
230~247
(Without this mod to fix Redhook's retrieve mechanism, the glossary terms of this mod will almost have no chance to be seen at all.)

Skadi the corrupting heart:
4001~4005

Slash Blade:
4009~4017

Abigail Williams:
5001~5031

----------
Warning:
Due to a study on the bug that causes glossary of other mods to duplicate the same term for several times, Redhook's glossary algorithm has something wrong on the 10 numbers before every multiple of a thousand since 3000, which leading to multiple duplicated retrieve thread. To avoid that bug, the following glossary term numbers MUST NOT BE USED BY ANY MOD including this compatibility Fix mod.

These special glossary term numbers which must not exist in the whole game are:
2990~2999,
3990~3999,
4990~4999,
5990~5999,
6990~6999,
7990~7999,
8990~8999,
9990~9999.
13 Comments
Cathelia Samicora  [author] 28 Apr @ 5:46pm 
@KOCkey
抱歉,没太明白你所指的意思,请具体描述一下问题。
本mod必须放置于所有模组的最末尾,故理论上不会影响任何mod的术语表本身的词条内容及翻译。
KOCkey 27 Apr @ 11:09pm 
不知道是哪个mod,写在术语表affix开头的怪癖汉化不了
Cathelia Samicora  [author] 22 May, 2024 @ 8:36am 
Glossary term number statistics update:
Abigail Williams:
5001~5030 changed to 5001~5031
(Add a new term on number 5031)
Cathelia Samicora  [author] 7 May, 2024 @ 8:48pm 
@Toxic Masculinity You are welcome, I'm glad this mod can be helpful.
Toxic Masculinity 7 May, 2024 @ 7:49pm 
That's crazy to me that I've never even known about any of this somehow. I'm gonna check this out right now though. Thanks for all the response, and for making this mod as well.
Cathelia Samicora  [author] 6 May, 2024 @ 10:58pm 
Glossary term number statistics update:
The Mountain - Updated Version:
1007, 1008, 1009
("The Mountain" has fixed its glossary number conflict, thank Grim_Reaper for the update!)
Cathelia Samicora  [author] 6 May, 2024 @ 10:58pm 
Glossary term number statistics update:
Scarlet Ruins:
63~99
("Scarlet Ruins" has fixed its glossary number conflict, thank Phasmy for the update!)
Cathelia Samicora  [author] 5 May, 2024 @ 6:46pm 
@Toxic Masculinity
You may test it by installing the following mods:
The Voivode - Reworked (You won't see Voivode's glossary terms if you don't install this mod, BUT don't install Scarlet Ruins at the same time to do the test, otherwise according to Redhook's Algorithm, Scarlet Ruins' glossary number 61~97 will auto help Voivode's glossary number 101~105 to be seen, this is because 97+10=107 & 107>101.)
Grunt's Modded Fallen Heroes (You won't see its glossary terms no matter how, unless you install this mod)
Other mods that using glossary have already selected the very few special numbers as their FIRST glossary number, which can always be searched by Redhook according to the Algorithm (63~73, 1007~1017, 2011~2021, 3000~3010, 4000~4010, 5000~5010), so that they can always be seen as long as they begins the number in that range mentioned above, and keep there numbers consecutively. But as you see, these numbers are very few compared to 0~9999, that is the significance of this mod.
Toxic Masculinity 5 May, 2024 @ 1:43pm 
Are there any current mods that are available to test this mod with?
Cathelia Samicora  [author] 5 May, 2024 @ 1:41am 
Warning to modders who want to add new glossary terms:
Due to a study on the bug that causes glossary of other mods to duplicate the same term for several times, Redhook's glossary algorithm has something wrong on the 10 numbers before every multiple of a thousand since 3000, which leading to multiple duplicated retrieve thread. To avoid that bug, the following glossary term numbers MUST NOT BE USED BY ANY MOD including this compatibility Fix mod.

These special glossary term numbers which must not exist in the whole game are:
2990~2999,
3990~3999,
4990~4999,
5990~5999,
6990~6999,
7990~7999,
8990~8999,
9990~9999.