2015-12-05

USING LIBRARIES:

Organization: Compartmentalize, Compartmentalize, Compartmentalize!

you could have your entire code (game software, OS software, other software, or whatever else) be in a single file... but we humans need to split that code up into multiple files for our sanity. This is concept of~for libraries, modules, game mods, patches, updates, upgrades, versions, game xpacs (expansion packs), and etc. All of these things, are just files of code, which will be used~applied (directly or indirectly) to the main code file.

The quest engine is built via multiple library files, the default being the 'english.aslx' file and then the 'core.aslx' file (actually this is just an 'addresses book or a hub' of many 'core' files that the quest engine will find, get, and include into or for the main file ~ if you look into the actual quest folder, you can see all of these 'core' library files which make up the quest engine). So, if you're a good programmer, you can create your own entirely unique game engine with quest. Quest is extremely 'modable', imagine not jsut merely being able to make mods for skyrim, but to make your own 'my skyrim' engine (such as maybe a sci-fi themed game engine as opposed to its dark medieval fantasy theme).

So, a library file (which uses the same extension of 'library_file_name.aslx' as your game file 'game_file_name.aslx', btw), is simply (extra) code that will be added to your game file's code automatically by quest upon the game's initialization (the game's startup by someone playing the game), so long as you properly add the library file, which we'll talk about now.

to have library files being used by your game:

(we're ignoring multi-layered 'include ref'~inheritances, to keep it simple, if you already understand this, then great, but otherwise, let's ignore it)

1. you must have the library files, physically, be in the same folder as your quest.exe file, for quest to be able to find and use your library files.

2. within your game file, you need to use the, <include ref="library_file_name.aslx" />, tag code line for each of your library files, see the any game quest file to see where to place them.

3. important note, unlike most of your code where vertical placement doesn't matter, it DOES with library files, as these are used to build-up (initialization) your game for playing. Let's pretend that playing our game, is akin to constructing a building, since we got gravity, you have to first construct the foundation, and then work your way up, ie you can't build the 'roof-ceiling' before you've built the walls. For example, try putting the 'core.aslx' file above the 'english.aslx' file, it may cause your game not to initialize (I haven't tested it myself). So the vertical placement matters as that's the order that your game (its code) is built-up (initialized) to be a playable game for someone. From upper to lower.

and literally, that's it for adding~using library files.

-----------------

or, if you understand the code structure, you can just copy and paste the entire codes or just desired sections of libraries' codes into your game file's code too. But usually, you're using a library as you want to use its entire code (as it is often providing you a system), in which case, it's much easier and quicker to use the non-copy-n-paste code method described at the top of this post, as this way you're ensured the library is properly added to your game file code, whereas you can make mistakes with copying and pasting.

-------------------

the hard part is in learning how to work with the libraries in using them to develop your game, as you got to understand how they work, using the same code names~labels and etc, to be able to work with the libraries, to develop your game with their features~abilities.

----------------------------

CREATING~WRITING LIBRARY FILES:

it's just like the game file, same '.aslx' extension, you write in your various code segments into the library file, with the only difference of using:

<library>
// your mass of code:
// maybe a function here
// maybe an object here
// etc etc etc
// look at other peoples' library files to understand if not clear
</library>

vs the game file's using of:

<asl version="550">
// your mass of code
</asl>

--------------

for your other questions...

you should've been reading all of my posts! (joking)

find people who're working on and~or know RPG stuff, me, neonayon, all of the good coders (users and site mods), and etc people

use~study RPG libraries~guides~code samples (Jaynabonne's, Pixie's, Pertex', Chase's, Sora's, HK's, etc's), and~or threads-posts of code on RPG stuff

use~study the 'how to (guides)' in the quest doc site

use~study the quest doc site

etc etc etc

Statistics: Posted by HegemonKhan — Sat Dec 05, 2015 2:40 am

Show more