Jump to content

The differences between ALLY and FAMILIAR values


aVENGER_(RR)

Recommended Posts

Long story short, I want to create a creature which is not directly controllable by the player but is still considered a member of the player's team (i.e. GOODCUTOFF) so that the party is be able to gain XP for each kill the creature makes. In the past, I've been using the ALLY setting for such creatures. However, I've recently noticed a major drawback - the ALLY setting gets converted into CONTROLLED upon loading a saved game and the creature becomes directly controllable by the player!

 

After some experimenting, I've come to the conclusion that the FAMILIAR setting basically does the same thing as ALLY but is not getting lost upon loading a saved game. Now, I'm not acquainted with this setting and I don't think being used by any creatures in BG2, not even the mage familiars. So, my question is - would there be any harm if I assigned the FAMILIAR setting for a few of my custom summonable (but not controllable) creatures?

Link to comment
It is used by the familiars

 

Are you sure? According to Near Infinity, familiars (i.e. FAMCAT.CRE) use the ALLY setting in their EA field. Is the FAMILIAR setting per chance being applied to them by effect #192 Find Familiar when they are actually summoned?

 

I don't think there is any harm.

The constitution damage/unable to summon familiar stuff is implemented by effects, not by the EA field.

 

Good to know, those were my primary concerns. Thanks! :(

Link to comment

The default value in the CRE file doesn't mean anything (the engine will give it a correct EA when the familiar is summoned and attached to the saved game). You can detect the default familiars (and only them) with the FAMILIAR allegiance. Note that any FAMILIAR is also PC (so a creature of allegiance FAMILIAR will be returned in a check for allegiance PC).

 

ALLY (4) and FAMILIAR (3) should behave more or less identically, so I'm not sure what problems you're running into (ALLY is used for summoned creatures and should give a controllable creature by default as far as I know). I don't remember that CONTROLLED (5) was ever saved (IIRC, it was more a runtime value for charmed and possibly otherwise-controllable characters, but it didn't match the stored EA stat) and CHARMED (6) shouldn't be used by the engine.

 

It sounds like you want a GOODBUTBLUE character, but I don't know that they contribute to party XP for their kills (I don't think they do, but I'm not sure).

Link to comment
Note that any FAMILIAR is also PC (so a creature of allegiance FAMILIAR will be returned in a check for allegiance PC).

 

Gah, this is not good at all, as it means that dialogues which are triggered by See([PC]) would also trigger on anything with a FAMILIAR value. This could, in term, disrupt a lot of scripts so I'm definitively dropping the FAMILIAR designation.

 

ALLY (4) and FAMILIAR (3) should behave more or less identically, so I'm not sure what problems you're running into (ALLY is used for summoned creatures and should give a controllable creature by default as far as I know).

 

In my testing, when set directly in the .CRE file, ALLY gives you a creature with a green circle which is friendly but not directly controllable by the player i.e. you can't order it to move here, attack this, cast a spell etc. and the default mouse-over icon for such a creature is the conversation (talk) icon. Unfortunately, this effect disappears upon loading a saved game i.e. the creature becomes fully controllable by the player and the default mouse-over icon becomes the selection hand. The FAMILIAR setting does the same thing as ALLY but the creature with this designation does not become controllable by the player even after loading a saved game.

 

It sounds like you want a GOODBUTBLUE character, but I don't know that they contribute to party XP for their kills (I don't think they do, but I'm not sure).

 

 

Unfortunately, they dont. :( So, is there any way of making a creature completely off limits to the player but at the same time maintaining its GOODCUTOFF status so that the party can get XP for its kills? I'm already using effect #287 - Selection Circle Removal but that doesn't entirely prevent the player from controlling the creature as he can still do it by group selecting the creature with other characters or by simply drawing a selection box around it.

Link to comment
Unfortunately, they dont. :( So, is there any way of making a creature completely off limits to the player but at the same time maintaining its GOODCUTOFF status so that the party can get XP for its kills? I'm already using effect #287 - Selection Circle Removal but that doesn't entirely prevent the player from controlling the creature as he can still do it by group selecting the creature with other characters or by simply drawing a selection box around it.
I can't think of any reasonable way to do this, no. :(
Link to comment

You can attach a script to the creature to check IF Allegiance(Myself,[CONTROLLED]) THEN RESPONSE #100 ChangeEnemyAlly(Myself,[ALLY]). If loading the game is the only thing that causes the CONTROLLED->ALLY conversion, this script block will only trigger upon loading a saved game.

Link to comment
MakeUnselectable should work, if you remove the feet circle it won't be seen as purple :(

 

That works, but unfortunately, the MakeUnselectable() action also disables the AI of the target which is not an option as the summoned creature is supposed to fight for the party.

 

You can attach a script to the creature to check IF Allegiance(Myself,[CONTROLLED]) THEN RESPONSE #100 ChangeEnemyAlly(Myself,[ALLY]). If loading the game is the only thing that causes the CONTROLLED->ALLY conversion, this script block will only trigger upon loading a saved game.

 

Already tried, doesn't work. ;) I even made sure that the script block was actually being executed by adding a DisplayStringHead() as a secondary action but, once a saved game is re-loaded, the creature always remains controllable even if I successfully change it's allegiance to ALLY via script.

 

BTW, it seems that the LastSummonerOf(Myself) value is also being reset when loading a saved game. I've used a basic testing script to confirm this:

 

IF
See(LastSummonerOf(Myself))
THEN
RESPONSE #100
	DisplayStringHead(LastSummonerOf(Myself),10656) // Who is your master?
END

 

When assigned to the summoned creature, the script works as expected until the game is saved and reloaded. After the reload, it simply ceases to function.

Link to comment
Already tried, doesn't work. :( I even made sure that the script block was actually being executed by adding a DisplayStringHead() as a secondary action but, once a saved game is re-loaded, the creature always remains controllable even if I successfully change it's allegiance to ALLY via script.
The engine does have its quirks. Can you get around this by first putting Enemy() before changing EA?
Link to comment
The engine does have its quirks. Can you get around this by first putting Enemy() before changing EA?

 

Oddly enough, this seems to work! ;) However, using ChangeEnemyAlly(Myself,ENEMY) instead of Enemy() doesn't work. :( The same goes for ChangeEnemyAlly(Myself,NEUTRAL) or anything else for that matter. Now, I really wanted to avoid using Enemy() since it could cause annoyances for players who have their Autopause setting checked for "Enemy Sighted". So, I've done some more experimenting and I believe that I've finally found an acceptable solution. Basically LeaveParty() does the same trick as Enemy() without turning the creature hostile. Apparently, this script block seems to do exactly what I want:

 

IF
OnCreation()  // When the creature is first summoned or a saved game is loaded
THEN
RESPONSE #100
	LeaveParty()  // Creature temporarily leaves the party (i.e. gets a blue circle)
	ChangeEnemyAlly(Myself,ALLY)  // Creature becomes an uncontrollable ally once again (as intended)
	Continue()  // Continue running the rest of the script
END

 

Now, the mandatory question is... would using LeaveParty() on a summoned creature (a non PC) have any harmful effect on the game? So far, my testing seems to indicate that everything is working fine, and that this script action does not seem to interfere with regular party members joining/getting kicked out. Is there anything else I should be aware about LeaveParty()?

Link to comment

I suspect the sun will die before you have any trouble calling LeaveParty(). What you're doing sounds more like a bug with ALLY behavior than anything else, but at least you may be on the way to successfully exploiting it.

 

RE: LastSummonerOf() - marked objects (LastSummonerOf(), LastTalkedToBy(), LastTrigger(), etc.) aren't stored in a saved game. They exist for the current session only.

Link to comment
' date='Jun 17 2007, 11:42 PM' post='90124']

Oddly enough, this seems to work! :) However, using ChangeEnemyAlly(Myself,ENEMY) instead of Enemy() doesn't work. :( The same goes for ChangeEnemyAlly(Myself,NEUTRAL) or anything else for that matter.

When you have a buggy engine, its good to start looking for unorthodox methods of achieving your aims - this is one of them. ;)

 

Now, the mandatory question is... would using LeaveParty() on a summoned creature (a non PC) have any harmful effect on the game?
My guess is that SetLeavingPartyDialogue() will be triggered. So long as your summoned creature doesn't feature in PDIALOG.2DA, you shouldn't see any ramifications for this.
Link to comment
So long as your summoned creature doesn't feature in PDIALOG.2DA, you shouldn't see any ramifications for this.

 

Nope, and the creature in question doesn't have any dialogue files associated with it either, so hopefully, LeaveParty() should cause no problems. :( BTW, during my, testing I've noticed that RemoveFamiliar() can be substituted for LeaveParty() as it also seems to reset the EA of the target creature. However, I chose not to use that action as I don't know anything about it save for the IEDSP info. Plus, it doesn't seem to be used in any BG2 scripts. OTOH, through my testing I've come to believe that AddFamiliar() effectively makes the targeted creature GOODBUTBLUE (meaning no XP for kills) if that's of any use to anyone. ;)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...