Mike1072 Posted September 28, 2010 Share Posted September 28, 2010 Can't reproduce at all, either on Tutu or BGT. Different variations of Haer'Dalis and Xan install fine for me. However, it might be fixable, because I noticed a bug that applies solely to Haer'Dalis, Jan and Xan. I think the Jan and Xan code should currently be functional, because existing_weapon_type will be set appropriately providing the creature has any proficiencies, and by this point the creature has gone through the L1NPC proficiency selection. I did notice something else in Jan's code though: PATCH_IF (NOT "existing_proficiency_stars" > 0x05) THEN BEGIN WRITE_LONG ("offset_to_effects" + "i" + 0x14) ("existing_proficiency_stars" + 0x01) END That condition should be "existing_proficiency_stars" WRITE_LONG ("offset_to_effects" + "i" + 0x14) (("existing_proficiency_stars" < 0x5) ? ("existing_proficiency_stars" + 0x1) : 0x5) Link to comment
Miloch Posted September 28, 2010 Share Posted September 28, 2010 That condition should be "existing_proficiency_stars" < 0x05. The whole thing could just be replaced with what the others use:WRITE_LONG ("offset_to_effects" + "i" + 0x14) (("existing_proficiency_stars" < 0x5) ? ("existing_proficiency_stars" + 0x1) : 0x5) Actually, I don't think the augmented proficiency point was ever intended to apply to Jan or Xan, since it doesn't in the unmodded game. So that line should be deleted entirely for them. However, they should get 1 point in crossbow and longsword respectively if they don't have it already (so they can use their special weapons). The subsequent patch handles that. Coran gets an extra point in longbow and Haer'Dalis gets an extra point in shortsword (or a single point if they don't have one already), so that line of code applies only to them. Ideally, the whole monstrous proficiency routine should be revised so NPCs with "special" weapons start out with 1 point in that proficiency, to prevent them getting a free point later on (unless they're supposed to - i.e. for Coran and Haer'Dalis). But I don't really want to delve into that code. If and when Nythrun ever gets back, she'll probably rewrite it from scratch or something anyway. Link to comment
erik Posted September 28, 2010 Share Posted September 28, 2010 I've already broken Haer'dalis once by poking around the bonus proficiency code. I'm not touching it for a while yet. That bloody code is thorny. (Seems the Coran code I added is working, though. At least noone has reported otherwise.) Link to comment
BloodBeast Posted September 29, 2010 Share Posted September 29, 2010 I say scrap the bonus proficiencies, it is basically a cheat, and, if you ever need it, there's always the trusty ShadowKeeper to add proficiencies. And while you're at it, scrap the start up equipment, except for special items like Edwin's necklace, and Shar Teel's armor and weapons, since she's expected to be fighting. because there's always an abundance of equipment in stores, and on dead foes, etc. (if this will make the code shorter) Link to comment
BloodBeast Posted September 29, 2010 Share Posted September 29, 2010 That condition should be "existing_proficiency_stars" < 0x05. The whole thing could just be replaced with what the others use:WRITE_LONG ("offset_to_effects" + "i" + 0x14) (("existing_proficiency_stars" < 0x5) ? ("existing_proficiency_stars" + 0x1) : 0x5) Actually, I don't think the augmented proficiency point was ever intended to apply to Jan or Xan, since it doesn't in the unmodded game. So that line should be deleted entirely for them. However, they should get 1 point in crossbow and longsword respectively if they don't have it already (so they can use their special weapons). The subsequent patch handles that. Coran gets an extra point in longbow and Haer'Dalis gets an extra point in shortsword (or a single point if they don't have one already), so that line of code applies only to them. Ideally, the whole monstrous proficiency routine should be revised so NPCs with "special" weapons start out with 1 point in that proficiency, to prevent them getting a free point later on (unless they're supposed to - i.e. for Coran and Haer'Dalis). But I don't really want to delve into that code. If and when Nythrun ever gets back, she'll probably rewrite it from scratch or something anyway. Haha, that fixed my install error!! Kudos!!! I removed that extra proficiency code, and no more errors, YEAH !! Link to comment
BloodBeast Posted September 30, 2010 Share Posted September 30, 2010 I deleted the whole block for Xan. Link to comment
Miloch Posted September 30, 2010 Share Posted September 30, 2010 I say scrap the bonus proficiencies, it is basically a cheat, and, if you ever need it, there's always the trusty ShadowKeeper to add proficiencies.I tend to agree to some extent (about them being cheats) but if you have to resort to SKing your characters, it doesn't make a whole lot of sense to use this mod too, since it aims to make such manual hackery unnecessary. Like I said, Xan should just get 1 manual fixed point in longsword that uses up one of his allotted points. That code should do nothing if you've already given him that point (at least if you deleted the WRITE_LONG line indicated). I don't think we're going to go deleting huge chunks of someone else's mod just yet, so it would be better if you could test the proposed code. If it works for Coran, that should be "good enough" but it helps to make sure. You can always delete the block and reinstall after that if you really don't want him to be able to use the moonblade. Link to comment
BloodBeast Posted September 30, 2010 Share Posted September 30, 2010 The bonus proficiency doesn't crash the install, the thing that cause the crash is the following. PATCH_IF ("existing_weapon_stars" < 0x1) THEN BEGIN SET "weapon_type" = 0x5a SET "proficiency_stars" = 0x01 LAUNCH_PATCH_MACRO ~fj_add_cre_prof~ END I imagine it should read PATCH_IF("existing_proficiency_stars" < 0x1) THEN BEGIN Link to comment
Miloch Posted September 30, 2010 Share Posted September 30, 2010 I imagine it should readYeah, typo. So does that work then? In other words: END ELSE PATCH_IF (~%script_name%~ STRING_EQUAL_CASE ~xan~) THEN BEGIN READ_LONG 0x02c4 "offset_to_effects" READ_LONG 0x02c8 "count_of_effects" SET "existing_proficiency_stars" = 0x0 FOR ("i" = 0x00; "i" < ("count_of_effects" * 0x108); "i" = ("i" + 0x108)) BEGIN READ_LONG ("offset_to_effects" + "i" + 0x08) "existing_opcode" PATCH_IF ("opcode" = 0xe9) THEN BEGIN READ_LONG ("offset_to_effects" + "i" + 0x18) "existing_weapon_type" PATCH_IF ("existing_weapon_type" = 0x5a) THEN BEGIN READ_LONG ("offset_to_effects" + "i" + 0x14) "existing_proficiency_stars" SET "i" = ("count_of_effects" * 0x108) END END END PATCH_IF ("existing_proficiency_stars" < 0x1) THEN BEGIN SET "weapon_type" = 0x5a SET "proficiency_stars" = 0x01 LAUNCH_PATCH_MACRO ~fj_add_cre_prof~ END Link to comment
BloodBeast Posted September 30, 2010 Share Posted September 30, 2010 Oh yeah, works now, no more errors, at least. Kudos mate! Link to comment
Miloch Posted October 4, 2010 Share Posted October 4, 2010 And while you're at it, scrap the start up equipment, except for special itemsThis already happens, but some equipment gets conditionally replaced depending on which class/kit and proficiencies you chose. However, some NPCs should have no starting equipment at all (because they're imprisoned or whatever) and I believe Xan in BG1 should be one of those. So I excluded him from getting starting equipment. Most of the other such NPCs (such as Dynaheir, Branwen, etc.) were already in that routine. Link to comment
BloodBeast Posted October 4, 2010 Share Posted October 4, 2010 Ok, it could be just me, because I like the BG style weapon proficiencies (TweakPack), so most NPCs start out with the wrong weapons, that's why I said that. Is there a way to accomodate this? I could try and figure that one out... "If BG style weapon proficiencies is installed" THEN ? ELSE ? Link to comment
Miloch Posted October 4, 2010 Share Posted October 4, 2010 Ok, it could be just me, because I like the BG style weapon proficiencies (TweakPack), so most NPCs start out with the wrong weapons, that's why I said that. Is there a way to accomodate this? I thought I already mentioned this, but from the readme:If you'd like to install the BG1-style proficiencies component of BG2 Tweaks, you should install that component after Level 1 NPCs. Strange results are likely to occur if Level 1 NPCs is installed afterwards.So... like it says. You can install the other tweaks before L1NPCs, if you want, but install that one after it. It might be possible to accommodate it in reverse, but it would take some (more) nasty hackery, and I'd like to avoid that if there's a workaround (assuming the workaround works). In L1NPCs, just choose the BG2-style proficiencies with the knowledge they'll be converted to BG1-style after you install the tweak. Link to comment
BloodBeast Posted October 5, 2010 Share Posted October 5, 2010 I may try to hack it one day, Link to comment
Miloch Posted October 5, 2010 Share Posted October 5, 2010 Did you try the workaround before trying to hack several thousand lines of code? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.