Jump to content

Charmed allied summons


Demivrgvs

Recommended Posts

I don't know if it's the right place to mention it but I've encountered a strange issue related to allied summons who get charmed. If I use Dispel Magic to remove the charm effect they are again on party's side (green circled, and their scripts correctly make them attack the CPU) but I can't select them anymore, and moving the cursor over them the "Talk" icon appears.

 

What can be causing it? :)

 

I've checked with NI the relevant spells and they seem perfectly fine, they are set as follow:

 

Known values for 'Charm Type' are:

0 Charmed (Target neutral after effect ends)

1 Charmed (Target hostile after effect ends) ---> LvL 1 Charm

2 Dire charmed (Target neutral after effect ends)

3 Dire charmed (Target hostile after effect ends) ---> LvL 2 Dire Charm & Domination

4 Controlled by Cleric ---> LvL 4 Mental Domination

5 Target is hostile

Link to comment
I don't know if it's the right place to mention it but I've encountered a strange issue related to allied summons who get charmed. If I use Dispel Magic to remove the charm effect they are again on party's side (green circled, and their scripts correctly make them attack the CPU) but I can't select them anymore, and moving the cursor over them the "Talk" icon appears.

 

Creatures who's allegiance was initially set to ALLY behave this way.

 

I make use that feature in RR for the Shamblers and the Spirit Warrior who act as the party's allies but aren't directly controllable by the player. Check this thread for more details.

Link to comment
Creatures who's allegiance was initially set to ALLY behave this way.

 

I make use that feature in RR for the Shamblers and the Spirit Warrior who act as the party's allies but aren't directly controllable by the player. Check this thread for more details.

What misleaded me is that summoned creature who's allegiance is initially set to ALLY behave perfectly at first, they are selectable and fully controllable.

 

I want to make something slightly different from what you did, because you wanted the allied creatures to be un-controllable (sort of goodbutblue) while I just want summoned creature to give XP to the party when killing enemies.

 

Long story short, to avoid the aforementioned issue I've to change all ALLY flag to NEUTRAL, right? But is it possible via script to achieve my proposed goal?

Link to comment
I want to make something slightly different from what you did, because you wanted the allied creatures to be un-controllable (sort of goodbutblue) while I just want summoned creature to give XP to the party when killing enemies.

 

In RR, the aforementioned creatures are completely uncontrollable by the player (i.e. they can't be selected and ordered around, so they only act on their AI) however, they still grant the party XP for any kill they make.

 

Long story short, to avoid the aforementioned issue I've to change all ALLY flag to NEUTRAL, right? But is it possible via script to achieve my proposed goal?

 

If the creatures are already flagged as ALLY try switching that to something else (i.e. CONTROLLED) and see what happens.

Link to comment
In RR, the aforementioned creatures are completely uncontrollable by the player (i.e. they can't be selected and ordered around, so they only act on their AI) however, they still grant the party XP for any kill they make.
Sorry I wasn't clear, I do want them to be controllable, that's the difference between our goals.
If the creatures are already flagged as ALLY try switching that to something else (i.e. CONTROLLED) and see what happens.
You mean via script "on creation"? I'll try it.
Link to comment

The aforementioned issue persists even if the .cre file is set to either NEUTRAL or CONTROLLED. :devil:

 

IIRC, they should be selectable again if you save and reload (if not in battle of course).
Having to reload everytime a summoned creature gets charmed is quite immersion-breaking.

 

EDIT: ENEMY is even worse as a charmed summon will remain red circled even after a successful dispel. It seems this annoying problem can't be avoided! :)

Link to comment
It seems this annoying problem can't be avoided! :)

 

This is a somewhat hacky workaround for a hardcoded engine bug, but if you add the following block near the top of your summoned creature's script, your problem will dissapear.

 

IF
!StateCheck(Myself,STATE_CHARMED)
!Allegiance(Myself,ALLY)
THEN
RESPONSE #100
	Ally()
	Continue()
END

Link to comment

That would make the script be unreliable since LastSummonerOfMyself() isn't stored in the savegame. For example, if you'd reload the game after summoning the creature the aforementioned trigger would never return true and the script wouldn't execute.

 

A better way to limit the script to the party's summons would be to set a LOCALS variable when the creature is summoned by a PC and use it as a check later on.

 

On second thought, simply adding an !Allegiance(Myself,EVILCUTOFF) to the trigger list should do the trick nicely. So, the complete script block would now look like this:

 

IF
!StateCheck(Myself,STATE_CHARMED)
!Allegiance(Myself,EVILCUTOFF)
!Allegiance(Myself,ALLY)
THEN
RESPONSE #100
	Ally()
	Continue()
END

Link to comment

I've tried your last code aVENGER but unfortunately it doesn't work, as any other I've tried. :)

 

Are you sure that the allegiance itself is the problem? Couldn't be that dispel already makes the charmed creature ALLY back again (I should be able to check it by testing if the creature contributes to party's XP), and the problem is something else? :devil:

Link to comment
I've tried your last code aVENGER but unfortunately it doesn't work, as any other I've tried. :)

 

Hmm, that's odd, it worked fine for me.

 

Did you add it to the top of the creature's script? I've tested it with a summoned Nymph and she became properly selectable after the charm effect was dispelled. Also, check if the creature in question has another script in a higher priority slot that might be blocking its base script.

Link to comment

I'll try it again...I put it in the Override custom script but after this for some reason:

 

IF
HPPercentLT(Myself,30)
GlobalLT("EfreetiGasForm","LOCALS",3)
!StateCheck(Myself,STATE_DEAD)
THEN
RESPONSE #100
	IncrementGlobal("EfreetiGasForm","LOCALS",1)
	ReallyForceSpellRES("dvgasfrm",Myself) // Gaseous Form
END

IF
HasItem("dvgasfrm",Myself) // Gaseous Form
THEN
RESPONSE #50
	RandomWalk()
RESPONSE #50
	NoAction()
END

 

Which is SR's new Gaseous Form for genies...

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...