There are different kind of libvars which can have different kind of values.
Libvar Types: Commanders, Historical Unit, Historical Model, LandscapeType, etc…
ValueTypes: numeric, text, regime slot#, people slot#, sftype slot#, etc..
These functions are really usefull when creating event libraries. As you can create libvars in the libvar tab of the advanced editor and allow end users of the Simple Editor to set their values. Then your scripts here can read the values set by the Simple Editor user.
parameters: historical unit slot#, library Name, variable Name
returns: value of libvar
==CheckLibVarHex parameters: x, y, library Name, variable Name
returns: value of libvar
parameters: sftype slot#, library Name, variable Name
returns: value of libvar
parameters: locationtype slot#, library Name, variable Name
returns: value of libvar
parameters: roadType slot#, library Name, variable Name
returns: value of libvar
parameters: riverType slot#, library Name, variable Name
returns: value of libvar
parameters: people slot#, library Name, variable Name
returns: value of libvar
parameters: regime slot#, library Name, variable Name
returns: value of libvar
parameters: landscapeType slot#, library Name, variable Name
returns: value of libvar
parameters: historical unit slot#, library Name, variable Name
returns: value of libvar
parameters: library Name, variable Name
returns: value of libvar
Your event library might be trying to access data of other libraries for example. Its best not to use these and use your own libvars to ask the Simple Editor user to supply whatever information you need.
Like for example if you are writing a partisan event library you might want to have global or regime libvars asking the Simple Editor user to tell you the historical unit model to use when placing partisan units.
parameters: library Name, event picture Id# as set in library
returns: returns event picture slot#
parameters: library Name, card Id# as set in library
returns: returns actioncard slot#
parameters: library Name, people Id# as set in library
returns: returns people slot#
parameters: library Name, sfType Id# as set in library
returns: returns sfType slot#
parameters: library Name, unit PredefId# as set in library
returns: returns unit predef ID# in our scenario
parameters: library Name, event Id# as set in library
returns: returns event slot#
parameters: library Name, historical unit ID# as set in library
returns: returns historical unit ID# in our scenario
parameters: library Name, commander ID# as set in library
returns: returns historical unit ID# in our scenario
parameters: library Name, smallGfx Id# as set in library
returns: returns smallGfx slot#
parameters: cards slot#
returns: returns name of library
parameters: library name, variable name, variable value
effect: changes or adds the variable
parameters: library name, historical unit slot#, variable name, variable value
effect: changes or adds the historical libvar variable
parameters: library name, variable name, variable value
NB: You need to call SetCardXY(x,y) to specify the hex you want to edit the libvar of.
effect: changes or adds the historical libvar variable of the specified hex.
parameters: library name, event name
effect: executes stated event.
NB: more safe than the ExecCallFunction which could pose a problems if end user would have loaded another event library using an event with exactly the same name.