|
Post by Zaphod Beeblbrox on Mar 4, 2007 1:29:11 GMT
First of all go to the Functions Editor (link at the top of the Adventure Creator area), and Load the SEL file for your book (it will be listed in 'Your Book SEL Files' with the same name as your book). Then scroll down and at the bottom highlight 'GeneralLib' from the list in the very bottom right box (currently Excluded). Click 'Save'. GeneralLib should now appear in the 'Included' column.
This now means you have attached the hosted SEL library 'GeneralLib' to your adventure and can use the functions defined in that library - most noteably for this purpose we now have use of the '&dice' function.
Enter (copy/paste) the following code and text in reference 0 (or whatever page ID/number you want to create the character in):
<EVENT event="&permvar $iskill, $skill, $istamina, $stamina, $iluck, $luck;"></EVENT> <EVENT event="$iskill=$skill=6+&dice(1);">You roll: <INFO info="$skill-6;"></INFO> for Skill</EVENT> <EVENT event="$istamina=$stamina=12+&dice(2);">You roll: <INFO info="$stamina-12;"></INFO> for Stamina</EVENT> <EVENT event="$iluck=$luck=6+&dice(1);">You roll: <INFO info="$luck-6;"></INFO> for Luck</EVENT>
Then in the 'charsheet' page enter this:
Skill: <INFO info="$skill"></INFO>/<INFO info="$iskill"></INFO> Stamina: <INFO info="$stamina"></INFO>/<INFO info="$istamina"></INFO> Luck: <INFO info="$luck"></INFO>/<INFO info="$iluck"></INFO>
Hopefully that will be of some use, and may give an idea of how ABML & SEL work together.
|
|
neko
New Member
Posts: 5
|
Post by neko on Mar 8, 2007 16:16:36 GMT
Hi Zaphod,
Firstly, thanks for sorting out the testing area in "your books"!
Problems...
Have just tried accessing the "function editor" link but unfortunately just got this message, "failed to open your library files directory", and couldn't get any further!
Any ideas?
I also tried generating some stats. with &random7,12 but that didn't seem to work either...
Also, how can I get combat routines onto my editor?
Cheers!
|
|
|
Post by Zaphod Beeblbrox on Mar 8, 2007 21:28:49 GMT
Hi Neko Thanks for spotting that very serious error - I believe at some point in the past I uploaded some old versions of my scripts by accident - as a result in this case the MyLibrary directory has not been created with any accounts since then (and I would never have known as I am not in the habit of creating new accounts for myself!). I have manually added it to your account and you should find the Functions Editor available to you now. I will have to write a script at some point to run through existing accounts and add to all of them I guess Functions need a space between the function name and the parameters (if you aren't using parenthesis around the parameters) which is why &random7,12 will not work (you are actually calling a function called &random7 which does not exist) - try &random 7,12; (semi colons are generally meant to terminate statements). If that doesn't work try &random(7,12); - and please let me know as parenthesis are meant to be optional for parameters in the system. I assume you are assigning the value to a variable too i.e. $skill=&random 7,12; (Sorry if teaching to suck eggs do not know your programming experience). As for using the combat routine - well now your Function Library is fixed hopefully that will all become clear! The FFCombat library holds my latest version of standard FF combat, however it is very large and very complex, and not yet finalised (so at this point if you are going to use it as it is I suggest you copy and paste it in to the Library attached to your adventure). It currently holds one function - &combat_full and has a large number of parameters. I will be adding 2 simple interface functions that I used in Hunger of the Wolf to allow more easy usage of the main &combat_full function sometime over the next few days, as well as adding more detailed comments to explain how to use the functions more clearly.
|
|
|
Post by Zaphod Beeblbrox on Mar 9, 2007 15:31:14 GMT
All accounts should now have MyLibrary and therefore access to the Functions Editor.
|
|
neko
New Member
Posts: 5
|
Post by neko on Mar 13, 2007 18:49:46 GMT
Hi Zaphod,
Thanks for sorting that out for me!
So far, so good...I've managed to get the character generation to work and to include a simple combat routine.
Now I just need to write a good story!
|
|