Skip to content

BG EE Keeper: Item effects as character effects

ZergyZergy Member Posts: 3
Is it possible to add passive item effects as baseline effects on characters (like the Cavalier +hit to dragons) using EE Keeper?

If so, does anyone have a guide on how to do it? I've been looking but couldn't seem to find one.

Comments

  • ArunsunArunsun Member Posts: 1,592
    In the effect menu you have an add effect button.
    Here's a reference for all effects and how they are handled:
    https://gibberlings3.github.io/iesdp/opcodes/bgee.htm

    For a passive effect to add to a character you should fill the fields thus:
    Type: Whatever effect your want to add
    Target: Self
    Flags: Permanent or Instant/Permanent
    Probability: 0 on the left box, 100 on the right one
    Dispel/resistance: Non-magical
    Time: Irrelevant
    And the rest you should fill depending on the effects, as per the link I sent
  • NoloirNoloir Member, Mobile Tester Posts: 380
    @Arunsun Are these codes universal across the Infinity Engine? In otherwords, if a character with edited AC were made in IWD the override and char files were copied to BGEE would it remain the same?
  • ArunsunArunsun Member Posts: 1,592
    Noloir said:

    @Arunsun Are these codes universal across the Infinity Engine? In otherwords, if a character with edited AC were made in IWD the override and char files were copied to BGEE would it remain the same?

    Across all the EEs yes they are, except for PST:EE
  • NoloirNoloir Member, Mobile Tester Posts: 380
    @Arunsun Using the opcodes from the gibberlings site say one wanted to convert magic damage from a weapon like Narbucchad's staff into lightning damage. Where would the opcode e inserted in the most recent version of NI?
  • ArunsunArunsun Member Posts: 1,592
    edited April 2018
    @Noloir

    I'm gonna give a fairly long answer if you're interested in understanding how it works, and a TL;DR below to just solve your problem :smiley: . So just open the spoilers and read everything if you are interested.



    Narbucchad's Demise is a pretty particular staff with more than one combat ability, as it has 1 melee, 2 ranged and 1 magical abilities.
    The magical ability is an ability you may use from the "item abilities" selection (with the bag icon, similarly to ring of Gaxx's improved invisibility for example). It's a big Magic Missile with 11 missile that will give you a lesser version of the staff upon being used.
    There are then the actual weapon abilities, respectively the two ranged and the melee one.


    If you look at these:
    The Melee ability is a mundane +3 staff. When you open that melee ability you may see no effect but there are a few fields of interest here:
    Dice Size: 6
    # dice thrown: 1
    Damage Bonus: 3
    Damage Type: Crushing

    So as per the description it will deal 1d6+3 crushing damage. If you click on crushing you'll see a number of available options: Piercing, crushing, slashing, etc... but only physical ones. So if you want your weapon to deal magical damage you'll have to do that in another way. Let's look at the ranged abilities now:

    I'll start with the second one, since it's the most easy to understand:
    As you may see, the fields I mentioned above are now all zeros. And the to-hit bonus is 99, meaning essentially this weapon will never miss except on a critical miss. That's because, as I mentioned above, you can't directly make it so your weapon deals magical damage. Note that the projectile field is Magic_Missile_1. I'll come back to that later.
    So the weapon itself doesn't deal damage BUT:
    There are two extra lines are extra effects using respectively opcode 141 (lightning effects) and opcode 12 (damage). The former is graphic effects. The latter one is the one that interests us. If you double click the last line, you'll see the following fields:
    Type: Damage
    Target: Preset target (in the case of a weapon, preset target will target the guy you're attacking with the weapon)
    Power: 1 : This is like a spell level: if you try using that against a target immune to level 1 spell, this effect will be ignored, because it's power level is 1. If you throw it to a target with spell deflection, it will be absorbed, deal no damage and drain one spell deflection charge. Power 0 will bypass these.
    Amount: 1 : This is the fixed amount of damage your effect will deal, a bit like the "Damage bonus" field in a normal weapon.
    Mode is self explanatory if you click it.
    Damage type: Magic -64. If you click that you'll see every type of damage available in game: Acid, cold, crushing, etc.... that's the field you want to modify in your case. You'll want to set it to Electricity. Don't use Magicfire and Magiccold, they crash the game.
    Timing mode is pretty irrelevant with damage.
    Dispel/Resistance is important in that case too: Here it is set to Dispel/not bypass resistance. The Dispel part is pretty irrelevant again for damage, but here it says that your effect can be stopped by Magic resistance. If you want to make it bypass resistance, choose either Dispel/Bypass resistance or Nonmagical.
    Duration is irrelevant.
    Probability 1 and 2 may require a bit more explanation. When you attack, a d100 is thrown. The effect will only trigger if the result of that d100 is strictly greater than probability 2, and lower than or equal to probability 1. So if you want to make it sure, go for 100 in probability 1, and 0 in probability 2.
    #Dice Thrown and Dice Size are the same as in the melee ability. Your effect will deal #DiceThrown d Dice Size + Amount damage. So here 2d2+1 magical damage.
    Save Type and Bonus are for the saving throws. If the target succeeds a save vs whatever box you tick with a bonus (or malus) equal to Save Bonus, the effect won't trigger. So, no damage. If you don't want the victim to get a saving throw, don't tick any box.
    Special adds some extra options to customize your damage.



    Now let's look at the first ranged ability. It is mostly similar but has two major differences:
    The projectile, and two extra lines
    Let's start with these extra lines: The first one uses the "modify attack per round" opcode and sets it to 2. Not particularly interesting in our case.
    The second one uses the "cast spell" OPcode. If you look at the spell cast by that ability in Near Infinity you'll see that it is the same as the charge ability: it destroys the staff and gives you a less powerful version. If you look at the "cast spell" opcode you will notice that its probability 1 is 7 and probability 2 is 0, so this only has a 7% chance to happen.

    Now the most interesting difference is the projectile.
    This time it's magic missile 6. As you may have noticed if you tested the staff in game, the first ranged ability will throw 6 magic missiles at the target, while the second one only throws 1.
    I'm pretty sure you get the logic behind that, since the first ability has Magic_Missile_6 as a projectile, and the second one Magic_Missile_1, but I just wanted to emphasize that the choice of projectile is very important for all your effects. In the ability with Magic_Missile_6 as a projectile, the damage will be applied 6 times. If you change that to, for instance, fireball, it'll deal damage to everyone with a fireball area, , if you change that to cloudkill, it'll deal damage every round for a while, etc... So essentially, the projectile is what determines whom will be affected, when they will be affected, and how many times they will be affected. The best way to deal with them, as long as you aren't proficient with them, is to find a spell/weapon that behaves like you want and has the visuals you want, and use the same projectile as this spell/weapon. In your Halberd that throws lightning case, I would suggest going for Arrow_shocking, for instance.

    Here's about everything you should need. Feel free to ask more questions if I wasn't clear.



    TL;DR: A normal weapon ability doesn't support non-physical damage by itself. Any non physical damage is dealt with a damage opcode. If you want to change the Narbucchad's Demise damage to Electricity, you need to open it, then open the first ranged ability, then open the "damage" effect line, change the "type" to electricity, and then repeat the process with the other ranged ability. This way, both ranged abilities will be changed to deal electricity damage instead.
  • NoloirNoloir Member, Mobile Tester Posts: 380
    @ Arunsun

    When clicking on the Damage (12) effect panel this panel emerges. For some odd reason the "Amount" variable displays as "Unknown" right underneath Power. No panel pops up when the line is clicked.
  • BubbBubb Member Posts: 1,000
    @Noloir
    Your Near Infinity installation is probably just out of date, (i.e. you are using a version from before those fields were mapped). Try updating your Near Infinity to the version found here and try again.
  • NoloirNoloir Member, Mobile Tester Posts: 380
    @Bubb Appreciate it. Unfortunately my old Dell Vostro 1000 is no longer supported by Windows or Java running on XP. Though I prefer mobile it may be time to get a new one. By any chance do you happen to know of any other NI versions that may have Damage (12) input variables accounted for. Maybe the last one?
  • BubbBubb Member Posts: 1,000
    @Noloir
    There are certainly a lot of versions of Near Infinity to choose from. I've checked how far back the damage fields go; versions from 2012 include the necessary definitions, so I'd assume the latest version that works on your system would be fine.

    You say that Java is no longer supported on your system - what Java version are you running? If what I am reading is correct, Java 8 is unsupported on Windows XP, *however* it can still be installed and used. Have you tried updating your Java version? The latest version of Near Infinity would work on your machine if you could indeed get Java 8 working.

    Nevertheless, here is the latest version of Near Infinity that still supports Java 6, which should be the oldest Java version that you could be running. See if that version works.
  • NoloirNoloir Member, Mobile Tester Posts: 380
    @Arunsun

    Thanks very much for the input. It took some time but I realized that even though the damage output variable were registered as "Unknown" in the 2005 version of NI they can still be copied and pasted to produce a desired effect. Works like a charm. Only drawback is that certain variables are undefinable using NI 2005 thus without some type of reference are untweakable. For example the magic damage on hit as displayed by Keldorn's armour in BGII can be duplicated but without a variable database that magic damage can't be tweaked into something like "Acid damage on hit" without hours of throwing darts in the dark guessing what those figures might be. Regardless, for something simple like +1 Electrical damage the damage op code for something like Aishideena can be copied and pasted under the Melee item ability and work just fine.
  • NoloirNoloir Member, Mobile Tester Posts: 380
    @Bubbles

    Thanks alot Bubb. Unfortunately none of them seem to function with this old 2004 laptop but with a bit of simple copying and pasting from items that have a similar effect to what I'd like to replicate in a new one it works just fine.
Sign In or Register to comment.