Jump to content

REQ: Ammo weight & how to detect if under a roof?


Recommended Posts

Hi all,

 

Two items today.

 

1. How does the game know when to apply ammo weight when in survival mode and not to when in regular game play modes? Ive gone through the HC_manager script, game settings, magic effects, perks and look at the HC_Rules but can find nothing that changes weights as relating to ammo. The forms themselves (ammo) have the weights, but I am wondering how the engine enables and disables weight calcs based on game mode.

 

2. How does the game create Acoustic Spaces when the player builds a settlement roof item, so that rain cannot penetrate it and more importantly, is there a way via papyrus to check if the player is inside one of these Acoustic Spaces under a roof item?

 

Any insights would be wonderful. Thanks in advance!

Link to comment
Share on other sites

I'll answer #2 for you. I got this tip off fadingsignal, the technique he used with True Storms and that I later used with Insult To Injury.

 

There are about a dozen or so occlusion space markers, generally placed within the "fake" interiors such as the ruined houses in Sanctuary. You have to create a formlist of those markers, and then do a recurring check to see if the player is near one. This is the function I'm using in my ITI mod:

 

 

bool Function IsPlayerNearSoundMarker()
    Actor PlayerRef = Game.GetPlayer()
    SoundMarkerArray = PlayerRef.FindAllReferencesOfType(ITI_FList_RainSoundMarkers as Form, 512.0)
    If (SoundMarkerArray.length)
        doMessage("Player in pseudo-interior space")
        return True
    Else
        return False
    EndIf
EndFunction

 

You can find that list of markers in the ESPs for either my mod or True Storms. It's not 100% foolproof, but for the most part that function will usually return true if the player is somewhere that would kick off the rain acoustic muffle.

 

Again, can't take credit for it. Thank fadingsignal.

Link to comment
Share on other sites

  • 2 years later...

Not to Necro such an ancient thread but I just wanted to point out that this works as well, and seems pretty reliable:

Actor Property PlayerRef Auto

ObjectReference Shelter = Game.FindRandomReferenceOfAnyTypeInListFromRef(_T_PO_Markers, PlayerRef, 512.0)

    If Shelter == None && PlayerRef.GetParentCell().IsInterior() == False
       Debug.MessageBox("You are EXPOSED!!!!!!!!")
    Endif

Note: _T_PO_Markers is the same formlist copied from Greslin's mod.

 

---

I'm Tentacus, my old account is lost due to lost E-mail account.

Edited by Berserga23
Link to comment
Share on other sites

  • Recently Browsing   0 members

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