<seeking...>
TMI. Too Many Instructions. *sigh*
Ok, I'm trying to compartmentalize my scripts so I don't hit the TMI. Luckily, I've structured the Regional Mod system in a somewhat hierarchal fashion.
The thing is, there's a (conceptual) limit of 10,000 nodes. Each node might reference any one of (hundreds) of template areas, which each might have (dozens) of WPs. Just storing the Node Biomass (one per node) and the WP biomass adjustments (one per WP in template area per node) is probably looking at about a milllllllllion integers. I'd also like to cache the area tag, name and handle (object) for each node.
With my first, rough, script assigning biomass adjustments to WPs I got to Node 8 before hitting TMI. Eight out of a potential ten thousand. Ouch.
Now I've divided up the scripting somewhat and I manage to handle 25 nodes using 5 areas with a couple hundred WPs without hitting TMI... But I know I won't reach 10,000. And there's something bugging me... When I hit TMI before, it gave the offending script (reg_node_setup), but then it listed the script run on the Housekeeper that called reg_node_setup and gave the same TMI warning.
I'm hoping that was just the return value of the ExecuteScript coming back to roost, but here's the question (which I will sooner or later discover the hard way); Do the instructions executed by child scripts count toward the parent script's TMI limit? Is all my divvying up a waste of time?
Currently the Mod onLoad executes a script on the Housekeeper who loops through all the nodes and executes scripts on them one at a time that loops through executing a script on areas,. Mod->Housekeeper->node->area.
All so I can setup the variables on WPs in Areas.
Note: This is not a deal-breaker, as I fully intend to incorporate NwNx db in the system, but I'd really like to get it working with vanilla NwN first.
<...too much information>
Modifié par Rolo Kipp, 23 novembre 2012 - 06:24 .