Hey guys, anyone know of two free global vars I can utilise? One for Bing, one for Lareth. In return, I can probably free up at least one flag, if not two (Bing's healing flag and Lareth alarm flag). How's that for a once in a lifetime deal? :coffee: Still need a list of vars and flags in use and intended to be used, plus descriptions of what they do but I'm guessing no-one has one. I'm caffeine powered at the moment. The DTs will be terrible.... :nervous:
global vars numbers 996 and 997 should be fine, I used 999 for Verbobonc's Drow population, and intend on using 998 in the near future, no need for a trade off Zeb.
Thanks Allyx On a serious point though, if I use the global vars and check through properly, then the flags should become freed up. I remember Blue saying something about being very careful not to use too many flags and vars as we'll eventually run out of space. So global vars 996 and 997 are now reserved.
There are a lot more global flags used in game, than there are global vars, worst case scenario is that if we fill all available flag numbers (not sure if there actually IS a limit or not) then we can move onto the vars numbers instead (IE make the vars number == 1 then check for that) it remains to be seen though whether there is a hard limit on these numbers though.
Would someone like to post Ruf's list of used flags / vars? I would if I was at my own PC... mind you, it won't cover the ones Krunch may have started using for HB - Expanded Universe.
Wonder whether we can tempt Blue to comment? I do recall him saying there was a definite limit on how many could be used by the game and it was something Co8 would have to keep an eye on. Still, I'm sure we're not near it yet...
Sorry, I shoulda said something earlier: Thats in both globalflags.mes and globalvars.mes in modules/ToEE/mes. So yeah, there is an upper limit of 999. We are nowhere near it, particularly with the vars, hardly any of those have been used. Here is Ruf's list.
May I be so bold as to suggest that this list be updated, posted, and stickied here in GM for the use and reference of all modders? I never understood why it was so jealously guarded. I recall back when I was doing the Sammy fix I inquired about global flags just to see them (didn't even want to add or use any), and I got the 'yeah we'll get right on that' brush-off treatment from Blue. :icon_chuc
Thanks Ted for the list. I fear you misunderstand me when I say there is a limit. Yes there is a limit of 999 but there is also a limit with regards to how much 'internal memory' (if that is the right term) which can be used by vars and flags. I can't remember much of the conversation I had with Blue on the topic other than it was something to watch out for. ---- Gaear - I don't think it was jealously guarded. More like a PITA to keep updated and I'm not sure how far Ruf actually got with the project when I went on extended absence. Not had chance to look at the list Ted has attached yet to see where it's at now.
I am all in favour of this being public knowledge, for obvious reasons. EDIT (2 seconds later) - I wonder if that is what is causing the anonymous CTDs in KotB? I use a lot of NPC flags as well as the global ones (to free them up for important stuff) - if the game is struggling to keep track of them, it may become unstable even easier than usual... Hmmm....
The only thing I can remember really is that 1 var and 1 flag both use the same number of bits and that there is a limited amount of bits that can be allocated to either. I think it was 8 bits per var or flag but I'm trampling along the foothills of my ignorance here and can't remember what the maximum total available for use was. Really could use Blue to comment when he's back as it may well be relevant to instability issues if KotB is suffering them as a result of too many flags and vars being used.
Well, first off, see attachment for my own list of vars and flags. Highlighted red means unsure, bugged removed or obsolete. Highlighted green means the flag/var is set there (I've done this for most of the dlgs and some of the pys). As for the var limit - I've just run a test, and used a script to set every flag from 1 to 999 to 1 and gave values to all the vars from 1 to 999. I didn't encounter any problems so far, but then again this kind of testing method would also tell you that there's nothing wrong with the Tolub brawl script etc. But if using a large number of them does cause problems, well, perhaps using vars as bit-wise flags is the way to go. And often vars can be recycled for several quests (most scripts that use vars don't have more than 4-5 states, if that, so you could probably reduce their number by half just by using cheap modulus tricks). PS FWIW, the results of the test I started here indicate that there's nothing in those ranges (tested on a long game I've recently played)