Skip to content

TobEx: 18

DanBoulosDanBoulos Member Posts: 146
edited August 2012 in Fixed
Current Behaviour:

Effect #164 “Cure Drunkenness” removes its own opcode

Expected behaviour:

Effect #164 “Cure Drunkenness” removes the drunk opcode

Revision

Dont remove REMOVE_INTOXICATION opcode, and there is no INTOXICATION opcode to remove
Post edited by Bhryaen on

Comments

  • CuvCuv Member, Developer Posts: 2,535
    I am reading Opcode #164 as being Slow Poison? In both ToB and in BGEE.
  • BhryaenBhryaen Member Posts: 2,874
    @Cuv
    With Near Infinity Opcode #164 reads "Remove Intoxication," no? That said, I can't get NI to make it an easily adjustable value in BGEE anyway...
  • CuvCuv Member, Developer Posts: 2,535
    @Bhryaen Can you take a screenshot of what you are seeing as Remove Intoxication? I made myself drunk, and created a potion that 'should' remove the icon at the very least, but it is refusing.
  • CuvCuv Member, Developer Posts: 2,535
    Alright, I really am not sure what I am trying to find with regards to this unconfirmed ToBex 18. I cannot confirm nor verify that intoxication is even doing anything. I drank enough at the tavern to get the icon, but none of my stats changed at all.

    Here is a potion that will reset the Intoxication bonus (94) back to zero (when it gets set to 100, it also removes the Intoxicated portrait icon. Perhaps someone else can use this to help solve this.
  • BhryaenBhryaen Member Posts: 2,874
    edited July 2012
    @Cuv
    This is a fragment of my Near Infinity window when making an item and adding a new effect. Maybe I'm confusing Opcode numbers with Effect numbers...? DanBoulos describes them as Effect #164 after all...

    image
  • CuvCuv Member, Developer Posts: 2,535
    edited July 2012
    @Bhryaen I am not seeing that in my NI. I am seeing effect 164 as Slow Poison. What version of NI are you using? I maybe be using an out-of-date older version

    nevermind, I grabbed the latest beta NI and I see it now too. thanks
  • CuvCuv Member, Developer Posts: 2,535
    Confirmed that Remove Intoxication doesnt seem to work at all. In order to get rid of Intoxication, Intoxication Bonus(94) needs to decrease the intoxication amount applied during my binges. This removes the icon also without the need to have Remove Portrait Icon in the spell/item/whatever.

    Perhaps Remove Intoxication(164) has been mislabeled and is indeed Slow Poison?
  • BhryaenBhryaen Member Posts: 2,874
    @Cuv
    Have you tried 164 v poison?

    Cure Poison = 11.
    Poison Resistance Bonue = 164.

    Just checked the list twice- no mention of a Slow Poison somehow.
  • CuvCuv Member, Developer Posts: 2,535
    I am not having any particular luck with this. With the new NI beta, I can see the remove intoxication, but I dont see it working or doing anything at all. The only time a player becomes intoxicated is drinking too much... but in BG that would wear off after a time... unconfirmed if it wears off in BGEE.
  • WispWisp Member Posts: 1,102
    As I understand the OP, this fix is simply that effect 164 does not remove itself. Since there is no opcode for it to remove, it now does nothing.

    But maybe it would be a worthwhile request to have the effect altered to set the drunkenness stat to 0 instead.
  • CuvCuv Member, Developer Posts: 2,535
    I would tend to agree with you on that! I honestly cant think of a single instance where it would be useful however:P But it possibly could be.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    This effect should set the intoxication to 0 and remove any lingering effects (0x5e) as well.
    It currently (in bg2) tries to remove 0xa4, therefore crashes.
    In bg2 it already zeroes the intoxication stat out.
    (I'm not going to drop the disassembly here, just 2 lines)

    0052EAE1 66 C7 80 4A 0B 00 00 mov word ptr [eax+0B4Ah],0 <--- this erases the intox code

    (There are 2 such lines as this)
    0052EB0D 68 A4 00 00 00 push 0A4h <--- this uses the bad opcode to clear

    As far as i know Asc64 simply replaces the 0xa4 byte with 0x5e, and it works in ToBEx.
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    Potentially fixed - The remove intoxication effect now set intoxication to 0 in both the derived and base stats (it was only affecting derived before), and removes the effect 164 (CGAMEEFFECT_INTOXICATION) rather than the original (and removed in the OP) effect 94 (CGAMEEFFECT_REMOVE_INTOXICATION) from both the equipped and timed effect lists.

    Can someone confirm that I should be resetting the base stats here? Also, is it even possible to have an intoxication effect in the equipped effects list?
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    @SethDavis - yes, this is a removal type effect (like remove invis/cure feeblemind/cure fatigue)
    Probably the closest thing is cure fatigue. Fatigue/intoxication seem to be quite similar in handling.
    I doubt any current official item applies intoxication in equipping effect (but the same is true for fatigue effect), yet, a modder might think it is fun. So, i advice do everything with intox what you do with fatigue.
    When we first found this bug (crasher), it was quite a bummer, we wanted to implement 'coffee' - to remove drunkenness from taverns.
  • SethDavisSethDavis Member Posts: 1,812
    @Avenger_teambg - Coffee would make an interesting addition, so long as we made sure to keep Boo away from it ^^
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Confirmed fixed - though now i tested @Cuv's solution and it would work for regular cases (when effect only sets the base stat and goes away). Sadly i didn't know about that earlier.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Here is a 'coffee' item using the newly fixed opcode.
  • CuvCuv Member, Developer Posts: 2,535
    Nice!!! I love coffee
  • BhryaenBhryaen Member Posts: 2,874
    This would be hilarious to add to taverns. lol

    "I'm not giving you single new tavern rumor until you get some rest... unless, of course, you buy some of my quality cafe imported all the way from Maztica..."
  • BhryaenBhryaen Member Posts: 2,874
    Confirmed Fixed:

    1. Created a duplicate of POTN29
    2. Changed the Effect #0 to be Remove intoxication (164)
    3. Tanked up with Winthrop until he told me to leave the bar
    4. Verified getting intox icon on portrait and mentioned on Record screen
    5. Drank my new 164-potion

    Voila- no intox shows on Record or in portrait icon.
Sign In or Register to comment.