Extended session variables

gexrrt

Member
I've found extended variables rule - i can set variables and also see and change them run time

Are there rules and commands to modify, check this kind of variables


tks

Roberto
 
There are several rules built into Trainz that deal with variables but I do not know how they relate to the Extended SessionVariable Library, which I have never used.

The built-in rules are:-

Variable Check Rule
Variable Modify Rule
Variable Modify Continuous Rule
Variable Show Rule


and, from the DLS

Variable Random Rule

Information on these rules can be found on the Trainz Wiki
 
Roberto - Where did you find this rule? I would be interested to see it. Perhaps I can then answer your question.

Regards - Trevor
 
Hi Trevor

The only one that I know about is the "Quick Session Variables" rule which has "Extended SessionVariables library" as a dependency, both by Pierre Guy. I don't know if there is any way to manipulate these variables as when I asked Pierre about them a couple of years ago he replied that they were for diagnostic purposes and not intended for general session use.

Regards

Brian
 
Hi.

Thanks to all for your interest in Extended Session Variables. Very shortly, Extended Session Variables Library (esvlib) is a library that I use in most of my driver commands and rules script to communicate or share data beetween independant scripts.
The library offers more functions than the standard N3V session variables library, mainly by enabling to have session variables either at the session level or at the train level. It offers also more types for variables by enabling to have string list or string set variables types.
ESVLIB is compatible with N3V session variables, as it will use standard N3V library routine to store values for string or numeric type variables with session level scope. For all other types or for train level scope session variables, ESVLIB uses its own storage format (using soups) to implement the added functionalities.

As this library was designed for scripters, there is currently no specific rules or driver commands to create, edit, view ESVLIB variables.
ESVLIB asset includes a static class helper tool script that makes easy for any scripters to load the library during initialisation of any other assets and to call specific routines to create, get, set or delete a variable of any type and for any scope.
If some scripters are interested in using in their own scripts this library, we can continue the discussion in another thread in the scripting section of this forum. There is currently no documentation on how to use the library, but I can easily create one on the wiki and can also explain how to quickly use it.

Take care that there are currently two ESVLIB assets : one for pre SP2 Trainz and one for post SP2 and later Trainz.

The new ESVLIB post SP2 includes a run time monitor (that can be launched by clicking on the RM icon in the top toolbar and selecting session variables) that offers most of the functionalities included actually in Quick Session Vars rule. So I am not sure today of the future of Quick Session Vars rule, that may be deprecated in the future. At least, if I migrate Quick Session Vars Rule on new ESVLIB post SP2, there will be a few functionalities deprecated like global scope vars (no longer supported in SP2) and also some specific vars type like trackmark list or platform list vars (no longer supported in SP2).

Hope this helps a little.
Regards.
Pierre.
 
Back
Top