MalachXaviel Posted August 15, 2023 Share Posted August 15, 2023 (edited) I published an AI mod and I've been having trouble trying to change it works. https://www.nexusmods.com/baldursgate3/mods/705 Currently I use the LoseControl state to indicate to the game that the AI needs to takeover. As opposed to DOS2, there seems to be something inherently programmed into the game for the AI to treat characters under this status differently and it will actively override any AI archetypes set for it. The AI means that although the AI will take control, it will avoid healing, buffing or using abilities that would buff targets that are under this condition, regardless of faction, allied status, condition etc. In other words, the AI will handicap itself. The reason I believe this is programmed in is that, for example, if one of your party members get's dominated, the enemy AI isn't suddenly going to start healing that character because they know the status will eventually wear off and that character will be a target again so I understand the reasoning and logic behind but I cannot find out where this is being controlled at. I've indexed and looked for references to LoseControl, LoseControlFriendly, SG_Charmed, SG_Dominated, SG_ScriptedPeaceBehaviour. I've messed with factions. I've even tried to use a couple of NPCs that I've known to go from Friendly/Hostile mid-fight (such as the Helm Mindflayer) to see if there is anything to reference. The two options I'm pursuing are:1. Identify how the StatusPropertyFlags LoseControl and LoseControlFriendly are built, copy those, and remove whatever logic that exists that makes the AI consider them ineligible for certain abilities. The closest I've come to find this is via Shared\Public\Shared\Stats\Generated\Structure\Base\ValueLists.txt but this file literally just contains a list of the "StatusPropertyFlags" with nothing referencing how they are controlled or built. 2. Use an alternative method to LoseControl by actively changing a party member to an allied NPC at the start of the battle, and then return them to normal at the end of the battle. Changing the faction itself has no effect however when I combine changing the faction with "LoseControl" I've gotten party members to start giving out taunts and stuff during battle like the NPCs do if they belong to an applicable faction, which is kind of neat in itself, but if LoseControl isn't added, the party members are controllable like normal. I've tried to reference how party members can be converted to hostile such as during the Laezel and Shadowheart conflict event (CAMP_Shadowheart_CFM_LaezelFight_SceneTrigger_000) but it's unclear to me what mechanism the game uses to transition NPCs in and out of an AI controllable state (at least by referencing those events) Hoping some fellow modders will have some ideas Edited August 15, 2023 by MalachXaviel Link to comment Share on other sites More sharing options...
Recommended Posts