Skip to content

Summoned Ettercaps does not apply poison?

MWOMWO Member Posts: 214
Hello again!

Another question for you developers out there.

I've been doing some tests as of late regarding the game, e.g. trying out the game mechanics.

Summoned Ettercaps with "Monster Summoning III" doesn't seem to affect the target with its natural poison attacks. Shouldn't ettercaps apply poison when hitting an enemy?

1frlit18d6g2.png

Comments

  • kjeronkjeron Member Posts: 2,367
    edited February 2020
    They have a 40% chance to switch to their poisoning attack every 2 rounds while idle, and a 60% chance to switch back to their normal attack. Same as non-summoned ettercaps. I believe it requires Party AI to be turned on for summoned creatures though.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    kjeron wrote: »
    I believe it requires Party AI to be turned on for summoned creatures though.

    Why?
  • kjeronkjeron Member Posts: 2,367
    Luke93 wrote: »
    Why?
    I couldn't remember whether summoned creature's were affected by hte "Party AI" button, they're not, so it shouldn't matter.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2020
    kjeron wrote: »
    Luke93 wrote: »
    Why?
    I couldn't remember whether summoned creature's were affected by hte "Party AI" button, they're not, so it shouldn't matter.

    Yep. Moreover, it's not true they need to be idle (yeah, ETTERCAP.BCS is a bit strange...)
    IF
    	See(NearestEnemyOf(Myself))
    	Delay(12)
    THEN
    	RESPONSE #60
    		SelectWeaponAbility(SLOT_WEAPON0,0)
    		AttackReevaluate(NearestEnemyOf(Myself),15)
    	RESPONSE #40
    		SelectWeaponAbility(SLOT_WEAPON1,0)
    		AttackReevaluate(NearestEnemyOf(Myself),15)
    END
    
  • kjeronkjeron Member Posts: 2,367
    "idle" might not be the best term, but they can get stuck in the attack cycle, preventing them from changing weapons until their target dies.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    kjeron wrote: »
    "idle" might not be the best term, but they can get stuck in the attack cycle, preventing them from changing weapons until their target dies.

    Interesting. Please, could you elaborate? Is it because of that Continue()?
  • BubbBubb Member Posts: 1,000
    It's due to how AttackReevaluate doesn't terminate until all valid targets are dead. The engine won't re-execute a script block that's currently running - even if it "should" due to all the triggers holding; (note that this still halts the script-pass as if it had chosen the block).

    So, the weapon-switching block won't run again until the AttackReevaluate ends. This effectively means that the script does a single-time weapon select at the beginning of every battle, 60% chance for non-poison attack, and 40% chance for poison attack.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2020
    @Bubb

    Ah, here we go again.

    As we already discussed, nothing changes if the Ettercap is in "chase" mode, right? When 'ReevaluationPeriod' is up, it will simply switch to the nearest target. So the following block
    IF
    	!GlobalTimerNotExpired("BD_PICK_WEAPON","LOCALS")
    	OR(2)
    		ActionListEmpty()
    		Global("BD_FIRST_WEAPON","LOCALS",0)
    THEN
    	RESPONSE #60
    		SelectWeaponAbility(SLOT_WEAPON0,0)
    		SetGlobalTimer("BD_PICK_WEAPON","LOCALS",TWO_ROUNDS)
    		SetGlobal("BD_FIRST_WEAPON","LOCALS",1)
    		Continue()
    	RESPONSE #40
    		SelectWeaponAbility(SLOT_WEAPON1,0)
    		SetGlobalTimer("BD_PICK_WEAPON","LOCALS",TWO_ROUNDS)
    		SetGlobal("BD_FIRST_WEAPON","LOCALS",1)
    		Continue()
    END
    

    won't be executed because both 'ActionListEmpty()' and 'Global("BD_FIRST_WEAPON","LOCALS",0)' are FALSE; moreover, the next block
    IF
    	See(NearestEnemyOf(Myself))
    	Delay(12)
    THEN
    	RESPONSE #60
    		SelectWeaponAbility(SLOT_WEAPON0,0)
    		AttackReevaluate(NearestEnemyOf(Myself),15)
    	RESPONSE #40
    		SelectWeaponAbility(SLOT_WEAPON1,0)
    		AttackReevaluate(NearestEnemyOf(Myself),15)
    END
    

    won't be executed because it's currently running (even if both 'See(NearestEnemyOf(Myself))' and 'Delay(12)' are TRUE).

    A quick fix would be that of replacing 'AttackReevaluate()' with 'AttackOneRound()' (which does terminate after one round...)
    Post edited by _Luke_ on
  • CamDawgCamDawg Member, Developer Posts: 3,438
    edited February 2020
    This was something changed in 2.5, when it was noted that neither ettercaps nor wyverns use poison when summoned. The original BG devs gave ettercaps and wyverns multiple weapons to reflect their PnP attacks--they also use different attack animations, e.g. the wyvern attack that poisons is a tail sting while its non-poison attack is a bite or claw IIRC.

    When summoned they just used their main, non-poison attack, so we scripted the ability to switch weapons occasionally. It's scripted a bit oddly since the priority was to never interrupt user instructions--outside of that it's their existing combat script.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2020
    @CamDawg

    You might want to try the following one:
    IF
    	StateCheck(Myself,STATE_PANIC)
    THEN
    	RESPONSE #100
    		RandomWalkContinuous()
    END
    
    IF
    	!GlobalTimerNotExpired("BD_PICK_WEAPON","LOCALS")
    	OR(2)
    		Allegiance(Myself,EVILCUTOFF)
    		ActionListEmpty()
    THEN
    	RESPONSE #60
    		SelectWeaponAbility(SLOT_WEAPON0,0)
    		SetGlobalTimer("BD_PICK_WEAPON","LOCALS",TWO_ROUNDS)
    		Continue()
    	RESPONSE #40
    		SelectWeaponAbility(SLOT_WEAPON1,0)
    		SetGlobalTimer("BD_PICK_WEAPON","LOCALS",TWO_ROUNDS)
    		Continue()
    END
    
    IF
    	See(NearestEnemyOf(Myself))
    	OR(2)
    		Allegiance(Myself,EVILCUTOFF)
    		ActionListEmpty()
    THEN
    	RESPONSE #100
    		AttackOneRound(NearestEnemyOf(Myself))
    END
    
  • MWOMWO Member Posts: 214
    Okey... thanks for the insights!
Sign In or Register to comment.