Skip to content

[MOD] -Scales of Balance- a post-hac tweak mod

1235785

Comments

  • kjeronkjeron Member Posts: 2,368
    If a cre file can only have one or the other, but not effects of both lengths:
    Subtract Effects Offset from Items Offset, divide by # effects. result should be 0x30 or 0x110. Use appropriate values from there.

    If a cre file can both effect lengths:
    You could check the first 8 bytes, if they are all "0", then assume its 0x110 bytes long, otherwise assume its 0x30 bytes long. You would need to store two variables, one to store # of 0x30 effects, and one to store # of 0x110 effects, and use them for location instead of "loop".
    All "0"s in the first 8 bytes of a 0x110 byte long effect are for the Signature and Version fields, which should always be "0", (empty), in a cre file.
    All "0"s in the first 8 bytes of a 0x30 byte long effect would be:
    Opcode 0 (AC bonus)
    Amount: 0
    Type: All Weapons

    Which no creature should ever have, as it would do absolutely nothing.

    extending what you have:
    COPY_EXISTING_REGEXP GLOB ~.*\.cre~ ~override~
    PATCH_IF (SOURCE_SIZE > 0x2c8) BEGIN
    READ_LONG 0x2c4 "effect_offset"
    READ_LONG 0x2c8 "effect_count"
    SET effect0 = 0 effect1 = 0
    FOR (loop = 0 ; loop < effect_count ; ++loop) BEGIN
    READ_LONG (effect_offset + (effect0 * 0x30) + (effect1 * 0x110)) effecttype
    PATCH_IF (effecttype = 0) BEGIN
    READ_LONG (effect_offset + 0x8 + (effect0 * 0x30) + (effect1 * 0x110)) "opcode"
    PATCH_IF opcode = 233 BEGIN
    READ_LONG (effect_offset + 0x10 + (effect0 * 0x30) + (effect1 * 0x110)) prof
    PATCH_IF prof = 99 BEGIN
    WRITE_LONG (effect_offset + 0x10 + (effect0 * 0x30) + (effect1 * 0x110)) 98
    END
    END
    ++effect1
    END
    ELSE BEGIN
    READ_LONG (effect_offset + (effect0 * 0x30) + (effect1 * 0x110)) "opcode"
    PATCH_IF opcode = 233 BEGIN
    READ_LONG (effect_offset + 0x8 + (effect0 * 0x30) + (effect1 * 0x110)) prof
    PATCH_IF prof = 99 BEGIN
    WRITE_LONG (effect_offset + 0x8 + (effect0 * 0x30) + (effect1 * 0x110)) 98
    END
    END
    ++effect0
    END
    END
    END
    BUT_ONLY
  • RoarRoar Member Posts: 41
    bug found: when using the Monitor of Mystra cleric kit, the 'identify spell' does not work. You can memorize it but cant cast it in your inventory screen to identify an item.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
  • RoarRoar Member Posts: 41
    Hmm, trying to fix the identify spell may be for trouble then its worth. I don't think many pple would roleplay this kit for an identify spell anyway. By the way, are you still designing new kits for this mod?
  • [Deleted User][Deleted User] Posts: 0
    edited October 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • CrevsDaakCrevsDaak Member Posts: 7,155
    Yeah, seems like I confused .eff's length with .cre's effect length. Not even sure why D: (this is what you get for coding late at night) Also I wasn't considering v1 effects, but @kjeron‌ has it right, so using his code would be safe IMO.
  • kjeronkjeron Member Posts: 2,368

    Hmm. That is problematic. Identifying enchantments would certainly seem to fall under Mystra's purview, so I'd like this to work. But, I have no idea how the identification process works in the inventory screen. Maybe it only looks for the wizard spell?

    I had a similar problem when trying to give the Monitor a priest version of Spell Sequencer: you could cast it, and choose priest spell to load into the sequencer, but you would not get an innate to cast the sequencer. It may be doing something behind the scenes that is mage-only (so it works fine with cleric/mages).

    The unfortunate solution for sequencers was to take the spell away (for now, at least)... I fear that might be the solution for Identify as well...

    @subtledoctor
    Good News:
    D5_MYS72.spl
    First, the filename of the spell creating the Sequencer must be 7 characters long, otherwise it will not automatically give you the innates to activate the sequencer.
    D5_MYS7.spl

    Second, you will have to create the innate spells to activate the sequencers, they are not generic, but spell-specific. You'll need two, and the engine will give you whichever one is appropriate automatically, so you don't need to use Opcode 171 "Give Innate Ability", but they will have to remove themselves with opcode 172. Important: the Activate Spell Sequencer Opcodes must target "Self".

    Target: Living Actor
    Activate Spell Sequencer, exact same filename suffixed with a "d", with target: "Self"
    D5_MYS7d.spl

    Target: Any Point in Range
    Activate Spell Sequencer at Point, exact same filename suffixed with a "p", with target: "Self"
    D5_MYS7p.spl

    I would suggest copying the existing files from another sequencer and just changing their filename and resources, everything else about them, except maybe the icon, can be left as is.

    Third, if your using Near Infinity, Opcode 260, Activate Spell Sequencer at Point, currently does not display a .spl file resource menu to select from, you will have to "edit as string" and type it in manually, or change the opcode to something that does display a .spl file resource menu to select from, then switch it back.


    Bad News:
    As for Identify, I couldn't find anything to suggest it isn't hard-coded. I was unable to duplicate the spell, scroll, or the glasses. However, you could always give them a massive Lore bonus and forget the spell.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    SoB.zip 27.4K
    Post edited by [Deleted User] on
  • kjeronkjeron Member Posts: 2,368
    edited September 2014
    COPY_EXISTING ~WEAPPROF.2da~ ~override~
    REPLACE_TEXTUALLY ~ 2~ ~ 3~
    String 25001 becomes String 35001.
    Just add a space after the 2:
    	REPLACE_TEXTUALLY ~ 2 ~ ~ 3 ~
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Seems reasonable, I guess. It's hard for me to take everything into account to make a definitive judgement
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
  • DemivrgvsDemivrgvs Member Posts: 315
    A notification linked me here but I cannot find where I was mentioned...

    Anyway, if you are wondering what SR has done or will do about Mantles and Absolute immunity:
    - Mantle becomes a Prismatic Mantle (same as PnP Prismatic Aura - vanilla Mantle plus a FireShield effect with powerful Prismatic Spray-like effect when struck).
    - Improved Mantle is replaced by Moment of Prescience (this Divination variant of Mantle will require a few tests for AI sake when it comes to detecting and countering it)
    - Absolute Immunity in the current build already protects from ANY source of damage.
  • The user and all related content has been deleted.
  • DawgliciousDawglicious Member Posts: 224
    Since you could pick and choose what to install, I feel like splitting it isn't really needed. Though maybe it would be better for compatibility with other mods?
  • So I'm thinking about splitting this in half: Part 1 with item tweaks, stat tweaks, and proficiency changes; and Part 2 with kits and NPC rekitting. How do people feel about that? Good idea? Or am I looking for problems where there are none?

    You could do what BG2 Tweaks does and ask the user up front whether they even want to see certain categories.

  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • The user and all related content has been deleted.
  • SparhawkSparhawk Member Posts: 5
    Subtledoctor if you can tell me where i would find those files (i've never made amod so i don't know how to dig into those things) i'll get you the filenames
  • DemivrgvsDemivrgvs Member Posts: 315
    @subtledoctor sppr116 is SR's Sunscorch. I will restrict Animate Skeleton Warrior (sppr623) and Death Knight (sppr703) to evil priests yes.

    When it comes to detect SR, currently I have this:
    COPY ~spell_rev\shared\dvimhere.mrk~ ~override~ // Used to detect if SR is installed
    COPY ~spell_rev\shared\dvsrv3.mrk~ ~override~ // Used to detect if SR V3 is installed
    I may add or change the latter, but the former can be what you are looking for.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014

    Okay, BG2EE players out there, forget PMing files, forget looking up the proficiencies. Can you just tell me the filenames (that's all) for Dorn, Neera, Hexxat and Rasaad? Okthxbye.

    Taken from NPCLEVEL.2DA:
    Dorn: Dorn8, dorn9, dorn10, dorn12, Dorn14
    Neera: Neera8, Neera10, Neera15
    Rasaad: Rasaad8, Rasaad10, Rasaad12


    Hexxat:
    OHHEX8, OHHEX9, OHHEX10, OHHEX11, OHHEX13, OHHEX15, OHHEX25
    Replace OHHEX with OHHFAK for Clara


  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • WithgilWithgil Member Posts: 39
    Hi
    really loving your mod :) looking forward to play some Baldurs Gate this weekend.
    I am using following NPCs:
    Angelo
    Tashia
    Ninde
    Arath
    Ajantis (BG2)
    Sarah
    Faren
    Dace
    Petsy
    would be great if you could do them too.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
  • WithgilWithgil Member Posts: 39
    Mmh there should be no problem with your kits.

    Tashia - sorcerer
    Ninde - necromancer
    Arath - druid
    Sarah - ranger
    Ajantis - paladin
    Faren - fighter dual classed into a thief
    Dace - bounty hunter
    Petsy - bard
    Angelo - fighter dual classed into a mage

    Ajantis should be a paladin of Helm or Torm.
    And maybe an option for Sarah to be rekitted into a forest runner.
Sign In or Register to comment.