Skip to content

Elric's Stormbringer

CrevsDaakCrevsDaak Member Posts: 7,155
edited August 2014 in General Modding
I don't know when I first had this idea and commented it to @Metalloman‌, who encouraged me to make this mod... But I never found a way to do something and abandoned it a long time ago (and I lost because of a HD crash). Yesterday Metalloman reminded me of this, and, with more IE modding knowledge I did it pretty quickly (considering the time I had taken to make it originally).

So... Here's the mod :D It just adds the sword and patches it into a store, Sorcerous & Sundries for TuTu & BG:EE, Ribald's special stock for BG2:SoA and Lazarus Librarus (the Arcana Archives) in BGT, BG2EE and BG2:ToB, but only in his Saradush stock to avoid duplicates.
Post edited by CrevsDaak on

Comments

  • ErgErg Member Posts: 1,756
    @CrevsDaak, I gave a quick look at the code and I've spotted a potential problem.

    You are using some of new colours added by 1PP for this sword, so it will crash the game in vBG1, Tutu or BGT, if the "Extended palette entries" component of 1PP is not installed.

    There are two possible solutions:

    1) easy way: don't use colours with a numeric code greater than 116

    2) difficult way: check the size of the files MPALETTE.BMP and MPAL256.BMP (see the 1PP documentation for more details about those files) to detect if the user has the "Extended palette entries" component and based on the results use an ITM file with either the old or the new colours
  • CrevsDaakCrevsDaak Member Posts: 7,155
    edited August 2014
    @Erg‌ thanks, I fixed by placing a
      PATCH_IF !GAME_IS ~bgee bg2ee~ BEGIN
    READ_LONG 0x6a "effect_offset"
    READ_SHORT 0x70 "effect_count"
    FOR (loop_count = 0; loop_count < effect_count; ++loop_count) BEGIN
    READ_SHORT (effect_offset + (loop_count * 0x30)) "effect_opcode"
    PATCH_IF (effect_opcode = 7) BEGIN
    READ_LONG (effect_offset + 0x4 + (loop_count * 0x30)) "old_value"
    PATCH_IF (old_value > 116) BEGIN
    WRITE_LONG (effect_offset + 0x4 + (loop_count * 0x30)) 112
    END
    END
    END
    block in the middle. I always forgot about that, since I don't delve much around item colors (most of times I use a item with the colors I want as base, but here I used a common long sword & and common TWS as bases).
    Post edited by CrevsDaak on
  • Camus34Camus34 Member Posts: 210
    I know this is old, but could you add this to SOD as well?
Sign In or Register to comment.