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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Kayl
Newbie


Joined: 19 May 2004
Posts: 6

PostPosted: Fri May 28, 2004 12:05 am   

Guages for 4 year olds.
 
Okay, I've read the help files and searched the forums, but find myself still guage-confused. I wish to set up a couple of guages for health and mana, of course. Could someone please take me through the process of setting them up step by step like you're explaining it to a 4 year old? Smile

Thanks,

Kayl
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri May 28, 2004 3:06 am   
 
1. Set up a trigger or other method to obtain the values and put them into variables. Sample:
#TR {(%n)/(%d)hp (%n)/(%d)ma} {#VAR hp %1;#VAR maxhp %2;#VAR mana %3;#VAR maxmana %4}

2. Make a health gauge
a. Open the Settings Editor by clicking the Buttons button
b. Start a new button by clicking New
c. Put a name in the Caption box (HP)
d. Select Gauge as the Kind
e. Go to the Gauge tab
f. Put the variable or formula for your health in the Value box (@hp)
g. Put the variable or formula for your maxhealth in the Gauge Max box (@maxhp)
h. Put the variable or formula to change colors in the Gauge Low box (@maxhp/4)
i. Select a Gauge Color, don't use black
j. Select a Low Color, don't use black
k. Click the Save button

3. Repeat step 2, using Mana, @mana, and @maxmana in place of HP, @hp, and @maxhp to make a mana gauge
Reply with quote
Kayl
Newbie


Joined: 19 May 2004
Posts: 6

PostPosted: Sun May 30, 2004 11:42 pm   
 
Smile

Thanks, much lightbulb!

Could you quickly describe the difference between variable types of %n, %d, and %1, %2 etc. I believe the numbers are individual variables, but thought that all others had to be %d for integers. Also, does it matter whether you name a variable 'HP' or 'HEALTH'? In other words, does the terminology used by the MUD affect what terminology you must use to define the variable? I'm playing Achaea. Anyway I'm a writer not a coder so thanks for understanding in advance.

Kayl
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon May 31, 2004 12:20 am   
 
LAST POST QUOTE HERE

[generic tantrum]*KICK SCREAM B***CH MOAN*[/generic tantrum]

The pattern matching help file will help you GREATLY
Here is how to get to it

In Zmud click Help Then Contents
or in Zmud command line type #HELP
or in the zmud directory click on the help file.
or on the website in the support library there are other options like
a Rich text help file for easy printing, or an Online browsable help file.

The help files will help you ALOT.
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Mon May 31, 2004 12:56 am   
 
While I agree with nexela that the help file is very useful in finding information related to your question, I tend to disagree with the tone in which that particular answer was given... which just happens to happen a lot.

There are reasons people post questions here. They want answers. They don't want to be fussed or yelled at for not checking the help file first or for not searching the forums. Give them the answer they're looking for and kindly point them in the direction of where they can find additional information to possibly solve future problems they may have. ie: the help file.

If someone asks you for the number to the police department would you stand there and tell them they could look it up in the phone book, call information or dial 911 before giving them the number to the station?

quote:
Also, does it matter whether you name a variable 'HP' or 'HEALTH'? In other words, does the terminology used by the MUD affect what terminology you must use to define the variable?

No, you can name variables just about anything you want. Check the help file for #VARIABLE for more information.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon May 31, 2004 2:39 am   
 
%d and %n are used in trigger patterns. %d matches any number of the digits 0 to 9, and nothing else. %n matches any number of the digits 0 to 9, plus commas, the + sign, and the - sign. For either wildcard there must be at least one matching character. I used %n for the first value in each pair because there are situations on some MUDs where those numbers can go below zero. The second number from each pair was the maximum for that attribute and should never go below zero, so I used %d.

%1 and %2 are used in the trigger value to refer to the portions of the trigger pattern which are enclosed in parentheses. %1 is the first portion which is enclosed, %2 is the second, etc. They are not related to the wildcards, only to the parentheses. In this case, each wildcard is enclosed in a separate set of parentheses, but that isn't always true.

You may name your variables without regard to the MUD terminology, just as Vorax says. HP, HEALTH, LifeForce, and PromptVariable1 will all work equally well, so use whatever is easy for you to remember and type.
Reply with quote
Kayl
Newbie


Joined: 19 May 2004
Posts: 6

PostPosted: Tue Jun 01, 2004 2:29 am   
 
Smile

Lightbulb, Vorax. Thank you very much for your responses. Things are a bit clearer now. I appreciate you taking the time to explain these things. Nexela, while I can understand your frustration with my seemingly ignorant inquiry, you may have missed the part where I prefaced said inquiry stating that I had read the help file. Not knowing me, you might assume that I had skimmed some, gotten lazy, and felt it was easier to have someone spoon feed it to me. An incorrect assumption from the start. I have read said files but find them lacking in any sort of clarity, or friendliness to the average user. What lightbul so succintly wrote in answer to my questions is aeons beyong what the help file has to offer. The help file serves the broth before heating the stove so to speak; it assumes prior knowledge, the kind of which had I had, I wouldn't have asked the question to begin with. Again, thank you lightbulb for so effectively answering my questions, without the judgement of my ingnorance.

Kayl
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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