Skip to content

General mod Questions thread

1434446484970

Comments

  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2019
    I have a couple of questions about some CRE flags (offset 0x010).

    1) What's the meaning of Allegiance tracking, General tracking and the like? The IESDP says "related to random walk". Could someone clarify this statement?

    2) What's the meaning of Un-interruptable (BIT31)?
  • GoidaGoida Member Posts: 118
    Right. I'm trying to patch stores with my item. It should be available at stores (type =0) that: sell items (bit 0 at 1), buy items (bit 1 at 1), identify items (bit 2 at 1), stealing is disabled (bit 3 at 0) and they do not buy stolen goods (bit 12 at 0). I'm trying this code but getting a parsing error at the bitwise operation:
    COPY_EXISTING_REGEXP GLOB ~.*\.STO~ ~override~
    
    READ_BYTE  0x8 type
    READ_SHORT 0x10 kind
    
    PATCH_IF
    
    type = 0
    ((kind BAND 0b0001000001101111) =  0b0000000000000111)
    
    THEN BEGIN
    
    ADD_STORE_ITEM "ACIDTH_#" LAST #0 #0 #0 ~IDENTIFIED~ #3
    
    END
    END
    BUT_ONLY
    

    What's wrong with it? I'm using READ_SHORT to get the first 16 bits - READ_BYTE doesn't go as far as the fence switch and READ_LONG would be rather too long indeed.
  • The user and all related content has been deleted.
  • GoidaGoida Member Posts: 118
    I think I'm missing a simple "&" there.
  • RaduzielRaduziel Member Posts: 4,714
    Another general modding question.

    Let's say we have Spell X and I don't want it to be cumulative with itself.

    Is it redundant to add Opcode 321 (spell X) to the beginning of its effects and add an Opcode 206 (spell X) at the end of its effects?

    Thanks!
  • kjeronkjeron Member Posts: 2,367
    Raduziel wrote: »
    Is it redundant to add Opcode 321 (spell X) to the beginning of its effects and add an Opcode 206 (spell X) at the end of its effects?
    One or the other.
    321 at the beginning to refresh the effect/duration when cast without stacking the effects.
    206 at the end to block further casts until the duration runs out, effect/duration cannot be refreshed.
  • RaduzielRaduziel Member Posts: 4,714
    @kjeron

    And what if we are talking about a second spell is not cumulative with the first?

    I'm specifically looking at Improved Haste. Nothing in it removes Haste (321) or blocks Haste (206). AFAIK Improved Haste should overcome Haste, right?

    Thanks!
  • kjeronkjeron Member Posts: 2,367
    Raduziel wrote: »
    I'm specifically looking at Improved Haste. Nothing in it removes Haste (321) or blocks Haste (206). AFAIK Improved Haste should overcome Haste, right?
    Improved Haste does have OP206 effects blocking SpWi305 (Haste) and SpRa301 (Stalker Haste).
    It doesn't need to remove it though, the most recent haste effect has priority.
  • RaduzielRaduziel Member Posts: 4,714
    @kjeron I love when things get solved without me doing nothing.

    Thanks!
  • [Deleted User][Deleted User] Posts: 0
    edited March 2019
    The user and all related content has been deleted.
  • The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    Yet another General Modding Question - that's is such a convenient title for a thread.

    1) I want to make an individual under Stoneskin/Ironskin immune to Poison/Disease when those are delivered by a melee or missile attack. So the touch of a mummy would be ineffective, but the Contagion spell would work.

    2) I want to make an individual under the spells above and Mirror Image/Reflect Image immune to the aforementioned effects plus Level Drain.

    I know I can't just throw an Opcode 101 because it will

    i) Remain during 12h, even if the Stoneskin/Ironskin is gone.

    ii) Protect the individual under Mirror Image/Reflect Image even if an attack lands (AFAIK there is a % chance of striking the creature protected by these spells).

    Thanks!
  • The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    There's already a mod for that...

    Can you tell me the name?

    I'll reverse-engineer it and add this feature to DoF's spells alterings.

    Thanks!
  • The user and all related content has been deleted.
  • The user and all related content has been deleted.
  • [Deleted User][Deleted User] Posts: 0
    edited March 2019
    The user and all related content has been deleted.
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367
    edited March 2019
    2 questions regarding limiting access to wizard spells. Looks like the kit exclusion flags are not working for me, possibly because the kit flag I'm using (Skald) is not a valid kit for the class I'm using (mage/thief).
    The method you're describing works. A mage/thief with the skald kit cannot learn a spell with the skald kit unusability flag. Are you setting the skald flag on the spell(stops learning) or the scroll(stops casting)?
    It just doesn't work at chargen selection, because chargen spell selection is broken to begin with. If you add one of the specialist exclusion flags to the kit (any of them) along with the skald flag, then it does work, as it "turns on" the spell filter, but then you are also restricted from those spells, given the extra spell pick and forced to select a spell of that school.
  • [Deleted User][Deleted User] Posts: 0
    edited March 2019
    The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    Hi :)

    I have a spell that turns a character into a polar bear (Animation = 29187 | BAM = MBER with palette MBER_PO) and I want to make a polar bear appear in the inventory screen while the character is transformed.

    I've used the Slayer as a base to make the BAM (attached - an idea gently gave by @LavaDelVortel ). This BAM is being copied to the override folder as MBERINV.bam. However, when the character transforms the Inventory screen remains empty.

    PS: I've noticed that the Black and Brown bears have their inventory BAMs as MBER0INV and MBER1INV (respectively) and the size of frames and cycle is way different from those of the Slayer, so I guess I'm even more lost than I initially thought.

    What am I doing wrong?

    Thanks!

    Edit: I'm using Legacy v1 for the BAM file.


    Ok, I discovered how to make the thing appear at the inventory (with the idea Lava gave a few posts below), but I still need to know how to make the color change from Brown to White. Doing it manually (using NI) gives an odd result:

    chondp3t55ja.png

    I imagine that it can be better than this.
    Post edited by Raduziel on
  • LavaDelVortelLavaDelVortel Member Posts: 2,729
    I think it may be tricky with bear, as there are different bear that use one base: MBER. I checked their INI files and it looks that all mention MBER and then use different palettes. To check INI you need to check animation number. For polar bear it's 0x7203 BEAR_POLAR so the ini you are may want to check is: 7203.ini

    Not sure how to deal with animation that have one base but palette options... you may try to look for a petter. So 0x7200 BEAR_BLACK uses MBER0INV and 0x7201 BEAR_BROWN uses MBER1INV. Maybe the correct name is MBER3INV? But that's just a guess.
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    @LavaDelVortel

    Edit:

    MBER3INV does the trick, but the colors are odd (doing it manually as reported a few posts above). I need to know how to use the BMP feature that the game uses to color things.

    Thanks!
    Post edited by Raduziel on
  • LavaDelVortelLavaDelVortel Member Posts: 2,729
    edited March 2019
    @Raduziel - And perhaps MBER3INV is correct. The problem is that - as you noticed - those animations for some reason use different dimensions than most in BG2. Perhaps it's because they were already present in BG1 and they were coded to work with the old siezes. Perhaps if you used dimensions as the other bear ones AND the center X and center Y as them, perhaps it would work just fine?
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    @Raduziel - And perhaps MBER3INV is correct. The problem is that - as you noticed - those animations for some reason use different dimensions than most in BG2. Perhaps it's because they were already present in BG1 and they were coded to work with the old siezes. Perhaps if you used dimensions as the other bear ones AND the center X and center Y as them, perhaps it would work just fine?

    Maybe, but the color is brown. The png I'm using is white. That is the oddest part IMO.

    Stupid me.
    Post edited by Raduziel on
  • LavaDelVortelLavaDelVortel Member Posts: 2,729
    @Raduziel - are you sure? The one you attached is brown.
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    @Raduziel - are you sure? The one you attached is brown.

    Apparently, I edited the right file and deleted the wrong one.

    I'll try to solve this mess later.

    Thanks!

    Edit: @argent77 How can I, using NI, use the palette (bmp) to alter the color of a BAM? Like the game itself does - it takes a creature X and alters only its colors.

    When I select Post-Processing -> Replace Colors -> Palette -> Load Palette -> MBER_POR.bmp the BAM disappears completely (I'm using MBER1INV.BAM as a base):


    q7j5rold7lrm.png


    Thanks!
    Post edited by Raduziel on
  • argent77argent77 Member Posts: 3,448
    @Raduziel Palette swapping in the BAM converter is somewhat buggy in the latest release. It should still work in the previous NI version though (v2.1-20180531).
  • UlbUlb Member Posts: 295
    @Raduziel
    Are you talking about swapping the palette of the actual animation or is this solely about the inventory bam? If it's the later, you could also simply extract it as graphics and then edit those with a tool like gimp or photoshop and rebuild the bam. It's very straight forward and will probably yield better results.
  • UlbUlb Member Posts: 295
    Got a question of my own:
    Does anyone have information or a tutorial on how to determine at which frame of an attack animation the actual 'hit' connects?
    I am moderately sure I've red somewhere that this can be done via a .bmp(?) file or something similar but can't seem to find any information on that.
Sign In or Register to comment.