Is there a mod that assigns player’s AI scripts to simulacrum upon summon?
Myrag
Member Posts: 328
As in the topic, I’m playing with scs and I’d like my simulacrums to get SCS AI scripts assigned to them so that they follow melee/ranged auto attack settings.
Is there anything like that?
Is there anything like that?
0
Comments
Guessing what you want here ... copy over the caster's combat script (the one in the second "class" slot), but leave out all of the other scripts which could otherwise do nonsensical things with character quests and the like? That might be possible, but it's definitely tricky and I don't see how to do it in the engine.
Edit: check for "who is this a clone of" - stat 138. Check for "what script does player N have" ... not directly. I'm pretty sure I'd have to edit the combat scripts themselves to set a local variable, because that's not a detectable stat otherwise. Then it's a matter of setting up a script to change the clone's script. Doable, but only to AI scripts on a specified whitelist.
I did, initially I thought it's perfect for what I need, but it throws error when installing on my GOG BG2EE version of the game. Tried on the clean install too. Will report to @morpheus562 with the error in his dedicated thread.
@jmerry I'm not a modder, but I did understand most of what you've said, I'm not sure what would be easier, a small mod that allows auto-attacking with equipped weapon to a simulacrum that is smart enough to target enemies that actually can be hit, or a mod that copies assigned AI script to your character. But I thought that I'd ask here, maybe there is something like that.
I responded on my main thread, but you need to install my main ai scripts first. Errors will not be thrown when then.
Well, all right. I can still build that. Assign an intermediate script to set the control variables and then set the default AI. One block to start with, and then I run a double-layered loop:
So my original intent failed, but I can still give the clone BDDEFAI with the same control options as the original. And in theory, extend it to a mod that alters those options.
SCS actually uses the same control variables as standard BDDEFAI for its "ease-of-use AI", but changes their meanings and interface labels. The clone should thus inherit settings from the original without any extra work on my part.
... Oh. Huh. If I apply BDDEFAI without any modifications, the clone takes no action. I actually need to edit the script to replace all of those InParty(Myself) checks with broader allegiance checks.
Anyway, nearly there with the next version of my tweak mod. It shouldn't be much longer before I'm ready to release.
I've already written mine, and tested to ensure it's functional. It's in. Even if all the work I put into fixing the version that didn't end up working out was wasted. Now your clones can be exactly as dumb as the original. Why, yes, projected image, you should switch to your sling because the caster had "prefer ranged weapons" selected. And you should cast a stoneskin because I didn't turn off "Use defensive spells" for testing purposes.
Your version of things requires the use of your altered scripts, which as your mod title says are aimed at a "powergaming" mindset. My version takes whatever's already there and copies it over with the bare minimum changes required to make it functional. Which means it's compatible with the vanilla game scripts, my own slight improvements, the SCS "ease of use AI", and anything else that uses the same AI control variables set in the customization menu. Even supporting something that used a UI mod to set up different AI control variables would be as simple as putting together an alternate 2DA to draw the list from.
Different philosophy, different appeal.