Hi Kal, what you are trying to accomplish is rigth at the leading edge of programming in AoM. I have watched people attempt to solve this problem, but I'm not sure anyone had found a way to do it.
Mythic and inventoor and nottud were the people I know who had dug into AoM so deep that they might have had a solution, but I don't remember it ever being solved. I can try to use the search function and look through past threads here for people's approach to this problem. The problem is that a scenario doesn't usually save any of its history into anything other than its own SCX/SCN file, so the next scenario has nothing to go by.
I am vaguely recalling someone proposing that they save lighting settings into a file during a scenario that can be accessed by other scenarios because that is a universal file, not scenario-specific. But I think the problem with that is they couldn't get the lighting settings into the scenario, but as text messages that are shown in the command line/debug screen.
You sound like you have looked pretty deeply into this already with your mention of XML files. I suggest that you search previous threads in this forum for other people's work and update us on your progress in this thread. There are a lot of smart people here that might get an idea from you if you share your efforts.
In all your science of the mind, seeking blind through flesh and bone
Find the blood inside this stone
Well, I know I've never shown what I feel, I've always known
I plan my vengeance on my own - and I was always alone