Jump to content

[WIP] Working visible weapon mod


slevin92

Recommended Posts

Well, this is a new mod i'm working on. It has some glitches, but for now it works for the most part.

 

Features:

 

- Equipable at the same time: Pistol, Rifle, Heavy weapon, 1hand melee, 2hands melee

- Update automatically your weapon (not apparel)

- Vanilla and custom weapon works (as far as they have the required weapon type keyword)

 

Planned features:

- Companions equip their weapon (work in progress but it glitch with their default weapon)

- Npc too (may be)

- Bug fixing

 

I'm also working on updating my previous mods FCO and DMM... finally :ermm:

 

Edited by slevin92
Link to comment
Share on other sites

Damn that's excellent work!!

 

I've was working on this kind of idea myself with grenades as a test.

Man - how did you do it? Are you using AttachTo? Are you using PlaceAtNode?

 

Does the gun stay persistent or does it unload after a walking a few cells away?

 

And - does it display the weapons mods(bayonet, magazine etc?

 

Ah waw, so cool! This gives me a lot of hope haha, I had all but given up on the idea.

Link to comment
Share on other sites

I use a placeatnode on a custom skeleton. I managed to get all mods displayed. Didn't try yet the 3 cell bug. But for now, the bug i have is that sometime the weapon fire from the last position where the placeatnode was called. Really strange.

Link to comment
Share on other sites

Excellent!! Well I've been reading that PlaceAtNode has true/false settings for keeping the object persistent and can give an ref id, so that will be interesting as hell to test the 3 cell bug.

 

Well, I might have an idea about solving your problem -

I take it the weapon is being dropped and placed at custom node(?) and then when the player draws the weapon it is being re-added to the inventory and then equipped?

Well, seeing as there is a gap in time anyway between drawing the weapon and it actually appearing in the hand - maybe try another PlaceAtNode(RArm_Hand) or the weapons node before adding to inventory and equipping ^.^ it might just kill two birds with one stone ^.^

 

Can I ask mate, is the script attached to a quest? Or on a piece of armor or something?

Link to comment
Share on other sites

I've wrote two different ways to display equiped weapons. One that require a drop and an other that work directly from inventory. I've fixed the bug in the first method but not in the other yet. The mods is not affected by the 3 cells bug (i was able to run from sanctuary to diamond city without any bug)

 

It's attached to a quest.

Edited by slevin92
Link to comment
Share on other sites

Oooow, doing it straight from inventory, that's great! I'd love to take a look at that script ^.^

 

So I think some information isn't updating between the weapon being placed at node and it being equipped. So an idea might be to force an update of some kind, maybe by attaching a dummy ObjectMod to the weapon as it gets drawn - that will force it's 3D info to reload, and might just reset the location of whatever node the bullet fires from :)

Link to comment
Share on other sites

You'are right. I'll try that.

 

In the mean time, now I need to understand how to copy all the info of an equipped weapon to make a copy and auto-equip it when the player fast travel, take a door, etc...

 

Try this:

Weapon myequippedweapon = game.getplayer().getequippedweapon(0)

objectreference mynewitem = game.getplayer().placeatnode("mynodename", myequippedweapon, false, false, false, true)

 

It should spawn your weapon at the dedicated node. Now you can do whatever hou want with it. For the grenade, it's may be getequippedweapon(1) but I'm not sure.

Edited by slevin92
Link to comment
Share on other sites

  • Recently Browsing   0 members

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