Jump to content

Shotgun shell casings very dark indoors but fine outdoors


Trentosaurus

Recommended Posts

Cos I was thinking of doing it with OnFire...but...an OnCellEnter event handler might really be the way to go. Can't believe I missed that. That's a good idea, Mktavish, but we can simplify it by setting the shell model every time the player enters or exits the cell. I need to go for now, but I'll have a think in the meantime.

Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Hmmm ... OnCellEnter ? Does that mean it needs a specific Cell ID ? Because there are a boat load more of interior cells than world spaces ... And world spaces covers all the individual cells it contains.

Therefore just check for being in all the world spaces to change for the exterior shell model.

Otherwise the default would be the interior shell model.

 

I thought there was a function to check interior /exterior cell ... but I couldn't find it.

Plus you wouldn't want this check to run when changing from one exterior cell to the next ... which could definitely cause intermittent lag. Hence better to check at the loading screen imo ... if that does what I think ?

 

And on the ejected shell model ... is that held by the weapon or the ammo object ?

Just curious mostly , so I can understand that part of modeling.

Link to comment
Share on other sites

I'm not sure if I want to have a script running with this mod. In order for the custom animations to work with this weapon, it will already be running at least one script when firing, and might need a separate script for the reload animation.

 

Unless these scripts end up being really lightweight then it might not be worth it. These shells are pretty highpoly, so if somebody is using a mod that increases the number of shell casings that can be present on screen, then it might get laggy quick.

 

The ejected shell model is handled in the GECK under the Art & Sound tab when editing a weapon ID. It can be changed to pretty much any 3D model, if you wanted. I should note that it doesn't matter if it's using the vanilla shell that's been replaced with mine, or if it's using a custom nif. They are essentially the same nif, just named differently and have different texture paths (with the same textures).

Link to comment
Share on other sites

Well the script me and EPD are talking about ... at least in my view ... would only run upon cell change / Load screen.

Therefore just tacking on a tid bit of processing compared to loading all the cell contents.

 

In theory anyways so far. There shouldn't be any game render run time scripting hit.

 

Cuz of course that would suck and not be worth it for the lighting render on your ejected shell.

 

So it is defined on the weapon and not the ammo object ? err is there a completely nother .nif file I am missing here ?

Link to comment
Share on other sites

Right, it's a completely separate nif. The live shells you see in my screenshots that are ON my weapon are part of the weapon nif. The spent casings on the ground and in the air here are the "vanilla" casings, just replaced with my models and textures like any other replacer mod.

 

And yeah if everything is lightweight like I'm anticipating, then I would love to run a script if it can correct the dark interior shells. In fact, I like the idea of that script so much it could be it's own mod, or be included in unofficial patches like YUP.

Link to comment
Share on other sites

Hastily done but I think this is what you need.

scn ShellEventHandlerScript
Begin MenuMode 4
    If GetGameRestarted
        SetEventHandler "OnCellEnter" ShellUDFScript
;       print "Shell Event Handler Set"
    EndIf
End
scn ShellUDFScript
ref	 rEnteredCell
BEGIN Function {rEnteredCell}
    If player.IsInInterior
        SetWeaponShellCasingModel WeapTrentosaurusUbonik "weapons\2handautomatic\WeapTrentosaurusUbonikCasingINT.nif"
;       print "Interior Shell Model " + $GetWeaponShellCasingModel WeapTrentosaurusUbonik + " set."
     else
        SetWeaponShellCasingModel WeapTrentosaurusUbonik "weapons\2handautomatic\WeapTrentosaurusUbonikCasingEXT.nif"
;       print "Exterior Shell Model " + $GetWeaponShellCasingModel WeapTrentosaurusUbonik + " set."
    endif
END
Edited by EPDGaffney
Link to comment
Share on other sites

Right, it's a completely separate nif. The live shells you see in my screenshots that are ON my weapon are part of the weapon nif. The spent casings on the ground and in the air here are the "vanilla" casings, just replaced with my models and textures like any other replacer mod.

 

So that is 2 different .nifs ? Live shells ejecting part of the weapon ... then separate once it lays on the ground ?

Link to comment
Share on other sites

So if I'm understanding right, this would require two different nifs, and two different sets of textures, one adjusted for outdoor lighting, and one for indoor?

The extend of my knowledge of GECK scripting is simply injecting my weapon IDs into vender, perk, repair, and other form lists.

 

Also, this mod will technically be in the 2handHandle animation slot, since that's the only anim set that has free space to make new custom animations, or least that's how it was explained to me.

And it will NOT be fully automatic. Animation restrictions force me to use semi auto. The Attack Loop anim simply doesn't have enough frames to fit this animation into it.

Link to comment
Share on other sites

 

So that is 2 different .nifs ? Live shells ejecting part of the weapon ... then separate once it lays on the ground ?

 

 

3 nifs actually. One for the main weapon model. One for the live shells. And one for the spent shells.

The live shells will never actually leave the weapon, the script I was talking about earlier during the firing animation will be essentially hiding the shells as they revolve around and are fired.

 

I can't really explain any further. If you want to know more about this in particular you should message Asurah, she is the one that will be doing the animations and relevant scripting for me.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...