Jump to content



Recommended Posts

I believe most of this is known already, but I'll post for posterity.


Lore is calculated on-the-fly by the engine for party members. You could set Minsc's lore to 150 in his creature file, but it'll drop to its normal value when he joins the party. I don't know if this is true for non-party members, nor can I think of a way to actually test, as lore is useless for non-party members. To have a non-standard lore value or bonus/penalty, it needs to be applied as an effect.


Lore is calculated as ((level * rate) + int_bonus + wis_bonus). Intelligence and wisdom bonuses are from lorebon.2da and the rate is the lookup value in lore.2da, based on class. For multiclass characters, (level * rate) is calculated for both classes separately and the higher of the two values is used--they are not cumulative. For example, a level 13 cleric/13 mage will have 39 lore (13 * 3) not 52 ((13 * 3) + (13 * 1)). I assume dual-class characters work the same way. I'll try and test it further.

Link to comment

You can have perma effects that modify lore (you just have to use timing method 9, instead of 1) if you want it to stick.

In this case it is not a 'permanent after death' nor a 'permanent after bonuses' but a 'permanent after levelup' :)


The difference (i think i already said it), that some effects modify the character sheet with timing method 1 and don't stick as effect, but they always stick if used with timing method 9.

Link to comment

Yeah, most of this research came about from trying to institute a lower-than-bard-average lore score for Delainy. In the end, it was a timing 9 effect as you described. The rest of the info came from researching a storekeeper tweak. :)

Link to comment

Yet another thing people know, but that's not in the IESDP.

I'll make sure to add it, so this thread serves as a good reminder.


While I'm here though - is there anything else people can think of that everyone knows, but no-ones written down?

The fact that dialogs do not compile their scripting actions/triggers, perhaps?

Link to comment

Sorry to play through, but I am hoping that you don't mean I can't use

OR(3) !Dead("obj1") !Dead("obj2") !Dead("obj3")

in the conditions for dialogue branching compiled from a D file in Tutu and BG2 successfully...

Link to comment

Nope. Avenger is referring to the fact that actions and triggers are handled slightly differently by the engine for dialogues and scripts.


To the engine, something like Dead(Player1) is meaningless. It actually needs the numeric values of these commands, which is the purpose of IDS files--essentially a lookup table for linking stuff that makes sense to us (Dead()) to something that makes sense to the engine (0x4051). When you compile a script, the symbolic actions, triggers, IDS references, etc. are converted to their numeric equivalents at compilation time. This means you could delete/alter/mangle your IDS files and your scripts would still work fine.


Dialogues use plain text triggers and actions which are looked up by the engine in real-time as the game is played, meaning it always needs valid IDS files. 'Compiling' a dialogue file is a bit of a misnomer--when WeiDU 'compiles' a dialogue file it's really just creating a dlg with the proper links between states, triggers, actions, etc. The symbolic references are not converted to their numeric equivalents.

Link to comment
While I'm here though - is there anything else people can think of that everyone knows, but no-ones written down?


spells.ids the first number of the numerical spell code reflects the spell type (mage/cleric/innate/special).

Link to comment

What the "script compiler" does is technically a psuedo-compiler; it points the application to the routine without haveing to do the string manipulation and syntax checking. It typically speeds things up to about 25% of pure machine code, depending on a number of factors.


The Infinity Engine includes a script interpreter; which seems redundent to the psuedo-code interpreter. It uses the psudo-code for AI scripting, and the text interpreter for dialogs (because, typically, the game is not in a timing-critical stage during a dialog). I don't know (not having seen the source) whether active dialogs are psudo-compiled on the fly when the creature is active, or whether they are interpreted on an as-needed basis. I would suspect the triggers would be psudo-compiled as they are timing-critical, to some degree.


The ^D displays the current frame rate, the target frame rate, and the AI block maximum I think. For most modern machines the third number should be 4800, which seems to be the compiled in size of the AI block table.

Link to comment

wizwom: how does this relate to the lore opcode.

And why do you write in the archives where only processed stuff should go?


You wrote interesting things but to the wrong place.


btw, param#2 = 2 doesn't modify lore as percent, but makes the lore 100% (for identify).

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...