Most scripts just use the $default_script object, but some script objects add additional functionality on top of that, such as the $npc_centric_script (which adds commands for controlling a NPC) or a $holographic_advertisement_script (which is a type of $npc_centric_script which creates a hologram).
Usually an item enabled by a script consists of 3 parts:
The object itself.
The script (the text file).
The script object which supports the commands in the script.
The object itself usually has a verb which loads the script and executes it against the script object.
The inner workings are much more complex, and much more simplified from a programmers perspective (that's called good encapsulation), but that's the basic idea.
An example of this might be:
Hookie (an NPC object)
The 99 bottles of beer on the wall script
The $default_script object.
Hookie has a verb ('sing') which causes him to load the 99 bottles of beer script and execute it against the $default_script object. This in turn causes him to sing 99 bottles of beer.
The same paradigm applies to drugs:
The Drug object
The drug effect script (the text file)
The $drug_effect script object which supports the commands in the drug effect script.
Obviously the drug effect script is going to have some custom commands which allow you to do things like temporailly raise/lower stats and possibly modify look_places or however we decide to implement the effects of drugs.
Hope this makes some sense...
Just another tought... If a character creates a drug, let's say v-202 but adds another component to it, can we set an effect/description to it?
make v-202 with chem kit
Ninja goat mixes a vial of v-202
add tylenol to v-202 with chem kit
Ninja goat adds an extra edge to it.
Get all the effects of v-202 and an extra from tylenol, like dunno making you feel less pain.
Ninja goat runs around on screaming "I'm Superman!"
So can the v-202 inherit an effect? Or it would be a v-203, ie a new drug all along?
If we link a substance with an effect and the combine substances generate combined effects on the player... we can mostly do anything with a chemical kit.
Take for instance lip balm (i know it's not a drug but extends that object) you have cocoa extract and mint essence as components, effects are feeling refreshing and protected.
Exchange mint essence for red die No. 2 and you have lipstick, effects feeling prettier and protected.
Mix pharmacologic alcohol and oak extract and get a parfum, effects freshness and smelling good.
Get my drift? By using the same object (drug) other possibilities arise beyond it's original focus...
And that is just by thinking easy two components formulas i came up with :
lipbalm : cocoa extract + mint essence
lipstick : cocoa extract + red die no. 2
parfum : alcohol + oak/citric/flower extract
soap � �: glicerol + oak/citric/flower extract
massage oil : oak/citric/flower extract + mineral oil
(Edited by Xeethot at 5:11 am on Mar. 24, 2004)
Just some ideas. whoo.