( I'm talking about cities not forts so perhaps they work differently)
Im a computer science major goblin. I know the difference . However DF loads sites and some terrain from chunks in the world file so it is constantly streaming (and offloading) the site to you similair to how minecraft does terrain ( except it doesn't need to have as much loaded since what the player can see is much less) Which is why you have no "loading screen" when you visit your fortress , the problem with player forts is that toady can't split it into chunks so it loads the entire thing. Cities can be 16*16 and he can pull that off by generating the city and seperateing it out into chunks ( this was s big part of the site rewrite, before the first site rewrite human sites were loaded like forts (Toady lamented this many times) so they had to be tiny)
That is why you sometimes get those huge lag bursts when you first visit a city because it generates the whole city then offloads most of it.
Camps and lairs for example are loaded like player forts.
The whole world (with the sole exception of player fortresses) is recreated everytime from the same random seed based upon a set of raw data. This includes things like the total population of the site, the list of animals and plants available, the present season and so on. Nothing is stored except abstract data, everything is recreated every single time you load up the game; that is why interactions between fortress mode and the rest of the world are so scarce; there is literally nothing outside of the fortress at all except abstract numbers and group trackers on a simplified travel map.
The world is indeed generated (not loaded) in chunks but every site is a single chunk. This is the reason for the much lamented inability of the game sites to increase in population beyond 10,000, they cannot model more than than that many creatures 'actually existing' and doing stuff at a given time. It is near certainty that cities are not loaded in chunks because if they were the population size would essentially be infinite because the creatures in the other chunks do not actually exist. It is quite possible that cities used to be special, which explains their earlier small size; the memory requirements for loading things is far greater than for generating them, hence why the game uses the latter so much.
Since cities are the sites with the greatest need to be generated rather than loaded, it would be pretty staggering if cities were loaded while the other sites are generated. The specialness of the cities was likely eliminated as Toady One figured out a way to generate them from base data like other sites.
You can't argue that it is regenerating your own fortress.
However it does seem like NPC forts work differently as do goblin forts , hillocks probably work like hamlets.
Goblin I'll go ahead and ask toady. I have trouble accepting that he loads town the way you say he does when he has only ever said it doesn't work that way. Sure it might not be s good way of doing it and I am aware, but toady never claimed to be an expert Programmer. Toady is very open to questions he cares about the community I'm sure it will be fine.
No reason to think that anything works differently except player forts.
-----------------------------------------------------
The item ownership is interesting I believe item ownership is planned to be tracked more once toady works on law/culture changes and right now it is very simple "oh you are in this building, now you belong to it" that sort of thing. And it will be great when he goes to track that more . I believe he plans. to actually track item amounts by name per (important) person.
Now items (as toady has said) are tracked numerically by site ( then they put all the spare items in warehouse buildings he does that so he can simulate trade.
Items you drop in a site are tracked by position. We can test the possible part of your theory by dropping an item in a shop in a city and see if the shop "claims" it.
We already know the answer, the shop does not claim it because I have dropped things on a trade depot and came back to find that despite being owned when it sold it it is now. Trade depots remember are NEWER than shops and thus since they appear work identically in mechanical terms there every reason then to think that trade depots simply reuse the shop code in a different context (they are in code terms the same thing). What I am claiming is that in order to reconcile your experiance of buying items sold by a previous adventurer with my experience of sold items lying about unowned once the site is reloaded exactly where they were left the sites hoover up tracked items that are left in shops into their site item list.
The site item list it stored abstractly and then the items are created based upon it to fill the appropriate locations when the site is regenerated. If the regeneration happens say every 15 days then it would explain why new adventurer would be able to buy items from a previous dead adventurer, because enough time in the 'real world' has passed for the periodic 'sweep' to occur. The original tracked are untracked (effectively 'destroyed' really) and uploaded into the abstract item list, hence becoming one of the items that does not exist when the site is offloaded and thus being ownable.
At the moment there are only two kinds of property in the world. There is individual property and there is $SITE$ property, the thing is that this is always the property of THE SITE in general rather than any specific site, which is a bias that probably has something to do with the old economy. The funny thing here is that it is site property not individual property that actually matters in the game but lacks development while individual property is more developed in code terms (with explicit trackers to individuals) even though it means little more than the items a given person is wearing which does not really require any specific mechanic since you cannot grab items people are wearing anyway. It seems that the main thing that is mechanically neccessery to get rid of a load of economic exploits is simply to make every item on the map regardless of location belong to the site every time the site is generated/loaded provided that the item is not carried by anyone presently.
This would get rid of at a stroke the often extremely valuable freebie items lying about in many sites and would fix the core issue of this thread at the same time,
Time for more science perhaps? Did you delete the world entirely already?
Also remember to report it!
I have still got it but I do not think there is much more I can learn from it. I can rather easily generate a medium world in order to test the mechanics that I learnt about from the buggy game but the buggy game itself has little more to teach it other than it and it's world seed are fundermentally rotten, sadly. I can hardly be bothered to report it because it is an old bug that has been around for some time.