ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed Jan 22, 2020 10:19 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Mar 16, 2019 12:49 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
My original Schrödinger's Lore addon has an annoying bug: because the game's notes on which which lore you've seen is also used to decide whether to place a lore object, the lore listed in the "Show known Lore" dialog will sometimes be different from the lore you've actually seen. In retrospect, I really should have implemented that whole thing differently… :oops:

Anyway, backpatching the proper implementation into the original addon would invove multiple moving parts and would almost certainly break badly, so I'm starting over with a new addon, cleverly named Schrödinger's Lore (Mark 2). :wink: As you can no doubt imagine, you definitely shouldn't use both at once, and if you're going to use either, you should definitely use this one.

[If you're an addon author and your addon adds lore that would benefit from this reordering, you can get in on this too: in your ToME:load hook, check for the presence of the PartyLore:addLoreGroup() method, and if present, call it to add whatever lore groups you need (after loading your lore definitions, of course :wink: ). Check this addon's hooks/load.lua for examples. (Fortunately, this is exactly the same mechanism provided by the original Schrödinger's Lore addon, so your modifications will work the same for both addons.)]

[Technical notes:]
Code:
Hooks:
  ToME:load [to add our lore groups]
  Entity:loadList [to modify lore objects as needed]
Superload:
  mod.class.interface.PartyLore:
    addLoreGroup() [added, to add lore groups (hence the name)]
    getLoreGroup() [added, for use by Party:learnLore() below]
    checkLoreFilter() [added, for lore objects' :checkFilter() method]
  mod.class.Party:
    learnLore() [to check for lore groups and change lore to be learned as needed]
  mod.dialogs.Birther:
    on_register() [show an addon collision dialog if necessary]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Last edited by Zizzo on Sat Mar 16, 2019 12:57 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Mar 16, 2019 12:53 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
Frequently Asked Questions:

What's the difference between Schrödinger's Lore and Schrödinger's Lore (Mark 2)? Can I use both?

Schrödinger's Lore and Schrödinger's Lore (Mark 2) both perform the same function of arranging for various groups of lore to be learned in sequence, independent of which actual lore object you happen to find first. Mark 2 uses a slightly better implementation that avoids a problem in the original implementation (basically, different parts of the game disagreed on which lore the player had actually learned).

Both addons modify the same part of the game, so using both of them at once is likely to cause errors or damage your character; the character creation dialog will warn you if you try to create a character with both addons enabled. The original Schrödinger's Lore is officially deprecated in favor of Mark 2, so if you are going to use either, we recommend using Mark 2.

What was wrong with the original Schrödinger's Lore, and why not fix it instead of making a new addon?

The original Schrödinger's Lore implementation tried to avoid altering the internal structure of the lore objects you find lying around on the floor. Unfortunately, the game also uses its internal notes about which lore the player has seen to decide whether to place certain lore on a level at all, with the result that, for instance, vising the orc internment camps in the "wrong" order could lead to some lore not being placed. The attempted fix had the undesirable side effect that the known lore listed in the "Show known Lore" dialog sometimes would not match the lore the player had actually seen, showing some lore you hadn't seen and not showing some lore you had seen.

The proper fix was to use the approach we tried to avoid in the first place: to alter lore objects so that their "should I place this lore?" check would not be confused by our lore reordering. This change was deemed too complex to attempt to retro-fit on the fly onto existing characters; hence the new Mark 2 addon.

But what if I have characters using the original Schrödinger's Lore? Will installing Mark 2 break them?

No, it's fine to have both addons installed, just not both enabled. After installing Schrödinger's Lore (Mark 2), you should go to the Addons dialog and disable the original Schrödinger's Lore addon. Existing characters using the original addon will continue to do so unchanged, while new characters will use Mark 2.

What lore is actually affected by this addon?

Both addons will reorder the following groups of lore:
  • In Scintillating Caves, the two lores on level 2 and the two on level 3.
  • In Ruins of Kor'Pul, the two lores on level 1 and the two on level 2.
  • In Daikara, the two lores on level 4.
  • The five letters between Weisman and Rolf.
  • In the Embers of Rage DLC:
    • In Sunwall Outpost, the two lores on level 2 and the two on level 3.
    • The four Internment Camp reports.
If there are other groups of lore you think would benefit from being reordered in this manner, here would be a good place to suggest them. :wink: Other addons may also arrange for some of their lore to be reordered by this addon (as detailed above).

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group