This is an old revision of the document!
Table of Contents
Event Libraries
There is no special editor. The advanced editor is used to create these.
It is important when designing this to provide the final user (in the simple editor) the options to configure and customize these event libraries.
For example don't hardcode an event picture illustration for a message, but let the user specify one through a libvar or a table.
This can be done by adding stringlists (tables) to the library and libvars… these can be given documentation and datatypes and will enable to give the end-user the ease-of-use to tailer the library for his scenario.
It is very much recommended to always use the documentation buttons for libraries, libvars and stringlists (aka tables) so the end-user has some information on how to use them.
Rules when designing libraries
1. Never store data in regimeslots or gameslots. Always store data in libvars of your own library. This makes sure it can function independently and will not get data mixed up with other libraries not of your writing. Keep in mind you can create these libvars on the fly just by writing to them using the appropriate exec.
2. Only use the old 9 maparea slots for calculations within an event. Never store data in them, always use hexlibvars of your own library for that purpose.
3. Where possible do not hardcode core variables. Make them accesible as libvars or stringlists of your own library. The end user will appreciate it. As will you when you re-use your event library for a different scenario.
4. Never hardcode the action card categories… The designer using your libary needs to be able to determine the category of each card your library uses or generates. This means having a global libvar accesible in which the end user can specify the category number of your cards. (take a look at the basic event library to see this approach in action). This is because there are only limited categories and the person using the Simple Editor determines the category names and which cards goes in which category (because he might be using a lot of libraries).
5. Never hardcode eventpictures in the messages generated by your events. Allow the user of your library to set them through a libvar.
6. Make sure if you are looping through actioncards for example in your events and deleting stuff that you only delete stuff from your library and not from others. Remember: the end user might be using your library in conjunction with other libraries.
Upon loading in simple editor
Only the event, cards and event pictures info will be read from these libraries
