Jump to content

Using the Variablexx actor values


miguick

Recommended Posts

So, just to make sure you know: FO3 and FNV have 10 'extra' actor values, named Variable01 to Variable10, and from my understanding a few of them are used in some scripts to simplify tracking some stuff. Some are used very extensively like Variable01 in doctors' dialog, others are used so little that it seems they could just have used anything else and leave the AV 'free' for the taking.

I would like to repurpose one or two of these free AVs to be used as some weapons' resistance type, a feature which cannot be done without an actor value, or else I could use any other kind of variable. While the GECk only allows you to use the regular 8 'resistance' AVs for a weapon or magic effect resist type, in FNVEdit you can define any AV as the resist type and the game will work with it just fine.

Of course, this can be kind of problematic if several mods try to use those same variable AVs for different things, to the point that I'm not sure i should use them at all. The GECK wiki lists in which FO3 scripts and mods those AVs are used. But I don't know which FNV mods make use of those AVs, and if they do, they probably use them to more interesting effects than what i have in mind.

 

I've dumped the script text from FNV and its DLCs and looked for use of those AVs in the scripts text using Fileseek, but that doesn't include other result scripts in dialog responses, quests or AV checks in condition tabs. Going by the page, I could perhaps use Variable05 and Variable09 somewhat safely, since it doesn't seem like they are used in FNV.

 

Anyone has any further insights about these AVs, their use in FNV mods, whether i could use them, or should i look for alternatives to them?

 

Strangely enough, you can right click in the GECK AV window to create a new AV, but this just creates a new ActorValueInfo field that cannot be seen nor manipulated in the GECK, and which is not really usable for anything it seems. Trying to create several will crash the GECK. So there's nothing but a hint of a framework to create new usable AVs, which was unlocked back in Oblivion with this OBSE plugin.

Link to comment
Share on other sites

The safest thing to do is to use an object effect on the weapon and an actor effect that resists the object effect, and assign the actor effect to the NPCs and/or creatures you want to be resistant. Having said that, you can probably use Variable03 through Variable10 without breaking anything in the vanilla game. However, all bets are off when it comes to whether these values are in use by other mods.

 

For reference, here's what I found for the VariableXX actor values in FNV.

 

Variable01 - used by doctors & other things, similar to FO3 usage.
Variable02 - used by hostages (e.g. Boulder City), same as FO3 usage.
Variable03 - only referenced by an unused script (left over from FO3).
Variable04 - unused in FNV.
Variable05 - only referenced by an unused script (left over from FO3).
Variable06 - unused in FNV.
Variable07 - only referenced by an unused script (left over from FO3).
Variable08 - unused in FNV.
Variable09 - unused in FNV.
Variable10 - only referenced by unused script & dialog (left over from FO3).

Link to comment
Share on other sites

Avoid the variables used by MMM and FO3 please, and I believe doctors use one of them

 

I didn't think of it before my first post but I agree: even if a VariableXX actor value is only used by FO3 you should still avoid using it in FNV mods (otherwise it could create a conflict for TTW users).

 

And to reiterate, even if a value is unused in both FO3 and FNV, there's no way to know for sure what other mods might be using it in a way that would conflict.

Link to comment
Share on other sites

Yeah, going by use of those AVs when using a TTW game, and considering FO3 mods as well, I'm thinking they are pretty much off-limits to using them in such a way. Not to mention the GECK can't assign them as resist type to weapons, so it would be a complete hack job done in FNVEdit.

 

I'll go a different and possibly quite better route instead: using the standard Damage Resistance AV which affects all weapon damage, and having the energy weapons' ammo bypass it through new ammo effects. Much better for compatibility too.

Link to comment
Share on other sites

My wendy Gilbert mod uses variable 9. Can't remember exactly why I did it that way, but it had something to do with the way it appeared in the Pipboy. Any other mod that depends on var9 will probably be broken by mine.

My Enclave Commander NV mod uses var02, var03, var04, var05 for AI package variables and other flags on the npc. At the time, there was no simple way to manipulate NPC variables on these non-persisent actors. If I ever get back to that mod, I'll look at getting rid of the vars.
Link to comment
Share on other sites

I was perhaps answering the question a bit too literally (i.e. which ones are actually used by which game). As a more philosophical design choice, if you need to control something with conditions that absolutely can't be done with reference variables, quest variables, or script effects, and it will only affect new NPCs or creatures added by your mod, then using VariableXX actor values is generally pretty safe. If you plan to use them for something that affects vanilla NPCs or creatures then it's very prone to conflicts.

 

In Quo Vagis I used Variable04 to give me very specific control of the work schedule at Lolipopz. By using an AV, I could assign every dancer the same set of approximately 12 AI packages (dance stage 1, dance stage 2, go on break, tout duty, eat, sleep, etc.) That allowed the work schedule to change as more dancers were hired. That last bit was the important part, because package conditions can check AV on Subject, but they can't check a variable on Subject; they can only check variables on a specific reference. So, with reference variables, the number of AI packages required would have been (num tasks * num dancers2 ) which clearly didn't scale as I added more staff.

 

Anyway, I knew none of the dancers would ever provide medical services, and none of the vanilla doctors were going to be dancers, so it would have probably been safe to use Variable01, but I used Variable04 to be even safer. Even if another mod used Variable04 for something else, it would be unlikely to conflict because the NPCs added by that mod wouldn't have the Quo Vagis AI packages that are conditional on Variable04, and the Quo Vagis dancers wouldn't have the AI packages, equipment or whatever is controlled by Variable04 in the other mod. HOWEVER, if the other mod used Variable04 for something truly global like say, resistance to a new effect, then weird things could happen (e.g. dancers are partially resistant when they are on the pole, immune when eating lunch, and no resistance when they are on break). In hindsight I probably should have done it with tokens, but live and learn.

 

And yes, I was slightly OCD about the work schedule, but doing it the simple way with a few scheduled sandbox packages was just a mess. I've never seen two real dancers keep pushing each other out of the way while trying to use the same pole (at least not without triggering a StartCombat event). In fact, I decided to keep it simple in Coito Ergo Sum, so I did exactly that: a few scheduled sandbox, patrol and sleep packages, and it's exactly the kind of Charlie Foxtrot that Quo Vagis wasn't: customers clap in front of an empty stage, multiple characters get stuck trying to use the same idle markers, etc. But it works plot-wise, since Malibu is several orders of magnitude more competent at managing a bar than Hilly.

Link to comment
Share on other sites

Just FYI - mod "Near Death" uses these variables (last time I checked) and it's gone viral (last time I checked =) ) so be cautious using these vars - it might create conflicts for many users.

 

 

To avoid using vanilla vars you can

 

1) Create multidimensional array

 

Dimension0 is actor

Dimension1 is your value

 

There is no tutorial for this and you must know how to work with array.

 

2) Use NX vars from NXExtender plugin

 

3) Use JiP's plugin to create new vars but they're temporary so they'll be lost on next game load.(should be lost)

 

I prefer first method since it doesn't require additional plugins.

Edited by tomm434
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...