I am nearly finished with my first mod: a transformation of the technology tree traversal from depth-first to breadth-first. Clicking on "Mathematics" will queue up Animal Husbandry, then Archery, then The Wheel as opposed to the old way which was Animal Husbandry, then The Wheel, then Archery. Trust me, it's something that's bugged me since release and I'm excited to fix it. Anyway. 
I've currently put all my new code into a new Lua file called BreadthFirst.lua which is referenced near the beginning of both TechTree.lua and TechPopup.lua with an include statement. Other than the include statement, the only other changes to the other two Lua files are the hooks into my code.
The code works almost perfectly. The intermediate technologies are chosen in the correct order, and automatically process in order. The tech tree displays the little numbers next to the technologies and everything. However, that same information isn't seen in the tech popup -- and changing technologies in the tech popup leaves the tech tree page still displaying the old queue numbers. I am pretty sure it's because I have two separate "global" variables, one for the tech tree and one for the tech popup. How do I reference a truly global variable from two different Lua files?
Jack.

I've currently put all my new code into a new Lua file called BreadthFirst.lua which is referenced near the beginning of both TechTree.lua and TechPopup.lua with an include statement. Other than the include statement, the only other changes to the other two Lua files are the hooks into my code.
The code works almost perfectly. The intermediate technologies are chosen in the correct order, and automatically process in order. The tech tree displays the little numbers next to the technologies and everything. However, that same information isn't seen in the tech popup -- and changing technologies in the tech popup leaves the tech tree page still displaying the old queue numbers. I am pretty sure it's because I have two separate "global" variables, one for the tech tree and one for the tech popup. How do I reference a truly global variable from two different Lua files?
Jack.