Jump to content

BGII custom .cre as racial enemy, or no?


ericp07

Recommended Posts

You'd add an effect to the CRE (THAC0 vs. type and/or Damage vs. type bonus). Specific comes right before gender in NI (274h). Since she'll still have a racial enemy, I'd suggest bonuses less than 4 (also because you can't give a reaction penalty, but that has zero effect in BG2). Also keep in mind that these effects don't stack (only one THAC0 vs. type and Damage vs. type bonus will ever be applied, so if she has a weapon equipped that gives similar bonuses applicable to your custom CRE, she might lose her special bonus and get the weapon's, or vice-versa, etc.).

 

You don't need to add anything to SPECIFIC.IDS if you don't want (just pick a unique number); you can force NI to use unmapped values by Control-clicking (right-click) the field and selecting Edit as Hex (or whatever) and just entering the number you picked in hex notation. You can also just WRITE_BYTE 0x274 value from the TP2 when copying your CREs.

 

Note that specifics value is the group of the character; you want it to be unique from already assigned groups (there are lots of them) so your new CREs don't get picked up by other NPCs' InMyGroup() and NearestMyGroup* and other such (unlikely to ever be a problem in actual gameplay, though).

 

I've almost got this nailed down. I've given Hinaeariel a THAC0 vs. Type bonus for my defined IDS of "MALARITE," but I've been unsuccessful in figuring out how to set up a Damage vs. Type effect for her against this same type, which would apply to her attacks with any weapon. IESDP shows me that I can assign a specific type of damage, which suggests to me that I could apply this effect to a weapon, but that won't satisfy my goal of giving the character herself a bonus (just a +2 to damage) vs. any and all MALARITEs.

 

What am I missing here? If I'm doing things the "dirty" way here, I'll be sure to clean everything up in my .tp2 before the mod's general deployment, of course :suspect:

 

Thanks again,

Eric

Link to comment

You may want to create your own EFFs and add Use EFF file effects to her, sorry. Look at the other Damage vs. type and THAC0 vs. type EFFs to see the format of those (you set the bonus at the "Parameter 3" field; the dice values can't be used for either). (This should only really be necessary when adding the vs. type effect via item or spell, however.)

 

When adding the Use EFF effects, set the IDS target to GENERAL.IDS (3) - GENERAL_ITEM (0) and select your EFF file in the resref field and make sure the EFF file has its IDS target set to whatever you want the bonus against (in this case Specific.ids - Your Specific).

 

Damage vs. type doesn't allow you to set damage type. It adds the given bonus to any damage roll for an attack that hits an applicable creature.

Link to comment
You may want to create your own EFFs and add Use EFF file effects to her, sorry. Look at the other Damage vs. type and THAC0 vs. type EFFs to see the format of those (you set the bonus at the "Parameter 3" field; the dice values can't be used for either). (This should only really be necessary when adding the vs. type effect via item or spell, however.)

 

When adding the Use EFF effects, set the IDS target to GENERAL.IDS (3) - GENERAL_ITEM (0) and select your EFF file in the resref field and make sure the EFF file has its IDS target set to whatever you want the bonus against (in this case Specific.ids - Your Specific).

 

Damage vs. type doesn't allow you to set damage type. It adds the given bonus to any damage roll for an attack that hits an applicable creature.

 

I had a feeling there was another way to do it than what I was trying to do, and yes, dice would be irrelevant, as this is simply a bonus of +2 hp damage vs. the specific type. I must admit to being a bit nervous venturing into unknown territory here, but it's a good way to learn, too!

 

In the end, Hinaeariel should enjoy both a +2 to hit (which I've accomplished with the THAC0 vs. Type effect) and a +2 to damage vs. all creatures with the Specific designation of Malarite.

 

I have noticed that, in the character creation screen that shows a ranger's racial enemy choices, "Beast of Malar" appears at the bottom, so that any ranger may select that. I'm glad it worked! This reaffirms to me that the best way to handle the Specific.ids issue for the mod will be to include the relevant code in Hinaeariel's .tp2 file.

 

Thanks again,

Eric

Link to comment

It all looks clear enough to me, after another visit to EP#HINA.CRE in NI, except for devSin's mention of "resref." I don't see anything in the fields that reflects that. Where is it, that I might enter the appropriate data? I've added the Damage vs. Type effect, btw.

 

Thanks,

Eric

Link to comment

For the Use EFF file effect, the field would be labeled "Resource" (and selecting it in NI would bring up a list of .EFF files in the current install). With most effects, it's just unknown (the field is always a resref but is only useful for some effects). If you've added the bonus effects directly, there won't be any Resource field to modify.

 

"resref" is short for "resource reference" -- the (maximum) 8 letter name of the referenced resource (sans extension; the game always knows what type of resource to look for). Same for "strref," which is a "string reference" (the index of the string in dialog.tlk).

Link to comment
For the Use EFF file effect, the field would be labeled "Resource" (and selecting it in NI would bring up a list of .EFF files in the current install). With most effects, it's just unknown (the field is always a resref but is only useful for some effects). If you've added the bonus effects directly, there won't be any Resource field to modify.

 

"resref" is short for "resource reference" -- the (maximum) 8 letter name of the referenced resource (sans extension; the game always knows what type of resource to look for). Same for "strref," which is a "string reference" (the index of the string in dialog.tlk).

 

Thanks for the clarification. I've added effects directly, so that explains why I didn't see the field. I gathered that resref stands for resource reference, so I was looking for variants of that. Makes more sense now.

 

I think I've even stumbled upon another effect I wanted to give to one of Hinaeariel's custom weapons, which is the critical hit modifier. However, IESDP says there's a paramater of a statistic modifier to enter, but I see no such field in NI for that effect. Also interesting is that NI calls the effect something like Improve Critical Hits or Increase Critical Hits or something like that, but IESDP calls it Critical Hit Modifier. In any case, I'm glad I found it, and was able to add it to the axe. That's the axe's only special ability, above its magical "plus" to hit and to damage.

 

Happy modding,

Eric

Link to comment

Assuming you're using the right build (i.e., mine), it should be "Critical threat range bonus" (NI avoids using "modifier" in effect names). The threat range is extended to 20 - amount (a dice roll >= 20 - amount that hits is a critical hit). Extending the threat range for PCs (especially "while equipped") is pretty cheesy, though.

 

-1 may disable critical hits altogether (it doesn't crash, but I don't think I ever tested it to see if a natural 20 really doesn't crit).

Link to comment
Assuming you're using the right build (i.e., mine), it should be "Critical threat range bonus" (NI avoids using "modifier" in effect names). The threat range is extended to 20 - amount (a dice roll >= 20 - amount that hits is a critical hit). Extending the threat range for PCs (especially "while equipped") is pretty cheesy, though.

 

-1 may disable critical hits altogether (it doesn't crash, but I don't think I ever tested it to see if a natural 20 really doesn't crit).

 

I was looking at the wrong thing. Sorry about that!

 

I don't see anything with the name you mentioned, but I'm trying to look at too many things at once now. I'll focus on Use EFF for now. You said I'd have to create my own EFF to reference, right? I don't know how to set that up, but I'll keep stumbling along, and ask for more help when I get stuck.

 

Thanks,

Eric

Link to comment

That took little enough time *L* I'm lost in NI land now. I found that I'd previously assigned an effect to the axe to do additional damage vs. Chaotic Evil creatures, but I don't want it to do that, so I want to change this to an increased chance of scoring a critical hit. Ideally, if this is possible, I want to double the chance or range or what have you, but if that's either impossible to enumerate or overpowered for the item, I'll settle for a single increment of increase to the range, if that makes sense. I've poked around as much as I can without further guidance, though, so please advise me on how to proceed.

 

Thanks,

Eric

Link to comment

To create your own EFF file, you should be able to select an existing EFF that's close to what you want and choose File - Add Copy of (or Edit or whatever dumb PC-ish menus are up there). You'll be prompted for a filename and can then select your new EFF and edit it.

 

You can't double the range that I know of (but I haven't ever tried it). In every case, the range will either be 1 (default), 2 (19-20; some weapon style bonuses), or 20 (1-20; HLAs), so 1 should give you what you want most of the time. Just add the effect to the CRE, select the right effect, and enter 1 in the first parameter field (if your version of NI has it listed as unknown, just select the field and change the first "00" in the edit field at the bottom of the window to "01" and click Update). You don't need to set the target for attached effects, but you'll want the timing mode to be 9 (dispel/resistance can be left at 0).

Link to comment
To create your own EFF file, you should be able to select an existing EFF that's close to what you want and choose File - Add Copy of (or Edit or whatever dumb PC-ish menus are up there). You'll be prompted for a filename and can then select your new EFF and edit it.

 

You can't double the range that I know of (but I haven't ever tried it). In every case, the range will either be 1 (default), 2 (19-20; some weapon style bonuses), or 20 (1-20; HLAs), so 1 should give you what you want most of the time. Just add the effect to the CRE, select the right effect, and enter 1 in the first parameter field (if your version of NI has it listed as unknown, just select the field and change the first "00" in the edit field at the bottom of the window to "01" and click Update). You don't need to set the target for attached effects, but you'll want the timing mode to be 9 (dispel/resistance can be left at 0).

 

OK, I've done this, and saved the file CRITINC.EFF. Now, you say I should add this to the .CRE, not to the .ITM, right? I'm concerned about linking the effect to the correct weapon, as this effect shouldn't happen with any of Hinaeariel's other gear. I'll see if I can work it all out, and check back soon.

 

Thanks,

Eric

Link to comment

Add it to the weapon. Add an equipped Use EFF file effect, target self (1), while equipped (2), probability 100, and select your EFF file from the "Resource" field. Set the IDS target to General.ids (3) / GENERAL_ITEM (0).

 

For the threat range bonus, you could just attach the effect to the item directly (Critical threat range bonus, target self, amount 1, while equipped, probability 100), however. The EFF file is needed for Damage vs. type or THAC0 vs. type bonuses from an item (they require fields that are only available in EFF V2 structures), but the crit bonus only needs the first parameter for the range modifier.

Link to comment

Apologies for the sligth thread derailment:

 

NI avoids using "modifier" in effect names

 

Any particular reason?

Several of the effects allow positive and negative values, and, to my mind, a negative bonus doesn't make sense - so I use 'modifier'.

Link to comment
Add it to the weapon. Add an equipped Use EFF file effect, target self (1), while equipped (2), probability 100, and select your EFF file from the "Resource" field. Set the IDS target to General.ids (3) / GENERAL_ITEM (0).

 

For the threat range bonus, you could just attach the effect to the item directly (Critical threat range bonus, target self, amount 1, while equipped, probability 100), however. The EFF file is needed for Damage vs. type or THAC0 vs. type bonuses from an item (they require fields that are only available in EFF V2 structures), but the crit bonus only needs the first parameter for the range modifier.

 

I think I've got it all set up this way. The only difference is that, in the Type list, there's no entry that begins with the word "Critical." The only reference to critical hits I see in the list is "Increase critical hits," so I chose that, and added everything else exactly as explained for both the added weapon Effect and in the CRITINC.EFF file itself (which I did reference where appropriate).

 

On a related note, Hinaeariel's scimitar is supposed to have a bonus to hit Malarites, and a bonus to damage against them. So, I added the THAC0 vs. Type and Damage vs. Type to the item, both Instant/while equipped, but in the THAC0 vs. Type effect, I didn't see a field where I could assign the amount of the bonus (which should be 2). So, I'm guessing that I set this up incorrectly. I did see where I could assign the number and type of dice for the damage bonus, so I entered those where appropriate.

 

Thanks,

Eric

Link to comment
Any particular reason?

Several of the effects allow positive and negative values, and, to my mind, a negative bonus doesn't make sense - so I use 'modifier'.

I think it makes sense, but Jon pretty much avoided it for whatever reason, and I decided to adopt it as a rule when tinkering with the source.

 

#243 (0xf3) Item: Drain Item Charges [243]

This effect was disabled for ToB (only works in SoA).

 

#250 (0xfa) Spell Effect: Damage Modifier [250]

This effect gives the target maximum damage rolls (base xDy always rolls x*y); Parameter 1 is the stat value for DAMAGELUCK and must be non-zero (the value here doesn't seem to make any difference beyond 0=off else on).

 

#253 (0xfd) Spell Effect: Add Map Marker [253]

This effect was disabled for ToB (only works in SoA).

 

#254 (0xfe) Spell Effect: Remove Map Marker [254]

This effect was disabled for ToB (only works in SoA).

Link to comment

Archived

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

×
×
  • Create New...