Skip to content

TobEx: 04

DanBoulosDanBoulos Member Posts: 146
edited August 2012 in Fixed
Current Behaviour:

Action EquipRanged() never equips one-handed ranged weapons if a shield is equipped

Expected Behaviour:

Action EquipRanged() can equip one-handed ranged weapons if a shield is equipped

Revision:

Fix EquipRanged() so it will equip one handed ranged weapons
Post edited by Bhryaen on

Comments

  • BhryaenBhryaen Member Posts: 2,874
    I never had an issue with the sling/ darts/ throwing axe + shield combo. Not sure what this one fixes.
  • IgneousIgneous Member Posts: 368
    I think that's a script action, for use by the enemy A.I. — not silly humans.
  • BhryaenBhryaen Member Posts: 2,874
    edited June 2012
    @Igneous
    Well, how am I supposed to test for it then? :-P I did just try force-recruiting Hakt, tossed away his bow, tossed a shield on him, and put darts in his inventory. I un-partied him, attacked to make him hostile... and he insisted on punching me even with darts in his inventory. So he didn't auto-equip the darts... Not sure if this proves anything...
  • IgneousIgneous Member Posts: 368
    edited June 2012
    Confirmed, fixed. Tested in several scenarios. First, with an exceedingly simple player script:
    IF
    See(NearestEnemyOf(Myself))
    THEN
    RESPONSE #100
    EquipRanged()
    Attack(NearestEnemyOf(Myself))
    END
    With this script, I tested a halfling rogue, equipped with shortsword, buckler, and a variety of throwing weapons (e.g., sling, daggers, darts). In all instances, she would swap over to her ranged weapon (if available) when in combat. She would only equip ranged weapons in her quick weapon slots; she would not automatically equip ranged weapons from the inventory.

    I also successfully repeated the test with a fighter equipped with a large shield, axes, and so on.

    I then teleported a character to High Hedge, where there a variety of skeletons equipped with shortswords, bucklers, and throwing daggers, and scripted to EquipRanged() when enemies are at a distance. The skeletons chucked their daggers with prejudice, and were able to seamlessly switch between dagger and shortsword in spite of their shields (as can be observed in vanilla BG1).
  • ScottBrooksScottBrooks Member Posts: 687
    @Igneous thank you for your extensive testing!
  • BhryaenBhryaen Member Posts: 2,874
    I just tried a new one... not sure what the results mean. I spawned a bandit, tested to see that he does indeed go back and forth between his bow and sword depending on the proximity of the target. Then I force-recruited him, tossed away the bow and arrows, added a shield, added a sling, bullets, throwing axes, and darts. Then I un-recruited him, punched him to get him hostile... and all he ever did was chase me around with the sword- or, when I tossed away the sword as well, chased me around to punch me back. To test it another way I started the same though I put throwing axes, darts, and a sling in his weapon quickslots, keeping him on sword and shield at first. Then I moved to AR3600 and had a Sirine Dire Charm him. Again all he could do was attack with the sword regardless of how far away I was. I switched him to start with the sling, but no matter the proximity he just stuck to the sling. Maybe Force-recruit removes all scripts...
  • CorianderCoriander Member Posts: 1,667
    @Bhryaen Ya, looks like force recruiting overrides whatever the default script is.
  • yeahyeahyeahyeah Member Posts: 6
    edited August 2012
    can skeletons now throw their throwing daggers?
    Post edited by Bhryaen on
  • BhryaenBhryaen Member Posts: 2,874
    @YeahYeah's thread merged with the answer here...
Sign In or Register to comment.