Jump to content

[spoilers] Mechanics of the Lore From Learning mod


Recommended Posts

I promised this in the readme, so what follows is a breakdown of how you actually receive lore bonuses. The variables mentioned here are all available and adjustable in cdlore/customize.tpa. These are used at install time, so you'll need to make your adjustments to this file before installation.

Note that all of these depend heavily on resting, specifically the script that runs once you hit the rest button. The mod deliberately puts all of this scripting at the end of the script so that higher-priority events  (e.g. a love talk) can preempt the mod checks; this is why it's recommended to install LFL after mod NPCs. Also note that these individual components can preempt one another e.g. if you get a lore point from books, it may delay your martial lore point.

Books Provide Lore Bonuses

The idea here is pretty straightforward: every time the party rests, the PC will spend time reading books. The PC gets three 'actions' per rest (customize this with the variable actions_per_rest) and reading a book is one action. After five books are read (books_to_read variable) the player earns a lore point. This process can be repeated until a max of 10 lore is earned (max_lore_from_books).

I have built a framework so that special lore books will, by themselves, earn the player a lore point and consume an entire night's reading. For now, the only book that has been so designated is the History of the Fateful Coin.

Weapon Knowledge Provides Lore Bonuses

This one's a lot simpler: earning grandmastery in a single weapon earns you one lore point. This is a one-off; getting grandmastery in a second weapon does not earn you another point.

A second lore point can be earned through proficiency (just one pip) in 6 different weapons (number_weapon_profs). By default weapon styles do not count towards this bonus, though you can have them count by enabling count_weapon_styles.

Party Members Provide Lore Bonuses

There are a total of six available lore points here, three from race and three from class. The idea for both is simple: it checks if party members are of a race or class different than the PC's and, if a threshold is reached, it increments a variable every rest. After a certain number of rests you'll earn a lore point.

For race, you need three other races than the PC (other_races) and receive a bonus after 3, 10, and 30 rests (race_bonus_1, race_bonus_2, and race_bonus_3). I've included the player-selectable races plus what I could find from the game and mods (e.g. vampire for Hexxat and Valen, tiefling for Haer'Dalis, goblin for M'khiin, and rakshasa for Verr'sza). If I'm missing someone here, let me know.

Class checks work on the same idea. You'll need four other classes (other_classes) and receive points after 5, 15, and 45 rests (class_bonus_1, class_bonus_2. and class_bonus_3). These checks are in the form of xxx_ALL so being a multiclass will actually work against you here as e.g. a fighter-mage counts as both MAGE_ALL and FIGHTER_ALL in these checks. On the flipside, a paladin with just Aerie (cleric-mage) and Jaheira (fighter-druid) would hit the threshold due to their multiclassing. Kits do not affect the checks and barbarians are also, internally, classed as fighters.

I have some vague plans to expand this for NPCs of more 'exotic' backgrounds--someone like Viconia or Haer'Dalis should really count for more than someone like Imoen or Jaheira.

Defeating Monsters Provides Lore Bonuses

The first time you see a dead monster of race X (essentially anything 100-199 in race.ids), it increments the counter. At 10, 30, and 60 different types of dead monster (monster_bonus_1, monster_bonus_2, and monster_bonus_3) you'll get a lore point at the next rest period. This is a simple check and doesn't really care if the party was the one actually doing the killing, and also relies on having Party AI enabled since it abuses dplayer scripting.

I will probably lower the third threshold at some point as 70 (edit: default is now 60 as of v3) is actually fairly difficult to reach as not all of the race.ids entries are filled or valid.

Exploring Areas Provides Lore Bonuses

The player accumulates exploration points for visiting areas and will earn a single lore point at three different point thresholds, defaulting to 150/400/800 (area_bonus_1, area_bonus_2, area_bonus_3). All 'master areas' are worth a point. A master area is a technical term, but basically any major area of the game is a master area--e.g. Beregost is a master area, all of the smaller homes/shops/inns inside Beregost are not.

In addition to master areas, other areas provide variable bonuses up to five points. In general temples, taverns, and inns are worth 2, famous landmarks are 3, areas specifically relating to the PC's special heritage are 4, and extraplanar travel is 5. You can see (and adjust) these scores are desired in arealist.tpa in the /lib folder.

For modders, if you want your areas to contribute, simply set value to the score you think your area should have, and then extend the area script with cdlore/baf/area.baf with an EVALUATE_BUFFER.

Edited by CamDawg
Added notes for new component
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...