Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Feb 2018
P
Pox67 Offline OP
stranger
OP Offline
stranger
P
Joined: Feb 2018
Is there a way to turn a summoned pet/creature etc into an ally ai controlled mob? I am working on making a ratsummoner which calls a swarm of rats periodically. But I would like them to be ai controlled. I made the guid resources etc, but do not know how to turn the mobs into ai... :thankyou:

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
You will have to use scripting for this.

To detect when such a summon has been created, you can use the Osiris CharacterEnteredRegion event, checking whether that character is a summon and whether it has the root template of the summon type that should be AI-controlled.

You could try turning the summons into NPCs (CharacterMakeNpc Osiris call). NPCs are AI-controlled. I don't think they will keep following you after you made them an NPC (they will still be allied though), so you may have to force them into following the summoner.


Joined: Nov 2017
L
member
Offline
member
L
Joined: Nov 2017
If you want to do this through scripting, alternatively to CharacterEnteredRegion, you can use the
CharacterStatusApplied((CHARACTERGUID)<Summon>, "SUMMONING", NULL_00000000-0000-0000-0000-000000000000) event. That will probably reduce the need to filter your results a bit.

However, this can also be done through stats, and personally I think it's a cleaner solution.
First, make a new status (a CONSUME-type status works). Let's call it LOSECONTROL.
The only important entry for this status is the "LoseControl", which should be "Yes", because that's what makes the character not controlled by the player.
Then, in your summon skill, under SkillProperties, add TARGET:LOSECONTROL,100,-1.

The LOSECONTROL status will make your summon uncontrollable (and let AI take over for it), and the above syntax means that the status LOSECONTROL will be applied with a likelihood of 100%, permanently, to the summon.

Last edited by LarIlya; 28/02/18 08:54 PM.

Moderated by  Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5