Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
nilats
Beginner


Joined: 21 Sep 2009
Posts: 17

PostPosted: Sun Sep 08, 2013 1:11 pm   

new convert from zmud to cmud some questions on variables +classes
 
first question about importing zmud setting. Will cmud automatically update the triggers commands to what will work in cmud?

So I have some triggers that capture any info and reenter is as a command

Trigger:
^Character name .. (*)

response:
in zmud i had it as %1.. unsure what it is in cmud



Classes. I have some triggers that auto disable a class after firing

now its #clas classname 0 ?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4671
Location: Pensacola, FL, USA

PostPosted: Sun Sep 08, 2013 1:29 pm   
 
The conversion will handle most things, but there may be exceptions.

Anything wrapped in (parenthesis) will be turned into an anonymous variable, accessible via %1 - %99, in order of which opening parenthesis comes first.

To disable a class use:

#T- ClassName

#T+ will enable it.

#CLASS ClassName 0 is used for ending the definition of settings within the class, similar to a closing bracket '}' for individual settings.
_________________
Discord: Shalimarwildcat
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Sep 08, 2013 7:43 pm   
 
Quote:

first question about importing zmud setting. Will cmud automatically update the triggers commands to what will work in cmud?


No, it will not. This is because of both backwards-compatibility issues as well as simple changes to the underlying function of otherwise-correct syntax. If you are like the typical ZMud scripter, you WILL end up with hundreds or even thousands of minor compatibility wizard issues that require tedious editing. For example, in ZMud, double quotes are used for grouping rather than for literalization, so if something inside double quotes could be parsed it would be parsed. This stemmed from the fact that system variables like %1 were first expanded into the script code and then that expanded version was sent through the parser, so there was no way to tell where one command argument stopped and another started. In CMud, though, double quotes prevent parsing entirely, so instead of "dog" you'd end up with "%1" (typically not something the user intended).

The compatibility wizard should pop up automatically after import, but if not there's a menu/macro option to bring up the window. This will show you the error encountered and will provide a link to the particular setting so you can edit it.

Similarly, some settings might not have a compatibility issue. They will work differently, which means you need to find and fix the problem, but CMud won't be able to tell that there's a problem.

Quote:

Trigger:
^Character name .. (*)

response:
in zmud i had it as %1.. unsure what it is in cmud


This hasn't changed. While in ZMud you COULD have used %1...%99 variables in the trigger pattern, you were never actually supposed to. This usage was the same as *, and both ZMud and CMud try to match on the widest possible match in a line. In CMud, you are now specifically disallowed from using %1...%99 in trigger patterns.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net