Yeah I think so...how would she know where to put the stuff? What if it didn't originate from the house?
Other than having to worry about making all of the additional stuff added in later not just magically disappear (garbage can anyone?) and making it so that you can't dupe items by removing them then having your maid restore the defaults of your home it'd probably be rather easy.
Then again i haven't actually programmed any video games (yet!
) so don't lynch me if I'm just stupid.
Well, the first script would save the data for every physics-enabled item within the house at the time in some form of object checklist, regardless if they originated from the base house cell. The character save-files do much the same thing; things don't (usually) fall randomly or disappear if you reload a save. So the saving of the XYZ position as well as the XYZ angles for all the objects in the house can easily be done. And from that data, that's how the maid would know where to put the stuff. If an object is in a chest, then either the maid could ignore those objects, or checklists could be created for those chests as well (the objects stored within wouldn't need positional or angular data, though).
The stuff added later wouldn't disappear after a tidying up; since it wouldn't be on the object checklist, it wouldn't be altered (though a problem presents itself if a new item is occupying the 3D space that a checklisted item was saved as occupying; I suppose an override could be included to pass over putting the old item into or onto the new item). Duping would be easily circumvented by giving each item saved on the checklist a Reference ID (or using the already-given one if it has one already) and only bothering to reposition an object w/ the R-ID if that object is actually in the house. And of course, if characters are carrying the items within the house (including the player), then those items should be exempted from the object checklist so the maid doesn't have to resort to pickpocketing to get the stuff.
So let's say I have a sword in a display case, 5 books on a bookshelf, a collection of plates on a table, and a soul-gem on a desk. I talk to the maid and tell her to remember where everything is (activating the script that creates the object checklist; let's assume the checklist is made in the order of Sword, Books, Plates, Soul-gem). Then, I take the sword and put it on the floor. I place the books in a nearby container. The plates I take outside and drop them there. The soul-gem I pocket. And I tell her to tidy up. She'll walk to the sword and perhaps use a kneeling or looting animation. The sword will disappear and be put into her inventory as she picks it up. Then, the position and angle of the sword will be called from the object checklist, and she'll walk over to the display case. There, she'll either open up the case, or she'll just need to get close enough to it, and the sword will be removed from her inventory and placed in the house with the positional XYZs and angular XYZs pulled from the checklist. For all intents and purposes, the maid will have put the sword back into the case with precision accuracy. Next on the list would be the books, and functions would search the house interior cells and containers within the cells for those books' Ref IDs. Once retrieved, the maid'll go to the container I placed them in, take them, and place them exactly on the bookshelf using the same method as with the sword. Next will come the plates, but when the functions can't find the plates in the house cells or the containers, that item will be skipped. Finally, the soul-gem, but when the functions determine that the I am holding the soul-gem, that also will be skipped.
Is it sad that, the whole time I'm picturing this in my head, I'm seeing the Lusty Argonian Maid? :shifty:
EDIT: Of course, this is way too much work for something that I would actually expect to make it into the vanilla game. Fun idea for a mod, though.