Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
Hello everyone,

I'm fairly new to modding and want to try to do that idea of mod I had. The idea is basically to toggle on and off the control of companions on your party by AI. I thought of two ways to do that being a spammable spell working only on allies inflicting a variant of the Status Charmed or the same idea working with an infinite consumable.

The problem is that I've managed to do everything exactly the way I want but the status Charmed never works on Allies. I managed to make it work on enemies and it works just as intended, I managed to make it work with other status (tried bleeding) and my ally does indeed get bleed effect (I set it to 999 turns for comfort purposes). So what am I missing ? I use the divinity engine 2 by the way.

I suppose charm is a peculiar effect as it changes the AI to work on one or the other side of the battle being ally vs enemies. I also suppose that my problem is that I call for the "Charmed" effect being basically turn an enemy into ally for X turn. I'd need to call for the same status caused by enemies but have no idea how to do so.

Can anyone help me out ? Also when I manage to make that work I will need help to find an elegant way to make the effect to be toggled off easily, if possible coming from the same spell/consumable (if I come to turn my spell into a consumable) because as it is now I don't have any way to turn it off. And finally I will need to find a clever way to put it into the game, I don't know if you have recommendations. I was thinking to place spellbooks on the beach at the beginning or something but it's a bit shoe-horned and I'd love to find a better way to do it, maybe a special trader NPC having a huge stock of those books for 1 gold next to the beach statue and then in each act on the Lady Vengeance.

Thanks a lot in advance for your help it would really be awesome if I manage to finish a clean mod that people enjoy (even if there is 2 people in the word enjoying it lol).

I would really love to try combat with AI as allies to see how it would play out.

Joined: Oct 2015
apprentice
Offline
apprentice
Joined: Oct 2015
I don't think Charmed will help you with that. For one thing, I don't think it's possible to charm an ally as if you were an enemy with a skill, but if you can, the ally would turn into your enemy and attack you.

Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
I actually had a case where my ally was charmed and used Dominate Mind on another ally and he was actually on my side because it was my character using the spell or something similar.

If it's not possible it's not possible but I wouldn't see why it wouldn't be possible to use the property of charm and turn them around or simply use the "enemy" version of it.

But if you have another solution for my idea I'm all ears.

Joined: Oct 2015
apprentice
Offline
apprentice
Joined: Oct 2015
Originally Posted by Sombrero
I actually had a case where my ally was charmed and used Dominate Mind on another ally and he was actually on my side because it was my character using the spell or something similar.

If it's not possible it's not possible but I wouldn't see why it wouldn't be possible to use the property of charm and turn them around or simply use the "enemy" version of it.

But if you have another solution for my idea I'm all ears.

Hmm, well you could have a poke around EnemyCharm in the skill data. There isn't a specific enemy charmed status though.

Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
That's what I did but it seems to simply call for the regular Charmed and that's it. So I don't really get why it doesn't work as intended. Because when I call for Charmed I call the status effect, not a spell in particular. I'll try to copy the Enemy_Dominatemind and see from there what I can do.

Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
So I've spent many hours on it and the closest I found to make it work is to use the Cow Polymorph transformation as it gives control to the AI and doesn't remove the ability for characters to play (they only can't use ladders anymore).

I'd love to take inspiration from that status and make my own and remove the ladder issue and the cow form but everytime I try to interact with status effect nothing works. In this case if I change the Stat PolymorphResult in Status effect COW the spell has 0 effect anymore and if I change anything else like the Display Name or Description of the status it doesn't have any impact I have the default [Cow Shape] and the default description of the cow polymorph.

Am I stupid and miss something or this engine really flawed in many ways ? I also have a bug where all the things I place in the world are inexplicably doubled on all the mods I try to create. This one I spawned the spellbook to learn my custom spell and it appears twice and my other mod creates a new trader that works well but he also gets doubled but the people subscribing to my mod on Steam don't see it doubled (in some instances they don't see it at all, and not on all their saves). I'm quite frustrated because I feel I mostly have issues creating what I'd like (which should be easy normally) because of bugs and weird interactions more than anything.

If anyone can save me, please ?

Joined: Sep 2017
Location: Belgium, Ghent
addict
Offline
addict
Joined: Sep 2017
Location: Belgium, Ghent
Hey,

for AI taking over we have a flag in StatusData called LoseControl.
You could make a custom status that has the LoseControl value set to True. Anyone with that status assigned would then be taken over by AI. As an insight in some of the current takeover situations:

- Taunt: LoseControl = true, so player is Ai controlled + prefers attacking taunter
- Charm: player is Ai controlled, just changes alignment (temporarily)
- Chicken: LoseControl = true, script overrides Ai for flee behaviour
- Fear: player is Ai controlled, script overrides Ai for flee behaviour

Last edited by Larian_KVN; 25/09/17 01:26 PM.

CTRL+K the elf
Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
Originally Posted by Larian_KVN
Hey,

for AI taking over we have a flag in StatusData called LoseControl.
You could make a custom status that has the LoseControl value set to True. Anyone with that status assigned would then be taken over by AI. As an insight in some of the current takeover situations:

- Taunt: LoseControl = true, so player is Ai controlled + prefers attacking taunter
- Charm: player is Ai controlled, just changes alignment (temporarily)
- Chicken: LoseControl = true, script overrides Ai for flee behaviour
- Fear: player is Ai controlled, script overrides Ai for flee behaviour


Thanks for the reply. I actually saw that and used it but whenever I make a custom Status effect and use it in the stats editor with a custom spell the spell has no effect. I run into the same problem even when I use an already existing effect but changes its name.

I saw the LoseControl and also the Can Interact (or whatever the name) lines but as long as my custom status effect doesn't work in any way I can't make use of it. I'll try another approach of not copying any existing effect but instead creating a brand new one just using the LoseControl. Hopefully it will work.

I also encounter many bugs in my other mod created that simply spawn a trader in the 4 acts. For some unknown reason some players can't see the trader and only in some of their saves even if they don't have any other mod installed.

All those issues are really annoying as I have many ideas of mods but can't make them happen because of bugs (maybe I misunderstand some things in the engine but for the trader, and even the spell, I followed your "Larian guide" meticulously so I doubt I made a big mistake).

Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
I've worked from scratch step by step on a new status effect (instead of copying one) and a spell, started with a shout and now trying with a target as shout had no effect. Sadly the target version has no effect either. I can target myself or an ally as it should be (even though later on I will deactivate self targeting but for test purpose I don't mind).

Now the problem is that my spell doesn't proc any effect, in order to get some valuable help I will simply give you all the columns I filled and with what for both my Target_Spell and my StatusEffect. Anything I don't put means I let a blank space (so if you see anything important missing that may be my problem).
Here it goes!

For the Target_Spell:
Name: HelperShout
SkillType: Target
ForGameMaster: Yes
IsEnemySkill: No
Ability: None
Tier: None
ActionPoints: 0
Cooldown: 0
SkillProperties: HELPER,100,1
TargetRadius: 15
CanTargetCharacters: Yes
CanTargetItems: No
CanTargetTerrain: No
MemoryCost: 0
MagicCost: 0
TargetConditions: Character;Ally
UseCharacterStats: No
UseWeaponDamage: No
UseWeaponProperties: No
Icon: Skill_Summoning_DominateMind
From DisplayName until CastEffect (+TargetEffect) are all copied from DominateMind (I spare you the details it's not super relevant considering my bug anyway)

As for the Status, I went for a Status_DAMAGE as I thought it would be the most neutral possible since Charmed change side of AI in addition to loss of control, here it goes:

Name: HELPER
Type: EFFECT
InitiateCombat: No
BringIntoCombat: No
DisplayName: Helper
Description: Your companion is being controlled by the AI.
Icon: Skill_Summoning_DominateMind
LoseControl: Yes

So to summarize everything works from the creation of the skillbook to learning it etc it starts not working as intended when I basically use the spell. I can target myself, my ally but it has no effect whatsoever and the description of the spell is wrong as well (no status effect is displayed for instance).

What have I done wrong ?

I used to make it work at least with bleeding and here I can't make even work a bleeding, I clearly miss a detail but which ?



Joined: Sep 2017
Location: Western USA
stranger
Offline
stranger
Joined: Sep 2017
Location: Western USA
I've had a little practice with Status Effects, I will mess around with it and see if I can make something work.

Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
Originally Posted by Logic
I've had a little practice with Status Effects, I will mess around with it and see if I can make something work.


If you can find the way to make a simple LoseEffect status similar to charm but without changing side you'd be my true God laugh
It should be easy to do but I don't get why I can't make it work, it's really strange.

Also I'm curious to know the range to which I can use that effect. For the purpose of my mod it would be good to have something that can be toggled on and off as easily as possible, the best I could think of is by using a spell but maybe someone has a better idea ?

Also is it possible to have a combat only effect that automatically wears off out of combat ?

Joined: Sep 2017
Location: Western USA
stranger
Offline
stranger
Joined: Sep 2017
Location: Western USA
I got it to work.

Made a projectile spell named AIChar, gave it a status to call on: AICONTROL,100,4. AICONTROL is a Consume status, that has LoseControl: Yes.

I copied the Status_Consume TAUNTED as my base for AICONROL so I would have icons and a description to work with.

Remember to set the spell to CanTargetCharacters:yes, TargetConditions:Ally.

As far as getting rid of it, I don't know. I would set it for only 5 or so turns, and make the skill to apply it free. There might be a way to cure it, as Clear Mind can cure taunt. But I haven't messed around with that stuff yet.

Also, you have to restart the editor sometimes in order to see changed to the stat editor to take effect.

Edit: I did test this is combat and works as it should, can't control ally, and they still use skills. Also I used the skill for mindmaggots as by base for the projectile for skill effects.

Last edited by Logic; 26/09/17 09:16 PM.
Joined: Sep 2017
Location: Western USA
stranger
Offline
stranger
Joined: Sep 2017
Location: Western USA
I tried looking into how ClearMinded removes taunt and other mindcontrolling effects. But there is nothing in the stats editor to point to how this is done. So I'm assuming it's a scripted thing.

So as far as removing it goes, you could make another skill that applies a status effect that is using the same stackid as your aicontrol status. So once it's applied it will overwrite it and effective remove it.

Also looking at your previous post on your Helper Skill, it looks like that should work, did you try restarting the editor to see if the changes applied correctly? And if they still don't work, try changing your status to a CONSUME.

Last edited by Logic; 26/09/17 09:30 PM.
Joined: Sep 2017
Location: Western USA
stranger
Offline
stranger
Joined: Sep 2017
Location: Western USA
Okay, I've managed to complete everything to work how you'd like.

Skill_Target:
Name: AIChar
ActionPoints: 0
Cooldown: 0
SkillProperties: AICONTROL,100,-1
TargetRadius: 30
CanTargetCharacters: Yes
TargetConditions: Ally;!Self
Icon: Anything
DisplayName: Anything
Description: Anything
FXScale to TargetEffect: Same as DominateMind, except I removed CastEffect so the character didn't have effects over their head. Up to you though.

Status_CONSUME:
Name: AICONTROL
Type: CONSUME
DisplayName: Anything
Description: Anything
Icon: Anything
FormatColor: Anything
StackID: AI Control
LoseControl: Yes

The Status is permanent. To remove:
-Create another skill identical to AIChar
-Change name to NormChar
-Change SkillProperties to NORMCONTROL,100,1
-Create another Status identical to AICONTROL
-Change name to NORMCONTROL
-Set LoseControl to blank.

Save all Stats, restart editor, enjoy! If you have any questions, let me know.

Edit: As far as the skill being toggled or combat only, I think the only way to make it work that way is to use scripting, which is beyond me. But I bet it would be possible.

Last edited by Logic; 26/09/17 10:29 PM.
Joined: Oct 2016
S
stranger
OP Offline
stranger
S
Joined: Oct 2016
You are my savior, please marry me! I gonna try that out right now but I trust you on the fact that it works. Back in a bit when it's all setup.

Edit1: Now I can't manage to have my Skill appearing in the Use actions field for my skillbook, lovely. I'll restart from scratch I don't see where the problem can be I haven't missed anything and reload several times. This engine is so clunky.

Edit2: After an hour of my skillbook not wanting to be linked to my skill for no reason at all (it eventually worked after adding a new totally unrelated skill to my Target stats and rebooting the engine, because reasons right?) it finally work!!!

Now I have an issue with my skill turning OFF the effect doesn't replace the other effect but just stack on top. I'll double check the stack ID and see if it's not that if I can do something else. Otherwise I'll work for now with a timer instead of infinite turns but a on/off solution would be better.

Thanks a million though! You ok if I put you in the credits of my eventual mod ? (I may do a full playthrough of the game with the mod installed locally to test it tout first so may take a while before I publish)

Edit3: My bad I put Stats ID instead of Stack ID which is obviously not the same. Everything works absolutely perfectly now I love you whoever you are! And it helped me understand a bit better a few things. I'm still not sure why my thing wasn't working before but at least now it does, time to have fun with it now!

Last edited by Sombrero; 27/09/17 02:16 PM.
Joined: Sep 2017
Location: Western USA
stranger
Offline
stranger
Joined: Sep 2017
Location: Western USA
Hey, no problem at all! I do have the same problem that my skills have no Icons also, I think it has something to do with the stats that are attached to the in-game object itself. But indeed the editor is very clunky.

I'd be happy to have you put me as a credit.

I've never made a mod or helped anyone make one before smile

Last edited by Logic; 27/09/17 07:45 PM.
Joined: Sep 2017
Location: Western USA
stranger
Offline
stranger
Joined: Sep 2017
Location: Western USA
Also just so you know, the statsID is used to consume an item, hence status_consume. So if you wanted to make something that gave plus to all stats, that is where you would start.

You would need to make the consumable in stats_potions. Its very powerful actually and can do a bunch of things. Note, that to increase primary stats(str, fin, ex.), you need to put a number under Actpart if you want anything bigger than 1. Actpart is a multiplier for primaries, and possibly some other things as well. In order have a potion give +5 str. I had to set actpart to like 11 and the str. to 4. It takes some testing to get things right.


Moderated by  Larian_KVN 

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