[v1.3.0+] Schrödinger's Lore

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[v1.3.0+] Schrödinger's Lore

#1 Post by Zizzo »

As long-time players will know, there are lots of lore entries in the game that are pretty much meant to be read sequentially, and may not make sense if you read them out of order. Usually they're on different levels, which sorts them out well enough, but if more than one are placed on the same level (the two in the first level of Kor'Pul, for instance), the order in which you read them will depend on which lore object you find first, which won't always be the right order.

As a quickie workaround for that, I've whipped up my new Schrödinger's Lore addon. This addon adds the functionality of "lore groups", which are shown in order. If you pick up a lore object for lore that's in a group, then instead of seeing the lore for that object, you'll see the next lore in its group that you haven't seen yet.

For a first pass, the addon defines the following lore groups:
  • 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.
And in Embers of Rage:
  • In Sunwall Outpost, the two lores on level 2 and the two on level 3.
  • The four Internment Camp reports. (This one was my primary motivation for this addon; IIRC, the order the prides are listed in the quest description is different from the order in which you need to do the prides to get the reports in the right order).
If I've missed any other lores that could benefit from this reordering, let me know and I'll add them in later version.

[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.]

Technical notes:

Code: Select all

Hooks:
  ToME:load [to add our lore groups]
Superload:
  mod.class.interface.PartyLore:
    addLoreGroup() [added, to add lore groups (hence the name)]
    getLoreGroup() [added, for use by Party:learnLore() below]
  mod.class.Party:
    learnLore() [to check for lore groups and change lore to be learned as needed]
Last edited by Zizzo on Wed May 23, 2018 3:58 am, edited 1 time in total.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.3.0+] Schrödinger's Lore

#2 Post by Zizzo »

Well, crap. Turns out we can't use the game's internal tracking of what lore we've seen to track our substitutions; if the game think's we've already seen, for instance, the Rak'Shor internment camp's lore because we substituted it for one of the other camp's lore, that it won't place Rak'Shor camp's lore when we enter Rak'Shor camp.

We fix this (I hope…) in v1a by tracking lore substitutions in the addon's internal data, and by pretending to the game's lore tracking that we learned the lore it told us to learn instead of the one we substituted. [That means that if you have an existing character using this addon, you may see some of the lore we juggle twice; We Apologize for the Inconvenience.™]
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply