|
Post by rian1020 on Jul 5, 2008 0:29:33 GMT
Yea can someone tell me how to make an Item list on the character screen? Thanks in advance.
|
|
|
Post by Zaphod Beeblbrox on Jul 6, 2008 14:40:57 GMT
Hi rian
You need to edit the file 'charsheet' in the adventure creator (it should automatically have been created with your adventure). This is the line I used in Hunger of the Wolf:
<SCRIPT script="&display_compact_list('\n',$equipment);"></SCRIPT>
This assumes you have gone into the function editor and have 'included' the GeneralLib file so that you have access to the &display_compact_list function. If you are unfamiliar with this process:
1) Select 'Function Editor' link in the Adventure Creator home page 2) Scroll down until you see 3 boxes in columns headed 'Your SEL files', 'Your Book SEL files' and 'Hosted SEL files' 3) In the column headed 'Your Book SEL files' highlight your book name and click load. This loads the SEL library that is tied to your book (empty except for a comment). 4) scroll down until you see 4 boxes, the columns are headed 'Included' and 'Excluded' and the rows are labelled 'User Library' and 'Hosted Library'. These are the libraries available to tie to your adventure - the ones in the column Included are currently tied and the ones in Excluded are currently not tied. At the moment there is probably nothing in the included column. 5) In the Excluded column and the Hosted row (bottom right box) highlight 'GeneralLib', scroll back up and hit the save button.
Now you have 'tied' GeneralLib to your adventure you can use all the additional functions in there, currently only 3, &dice - rolls 6 sided dice, &dnd_dice - rolls dice with any number of sides, and &display_compact_list which will display a list with a 'multiplier' sign for duplicate entries with each entry separated with a separator of your choosing (in the script example above I have used a newline, \n).
To add and remove items from your list variable ($equipment in this example) look up &addtolist and &removefromlist in the functions reference page in the Articles section. Don't forget to make your item list variable Permanent with &permvar at the beginning of the adventure (reference 0 maybe), :
<EVENT event="&permvar $equipment;"></EVENT>
|
|