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.
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.
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)
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?
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.
@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 >.<
@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.
@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.
@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.
@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
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.
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.
Comments
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.
"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.
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.
Look at dire charm/domination/control undead/etc.
You can of course determine the icon based on the charm type, question is, did you?
Here's a non-hardcoded solution: 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.
@CamDawg - Sorry, completely missed your posts. Must refresh before posting finished >.<
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.
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
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.
theyre in different functions and the strref that I'm switching on seems to be redundant anyway
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.
Ok, @CamDawg 's fix has been applied to the list, and a distinction has been made between dire charm and domination
Looking forward to a Squirrel Neera
Ranger's Charmer Animal special abilities no longer work on non-aniaml creatures.