View Single Post
Old 03-15-2009, 02:37 PM   #20
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Re: Revolutionary New OLC and Scripting

NiMScripts can:

-Be called in response to the following game events: SAY, "GIVEN"/"GETS", COMBAT ROUND START, ACTOR DEATH/OBJECT DESTROY, ACTOR BIRTH/OBJECT LOAD/ROOM RESET, SOMEONE ENTERS A SCENE, SOMEONE EXITS A SCENE, A COMMAND IS TYPED IN PROXIMITY TO ACTOR/SCENE/PROP, EACH TICK, EACH PULSE.

DG Object scripts can be triggered when the object is picked up, dropped, given to another player, randomly every 13 seconds, a set amount of time after the object is loaded, when a specific command is typed by someone holding the item, with it in their inventory, or in the room with it (you can also decide in which of those stats a specific trigger will fire), when it is worn, or removed, or loaded, when a spell is cast upon it, when a player/mob leaves the room it is in, when it is opened/closed/locked/unlocked or when it is eaten.

---> NIMScripts command functions do not replace existing mud commands by default, a special call to "return(1)" alerts the MUD that it should not continue looking for other commands (command syntax properly entered, so stop here) -- if this is not used, the command executes and then the mud continues to the next command. So, in effect, you can override or augment standard commands like 'wear', 'lock', 'drop', 'get' etc by adding a command like this to a "prop" (similar to Diku "object") .. this can be done for rooms, objects or mobiles (actors,props,scenes) and therefore NiMUD can do all of the things listed as possible in DG scripts. Adding script_update() calls to the source in places listed above is also possible, but I have as yet to find a need for many of those.

-Generate an updated display using an ASCII graphics renderer which includes line, circle, button etc

DG can not do this.

---> NIMScripts interfaces with "NAGE", the NiMUD ASCII Graphics Engine. The "NAGE" functions are then tied into NiMScript functions. Since NAGE is modular, you could easily extract its functionality from NiMUD and wire it into DG Scripts, with the required attribution of course.

-Generate MXP and MSP

DG can not do this either.

---> It's probably the addition of only a few functions.

-Be fed a special script type called a "Builder Script" which it uses to generate customized dynamically allocated areas

DG can not do this, though exits can be created and removed via DG, but rooms can not be made, so DG can change the shape of an existing zone.

---> NiMScript have functions dig() and undig() to do this. In the build() processor, though, scripts can be written which generate player-owned facilities, complete with actors, props, scenes, cues and scripts. One early use of these scripts is a player castle which, when deployed, comes complete with random encounters.

-Utilize special functions to be called as a SPELL

DG can do this by attaching a command script to the player

---> NiMScripts must be written in a special way (utilizing magic-specific functions for mana drain and checks for special alchemical supplies or spell components), and are attached to spell objects edited in the "SPEDIT" (spell editor) which sets basic information about the spell (level, name, attached scripts).

You can also write skills using SKEDIT, and then check against them in a script function (as well as tie them to practitioners).

Advanced debugging features: a full screen live debugger, plus other script-related notifications using "NOTIFY" provide information about the script during execution.


Last edited by locke : 03-15-2009 at 02:53 PM.
locke is offline   Reply With Quote