You asked for it, and thanks to the inspiration of Makarei sending me a pile of great ambient noises, I have added the ability to define your own sound themes (note: these are the background ambient noises, not the visual appearance of interface themes)
Full details in the quest.txt file, but basically there is a new table +THEMES which defines them, and then you use THEME n within your script to play them. At present they do NOT show up in the link editor as options to be bound to 'nearby places' (so use the stock scene script and test as necessary for that)
syntax of a table entry looks like this:
id, name, loop, sec1=sound1, sec2=sound2, ...
You can have at most one loop sound (played over and over continuously) and up to 10 or 20 one-shot sounds which are played at random intervals. For example "10=drip" means "play sound effect drip.wav, at random intervals that average out to about 10 seconds.
* MIDI PLAY LIST SUPPORT
More or long the lines already documented in the music.ini file. Note that if any of your MIDI files have a built-in "loop" setting, they will jam the play list.
* NEW QUEST OPCODE: HOST_GIVE
Yep, just like give, but only the host gets it
* NEW QUEST OPCODE: HOST_TAKE
Yep, just like take, but only the host gets took. And please do NOT expect every other quest command to get this special treatment. Also, I was too lazy to test this, so there!
* COOKIE DE_REFERENCING (cookie pointers)
Just add an at-sign (@) in front of the cookie wrapper #<>
Hence:
#<cookieName> is contents of cookie called cookieName
@#<cookieName> is contents of cookie whose name is in cookie called cookieName.
SET greenPrize, "a pickle"SET redPrize, "a tomato"1: pick a prize by typing 'red' or 'green'ASK 30SET prizeKey #<lastAsk>Prize1: you said '#<lastAsk>'1: prizeKey is #<prizeKey>1: prize is @#<prizeKey> --------------------------------------------------------------------------------
output:
Pick a prize by typing 'red' or 'green' [user input] green You said 'green' prizeKey is greenPrize prize is a pickle
If this makes no sense to you, you didn't need cookie de-referencing... Note a 'bad pointer' will just result in an empty string.
You could also do arrays this way, as in:
; say cookie 'index' is used for array index SET arrayKey, MYARRAY#<index> SET value, @#<arrayKey>
value now contains whatever was in MYARRAY[index]
Let's see now, writing to the array element is NOT a dereference, I hope this is clear:
; let's pretend we are interested in ARRAY[47] SET index, 47
; make a key value 'ARRAY47' (which is just a cookie name) SET arrayKey, ARRAY#<index>
; now 'read' the current value of ARRAY47 ; for this we need the @ indirection operator ; since we want the CONTENTS of ARRAY47 and not ; just the cookieName "ARRAY47" SET oldValue, @#<arrayKey>
; now 'write' a new value into ARRAY47 and here ; we do NOT need the @ indirection operator. ; If we did, we would not be writing into ; cookie 'Array47' we would be writing into ; a cookie whose name was inside 'Array47' SET #<arrayKey>, newValue
NOW are we confused?
* NEW ACTOR EVENTS
Two new actor events for you to play with "@eventActorAttackN" and "@eventActorSpellN." These work like the other events, but trigger when you use a physical attack or a spell on an actor in a scene. (as always, scene must already have ENDed for any events to be seen). Cookie item.id is set to the id of the right-hand attack weapon (for Attack) and cookie spell.id is set to the id of the spell used. NOTE: spells with the 'all' attribute cannot hurt actors.
* NEW COOKIES: Spell Cookies
Wouldn't do you much good to set spell.id if you couldn't get some info about the spell just cast on the actor.
spell.id read or write. the rest are read-only. This tells which spell is 'currently selected' and the other spell cookies always give information about the current spell.
spell.name name spell.pp cost to buy spell, in pp spell.price cost to cast spell, in mp spell.damage pain inflicted (see note) spell.element spell element (number) spell.level element level of spell
Note: the damage field tells you what sort of spell it is. It is the value in the spells.txt table for that element, so I refer you to that. But negative numbers generally mean pain, positive numbers generally mean heal, and 'special values' mean they cause or cure various diseases. Use the spells.txt documentation for more info.
* NEW SPELL FLAG: Use on Self Only = 4
Another per-spell flag. If set, then the spell can only be cast upon the caster. (other limitations continue to apply, this is just one more).
-------------------- He knows when you are sleeping. Posts: 10668 | From: California | Registered: Dec 1998
| IP: Logged