• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Object Library Locking???

Messages
102
Country
unitedstates
Okay I stumbled across this, which was written for FS2002... Is it possible that the region locking for a library object works for FS2004 as well and if so how do we go about doing this as it is obviously a little different than FS2002? But if the database header information can go in to designing the object library we might actually be able to region lock libraries...

Look down to the part about the database header.... It's in there...

Tutorial about library by Christian stock
 
Last edited by a moderator:
If what I just read over at AVSIM is correct, if you place an object library into a self contained scenery file then the object becomes locked by the scenery BGL...

i.e. the GUID only shows up when that particular BGL is loaded into the computers memory (I just figured that out)...

i.e. if the BGL with the MDL and GUID contained is not loaded into the computers memory then the MDL in that BGL will not show up because it's not in the system or FS's memory at that point in time....

That makes logical sense correct?

Now in theory it would be possible to have stand alone object libraries that load into the computer's memory as long as certain lat/lon parameters are met otherwise those objects do not spawn.... This would help keep FS memory usage down and save some compute cycles and memory space free to render better frame rates and textires...

I guess the term I'd use for it is GUID spawning technique... You enter an area and all the guids in that area library get spawned into FS's memory and compute cycles...

For now this theory seems very logical to me, and would make sense as to why things have been area locked... Or perhaps it was just to make their design process simple as they created the specialized BGL's...

Whichever way, this implementation which has frustrated so many of us for so long, might actually help create area specific autogen libraries....

One test of this theory would be to get a GUID for a region locked MDL and add that GUID to default.xml for that particular region... If this theory is correct then you should get that GUID showing up in the autogen when within the spawn zone, but it should not show up outside of it...

I think one test to use would be the Lincoln Aviator... I believe it's region locked. If we add the GUID to it into region B's autogen files and then go to seattle or kittyhawk we should in theory see lincoln aviators spawn in the autogen but not spawn when outside of those areas...

I've got to go to bed right now and don't have time to test this theory, but I will come back to it tomorrow...

If anyone else wants to give it a shot go right ahead, I'd sure appreciate knowing the results....
 
Last edited:
I tried it with the aviator, but the aviator is obviously not region locked because it spawned far away from seattle, even in africa... I'll have to track down something region specific....
 
I tried the Whitehouse instead and it worked!!!!

Arno you're a genius!!! Great thinking, I can now think about kangaroos in Australia, Polar Bears in the Arctic, Moose and Elk in Canada, Elephants in SE Asia, and much much more...

What's more if I code the base object kibraries right, then I can use the same GUID nuber for each separate region...

Arno, you gave me the breakthrough I've been looking for!!! Now if I can create a region defined master object library that will be good, but if I have to create a scenery library for it that might make it a little more time consuming...

NOw to learn all I can about region locking the object libraries or failing that approach, learning what the largest BGL boundary can be... I might need to tile the continents...
 
Hi,

This is interesting, what did you do? You used the GUID of the Whitehouse in the autogen XML file?

And then the autogen only appeared near Washington and not in other parts of the world that have the same region?

If that is true, the next step is to figure out how the library is locked, as the previous theory about that (with the mixed library/placement) does not seem to work. Time to study the default library files more closely :).
 
Yes, that's pretty much it exactly.

I explained the theory in aother thread but in short...

Basically if an object library is coded into the same BGL as the scenery that BGL only loads into memory when you fly into that area... General Objext libraries remain in the computers memory for the whole time you are in FS....

But if the MDL has been coded in with the Scenery in the BGL, the MDL will only show up when that BGL file loads into memory, i.e. when you fly into the area...

It's nothing special, it just helps prevent memory leaks and the system from loading every single BGL in FS into the computers memory which would kill performance...

The only reason it's there is not to stop people from using those objects, it's just that the local sceneries were coded with the MDL's into the scenery to make life easier I'm sure for the designers...

See one person may have worked on Seattle while another worked on Paris... The primary reason for it is to keep system performance up... The MDL's are also native to the region they were designed in... It saves the master object library from getting messed up during development and interfering with other FS work going on at the same time...

See you have someone who is respsonsible for the master GUID's that local scenery area members can call on through the GUID system... All specific objects to a local area are handled by the local scenery area development member...

The way it works is basically it spawns all the MDL's in a BGL when you fly into an area. If the BGL that holds the MDL is not in memory when the object is called for there is no way for FS to display something that isn't residing in the computers memory bank....

That's basically it in a nutshelll....

So now I can create the Elephants for Asia without worrying about them spawning in Central America... What's more, I can even refine it further to spawn autogen objects only in a given city!!!
 
Last edited:
OK, but this does not explain yet what I found with my locking test, as I reported on the AvSim forum. There the object did also show when I was in a remote area, but only if I had visited the location where the MDL is loaded first. So it seems the library stays in the memory in that case. I hope someone will try the files I posted on Avsim to see if he can reproduce this effect.
 
Yes, it is likely cached in the computers memory... I'd already concluded that in my thoughts while I was figuring other things out... I'm guessing it holds it in the scenery memory cache until it fills and purges the oldest unused BGL...
 
That is interesting, because that would mean that if you move to the other side of the world, the libraries of the location you were before are still in memory. So it looks to me if the memory cleaning when loading a new location is not really perfect.
 
Argh the AVSIM forums are so flaky, I can't log in to post this:

I don't understand the AVSIM forums, one moment it won't let me log in and gives cookie errors and another moment it lets me log in... I wish they'd upgrade this forum software :(

If an admin is reading, phpbb.com has great free forum software...

Arno, I'm curious, is there a BGL (other than the unlocked object library BGL's) that contains nothing but a library object?

Is there any BGL [apart from the unlocked object library BGL's that we can all access and use wherever we want] that contains an object library with no scenery placement code in it?

I am yet to come across one that is locked and only has an object library but no scenery placement information in it...

I'm sorry to ask this, I just haven't tried to find a stand alone object library that is locked yet, and it'd save me from having to try and track one down...
 
arno said:
That is interesting, because that would mean that if you move to the other side of the world, the libraries of the location you were before are still in memory. So it looks to me if the memory cleaning when loading a new location is not really perfect.

I'm not sure, I've been reading over your experiments with HEX codes and I'm interested in what you're doing... Are there object libraries that are only object libraries that are locked?

Also I need to check your post about the experiment you're talking about... I need to investigate it... Did you describe the locations and everything? What steps you took etc? I'm just kinda curious...

Also is the Lincoln Aviator a locked MDL or is it an unlocked MDL/GUID? Because I might have replicated what you've described already in my autogen experiments...
 
Hi,

On AvSim I posted a link to the files I used for my experiment.

http://www.scenerydesign.org/temp/locking.zip

I found that the anaheim.bgl in the namw scenery folder contains only one object (no placement) and it is locked. But also with this object it does appear anywhere in the world if I first visit the origional one in LA. After that is appear anywhere in the world, if I don't go to LA first it does not appear.

After I changed the hex part as I described on the AvSim forum it is not locked and I can place it anywhere without having to go to LA first.

At the moment I am trying to decipher the hex code that does the locking.

Maybe to keep the information on one place, it would be better if we continued this discussion on AvSim?
 
Avsim is a pain for me, it won't let me log in fully. I go to log in and at first it didn't let me in, then it let me in but when I tried to post it keeps saying I need to log in.... :mad: :banghead:
 
You can also post here of course, but on AvSim we have a slightly larger public reading it :). You are sure that you have the cookies allows? Sometimes the firewall will block them or so.
 
Okay I looked over what you shared... I'm curious, is your scenery used directly or cached? I'm assuming it's direct, but I need to rule out possibilities as to why you got the results you did...

Did you say you had some success with Hex editing? I'm curious as to how far an object is to be able to be spawned if it's in the hex code...

i.e. probably run a test with halving... Try placing the object 100 mi (or maybe based on lat/lon) to the north, see if it appears. If it doesn't move it only 50 mi north... Or maybe base it on 1 degree increments... We'd have to do this N,S,E,W to figure out the dimensions of the boundaries.

I think we need to do this with a couple of different objects to see if the distances are fixed... If they are then we can figure out the grild and then maybe the coding system... If they have different distance limitations then it's back to the drawing board...

I wonder if it's coded somehow based on regions or some other format... If we can find a similarity in the Hex code format we might be able to figure out what the codes do...

BTW Thanks Arno for all the hard work you've put in to FS development over the years... I think we should start a yearly awards system or hall of fame induction in the FS community to recognize those who have given us remarkable developments in the FS world... I think we should start with you, after Bruce Artwick of course... ;)
 
Last edited:
Hi,

flightsimstudios said:
Okay I looked over what you shared... I'm curious, is your scenery used directly or cached? I'm assuming it's direct, but I need to rule out possibilities as to why you got the results you did...

You mean the option in the scenery library? I just put the BGL files in the Addon scenery folder for a quick test. By default it is set to direct use and I did not change that.

flightsimstudios said:
Did you say you had some success with Hex editing? I'm curious as to how far an object is to be able to be spawned if it's in the hex code...

As I posted on AvSim I had success in removing the locking. But on the reverse I am still working. I know which piece of hex code does the locking, but I am now trying to figure out how it relates to the lcoation (I think it is a way to indicate certain LOD squares, but haven't figured it out yet).

In my initial test I did increase it with 1 degree every time. But as long as you start at your initial object it will always show, till you have gone round the world. That is why I am focusing on the hex code now, instead of trying to test it in FS.
 
Back
Top