Script Variable

I have tried, with no success to figure out how to use a very specific feature in the cls_pres_***.2da files. These are the files that list the requirements a character needs to be able to select a Prestige Class. Most of the cls_pres file is a cake walk. However, there is a particular function that I simply cannot figure out. The ScriptVar function. When viewed in the cls_pres_temp.2da file, you will see that the second linehas the following information: LABEL - ScriptVar, ReqType - VAR, ReqParam1 - cmi_AllowTempest, ReqParam2 - 0. I am trying to figure out where the cmi_AllowTempest would be located so I can then figure out how to use the ScriptVar function for a Prestige Class I have in mind, but I need to call a ScriptVar to do it. How is it referenced? Where does that ScriptVar look to find the information provided by cmi_Allow_tempest?

Can anyone help with this?

// change (to something appropriate) and copy this string to your cls_pres_*.2da
const string sBlockMyPrestigeClass = "tem_AllowMyclass";
r ScriptVar VAR tem_AllowMyclass 0

where r is the row ID in the cls_pres_* 2da

Then choose a handy OnModuleLoad (or similar) handler-script, like k_mod_pc_loaded or cmi_pc_loaded

and add this line →

SetLocalInt(oPC, “tem_AllowMyclass”, TRUE); // is case sensitive

… and (if I’m reading your PM right) no PC can level as ‘Myclass’

(like it says in the notes, it’s back-asswards – allow=TRUE means block the prestige class)

but those instructions are too simple. That local_int needs to be set on all PCs and Companions to prevent them from choosing the PrClass, even after any other prerequisites are met …

So you’ll have to clear that variable somewhere, where those extra conditions do get met, and further you’ll need to prevent that variable from being reset TRUE in the OnLoad-ish event …

/totally untested