Jump to content

How would I script a model change for a actor?


devinpatterson

Recommended Posts

I have several bots (mostly protectrons, but others as well) that use human attire (hat's, belts, shoe etc), wigs & weapons. I have made a kind of a tool set in blender of various items rigged to the bots and I was curious how I can change the weapon models and attire through script. This way the bots can appear to equip different items.

 

As a concrete example I have K8-E a cowgirl eyebot. I'v rigged all 6 cowboy hats and all revolvers to her (except police pistol). So for example under the modellist tab I'll check lucky and K8-E will be holding her unique 357. I'v set up each item as two separate nifs. One being just the item rigged to the skeleton (no bot) and the other being the bot and the rigged item. I'd like to use the first nif so I don't have to make models of every combination (ie 6 hats multiplied by 7 revolvers is 42 models...PITA and sucks up the MB's)

 

Since she's a companion (or soon will be) I need to have some way for her to switch guns, hats etc in game. So if the player gives her a 44 mag she can use her 44mag model (that I already have in her eyebot sub directory) and remove her lucky model (simulating unequipping and equipping the item).

 

I also have multiple embedded weapon's, one for each revolver and I was wondering if anyone had a few lines of script or suggestions on how to synchronize the embedded weapons when their appropriate models are equipped. As well as ideas in re: to making the embeded weapon use up ammo (which they don't appear to be doing) and having increased damage for the various ammo types (SWC etc). So in the example above when a 44mag and 40 rounds of SWC is put in K8-E's inventory she can equip her 44mag model fire it with x 1.2dam, - 6dt for 40 shots, just like a human npc.

 

EDIT oh and any suggestions on using the companion wheel to force her to equip her bowie knife when melee only is selected.

 

Thanks for any help

Edited by devinpatterson
Link to comment
Share on other sites

I'd like to use the first nif so I don't have to make models of every combination (ie 6 hats multiplied by 7 revolvers is 42 models...PITA and sucks up the MB's)

 

sorry but. . . unless you do that, ur outta luck i think. BTW, I think you'll need to use all new entries for the NPC completely. I realize yo have embedded weapons and things, but there are variables like sound, damage, ammo, and those things. I really think you'll need to be making a whole slew of new combined entries to pull this off. I think you realize it too, but naturally instead of doing the tedious gruntwork, you are looking for a simple workaround. That's exactly what I would do too. I know its gonna take up a lot of your time to pull this off, but i can see your mod is going to be WORTH the effort. I may not be the top modder around, but I'm really not seeing any workaround to the two problems you are presented with.

Link to comment
Share on other sites

Creatures can wield weapons if you have their weapon set in a leveled list (see super mutants, aliens, etc.).

Also, weapons can have clothing parts attached to them which automatically equip when worn (see shishkebab, weapons with backpacks)

I don't know if the clothing thing applies for creatures as well as NPCs, but at least for the weapon thing if you can alter the creatures to be able to wield weapons like super mutants can (with the correct animations, etc.) and not have embedded weapons it may be possible, but I admit I really don't know what I'm talking about.

Link to comment
Share on other sites

sorry but. . . unless you do that, ur outta luck i think. BTW, I think you'll need to use all new entries for the NPC completely. I realize yo have embedded weapons and things, but there are variables like sound, damage, ammo, and those things. I really think you'll need to be making a whole slew of new combined entries to pull this off. I think you realize it too, but naturally instead of doing the tedious gruntwork, you are looking for a simple workaround. That's exactly what I would do too. I know its gonna take up a lot of your time to pull this off, but i can see your mod is going to be WORTH the effort. I may not be the top modder around, but I'm really not seeing any workaround to the two problems you are presented with.

 

That's unfortunate :(

It's not so much the models themselves, I can import them and export them in about 60 seconds, probably get all 42 models in under an hour, it's the multiple ref's. I imagine there will be additional repercussions with new entries. For instance moving K8-E's inventory (to a dummy cell and then moving it to her new ref entry so inventory isn't lost), scripts would continue to run on a disabled ref (? I think), other details as well (I'm sure). Heck even If there was a way to just switch hats while keeping the same ref that would be enough to get by. Shame FOSE doesn't have a function like this.

 

Thanks for the info Weijiesen. I'll look for a while longer, but I"m convinced your correct.

Link to comment
Share on other sites

Creatures can wield weapons if you have their weapon set in a leveled list (see super mutants, aliens, etc.).

Also, weapons can have clothing parts attached to them which automatically equip when worn (see shishkebab, weapons with backpacks)

I don't know if the clothing thing applies for creatures as well as NPCs, but at least for the weapon thing if you can alter the creatures to be able to wield weapons like super mutants can (with the correct animations, etc.) and not have embedded weapons it may be possible, but I admit I really don't know what I'm talking about.

 

That's interesting Dandys, because there is a tweak to the eyebot skeleton that allows wielding different weapons (you can use it to have an eyebot use a mini-gun for instance). But of course no animations for it since eyebot's don't have a proper arm. But this also applies to protectrons and possibly other bots as well. I'll try a leveled list and see if it allows the weapon to be switched/used without an embedded counterpart. If that works it would be a good portion of what I'm looking to do.

Thanks for the advice :thumbsup:

Link to comment
Share on other sites

I'm not sure if the problem has more to do with your reluctance to script, but I wonder if this is worth some investigation.

 

From DragoonWraith's description:

NifSE, allowing dynamic mesh modification in Oblivion scripts!

 

NifSE is a modder's resource, an OBSE plugin that brings the functionality of the NifTools team's incredible Niflib to Oblivion scripters. NifSE allows scripters to read and modify nif files during the game through scripts, and does so without changing any files on your harddrive or writing any permanent data to the disk!

Link to comment
Share on other sites

 

NifSE is a modder's resource, an OBSE plugin that brings the functionality of the NifTools team's incredible Niflib to Oblivion scripters. NifSE allows scripters to read and modify nif files during the game through scripts, and does so without changing any files on your harddrive or writing any permanent data to the disk!

 

If this is available for NV it would be absolutely perfect, it's exactly what I'm looking for :biggrin:

Thank you very much Myrmaad!

Link to comment
Share on other sites

Creatures can wield weapons if you have their weapon set in a leveled list (see super mutants, aliens, etc.).

.. . . . if you can alter the creatures to be able to wield weapons like super mutants can (with the correct animations, etc.) and not have embedded weapons it may be possible, but I admit I really don't know what I'm talking about.

right... because those are humanoid, and already setup to wield those things.

But the OP is talking about an eyebot....

Embedded weapons don't change the look, they only change the ProjectileNode placement, and determine the projectile and stats.

 

I think Myrmaad has the right idea here. That does sound worth investigating.

reading/modifying a nif file through the use of scripting sounds like a viable option if one can successfully get that functioning in FNN

Link to comment
Share on other sites

right... because those are humanoid, and already setup to wield those things.

But the OP is talking about an eyebot....

Robco Certified. Upgraded Mr Handy, Robobrains, Assemblotron.

 

And, more pertinently: the hoverbrain.

 

http://www.fallout3nexus.com/downloads/images/712-1-1285533245.jpg

 

Exactly what you want done, but with a different model.

 

It can (and has) been done. Just because super mutants alook vaguely humanoid doesn't mean they use human anims. They've got a custom skeleton and their own separate set of animations.

 

http://www.newvegasnexus.com/downloads/file.php?id=43331

Edited by Lt Albrecht
Link to comment
Share on other sites

Exactly what you want done, but with a different model.

 

I'm not having any trouble with actors using their weapons, I'v actually built quite a few for the sunset sarsaparilla wild west amusement park I'm working on. They still need some re-textures and tweaks but in general they are working very well.

 

 

http://img573.imageshack.us/img573/5364/botsg.jpg

 

My issue is I'd like to be able to change nif's while retaining the same refid and as of yet, I havn't found a way to do that. Everything I'v read so far seems to indicate that a new model requires a new refid, at least until NifSE comes to fallout.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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