CrevsDaak Posted April 4 Share Posted April 4 I should've posted it sooner but forgot, so apologies for the delay. I've not delved into what modifies the fiend summoning spells themselves so I was reluctant of assuming how they worked, but it seems like they are fairly straightforward. The issue consists of summoned fiends all being given the CONTROLLED — 5 alleigance which causes them to be controllable by the party when summoned by enemies. This is done by explicit writes to field 0x270 to their creature files on dw_talents/fiend/friendly_fiends_core.tpa on the friendly_fiends_resources function. Note that this isn't necessary, though let me explain why first. Opcode 67, in this case as it is used by the secondary effect file triggered by the alignment mask checks on the Gate et al spells, has an option (parameter2) that allows for the caster's alleigance to be considered when adding the summoned creature file to the active game, however the Gate spell has it set to 2, "EA from CRE file" as a leftover from vanilla functionality of the spell. Changing this would fix the issue however it would mark them as ALLY — 4 rather than the desired CONTROLLED — 5 however the achieved overall goal would be similar enough and it'd fix this bug. Mind that opcode 67 has to be set to either 0, 1 or 3 to preserve the targetting on where (position) the fiend is summoned (on target vs. on caster). I thought this issue was ridiculously complex and thus hadn't mustered up the courage to look at it yet, big mistake as it doesn't seem to be that complicated, and you would've found it pretty fast either way. Quote Link to comment
DavidW Posted April 4 Share Posted April 4 It's slightly more complicated than this, unfortunately - there's an engine bug that means setting a creature's allegiance to ALLY prevents active control of it. But there is a problem here, I agree (though I can only intermittently reproduce it). I've tightened fiend scripting to try to address it. Quote Link to comment
RoyalProtector Posted April 4 Share Posted April 4 Another tangential issue to fiends that I saw is that summoned fiends that can use "Symbol Of" spells, fail to affect your own party, because the spells are now party friendly. (Or at least I think that's what this is) Quote Link to comment
CrevsDaak Posted April 6 Author Share Posted April 6 On 4/4/2024 at 4:52 AM, DavidW said: It's slightly more complicated than this, unfortunately - there's an engine bug that means setting a creature's allegiance to ALLY prevents active control of it. IESDP mentions the bug as occuring only when param2 is set to 5, which is the Mode that makes the creature be aligned with the opposite alleigance of the caster. A quick test (on BG2EE) done by setting param2 to Mode 3 (creature becomes ALLY if cast by party, ENEMY if cast by an enemy) on spgate.eff and dw#hlba.eff shows that summoned fiends can be controlled just fine (however they will still try to attack the party if you're not protected from evil, which I think is just fiends working as intended). The fiend will move around and do its own thing (akin to Planetars) due to its script, so if that's actually what the bug is then I'm out of ideas (though then it could just de-script itself via ChangeAIScript() to avoid that). I also tested Mode 5 and it is most likely bugged, as it just always summons the creature as hostile to the party, but I can vouch for Mode 3 working in regards to both the creature being actually controllable when the spell is cast by the party and in making it an Enemy when necessary. Quote Link to comment
DavidW Posted April 6 Share Posted April 6 OK, that's helpful - I might try that. (Though not immediately - RL constraints!) Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.