How do the library based Checks and Execs work?

Check values of different types of libvars

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.

CheckLibVarCommander

parameters: historical unit slot#, library Name, variable Name

returns: value of libvar

==CheckLibVarHex parameters: x, y, library Name, variable Name

returns: value of libvar

CheckLibVarSFType

parameters: sftype slot#, library Name, variable Name

returns: value of libvar

CheckLibVarLocType

parameters: locationtype slot#, library Name, variable Name

returns: value of libvar

CheckLibVarRoad

parameters: roadType slot#, library Name, variable Name

returns: value of libvar

CheckLibVarRiver

parameters: riverType slot#, library Name, variable Name

returns: value of libvar

CheckLibVarPeople

parameters: people slot#, library Name, variable Name

returns: value of libvar

CheckLibVarRegime

parameters: regime slot#, library Name, variable Name

returns: value of libvar

CheckLibVarLandscape

parameters: landscapeType slot#, library Name, variable Name

returns: value of libvar

CheckLibVarHistorical

parameters: historical unit slot#, library Name, variable Name

returns: value of libvar

CheckLibVarGlobal

parameters: library Name, variable Name

returns: value of libvar

Check the slot# or ID# of a specific library imported data instance

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.

CheckGetEventPic

parameters: library Name, event picture Id# as set in library

returns: returns event picture slot#

CheckGetCardByLibrary

parameters: library Name, card Id# as set in library

returns: returns actioncard slot#

CheckGetPeopleByLibrary

parameters: library Name, people Id# as set in library

returns: returns people slot#

CheckGetSFTypeByLibrary

parameters: library Name, sfType Id# as set in library

returns: returns sfType slot#

CheckGetPreDefByLibrary

parameters: library Name, unit PredefId# as set in library

returns: returns unit predef ID# in our scenario

CheckGetEventByLib

parameters: library Name, event Id# as set in library

returns: returns event slot#

CheckGetHistoricalIDByLib

parameters: library Name, historical unit ID# as set in library

returns: returns historical unit ID# in our scenario

CheckGetHistoricalIdForCommanderByLib

parameters: library Name, commander ID# as set in library

returns: returns historical unit ID# in our scenario

CheckGetSmallPic

parameters: library Name, smallGfx Id# as set in library

returns: returns smallGfx slot#

Misc. checks related to libraries

CheckGetCardLib

parameters: cards slot#

returns: returns name of library

The following Execs are available:

ExecSetLibVar

parameters: library name, variable name, variable value

effect: changes or adds the variable

ExecSetHisLibVar

parameters: library name, historical unit slot#, variable name, variable value

effect: changes or adds the historical libvar variable

ExecSetHexLibVar

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.

ExecAllFunctionByLibrary

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.

 
dcx/library_checks_and_execs.txt · Last modified: 2016/02/26 18:51 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki