ericp07 Posted March 19, 2008 Share Posted March 19, 2008 Hello, Is it possible to assign a creature of my own creation (based on an existing creature) in BGII as the racial enemy for my joinable ranger NPC? The creature in question would be set to spawn in any outdoor wilderness area, sometimes used by evil lycanthropes as though they're hunting dogs. This would play perfectly into the mod's tone, and the creature will be used in this way even if I can't assign it as the character's racial enemy (in which case, she'll likely have lycanthropes as her racial enemy). Thanks, Eric Link to comment
devSin Posted March 19, 2008 Share Posted March 19, 2008 Racial enemy needs to be a race from RACE.IDS. If you give your creature a unique race, then yes, you probably can (I think you'll have to append the entry to HATERACE.2DA so that it has some display text, and then Player1 will also be able to choose it, but it's the best you can do). You could also give your PC a THAC0 vs. type bonus for the race in question, but be warned that these values don't stack (if these NPCs are also alignment evil and your ranger also has a THAC0 vs. type bonus against evil creatures, say from an equipped weapon or whatever, the engine will only pick one of the bonuses to use). Any of the other racial enemy bonuses aren't important, so it would work close enough (although she'll also need a real racial enemy and will get all the bonuses against that race too). Link to comment
ericp07 Posted March 19, 2008 Author Share Posted March 19, 2008 Racial enemy needs to be a race from RACE.IDS. If you give your creature a unique race, then yes, you probably can (I think you'll have to append the entry to HATERACE.2DA so that it has some display text, and then Player1 will also be able to choose it, but it's the best you can do). You could also give your PC a THAC0 vs. type bonus for the race in question, but be warned that these values don't stack (if these NPCs are also alignment evil and your ranger also has a THAC0 vs. type bonus against evil creatures, say from an equipped weapon or whatever, the engine will only pick one of the bonuses to use). Any of the other racial enemy bonuses aren't important, so it would work close enough (although she'll also need a real racial enemy and will get all the bonuses against that race too). Hmmm...in that case, this idea may not be feasible. The creature in question is based on the panther, and I haven't attempted to modify the race entry (the idea that a new race could in any way be defined didn't occur to me before). However, the creature isn't truly meant to be related to any creature in nature, as it is properly an extra-planar creature that assumes two different forms. I can invoke the creature in either form from the CLUAConsole, but I haven't yet worked on designating spawn points. The beast hunts alone, in pairs, or in small packs, and is indeed evil. I'm not sure if I should attempt this or not, at least for now, but to do so would be a big plus for the mod. Thanks, Eric Link to comment
ericp07 Posted March 22, 2008 Author Share Posted March 22, 2008 As the creature currently stands, race is defined as "cat." RACE.IDS has an entry for cat, but HATERACE.2DA does not. I can't add it to that file because I don't know what should be included in the columns to the right of the creature name (STRREF, IDS, and STRREF_HELP). I'll check the creature's .CRE again to see if I can find the appropriate values there. I'd rather create a unique race for this creature, but not sure what all is required for that. Thanks, Eric Link to comment
igi Posted March 22, 2008 Share Posted March 22, 2008 I can't add it to that file because I don't know what should be included in the columns to the right of the creature name (STRREF, IDS, and STRREF_HELP). STRREF = string reference of the creature race IDS = the IDS value from race.ids for the creature race STRREF_HELP = string reference description of the race It's in the IESDP. Link to comment
ericp07 Posted March 22, 2008 Author Share Posted March 22, 2008 I can't add it to that file because I don't know what should be included in the columns to the right of the creature name (STRREF, IDS, and STRREF_HELP). STRREF = string reference of the creature race IDS = the IDS value from race.ids for the creature race STRREF_HELP = string reference description of the race It's in the IESDP. OK, I've looked these up. I assigned the number 160 as the creature's IDS, as I saw that this number isn't currently used in RACE.IDS, so I added BEAST_OF_MALAR with the number 160 to the file. I'm still not clear, though, on how the values for STRREF and STRREF_HELP are derived. I'm sure I can't simply plug in some made-up values for these. Are they generated after I perform some process? I need to know what's required on my part in order to get the right data in the right place, in order to add my creature to HATERACE.2DA. Oh, and do I need to add anything to my .tp2 file, or to the .CRE files (there are two, one for each form the creature takes)? Thanks! Eric Link to comment
devSin Posted March 22, 2008 Share Posted March 22, 2008 I don't want to look for the exact column structure; assuming <editor_name strref ids strref_help>: APPEND HATERACE.2DA "BEASTIE 99999 160 99998" COPY_EXISTING HATERACE.2DA OVERRIDE REPLACE 99999 ~Beast of Malar~ REPLACE 99998 ~The beast of Malar. It will eat you.~ Link to comment
ericp07 Posted March 22, 2008 Author Share Posted March 22, 2008 I don't want to look for the exact column structure; assuming <editor_name strref ids strref_help>:APPEND HATERACE.2DA "BEASTIE 99999 160 99998" COPY_EXISTING HATERACE.2DA OVERRIDE REPLACE 99999 ~Beast of Malar~ REPLACE 99998 ~The beast of Malar. It will eat you.~ Too sweet! Should this go in the portion of my .tp2 that copies the relevant .CREs? I'll test it. Hmmm...maybe I'll change the descriptive text some, though Thanks $1M, Eric Link to comment
devSin Posted March 23, 2008 Share Posted March 23, 2008 It can go anywhere in your TP2. REPLACE text string does a simple search/replace, replacing "text" with the strref for ~string~ (WeiDU searches dialog.tlk to see if the string exists and adds the string if not and returns the strref), so it will REPLACE 99999 with something like 74201 (or whatever strref the string gets added at) in a normal install. Note that entries are listed in the same order as the file (they're not sorted), so it will look a bit odd to have "Beast of Malar" show up after "Zombie" or whatever in the character creation string. But the patches would be more complex (you could use INSERT_2DA_ROW or REPLACE_TEXTUALLY to put your new entry in alphabet/lexicographical order); this should be enough to get it working, though (you can worry about making it pretty later). Link to comment
ericp07 Posted March 23, 2008 Author Share Posted March 23, 2008 I discovered that, even after adding the code to my .tp2 and reinstalling the mod, I still needed to manually enter the data into RACE.IDS and HATERACE.2DA via NearInfinity in order to be able to select BEAST_OF_MALAR as a racial enemy in Hinaeariel's .CRE file. No big deal...but now I realize that this narrows her focus too much. As I don't have a way to assign an identifier to various creatures as "followers of Malar," I figure I need to select one "race" as racial enemy. If this is true, I'll use lycanthrope as Hinaeariel's racial enemy. Ideally, I'd be able to use a common identifier for some evil clerics, druids, rangers, lycanthropes, and of course the Beast of Malar, in order to tie them all together and make them all Hinaeariel's racial enemy. This is one of those cases where reverting a 3rd Edition character to 2nd Edition loses something in translation. If there's another way to "unite" the above-mentioned foes in order to grant Hinaeariel the same kind of advantage associated with fighting a ranger's racial enemy, I'd love to know how to set that up, as it would speak to one of the overriding themes of my mod, and be a way to make Hinaeariel stand out among rangers in the game Thanks, Eric Link to comment
igi Posted March 23, 2008 Share Posted March 23, 2008 If there's another way to "unite" the above-mentioned foes in order to grant Hinaeariel the same kind of advantage associated with fighting a ranger's racial enemy Rather than giving a bonus on the race field (as the ranger racial enemy does), give a bonus based on the specifics filed (and set the specific value for your target creatures). Link to comment
ericp07 Posted March 23, 2008 Author Share Posted March 23, 2008 If there's another way to "unite" the above-mentioned foes in order to grant Hinaeariel the same kind of advantage associated with fighting a ranger's racial enemy Rather than giving a bonus on the race field (as the ranger racial enemy does), give a bonus based on the specifics filed (and set the specific value for your target creatures). That's perfect! If I can define and assign something like MALARITE, and add that to the "creatures" I mentioned earlier, I'll be in business I'll go back to NI and take a stab at this. Now, in order to apply the bonus Hinaeariel should get when fighting thusly identified foes, do I need to add an effect, or some other entry, to her .CRE? Thanks, Eric Link to comment
Icendoan Posted March 23, 2008 Share Posted March 23, 2008 I would imagine so, or to an item on her. Icen Link to comment
ericp07 Posted March 23, 2008 Author Share Posted March 23, 2008 I've added MALARITE and a number in SPECIFIC.IDS, but I'm not sure which field would be appropriate to assign this in an effect that I can add to Hinaeariel's .CRE. I'll see if I can figure it out by looking at effects already present in her file, but of course additional info is always appreciated Thanks! Eric Link to comment
devSin Posted March 23, 2008 Share Posted March 23, 2008 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). Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.