Skip to content

[(BG1) BUG] Minsc Charm Animal works on people (0813)

CadrosCadros Member Posts: 253
edited August 2012 in Fixed
Observed: Minsc Charm Animal class ability successfully applied the charm effect to Imoen
Expected: That it should not work on humans

Note: Could be supposed to work but I think not
Post edited by Bhryaen on

Comments

  • TanthalasTanthalas Member Posts: 6,738
    @Cadros
    I think you posted this in the wrong subforum

    As to the topic. I think that Ranger's Charm Animal actually does work on humans in BG2. Whether it should work on people is another story though.
  • AndreaColomboAndreaColombo Member Posts: 5,525
    In P&P, Rangers gain no Charm Animal ability. This is how their animal empathy works:

    "When dealing with domestic or non-hostile animals, a ranger can approach the animal and befriend it automatically. [...] When dealing with a wild animal or an animal trained to attack, the animal must roll a saving throw versus rods to resist the ranger's overtures. [...] The ranger imposes a -1 penalty on the die roll for every three experience levels he has earned. If the creature fails the saving throw, its reaction can be shifted one category as the ranger chooses."

    There is no mention of this working with humans, so it probably shouldn't.
  • BhryaenBhryaen Member Posts: 2,874
    I found this to be an issue also in vBG1. The charmed icon showed on Imoen even while a party member. That persuasive kicker of butts...
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    This shouldn't happen, hehe.
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    I don't know how they thought that a system where multiple effects that logically depend on eachother had no way of looking at eachother was a good idea... but it annoys me....

    The charm is correctly checking the type of the target against the intended type, but the portrait effect has already gone through assuming that the effect would be successful.

    The most straightforward solution that I can see is to remove charm icon effects from spells/abilities and toss them in the code for the charm itself.
    Post edited by SethDavis on
  • CamDawgCamDawg Member, Developer Posts: 3,438
    edited July 2012
    Nah, don't hardcode the icon. Route the icon through an EFF vs type so it won't apply to non-animals.
  • SethDavisSethDavis Member Posts: 1,812
    Potentially fixed - The add icon effect has been pulled into the charm code and removed from the spell effects (add icon is still a valid effect, will just be a bit redundant now for most charm sources)
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    SethDavis said:

    Potentially fixed - The add icon effect has been pulled into the charm code and removed from the spell effects (add icon is still a valid effect, will just be a bit redundant now for most charm sources)

    I think i agree with Cam. Unless you had some code to differentiate between the many different charms.
    Look at dire charm/domination/control undead/etc.
    You can of course determine the icon based on the charm type, question is, did you?
  • CamDawgCamDawg Member, Developer Posts: 3,438
    edited July 2012
    @SethDavis

    Here's a non-hardcoded solution:
    COPY_EXISTING ~spcl311.spl~ ~override~
    LAUNCH_PATCH_FUNCTION ~DELETE_SPELL_EFFECT~ INT_VAR
    opcode_to_delete = 142 END // delete portrait icon
    END
    edit: after thinking about it, the even easier solution is to delete the portrait icon effect. Portrait icons only matter to joinable NPCs, and none of them are animals.

    ...unless there are further details to be announced about Neera.
    Post edited by CamDawg on
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    CamDawg said:

    @SethDavis
    ...unless there are further details to be announced about Neera.

    There is a huge potential for her to become squirrel :)
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    @Avenger_teambg - The code has a switch statement for charm, charm_revolt, charm_control, charm_controlrevolt, charm_controlrevolt_turned and charm_thrull_charm. It set text displays for these for charmed, dire charmed or turned. I have icons for charm and dire charm matching with the string refs, but I didn't find a turned icon. Does this sound like an appropriate way of deciding the icon?

    @CamDawg - Sorry, completely missed your posts. Must refresh before posting finished >.<
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    @SethDavis yeah, if charm type is used, i guess it is likely it was used only with one type of portrait icon.
    Also, you can always add a new switch for a new charm type. It is slightly hardcoded, but it should work at least for BGnEE. Probably the best way would be to have a special set of these effects (there is already a flag for disabling text display), if this flag is set (1000+x), don't display the icon. Or add a new flag, if some bg2ee spell uses the no text feature but would like to display the icon. On a related question: could you write the codes for those charm types and their general behaviour? This is definitely the type of info a modder can get with difficulties.
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    @Avenger_teambg -

    CGAMEEFFECTCHARM_CHARM 0
    CGAMEEFFECTCHARM_CHARMREVOLT 1
    CGAMEEFFECTCHARM_CONTROL 2
    CGAMEEFFECTCHARM_CONTROLREVOLT 3
    CGAMEEFFECTCHARM_CONTROLREVOLT_TURNED 4
    CGAMEEFFECTCHARM_THRULL_CHARM 5

    these are being read from param2 into a variable called charmType and switch casing ensues
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    @SethDavis, Domination and dire charm both use CGAMEEFFECTCHARM_CONTROLREVOLT.
    Domination uses 1003 (decimal) to avoid the text, and displays its own efftext. This may not apply to BG1, though. I looked into ToB files only.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    SethDavis said:


    @CamDawg - Sorry, completely missed your posts. Must refresh before posting finished >.<</p>

    No worries, it's happened to me too--add another item Vanilla needs to fix. Invision will pop up a note if someone posts to a thread while you're reading/replying.
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    @Avenger_teambg - When determining the icon the type has 1000 subtracted from it if it's over 1000, so domination would resolve to 3 for the icon, but would remain 1003 for the text and get the no_strref set to its text

    theyre in different functions and the strref that I'm switching on seems to be redundant anyway
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    I know that, the problem is exactly that, you need a different icon for domination and dire charm.
    Domination: 43
    Dire charm: 1
    Charm: 0

    For a complete list of charm using spells:


    spell (charm params) - (portrait icon)
    SPWI996 (0 2) - none
    SPIN910 (0 2) - 43 domination
    SPWI104 (1 1) - 0 charm
    SPIN785 (0 1) - none
    SPPR982(1 3) - 1 dire charm
    SPIN883 (0 3) - 43 domination
    SPIN975 (0 3) - 43 domination
    SPIN980 (1 1) - 0 charm
    SPIN985(0 3) - 43 domination
    SPCL311 (2 0) - 0 charm
    SPWI316(1 3) - 1 dire charm
    SPPR204(1 1) - 0 charm
    SPIN108 (2 0) - 0 charm
    SPWI506(0 1003) - 43 domination
    SPIN119 (1 1) - 0 charm
    SPPR405 (0 1003) - 43 domination
    SPCL641 (2 1) - none
    SPWM179 (0 0) - none
    SPWI929(0 3) - 1 dire charm
    SPWI930(0 3) - 1 dire charm
    SPWI939 (0 3) - none
    SPWI943 (1 3) - 1 dire charm


    These are not all used for anything meaningful and some are obviously buggy, because they say 'charmed' but use the domination portrait icon.
    But generally, the useful domination spells (spwi506 and sppr405) display a string, suppress the charmed string and use the domination icon. This is what i meant in the previous note: 1003 == domination portrait icon, while 3 == dire charm.
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    @Avenger_teambg - Oh, that's evil of them....

    Ok, @CamDawg 's fix has been applied to the list, and a distinction has been made between dire charm and domination
    Post edited by SethDavis on
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited August 2012
    Confirmed fixed - Minsc whistles to Neera - without much effect, his charming days are over.
    Looking forward to a Squirrel Neera :D
  • TanthalasTanthalas Member Posts: 6,738
    Confirmed Fixed

    Ranger's Charmer Animal special abilities no longer work on non-aniaml creatures.
  • ChrisYuiChrisYui Member Posts: 94
    Where does this change leave Safana? I agree that in Ranger's and Minsc's case it makes no sense ( and, in general, of course ), but perhaps her special ability "charm animal" was intended to work on non-animals. It would make more sense to me anyways, she seems to have no special skills regarding charming animals.
Sign In or Register to comment.