Jump to content

[Script] OnCellLoad()


Recommended Posts

CellAttach/Detached are events that fire for the cells that are loaded(using 'load/ed' to make it less confusing - it's actually deeper than that, since cells unload at different times in memory regardless if the player is there or not) around the player in 5x5 cell radius(UGridsToLoad default). Should an NPC be in a cell that becomes "detached" it will fire for them as that cell has moved out of the 5x5 range. It's not very reliable in exteriors but great to use for interiors as you will know when the attachment/detachment will occur.

 

Edit: I think I misunderstood the question.

Edited by AnishaDawn
Link to comment
Share on other sites

The most reliable ObjectReference based events are OnLoad() and OnUnload().

 

OnLoad typically happens 10,000 to 12,000 game units from the player influenced by uGridsToLoad (plus load on the system, plus blah blah).

 

OnUnload typically happens 15,000 to 18,000 game units from the player influenced by uExteriorCellBuffer (plus load on the system, plus blah blah).

Link to comment
Share on other sites

::scratches head::

 

Would you care to elaborate on the OnLoad part as it appears there's something I missed? Those are in terms of cells(positions converted to coordinates) 2.4x to 2.9x. Granted I've never used OnLoad outside of spawned objects that are designed to unload immediately, what you're saying suggests that the game uses just a portion of UGridsToLoad.

Link to comment
Share on other sites

The default active area based on uGridsToLoad = 5 is a radius of 10,250 game units around the player.

 

I have published plenty of test driven data-log reserach backed articles on this subjet with pictures and video, like this one or that one which shoots at uGridsToLoad 25

 

If you have some actual data backed research that conflicts, please do share. The research (not opinions).

Link to comment
Share on other sites

Which is why I asked because I do have my own research for anything that involves cells, distance and what not, though I've been using basic math, I always needed a second set of eyes to see if my findings is sound.

 

Anyway, there's nothing in your research that is a conflict to my own, it only tells me that my math needs work. With a radius of 10,250 units, that puts the inscribed circle of the 5x5 box at a circumference of 64,402.65 units.

You know all this already though. I didn't, but I do now. :D One other I like is that you speak only in game unit terms and not try to use real world measurements like most do.

Your research on movement speed, I was looking for data on the base speed(in Skyrim it's 370 and increased by race height multipliers). Based on your data the speed is 500.

Your last link is also what I was looking for. A "range finder" or how range works in the game.

Obviously I got a A LOT more questions for you but I think I can make it from here. These corrections based on your data will also be adapted to my Skyrim research since Bethesda isn't known to make drastic changes to the inner workings of the cells/distance/range systems between Oblivion, Skyrim and Fallout series.

Now if I can just freaking log into the wiki I can add some notes to the Load event pages.

Link to comment
Share on other sites

>not try to use real world measurements

 

Because the game world map is distorted and distended for time-speed-distance calculations. The generally accepted conversion of 128 default unit player height = 6 real world feet does not scale to map distances, else the Commonwealth map which is 200,000 XYZ game units across calculates to only 1.77 miles wide.

 

= ( ( 200000 / 128 ) * 6 ) / 5280 ; feet in a statute mile

 

Using that raw value is amusing when the real world landmarks make it around 25 to 30 miles across.

 

The raw game unit conversion value needs to be factored for timescale, which the game runs default 20:1 to account for player movement speeds. Factoring timescale then makes time-speed-distance conversions more sane, but skewed high as the Commonwealth map becomes (1.77 * 20) 35 statute miles across.

 

So lets consider speed. An average marathon runner can sustain 10 statute miles per hour, with the real world map points being 25 miles across thats 2.5 hours to jog.

 

The player sustained running speed is 370 units per second (but being "sustained" that must be a jog not a run), crossing the 200,000 unit commonwealth map calculates at 9 real world minutes, or at timescale 20:1 thats 3 game hours which would be 30 real statute miles.

 

So the distorted world map is somewhere between 25 and 35 statute miles across depending on how you tell the story, and clearly conversion calculations can only resolve if all of the (time - speed - distance) factors are considered.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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