Jump to content

How are weapon mods handled by the engine?


drhead

Recommended Posts

I'm working on a modification to Underground Hideout (it's for personal use, though I'll ask the author if I can release it if it turns out good). If any of you have used that mod, you'll know that it has a weapon wall where you can show off all of your guns. What I'm wanting to do is make it so any weapon mods attached to your guns show up there as well, in addition to making GRA/Courier's Stash weapons compatible.

 

Now, I know that the item on the wall is not the actual gun itself, but it is just a static model. I know that NVSE has functions for checking a weapon's attached mods. This is a code mockup of what I'd want to do:

 

 

if someWeaponInContainer()=true then
     if someWeapon.modFlags()=0 then //assuming that mod 1 has value 1, mod 2 has value 2, and mod 3 has value 4 so modFlags() returns the sum of the values of the attached mods
          showModel(someWeapon.nomods)
          endif
     if someWeapon.modFlags()=1 then
          showModel(someWeapon.mod1)
          endif
...

 

It's a bit vague, but I think it should give you a good enough idea of what I mean. What functions would I be looking for? Also, if there is a way to read what the respective mod models from the base object, please do tell me what that is. That'd mean it'd be compatible with WMX and WME at the same time probably.

 

But I probably have no idea what I am talking about. Please get me on the right track here. Is this even possible? And, of course, the most important question is how weapon mod flags are even stored. With that I could work something out. Thanks in advance for any help/guidance you can provide.

Link to comment
Share on other sites

I can help you with the script, but I first need to know how the player interacts with the display wall in the UH (I don't have this mod). Does activating the wall opens a container for you to drop items into, or does it bring up a message box with options to select from?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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