Jump to content

Melee hotkeys, under barrel attachments, scripting queries


TrooperScooperMKII

Recommended Posts

So I'm contemplating a possible "melee" feature for firearms and the like: I'm not too clear on animations or the "enchantment" thing that the wiki has... basically, there is a command to play animation types (such as an arm swing, i.e. with a knife) which I suspect would "work" regardless of what is equipped in the hands... from my understanding, models have "nodes" or somesuch to reference bullet shots, etc. so the gun model would get swung along with the arm; the gun has a collision model or something, right? As in, if it hits something, it doesn't just clip through it?

So if my understanding is correct, a scripted hotkey could play a melee animation to swing the gun after placing an enchantment on it that hurts something that it hits, and damages the weapon as well. Ideally, what I see are two buttons- left and right, basically- with two different effects; for one handed pistols/energy guns/knives (hey, even with a knife/bat in your hand, there's no reason why you'd want to punch the bugger, right? could be faster, or have a power fist/brass knuckles, etc. even another blade or something, though there'd need to be a different animation/script for each weapon) etc. the left button swings your fist, dealing unarmed damage to the target... the right button would be a "pistol whip" type thing, i.e. smash the handle over the baddie's head, dealing damage to him and the gun. For two handed guns would use the right to just bash with the stock of the gun, dealing damage obviously; if you have a bayonet weapon mod (it's actually in game as an unused mod for the assault rifle) then the left button would stab out with the bayonet; otherwise, it does nothing, probably.

 

Now, one other thing: assuming one could add in the new animations/models, it stands to reason that an under barrel shotgun or something could be added in; what i see is an "accessory's rail" weapon mod, and a Powered Power armor type "modular" system, with the actual "mod" being miscellaneous items in the inventory; this to allow switching between them. The aforementioned node thinga-ma-bobs could be useful here- there's a fire weapon (?) command that will consume ammo by force-firing a weapon from the reference point on a model- as a hotkey would fire the ammo. The one thing I'm not clear on is reloading/animations... as in, how would it be done?

As a side note, a one-handed variant attached to the pip-boy would be used with one handed weapons, mirroring the punch/bayonet dynamic of melee; it could be used with any one handed weapon- or even no weapon- but reloading holsters your weapon and (hopefully?) plays an animation, with your right hand replacing the spent shells, whatever...

so, is any of this possible?

Link to comment
Share on other sites

There's an AddSpell command, which might be what I want- Object Effect would allow me to damage someone, add an electrical effect, basically do anything involving item enchantments, really, and it seems to have a range "self touch range" setting, along with allotments for making people hostile, increasing damage based on skills, etc, so...

but the item effect is normally permanently assigned; hence the add spell command.

The only problem is that it has an "Actor" reference, which I assume means it's only for people...

f***, searching for "example" scripts in GECK or online is a PITA. What does this stuff do, in plain english?

 

Sidenote, this is the list of animations, which can be played via script.

Other commands:

 

Evaluate Spell Conditions might be useful if conditions are, well, conditional; as in, the weapon always has the enchantment, but one of the conditions is linked to an object script that checks if the melee/UBshotgun script is calling it; thus fulfilling the conditions and allowing a permanent effect to play? Actually, this one seems pretty powerful- a single weapon's "spell" can have many different effects, each with their own conditions- so a single script, calling a single effect, could place any one of a dozen different effects on a weapon/enchantment, i.e. a power armor helmet could have water breathing, infrared/night vision for the helmet, a head flashlight, a targeting system, and a filtration thingy (to remove smoke/poison enchantments?) with a hotkey(s) "evaluating" the spell, setting variables based on what's supossed to be running.

 

FireWeapon rather obvious, it would be the base for an under barrel shotgun/grenade launcher, or what have you; a pip-boy mounted one-handed variant would also work like this, or for that matter, a static turret (someone requested a mortar tube?)

 

UseWeaponPackage might be a candidate for giving the ai the ability to use stuff like this.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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