Adding kits to enemies?
Greener
Member Posts: 430
Hypothetically if I wanted to add the Barbarian kit to Tazok, would the following suffice:
or do I need to add the individual abilities from the kit, for example immunity to rage, backstab and movement rate bonus ect...?
BEGIN COPY_EXISTING_REGEXP GLOB ~tazok.*.CRE~ ~override~ PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN WRITE_LONG 0x244 0x00004000 END
or do I need to add the individual abilities from the kit, for example immunity to rage, backstab and movement rate bonus ect...?
0
Comments
Alternatively, script the creature to run this upon creation, once:
This is probably better / more correct:
@kjeron
Related question: if the NPC in question is meant to be joinable and I decide to add kit abilities manually (i.e., via ADD_CRE_EFFECT), then I need to set "Parent Resource Type" (located at offset 0x90), "Parent Resource" (located at offset 0x94) and "Caster Level" (located at offset 0xC8) appropriately, right? Otherwise, once that CRE joins the party, its CLAB table is processed and this will grant it kit abilities twice (not intended of course).
My understanding is that you need to set "Parent Resource Type" to 1 (SPL), "Parent Resource" to the SPL that grants the kit ability you're adding (e.g., "SPCL122" if the CRE in question is an Archer and you're adding Missile Thac0/Damage bonus), and "Caster Level" to the level of the CRE in question (in case the "Parent Resource" SPL scales with level / is granted several times like "SPCL122").
Provided that's correct, I've got some questions:
If possible could you help me understand how your code is "better / more correct". I'm not very mod savvy thus the majority of my attempts are trial and error and reading others code.
Well, the first instruction allows you to store in the "kit_id" variable the hexadecimal number associated to BARBARIAN, whatever this number is (so that you don't need to know/remember/look for it). IDS_OF_SYMBOL will automatically pick it up for you based on the keyword BARBARIAN. OK, this is not necessary, but I find it quite useful. I mean, BARBARIAN is easier to remember with respect to 0x00004000 or whatever...
As far as these two lines are concerned,
here's the explanation...
Caster level is only relevant to Dispel Magic.
Time applied can be safely ignored here - otherwise it would break imported characters created before this field was utilized.
The 31500(ticks) = 7 hours game time, which is the time a new game starts in Candlekeep.
"Non-magical ability" flag is relevant when casting the spell (Wild Surge, Dead Magic, Casting Failure, etc...).