Skip to content

Ring of Stoneskin

TvrtkoSvrdlarTvrtkoSvrdlar Member Posts: 353
edited October 2014 in General Modding
Is there any way to set up an item that has a, say, 15% chance to stoneskin the wearer (as per the wizard spell, but lasting only 3 seconds) each time s/he's physically attacked by an enemy?

Or is the above an impossibility without making a pilgrimage to the sunken city of R'lyeh and petitioning Cthulhu himself for scripting knowledge?

edit: forgot to mention I'm using DLCTEP.

Comments

  • GrammarsaladGrammarsalad Member Posts: 2,582
    I'm fairly sure there is. Effect 232 looks promising. It looks like both parameters should be set to zero with self as target. Your 3sec stoneskin spell should be referenced in the resource field.

  • TvrtkoSvrdlarTvrtkoSvrdlar Member Posts: 353
    edited October 2014
    @Grammarsalad
    Nope, can't be done. I tried doing it like that, but there are quite a few problems:

    #1: the 'probability' field is basically mislabeled because it doesn't represent probability (N% for something to occur), but instead the ~span~ under which it's permitted to run... so to get a 15% outcome, 0-15 needs to be entered... normally, this wouldn't be a problem (since it's as similar to randomness as a game needs to be), but it's troublesome because...

    #2: the aforementioned span is determined once the item is *equipped*, instead of the probability (as one would expect!), being checked every time the effect triggers (in this case, every time the character wearing the ring is hit)... so what happens is that the 15% entered means the game rolls the dice when the item is first *equipped*, and then holds on to that number until the item is *re*-equipped... now, that would be pretty bad on its own...

    #3: but it gets worse, because, as already mentioned in #1, the game doesn't take into account a single chance, but an entire ~span~... so when you enter 1-15 in the 'Probability' fields, what that means is the game will take any 'percentage' (let's loosely call it that) from 1-15 when the item is equipped... this results in instances where that 15% on paper turns into something much lower, because the game is working with an interval [1-15]; thus, it accepts (and remembers!) 1%, 2%, 7%, etc., (all the way up to the 15% that was originally entered) because they're all legitimate values that fall within that 1-15 range... if the chance to trigger the stoneskin was ran every time the character was hit, a couple of bad runs in a row wouldn't mean much because the values tend to drift towards the average (in our case, 15%) as time goes on, but with the way everything's currently set up, it's very possible to get a roll of, say, 3%, which is then remembered and used to determine the frequency of all subsequent stoneskin occurences (and the only way to get a better number would be to re-equip the item, which itself means very little since the character screen doesn't show the proc chances for individual items)...

    #4: now, none of this would be a problem if the original chance to fire could be set to 100% in the item's properties via opcode 232 (and it can), and then have the referenced effects run their own dice roll, but as far as I saw through testing, this isn't the case, because it seems the effect being referenced automatically inherits most of the variables from its parent (probability being the most obvious one, along things like target and duration, neither of which can be changed)... so, I can set the ring to fire 100% of the time (to circumvent most of the aforementioned issues), and then the stoneskin spell referenced by it to 15%, but this means diddly squat since the spell stubbornly inherits the 100% roll from its 'parent'...

    All in all, it's one giant clusterfuck, and I have no idea if it's due to DLTCEP and the guy(s) who coded it, or engine limitations (which means we can blame Bioware's lazy programmers). This isn't the first time DLTCEP did something wildly different that what it presents on paper, but I prefer it over all the other editors because it's robust, and holds a myriad of other tools under its umbrella.

    Though, to be fair, it's possible I'm being dumb and missing something obvious here.

    Which is why I opened the thread in the first place! :P
  • MathsorcererMathsorcerer Member Posts: 3,042
    I have made an item like this and it works perfectly. The armor has opcode 232 which fires every time the wearer is hit in combat but the spell it casts will take effect only 50% of the time. I have not encountered the problems you state in #4, though--the spell does not fire 100% of the time.
  • TvrtkoSvrdlarTvrtkoSvrdlar Member Posts: 353
    edited October 2014
    @Mathsorcerer‌
    Would you mind uploading it?

    I've run dozens of tests with sub-100% settings on the spell itself, and it's just wonky, for lack of a better word. For instance, putting it at ~50% makes it fire the majority of the time, but anything below 40% and it almost never fires. At 20%, it should be going off every 5th hit (on average), but I've had half a dozen NPCs wailing on the ring-wearer for the better part of a minute without the stoneskin activating even once.

    As I said, wonky...
  • AquadrizztAquadrizzt Member Posts: 1,069
    @Mathsorcerer‌ is correct to the best of my knowledge. Opcode 232 (Apply Effect on Condition) with a "when hit" trigger, and a 100% chance to cast a "15% to apply stoneskin" effect on the wearer should work.
  • TvrtkoSvrdlarTvrtkoSvrdlar Member Posts: 353
    @Aquadrizzt‌
    I don't know man, I tried it like that, and it's not working as intended.

    As I said, anything below a 40% chance ends up almost never proccing.

    I have no idea if my executable is somehow bugged, or if it's the DLTCEP itself.

    What version are you guys using? I couldn't find anything newer than the 7.6g one.
  • MathsorcererMathsorcerer Member Posts: 3,042
    Open the zip and drop these two files into your override folder. The armor is "muwhleat.itm" and is all you will need to add to your character. Oh, phooey--I have it set so that only rangers or druids can use it and I forgot to clear the usability flags. It doesn't have any original descriptions because I haven't gotten that far with it yet. Oh...it also applies a minimum hit point value of 1 because I was testing with it. Still...the "apply spell on condition" should work normally.

    I have version 7.6b of DLTCEP, as well.
  • TvrtkoSvrdlarTvrtkoSvrdlar Member Posts: 353
    @Mathsorcerer‌
    Thanks a bunch, I'll definitely check it out!

    But in the meantime, lemme ask you something... I wanted to figure out if my DLTCEP is somehow bugged, so I made a test armor that increases the entire party's movement speed by 200% while it's equipped... I used 'Stat: Movement Modifier [126]', with the 'Target' field set to 'Party', and the 'Timing' field set to 'While equipped' (also, the other 2 variables are: Statistic Modifier = 200; Type = 2).

    Thing is, only the character wearing the item is getting the (quite visible!) movement speed increase.

    I tried some other effects (bonus AC, +attack/rnd., etc.), and all of them behave the same.

    Is this a known bug/limitation, or am I dealing with a corrupted installation?
  • kjeronkjeron Member Posts: 2,368
    As far I know Global Item effects do not use the target field.
  • TvrtkoSvrdlarTvrtkoSvrdlar Member Posts: 353
    @Jozigno‌
    Thanks for the link, I appreciate it ;)
  • MathsorcererMathsorcerer Member Posts: 3,042
    I think an effect would have to have a projectile which hits the party in order to successfully target the party and you can't put a projectile on an equipping effect. You would have to create a use effect, like a wand or a scroll, which casts a spell that targets the party.

    Thank you for the link @Jozigno‌; will update today.
Sign In or Register to comment.