List of unused global variables

Post » Thu Jun 21, 2012 3:52 pm

Can anyone point me to a link with a list of unused global variables? I remember seeing a list before, but now that I need it, I can't find it.

Thanks!
User avatar
Victoria Vasileva
 
Posts: 3340
Joined: Sat Jul 29, 2006 5:42 pm

Post » Thu Jun 21, 2012 4:44 pm

unused? what would be point of having them if they are unused? Not sure I really understand the context of your question. I did read a post yesterday regarding the animation variables which was very interesting and listed variable dumps from the game. http://www.gamesas.com/topic/1360112-full-dump-of-all-animation-variables/
User avatar
+++CAZZY
 
Posts: 3403
Joined: Wed Sep 13, 2006 1:04 pm

Post » Thu Jun 21, 2012 9:30 am

unused? what would be point of having them if they are unused? Not sure I really understand the context of your question. I did read a post yesterday regarding the animation variables which was very interesting and listed variable dumps from the game. http://www.gamesas.com/topic/1360112-full-dump-of-all-animation-variables/

"Unused" refers to Bethesda... they created the global, but then didn't use it. I know of one: HirelingRecognizeJenassaCOPY0000, but since another mod is already using that one, I don't want to.

I need to have a way to communicate with another mod, which may or may not be running on the players computer. Since both mods are ESPs, seems like having an existing global variable is the way to do it. Is there another method?

Thanks!
User avatar
Scarlet Devil
 
Posts: 3410
Joined: Wed Aug 16, 2006 6:31 pm

Post » Thu Jun 21, 2012 12:32 pm

Exactly what do you mean by communicating?

If all you need to do is pass some number between them, there are plenty of ways to do it. For example, you could put the player in some faction and then change the faction rank. Change some other actor's faction ranks. Change one of the player's obsolete actor values. Change some other actor's actor values. Add some items to a leveled list. Etc.
User avatar
Smokey
 
Posts: 3378
Joined: Mon May 07, 2007 11:35 pm

Post » Thu Jun 21, 2012 9:37 pm

Exactly what do you mean by communicating?

If all you need to do is pass some number between them, there are plenty of ways to do it. For example, you could put the player in some faction and then change the faction rank. Change some other actor's faction ranks. Change one of the player's obsolete actor values. Change some other actor's actor values. Add some items to a leveled list. Etc.

Thanks RandomNoob...

An existing global seemed like an easy way to do it, but yeah, I had also thought about using the actor values. My problem with the actor values is that I have 9 different actors (one carriage driver per hold capital), I guess we could just agree to use a specific one.
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Thu Jun 21, 2012 11:56 am

there are also a ton of unused marker objects.

you can set them to their opposite enable state (if they are enabled, disable them).


if this becomes common practice, i suggest starting a mod ID directory of which mods are using which vanilla objects



one other way of detecting another mod without using vanilla objects is for one mod to add a totally out of place object in a vanilla cell.


for example, in the cell Elsweyr there is only maliq the liar. if a mod adds an object in there such as a chair, a second mod can look for that chair, even without dependency

on the second mod, place a marker in the cell and add a script to it:

Furniture property Chair  auto ; point this to the same type of chair used by mod1GlobalVariable Property MyGlobal  autoEvent OnInit()    ObjectReference ModRadar = Game.FindClosestReferenceOfTypeFromRef(chair, self, 1000)    If (ModRadar != none)	    MyGlobal.SetValue(1)    EndIfEndEvent
User avatar
teeny
 
Posts: 3423
Joined: Sun Feb 25, 2007 1:51 am

Post » Thu Jun 21, 2012 3:36 pm

I'd just add a script to some obscure vanilla ObjectReference (not the base) and stuff all the vars you want in it. Provided both mods add the same script to the same REFR, they should be able to share the vars (just add the shared script as a property to any scripts that need it and point it to the REFR with it attached).

SharedVariableScript Property SharedScript Auto
User avatar
bonita mathews
 
Posts: 3405
Joined: Sun Aug 06, 2006 5:04 am

Post » Thu Jun 21, 2012 4:41 pm

I'd just add a script to some obscure vanilla ObjectReference (not the base) and stuff all the vars you want in it. Provided both mods add the same script to the same REFR, they should be able to share the vars (just add the shared script as a property to any scripts that need it and point it to the REFR with it attached).

SharedVariableScript Property SharedScript Auto

ooo, thats an excellent idea. do you know if the values in the save game files are unaffected even if multiple mods "overwrite" the same REFR (i.e. the new mod that edits the same REFR doesn't re-initialize the values stored in the save games back to default)?

if this works, this is exactly something i would need for overhauling my already-released mod without having the user lose their progress
User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm

Post » Thu Jun 21, 2012 7:03 pm

ooo, thats an excellent idea. do you know if the variable values will also be stored permenently in the save games?
Danke :) The script and vars do stick though, so I'd not have it updating or anything. Even if the vars stuck in the plugin's absence, I'd say it's worth it, even if it required an uninstall setup with an empty SharedVariableScript.PEX. Odds are, if the ref chosen is obscure enough, it wouldn't even matter...
User avatar
Adam
 
Posts: 3446
Joined: Sat Jun 02, 2007 2:56 pm

Post » Thu Jun 21, 2012 5:50 am

in my case i would want the values to stick in the save game, as i would need to use those changes to apply to when the user installs a brand new overhaul of my mod without losing their progress. this would be super awesome.
User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am

Post » Thu Jun 21, 2012 9:58 am

It should work as intended then. *knock on wood*
User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm

Post » Thu Jun 21, 2012 5:40 pm

aww man, it didnt work.

the game creates duplicates of the global variable even if it has the same name

i went in one of the unused test cells and attached a test script with global variable properties on a esp called Test1.

in-game i set the global to a value of 10 then saved.

created a new Test2 esp and added the same script, same global variable to the same REFR and launched game

in the console i types showglobalvars and it showed the same global variable twice. one with a value of 10 one with a value of 0.

when i typed set testglobal to 20 it showed the old global variable still with value of 10 and new global with value of 20, even though they are both named the same


however, at least for what i need to do, i can set global variable values in test1 esp, and have that value stick in the save game. i can then create a brand new esp and overwrite test1. as long as the new esp contains a global variable of the same name, the save game's value remains valid and i can recall the value in the new esp, even if the new test1 esp has completely different content in it

for once, the "values stick in save game" actually saved my butt this time.
User avatar
Tiffany Holmes
 
Posts: 3351
Joined: Sun Sep 10, 2006 2:28 am


Return to V - Skyrim