Jump to content

Unarmed NPC...?


Grabstein

Recommended Posts

I was speaking of larger differences than that ... like 90 for handtohand and 10 for all other skills that the NPC has equipment for. The game engine will be looking for what the NPC has and how much damage that can deliver. NPC strength will factor into any of the handtohand/blade/blunt calculations, so I don't think it will make a difference in what will ultimately get selected. Using fists alone doesn't benefit from any extra damage added by the weapon itself, so for fists to be the weapon of choice it needs to be the overpowering option.

 

Easy to test ... give the NPC 5 for both blade and blunt skill and 100 for handtohand. Let him carry a sword and an axe and see which weapon he uses then.

Link to comment
Share on other sites

The scripting approach might be doable with the OnActorEquip event from OBSE (found in the documentation). Using an event handler would help you avoid editing the NPC directly (no need to attach a script on the NPC), would work for any item, and would also avoid polling for equipped weapon (which would not necessarily be ideal when it comes to performance, for example, checking each frame if a weapon is equipped at the moment). For example, an event handler to handle the event (untested, but should work, only prints to console info about the event):

scriptname YourActorEquipHandler

ref Actor   ; the actor that equipped an item
ref Object  ; the item, assuming this is the base object and not the reference

begin _Function { Actor Object }

    ; only print info when the object is a weapon
    ; alternatively, replace PrintToConsole with MessageBoxEX for a messagebox

    if ( IsWeapon Object )
        PrintToConsole "%n (%i) equipped %n (%i)" Actor Actor Object Object
    endif

end

The registration for the event handler, with the filter only being applied to the actor, hopefully resulting in the handler receiving every item equip event for that actor and nothing else. You only need to register once after the game has been closed and restarted, if I remember correctly (the GetGameRestarted function might prove handy). I have not tested this myself, but based on the documentation:

SetEventHandler "OnActorEquip" YourActorEquipHandler "ref"::YourActorRef

You can try to see if it works. It should work, in theory. Just remember to limit the actor at least, or else the handler might receive every equip event in the game. At least based on the documentation. That would end up in a disaster. :P

 

Hopefully that helps a little! :thumbsup: I still think some sort of non-scripted approach would be better.

Link to comment
Share on other sites

Another option that came to mind is Packdonkeys ver 2 1. Sure they don't chatter away, but they are ignored by enemies (for the most part ... the donkeys will turn hostile and attack if they are accidentally hit by an arrow or spell). I always have two in tow once my guy can afford them.

Link to comment
Share on other sites

Thanks, for the suggestions. I want a companion, not *just* a traveling trunk. Although, some sort of Oblivion storage that could be summoned would be a neat idea. Anyways, I'll just make sure to not hand weapons over, or at least not ammo if I hand over bows.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...