Author Topic: Variables and paths from "Global Profiles" are not activated/used.  (Read 1854 times)

Incryptx

  • Newbie
  • *
  • Posts: 27
Hello

I use "Singularity" as the "Main Script" and use "KICS 4.1" and "Sigma 3.7.1" as "Global Scripts" because the author of "Singularity" prevents any edits, imports or modifications for integrity sake.

Be this as it may, variables form KICS and Sigima do not seem to be passed to "Singularity" for execution, nor do any "paths" in either profile. All of the "voice commands" seem to be available, but not embedded variables or path structures.

Since I load these global profiles in the global profile window, I file this as a bug against VA.

As well, there seems to be some conflict and confusion between using "Global Profiles" in VA's "Settings/Wrench" window, and opening the "Singularity" or other Profile, and using "Options/Use commands from other profiles" window.

What is the difference between including "Global Profiles" in VA's Settings and including the profile (by name) in the "Profiles/Options/Use commands from other profiles" window"?

In any event, it does not seem to make any difference in whether I include a profile as "Global" or in the profile's "Options/Include commands from other profiles" window, as variables and paths for secondary scripts are never seen or used.

Is this a bug, or by design for some reason unknown to users?

Thanks

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Variables and paths from "Global Profiles" are not activated/used.
« Reply #1 on: July 07, 2019, 12:13:13 PM »
Hi, Incryptx.  I'm not sure what you've got going on in your setup, or what your variable names are or what your commands are doing, so I thought I'd lay out a basic example of something I just tested (for my own sanity).  You may want to try reproducing all this locally so that it may help you to know where your problem lies.


I created a profile called, 'Global Profile'.  This profile simply has one command called, 'set global' that sets a text variable named, 'myVariable' to, 'hello from global'.  I have this profile selected as a global profile from the options screen.  That means it's accessible by all other profiles when they are activated.

I created a profile called, 'Linked Profile'.  This profile simply has one command called, 'set linked' that sets a text variable named, 'myVariable' to, 'hello from linked'.  Note that the variable is named the same.

I have a third and final profile called, 'Base Profile'.  This profile has a single command in it called, 'show variable' that writes token {TXT:myVariable} to the log screen so I can see the contents of, 'myVariable'.  This profile links in the, 'secondary' profile mentioned above (this is linked in from the profile options screen).  Note that this profile also includes 'global profile' because, 'global profile' is set as global.

- I run VA and select, 'Base Profile' as my active profile. 
- I then say, 'set global' which executes successfully (this is from, 'global profile'). 
- I then say, 'show variable' and 'hello from global' is displayed.
- I then say, 'set linked' which executes successfully (this is from, 'linked profile'). 
- I then say, 'show variable', and 'hello from linked' is displayed.

Everything seems to be working OK here.

If you are using scoped variables (variables prefixed with '>' or '~'), your results may vary.  I won't go into all the detail about that (it's all in the manual).

Incryptx

  • Newbie
  • *
  • Posts: 27
Re: Variables and paths from "Global Profiles" are not activated/used.
« Reply #2 on: July 10, 2019, 04:33:20 PM »
It's really difficult for me to explain what I am seeing here.

I have EDDI Installed, but don't load the EDDI.vap at all. I use "Singularity.vap" (HCS Profile) in VA as the main profile, then use both "Sigma 3.7.1.vap" and "KICS 4.1.vap" as global profiles. I have also opened Singularity.vap before hand, and using the "Options" tab, listed both global profiles as "Use commands from other profiles" in that dialog box.

When I say "Request Docking", Astra from Singularity.vap seems to respond with keystrokes and does the right thing, but I have Astra disabled in the Customizer with the box for the voice unchecked. The only reason I run Singularity is for the Ships Cat and to get the bindings checked so I can use the "HCS X55" bindings it provides. I expect "Sigma" to say "This is X-BRYB requesting docking permission and to do the keystrokes", but because variables are not being passed to Singularity from Sigma 3.7.1, Astra responds with keystrokes and does the right thing. With Singularty loaded as the main profile, and Sigma loaded as Global, I say "Who is on Duty". Sigma replies "It's Me, David, who is in charge of not set", It's me, David, who is in charge of not set" and so on for the rest of the crew.

I have these assignments set in Sigma, and If I load Sigma as the main profile, it works, by saying "It's Me, David, as First Officer, It's Me, Hazel, as Science and so on.

So, it seems the parameters and paths are not being passed to the "Main Profile" from the "Global Profile".

In all of this, I expect Singularity and it's voice commands to be ignored, as I have Astra's voice disabled and I expect Sigma to respond to all voice commands (which includes the paths and variables in that script).

KICS 4.1 seems to work fine and as expected, as it is for Music, and when I say "Play something" the paths and variables used by this script seem to locate the proper music files, all in local directories.

I'm sure your quick test shows one variable being passed correctly, but when used with complex scripts from three different profiles, it may get confused.

Furthermore, what I do with VA may not be recommended or advised, but for the most part, it all works except for variables and paths included in the Sigma.vap, do not seem to be passed properly, or those voice commands would not report "not set" when indeed, they are, both by the text files used and the paths to each text file which includes the proper variable.






Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Variables and paths from "Global Profiles" are not activated/used.
« Reply #3 on: July 10, 2019, 04:44:06 PM »
Are you expecting a "Request Docking" command in the global profile to override the one in the loaded profile?

Global profiles work exactly like any other included profile, in that any commands that also exist in the currently loaded profile will override those from other profiles.


I.E. if you have "Request Docking" in a global profile, but also in the loaded profile, the "Request Docking" command from the loaded profile will execute.