Well, I wasn't going to let this one beat me.
Only cprops and datafiles seem to store arrays, so to get them into itemdesc you have to store each element of the array separately and use GetConfigStringArray to get them.
This can be made to work with the sysbooks package from the 097 distro.
In Distro\pkg\items\sysbook\book\methods.src around line 250:
Code: Select all
//If we got this far.. then lets fall back on the itemdesc.cfg
//Note its read in as :*: which reads in every itemdesc.cfg
var cfg := ReadConfigFile(":*:itemdesc");
cfg := cfg[book.objtype];
if ( prop_name == "Contents" )
prop_value := GetConfigStringArray(cfg, prop_name);
else
prop_value := GetConfigString(cfg, prop_name);
endif
if ( prop_value )
return prop_value;
endif
The itemdesc entry for each book is now of the form:
Code: Select all
Item 0x7025
{
ObjtypeName newbiebook
desc Player guide
Graphic 0xff2
CreateScript book/onCreate
DestroyScript book/onDestroy
Script book/use
MethodScript book/methods
vendorsellsfor 50
vendorsellsfor 50
newbie 1
ReadOnly 1
IsBook 1
NumPages 9
Author Me I guess
Title Guide to This Shard
Contents Welcome to my very
Contents own shard. This book will
Contents try to explain some of
Contents the most basic things
etc etc
So if you want to give out a welcome book to each player, and want to use the disto's book package, this is one way to do it without using the 'orrible cprops on each book.
If this is of any value to the distro, let me know. I know MuadDib is a fan of editable datafiles so this might not meet requirements.