Jump to content

kjeron

Members
  • Posts

    485
  • Joined

  • Last visited

Posts posted by kjeron

  1. Saving against the EFF of op272 triggers a save, but doesn't block the effect.  It will still process the "Save for Half" flag though.

    The EFF applied by Op272 works this way for everything: Magic Resistance, Probability, Saving Throws, opcode Immunity, Spell Deflection/Reflection/Trapping.

    The EFF will trigger and process them, and then be applied anyway.

    Edit: Notable exception: op198 (reflect opcode) is NOT processed by the EFF at all.

    The only thing that can block the EFF separately from op272 is the 7EYES.2da mechanics and certain state-based (being dead) and animation-based (VOLO) immunities.

  2. 1 hour ago, Bubb said:

    The engine hardcodes the "24" limit as the size of an array that holds the available HLAs, and as the maximum number of points allowed at level up.

    Unless it changed from v2.3, the engine will still display up to 256 HLAs, you just cannot take more than 24 per level-up (and taking any more than once counts for each time).

  3. 1 minute ago, jmerry said:

    The wand of paralyzation's ability is not flagged as hostile. 

    It is though...in all v2.6.6.0 games.

    5 hours ago, Guest Warren said:

    Got the same result with MTOWBA_D in BG1EE 2.6.6.0, the Default script doesn't make it go red but others do. (Tested that CRE in Ulgoth's Beard, where it's not naturally present.)

    The DEFAULT script slot is cleared upon a Frozen/Stone death, likely related to these deaths forcibly removing the creature from the party, which normally updates a creature's DEFAULT script slot.  While the Chunking death also removes a creature from the party, it does not update the DEFAULT script slot, likely because there is no intended recovery from a chunking death.

  4. If they aren't lacking the script block to turn hostile, then they likely have a higher priority script block preventing it from running (which may be a intentional or due to bad scripting).

    The following script block found in some creatures at the top of their OVERRIDE script will intentionally prevent the rest of their scripts from processing while they are frozen/stoned:

    IF
    	OR(2)
    		StateCheck(Myself,STATE_STONE_DEATH)
    		StateCheck(Myself,STATE_FROZEN_DEATH)
    THEN
    	RESPONSE #100
    		SmallWait(5)
    END
  5. 4 hours ago, jmerry said:

    The initial +1 form has "charges", which are used up one at a time when you hit something. 

    charges are used up Hit or Miss, and when a "used up" item switches out it doesn't always work as desired for weapons, as the character may auto-switch to another quick-slotted weapon (or just "fists") when it occurs.

  6. 4 hours ago, rivvers said:

    Opcode 2

    Removes opcode #39 effects and the STATE_SLEEPING flag
    Note: Does not remove the STATE_HELPLESS flag.

    First one.

    Both lines are true.  The second is listed because op39 is capable of setting STATE_HELPLESS on the CRE structure with certain timing modes, in which case this opcode will fall short of removing all of it's effects.  It's not mentioned in similar cure opcodes because their counterparts are only capable of maintaining STATE_HELPLESS, not setting it in the CRE structure.

    On 4/26/2023 at 1:20 PM, rivvers said:

    Maybe it is a bug but it is easy to test. Effects with Type 6 are cumulative, like 0.
    This mode is used internally by opcode 12, for flags 7 & 8. And, yes, these effects are not cumulative.
    BUT this restriction is configured in opcode 12, not in opcode 18.
    So, this mode does not stack if used by opcode 12 because opcode 12 checks if a mode 6 effect is active but if used directly from opcode 18, there is no restriction.

    Type 6 is not cumulative, the source is irrelevant.  Neither op12 or op18 check for existing type 6 effects.  The engine uses the "best" type 6 effect among all those currently present on the creature, similar to Base AC/op0.

    4 hours ago, rivvers said:

    Opcode 46

    also remove opcode #109 and opcode #210

    Cannot remove op210.  Op210 applies op45, which op46 can then remove.  If op210 is presently delayed when op46 is applied, or applied in the same effect stack as op46, nothing will be removed.

  7. You would have to alter/create RNDBASE(.BMP) files for the animation, and then specify them in the animations INI file.  These control when the animation starts and the attack roll/projectile occur.  I have more information about RNDBASE files here.

    You would need to move the red pixels further right, 1 pixel per frame of the animation until the "firing" position (or 1 pixel per 2 frames, not sure).

    You may want to compare RNDBASE1.BMP (default) to RBF18_1.BMP (longer attack animation) as an example.

    Just make sure to save the BMP files with the correct color-depth (4-bit).

  8. Arrays in weidu only store strings/integers.  The following is only storing the strings "test_1" and "test_2", not their arrays.

    ACTION_DEFINE_ASSOCIATIVE_ARRAY test_arrays BEGIN 
        1 => test_1
        2 => test_2
    END

    Any given string can reference both a variable and an array at the same time.  Neither of the following interfere with each other:

    OUTER_SET test = 5
    ACTION_DEFINE_ARRAY test BEGIN a b c d e f END

    As such, Weidu references an array only&always when it expects to do so (immediately after ACTION_DEFINE_ASSOCIATIVE_ARRAY, PHP_EACH, $, RET_ARRAY, etc..., excluding necessary EVALs.)

    If you want to return multiple arrays from a function, you must declare each of them as a RET_ARRAY in the function definition and the function call.

    DEFINE_ACTION_FUNCTION	array_test
    	STR_VAR a = ~~ b = ~~ c = ~~ d = ~~
    	RET_ARRAY	EVAL ~%a%~ EVAL ~%b%~ EVAL ~%c%~ EVAL ~%d%~	BEGIN
    	ACTION_DEFINE_ARRAY ~%a%~	BEGIN 0 1 2 3 etc END
    	OUTER_SPRINT $~%b%~(0) value0	OUTER_SPRINT $~%b%~(1) value1	OUTER_SPRINT $~%b%~(etc) valueetc
    	ACTION_DEFINE_ASSOCIATIVE_ARRAY ~%c%~ BEGIN 0 => 0	1 => 1	2 => 2	etc => etc	END
    END
    LAF	array_test STR_VAR a = test_1 b = test_2	RET_ARRAY test_1 test_2 END
    ACTION_DEFINE_ARRAY	test_arrays	BEGIN test_1 test_2	END
    ACTION_PHP_EACH test_arrays	AS k => v	BEGIN
    	PRINT ~%k%:%v%~
    	ACTION_PHP_EACH ~%v%~	AS _ => op	BEGIN
    		PRINT ~%_%:%op%~
    	END
    END
  9. 2 hours ago, subtledoctor said:

    On BG2EE v2.6 I changed the Abjurer unusability flag in kitlist.2da from 0x00000040 to 0x00000440 - combining the Abjurer and Illusionist bit values. Then I fired up a game and created an Abjurer. Unexpectedly:

    • I could learn Chill Touch and Larloch's Minor Drain at character generation
    • I could cast those spells in the game
    • After removing Chill Touch from my spellbook, I gave myself a copy of SCRL82.itm, and I could learn Chill Touch again.

    You should be able to do the above with added kits just fine.

    It's the 8 specialists, WildMage, and Barbarian however that have hardcoded KITLIST.2da data, IIRC only their last column is read in the EE, and only to determine which kit is actually applied.

  10. It's triggered by the same mechanics as the script trigger, for the character with the effect.  This includes every time an attack is performed against that character.  Attacks are counted according to red pixels in the attackers "RNDBASE#.BMP" file - cosmetic attacks do not count, fake attacks used to round out 1/2 APR values do count.

    Most ranged attacks will trigger it twice, once when the attack is initiated, and again when(if) it damages them.  Melee attacks only trigger once because both events occur simultaneously.  An instantaneous ranged attack would similarly trigger it only once.

  11. 6 hours ago, Luke said:

    As @subtledoctorsaid, in this specific case you might opt for

    COPY_EXISTING "blakblad.itm" "override"
    	WRITE_BYTE 0x31 IDS_OF_SYMBOL ("STATS" "EXTRAPROFICIENCY20")
    	LPF ~ALTER_EFFECT~ INT_VAR ~check_headers~ = 0 ~match_opcode~ = 233 ~parameter2~ = IDS_OF_SYMBOL ("STATS" "EXTRAPROFICIENCY20") END
    BUT_ONLY_IF_IT_CHANGES

    As already said, that weapon stat is supposed to be unused...

    In so doing, you do not need to worry about mods that change grand mastery bonuses...

    That doesn't really help, as there are at least three different issues:

    • using PROFICIENCY_LONGSWORD (or any in-use proficiency) causes conflicts with the character's existing proficiency.
    • using any proficiency stat can lead to permanent adjustments if you level-up or dual-class while it's active.
    • proficiency for the weapon is checked BEFORE the equipped effect gets applied, so you won't benefit from it as an equipped effect. (any change to the inventory will update it, but this shouldn't be required).  Putting the proficiency effect in the spell would get around this, but also apply it to any Longsword, which would not be correct. As equipped or spell-based, it will affect any off-hand longsword, which would be incorrect.

    Simply put, the proficiency stats (their first 6 bits) aren't really designed for temporary alterations.

    Putting the equivalent effects on the weapon, and setting the weapon's proficiency to NONE (so it cannot double-dip), is the only thing that really works in-game.  It may not be as mod-friendly, but that should not have a higher priority.  (Whether or not it should get the defunct speed bonus is questionable.)

    Ideally, there would be an opcode, similar to op345, that could apply a specified (set or minimum) proficiency level to just the weapon it is attached to.

  12. 1 hour ago, Bubb said:
    • The first damage effect on an item ability overrides the ability's base values.
    • Hitting either op318 or op324 stops the search for a damage effect on an item ability.
    • The strength bonus is thrown away if it finds and uses a damage effect.

    Sounds like a bug caused by trying to account for the Snow Maiden's Reaver (IWD) and the "Void" weapons (SoD), which deal no physical damage, but do display that first op12 damage effect as their base damage in the inventory damage comparison.

  13. bg2ee description version is correct:

    Quote

    Armor Class: 0 (4 vs. crushing)

    bgee icon is more complete.  It has both the large and small icon (NI just defaults to display the second one, in-game you'll see the larger one).  The EE's generally don't use the secondary item icons anymore, they just scale down the main icon to fit the inventory slots instead.  Notable exceptions include scrolls (when picked up you see a rolled up scroll).  For whatever reason the secondary icons were deleted from most item icons in BG2EE.

  14. 1 hour ago, subtledoctor said:

    For me, I use it to add a 326 effect in the subspell with target mode 9 “original caster,” 

    This is one unavoidable reason.  The EFF applied by op248/249 ignores it's target field, applying a subspell with further targeting is the only way to get around this.

    If the effect needs any manner of projectile or area-effect, it will require being put in a SPL.

    Some opcodes require either being in an EFF or a SPL/ITM for certain functionality.  (This goes either way, though IMO more in favor of the EFF.)

    If nothing else, it's wasteful use of the namespace.  100 EFF files with a different name, or 1 EFF and 1 SPL file.  EFF are also more versatile the fewer fields they utilize.

     

  15. 53 minutes ago, guyudennis said:

    * Why some opcodes (ie #0, #54) simply refuse to be ALTER_SPELL_EFFECT’ed if parameter1 is to be changed to a negative value? Yet positive value changes always work; or if I delete it first then ADD_SPELL_EFFECT it back, it will now accept negative values without any issue. WTF?

    Quote

    ALTER_SPELL_EFFECT: patch effects on spells. This is a PATCH function. All integer variables except    check_globals, check_headers, header and savebonus default to -1 and negative values result in no change to the corresponding field.

    53 minutes ago, guyudennis said:

    * Why does op73 (extra damage modifier) bonus show up fine on character screen (ie the inventory screen’s damage portion) but op285 (melee weapon damage modifier) simply won’t show its bonus on the same screen (obviously with a melee weapon equipped)? IESDP does not mention this difference in “behavior”.

    It was not used by the unmodded game, so it's display was never implemented.

    53 minutes ago, guyudennis said:

    * I am proficient with using Weidu to create spells/effects/items from scratch and then add ability headers (with IR’s macro) & extended effects; but I cannot seem to find any mentioning of a way to use Weidu to create projectiles from scratch?

    Weidu doesn't have one.  Type1 (non-impact) are 0x100 bytes, Type2 (single-target) are 0x200 bytes, Type3 (area-effect) are 0x300 bytes.

    53 minutes ago, guyudennis said:

    * Does op206-self have to be the last in the effect chain? If it were stuffed in the middle, would it prevent the effects after it from being executed?

    Yes it would.

    53 minutes ago, guyudennis said:

    * While it’s quite intuitive to me to understand for items how global effects (conveniently named “equipped effects”) and extended effects (wrapped around similarly convenient headers named “melee” or “range”), I have a much harder time distinguishing between global and extended effects for spells, especially since most of spells will simply use melee headers anyways. Take an example for a spell/ability that removes itself when cast then gives itself back after a certain period: I’ve seen this done both as global effects or in the extended effects, and both works… So what’s the difference between global and extended effects for spells? Is there a good tutorial somewhere for a good explanation of how spells work structurally? IESDP shows me the skeleton of a spell file but not much about its inner workings.

    A spells global effects:

    • Are applied as soon as casting begins, and thus ignore whether or not the spell gets interrupted.
    • Ignore immunity to the spell (as they are not sourced to it).
    • Cannot use "Preset Target" or "Original Caster" targeting, generally restricting them to targeting "Self".
    53 minutes ago, guyudennis said:

    * With the addition of the “break sanctuary” flag (BIT9 if memory serves) in 2.6, for an ability to break invisibility when used, do I still need to apply op136 (force visible) if I already set BIT9?

    Yes.  BIT9 is not respected when the spell is forcibly instant-cast (such as by other spells, certain script actions, etc...).

  16. 11 hours ago, polytope said:

    Incidentally, the unconsciousness duration appears tied to the excess damage relative to hp.... looks like the formula is 2 rounds plus 3 rounds per point of excess damage unless I mistimed.

    It's 15s per point of damage (after 1 HP).

  17. I don't know if a spellstate for NAUSEA_IMMUNITY is necessary, just checking poison resistance should suffice, unless you know of any specific examples otherwise.

    There is one more special case that the EE's made worse and still have not fixed.  Ever since IWDEE came out and the "Wake on Hit" option was added, falling unconscious from non-lethal damage has erroneously used the "Wake on Hit" mode and the "Sleep" icon (because they are both the default(0) values).  Not that we can really do anything about that part, as it needs an internal fix.  The only way to block this effect is with 7EYES, which would require a spellstate, but it may be better to use it to block non-lethal damage entirely instead of just the op39 (which could catch other "Sleep" effects).

    Sleep does not actually disable scripts as most other disabling effects do.  It only restricts which actions may be taken (some hardcoded, some require an ACTSLEEP listing).  Dialog is one it restricts, but that can be circumvented with action #313 (after adding both to ACTSLEEP).  Though I don't know whether it would be worth it to update death scripts to handle STATE_SLEEPING.

    Blocking projectiles: All you have to do is add a new projectile to be used as it's impact projectile (See WEB.PRO/WEBTRAV.PRO/ANTIWEB.ITM).

  18. You're talking about two different things.

    When the transparency index (usually green) is transparent, it is so automatically.

    Black is made transparent explicitly by flags in the opcode/VVC/PRO/etc... that is calling the BAM file, though some of those were (and some may still be) hardcoded to always be on.  False Dawn has such flags set (both in the VVC and the PRO). It doesn't really matter which index it occupies.

    The EE's allow every index to have their own alpha value, at least for some uses, so you can have a dark/black animation and still have transparency.  The darkness spell is a good example (SPWI228.SPL, BDDARK15.pro, BDDARKA.BAM). However,  AFAIK NI's BAM converter doesn't have an option to adjust the alpha value, aside from manually altering each color index.

×
×
  • Create New...