Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 01-30-2009, 09:09 AM   #1
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Arrow Revolutionary New OLC and Scripting

Check out NiMUD at

Lots of new features, scripts, the most powerful MUD codebase in existence!
locke is offline   Reply With Quote
Old 01-30-2009, 12:30 PM   #2
Zivilyn
Member
 
Join Date: Sep 2005
Name: Dave
Location: Oregon
Home MUD: Ansalon.net
Posts: 89
Zivilyn is on a distinguished road
Re: Revolutionary New OLC and Scripting

It come with Asbestos armor? Lol, kidding, welcome back again Locke. Did you want to list features and explain why it's the most powerful MUD codebase in existence?

Last edited by Zivilyn : 01-30-2009 at 12:35 PM.
Zivilyn is offline   Reply With Quote
Old 02-05-2009, 03:43 AM   #3
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Post Re: Revolutionary New OLC and Scripting

I have to admit it's still being worked on. There are some definite kinks. The bug I found today: if you hurt() in a script, destroying the target, the variable points to a bad part of memory when you next dereference it. Yay. Crashed the MUD hard. This will be fixed soon I hope.

I plan to implement only bug fixes in the hard code. I've noticed I've written a lot but not all of it functions as expected, so that's the only changes I will be making from here on out: making it do what it says it does and making it work as expected. Yes, I'm done adding features.

The latest updates not even available yet on SourceForge include fixes to the magic and spell system that I have put off for years. Today I added 6 (yes 6!!) spells, one creates an object, 3 are offensive and 2 create mobs. Once the kinks are ironed out I will be pumping out 100+ spells for an upcoming release demonstrating all of the features of NiMUD.

-------

The most advanced features of NiMUD currently are still amazing to use. I'm particularly fond of the "TRACE" feature which permits an immortal to "act out" the actions of a scripted actor in the game. Once in TRACE mode (by typing "trace" from within the script editor), everything you do is recorded and stored in the script.

The way I usually create one of these is by creating a new script and then adding the first line:

autowait (25);

This is a good pace for a script. I then exit the editor and type the 'trace' command to enter 'trace' (or 'tracing') mode.

When I'm done acting out the set of activities, I type 'trace' in the script editor one more time to exit this mode and it stops recording my actions.

I used this method to create the adventurer guide. I was able to walk for a great distance within the MUD and the adventurer makes it to his destination.

At the end of this script I wrap it up by adding these lines by hand:

do({:waves and heads back to the Inn.});
jump(5005);

At this point, I made sure all the settings were correct, created a couple accompanying scripts that help the player participate, and polished it off with a self-test.

I've made several interesting areas with this method and with other scripting features. There are even some room creating features I haven't used in a while that are pretty cool, like the programmable map-room feature.

------

Adding a spell is easy! First, create the spell, then create a script that will be the actions of the caster. I was able to add a creature summoning spell, an offensive spell and a spell that creates an ice sword all with this method. I've created several functions that incorperate the features of the components and gem magick systems.

if ( reagents( mana, reglist ), { goto({cast}); }, { goto({failed} } );
<- tests to see if the caster has everything they need
mix(mana, reglist);
<- casts the actual spell, consuming the reagents

and

if ( gem({f|w|e|a},20), { goto({cast}); }, { goto({failed}); } );

where gem consumes any available mana stored in magic gems

Example: Water-elemental Spell Summons Water Spirit
locke is offline   Reply With Quote
Old 02-05-2009, 11:46 AM   #4
Zivilyn
Member
 
Join Date: Sep 2005
Name: Dave
Location: Oregon
Home MUD: Ansalon.net
Posts: 89
Zivilyn is on a distinguished road
Re: Revolutionary New OLC and Scripting

The trace() sounds great actually Locke. Reminds me of Applescript with 'record new script' then you just do whatever and hit stop when it's done.
Zivilyn is offline   Reply With Quote
Old 02-06-2009, 03:11 AM   #5
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Red face Re: Revolutionary New OLC and Scripting

I released a new version today with new production notes and many fixes enabling the spell system to work with gem magicks. A future version will include the 'natural magic' which takes advantage of hundreds of spell components to create a realistic alchemy.

Download at my website, below:
locke is offline   Reply With Quote
Old 02-08-2009, 12:59 AM   #6
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

Does this function read memory it shouldn't?

locke is offline   Reply With Quote
Old 02-08-2009, 01:47 AM   #7
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: Revolutionary New OLC and Scripting

Yes. It's the o+2

You could try this:

scandum is offline   Reply With Quote
Old 02-08-2009, 02:01 AM   #8
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

The o+2 would not be called if o+1 is checked against '\0', thus:

locke is offline   Reply With Quote
Old 02-08-2009, 02:22 AM   #9
scandum
Senior Member
 
Join Date: Jun 2004
Posts: 315
scandum will become famous soon enough
Re: Revolutionary New OLC and Scripting

Hrm.

It may not read invalid memory that way, but it still reads like a hack job.
scandum is offline   Reply With Quote
Old 02-08-2009, 04:36 AM   #10
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Red face Re: Revolutionary New OLC and Scripting

It's always a hack-job, Scandum. My method is elegant.
locke is offline   Reply With Quote
Old 02-27-2009, 03:12 PM   #11
Fizban
Member
 
Join Date: Jul 2006
Name: Brandon
Location: Shelby Township, Michigan
Home MUD: The Builder Academy
Home MUD: 4 Dimensions
Posts: 144
Fizban is on a distinguished road
Re: Revolutionary New OLC and Scripting

I find Scandum's method to be more elegant, as well as more "proper". As for the scripts, the trace feature is indeed neat, but the syntax screams "coder" whereas I think in-game scripting should be more builder orientated. If you need a coder to make all the scripts then the benefit of the system is largely negated in my eyes. If you need a coder to do the scripts it's just as easy for them to write them in C.
Fizban is offline   Reply With Quote
Old 03-09-2009, 09:29 PM   #12
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Red face Re: Revolutionary New OLC and Scripting

The reason you write a scripting language is not to make it easier, but to make it more powerful. A logical scripted language is capable of a higher degree of variation than without it, plus the headache of dealing with "C" code, timed events, etc, must be formalized somehow.

I think my language could use 1 or 2 changes, but overall it has greatly enhanced the experience and provided far more possibilities for spells, for instance, or area traversal, as well as the "random encounters" aspect of the game --
locke is offline   Reply With Quote
Old 03-11-2009, 01:10 PM   #13
Fizban
Member
 
Join Date: Jul 2006
Name: Brandon
Location: Shelby Township, Michigan
Home MUD: The Builder Academy
Home MUD: 4 Dimensions
Posts: 144
Fizban is on a distinguished road
Re: Revolutionary New OLC and Scripting

That's not really true. The benefit of the scripting language in a MUD is largely to reduce the workload of the coder by allowing the builders to create the scripts in their zone themselves. Builders are not known to be coders as such the language should ideally be easy enough to use to allow non-programmers to be able to use it to at least a minor extent.
Fizban is offline   Reply With Quote
Old 03-11-2009, 04:19 PM   #14
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

Actually, Fizban, it's very difficult to argue that considering I have personally written every single NIMScript to date and thus have plenty of evidence to the contrary. I would not say it's less work.



The things the scripts allow are multiple ways of 'getting to' the things that were once basic MUD features, but they can involve event-based activities. Also, they provide rudimentary logic and random variation.

In fact, it merely moves the "spec_fun", C hardcode world to soft code, decreasing overall reliability and increasing performance requirements (albeit slight).

Yes, in part, to open it up, but not really: many scripters don't have the extensive background necessary to undertake doing it on their own, and thus need training and guidance which I also provide. So, while it has yielded better gaming rewards, it has not really been less work at all.

The one place where it really pays off is when you want to create many variations on one theme. For instance, let's say you had a generic fireball script and you wanted to make many different strengths of fireballs as separate spells, that would be fairly easy to do. Maybe you just think of it as an offensive spell like fireball, then you can make a bunch of fireball like spells with different timed emotes and different potencies very quickly.

Another example is the Pirates part of The Isles. It is fairly easy to create 5 similar adventuring ships based on the first ship. You can just make one ship perfectly, and then use it as a template to make the other 4 ship adventures, swapping in and out different parts to make them different (such as the captain's name, the ship's name, or the types of random encounters and their chance of happening).


Last edited by locke : 03-11-2009 at 04:30 PM.
locke is offline   Reply With Quote
Old 03-13-2009, 05:12 PM   #15
Fizban
Member
 
Join Date: Jul 2006
Name: Brandon
Location: Shelby Township, Michigan
Home MUD: The Builder Academy
Home MUD: 4 Dimensions
Posts: 144
Fizban is on a distinguished road
Re: Revolutionary New OLC and Scripting


I wasn't saying they can't save the builder time as well, I was just stating that ideally, at least in my eyes (ie. I'm not saying your opinion is wrong, just simply that it's coming from a different perspective) , a scripting language embedded into a MUD should have simple enough syntax for the majority of the MUD's staff to be able to use it to save the absolute largest amount of time. That way more people can share the workload and builder's can write the scriptsfor their own zones when making the zones instead of having to think up scripts and then request that a coder write them for them. DG Scripts can most likely do 95%+ ofthe things your NIMSCript (I said most likely) but it has syntax which is friendlier to non-coders who would quite likely be intimidated by the syntax used in the NIMScript. I certainly do agree that how powerful and flexible a language is matters, I just disagree on it being the only thing that matters.
Fizban is offline   Reply With Quote
Old 03-14-2009, 01:58 AM   #16
locke
Banned
 
Join Date: Jan 2009
Home MUD: nimud.divineright.org 5333
Posts: 195
locke is an unknown quantity at this point
Cool Re: Revolutionary New OLC and Scripting

From what I can see, DG scripts can't do the things NIMScripts do, because DG scripts aren't written this way at all. NiMScripts aren't exactly in their best form, but they offer far more logic power than DG scripts. DG scripts seem to be a bit more specific in how they handle events, where NIMScripts are more general and have wider applicability. Plus, a newly added sub-language called "Building Scripts" is unlike anything available on a MUD before this release on 03/09/2009.


Game Statistics
---------------
Highest ranking player: Ponnet
Played the longest: Ponnet with 11 hours, 108 logins
Most diverse skillset: Ponnet with 62 skills
Most powerful mage: Ponnet with 13 spells
Most experienced: Ponnet with 126495 points

Strongest: Fizban with 27 strength
Smartest: Ponnet with 30 intelligence
Wisest: Ponnet with 30 wisdom
Nimblest: Ona with 25 dexterity
Toughest: Ponnet with 30 constitution

Nicest: Ponnet with 112390 karma
Meanest: Kileem with -2178 karma
locke is offline   Reply With Quote
Old 03-14-2009, 03:22 AM   #17
Fizban
Member
 
Join Date: Jul 2006
Name: Brandon
Location: Shelby Township, Michigan
Home MUD: The Builder Academy
Home MUD: 4 Dimensions
Posts: 144
Fizban is on a distinguished road
Re: Revolutionary New OLC and Scripting



I could easily, very easily in fact make that Game Statistics Page (exception for that most diverse skillset line, it could be done, but not necessarily easily, that would actually be a pain) with just DG Scripts. I'm not exactly sure what all NIMScripts can do but if you can list a few things they can do (5-10) I can list which DG can and can't feasibly do.
Fizban is offline   Reply With Quote
Old 03-14-2009, 11:41 AM   #18
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

The Game Statistics had nothing to do with NiMScripts. In fact, it isn't possible to do that in NiMScripts without specific functions -- I was just sharing that you made a high score.



NiMScripts can:

-Appear on a prop, actor or scene, a player or be called as a spell or inside another script
-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.
-Be installed by another script on an entity instance or player
-Be triggered by another script that has the owner as target
-Generate an updated display using an ASCII graphics renderer which includes line, circle, button etc
-Generate MXP and MSP
-Dispense objects, breed hirelings
-Be fed a special script type called a "Builder Script" which it uses to generate customized dynamically allocated areas
-Utilize special functions to be called as a SPELL
locke is offline   Reply With Quote
Old 03-14-2009, 02:39 PM   #19
Fizban
Member
 
Join Date: Jul 2006
Name: Brandon
Location: Shelby Township, Michigan
Home MUD: The Builder Academy
Home MUD: 4 Dimensions
Posts: 144
Fizban is on a distinguished road
Re: Revolutionary New OLC and Scripting

The Game Statistics had nothing to do with NiMScripts. In fact, it isn't possible to do that in NiMScripts without specific functions -- I was just sharing that you made a high score.

DG I thought it only listed online players but realized this isn't the case, so DGcan not actually do this either, it could generate those stats among people currently online, but can not read from pfiles.

NiMScripts can:

-Appear on a prop, actor or scene, a player or be called as a spell or inside another script

DG Can be attached to rooms, objects, mobs, or players as of tbaMUD 3.58, the player part is a relatively new addition though

-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.

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.

Mobile/Player scripts can be triggered randomly every 13 seconds, when a specific command is typed by a player/mob in the same room, when a specific phrase is spoken, when a specific message is sent by act() to the room the mob is in (emotes/socials), when the mob dies, when a player enters or leaves the room with the mob, when the mob itself enters a room, when the mob is given an item, when it is fighting, when it's hp reaches a certain amount of its max, when it is given gold, when it is loaded, when a spell is cast upon it, when it sees a player who it has previously fought, when a door or container in the room with the mob is opened/closed/picked/locked, at a set time of day.

Room scripts can be triggered randomly every 13 seconds, by a specific command, by a specific phrase spoken, by a zone reset, by a player/mob entering the room, by an object being dropped in the room, by a spell being cast in the room, by someone leaving the room, by someone open/close/lock/unlocking something in the room, and at a specific time of day.


-Be installed by another script on an entity instance or player

DG Can do this.

-Be triggered by another script that has the owner as target

DG can't quite do this, but it can pass variables from one script on an entity to another script on the same entity

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

DG can not do this.
-Generate MXP and MSP

DG can not do this either.
-Dispense objects, breed hirelings

DG can do this
-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.

-Utilize special functions to be called as a SPELL

DG can do this by attaching a command script to the player
Fizban is offline   Reply With Quote
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
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 12:53 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022