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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed Aug 30, 2006 12:20 pm   

XML Fileformat
 
As there has been some discussion on the xml fileformat I decided to put my notes about it on my website;
http://www.silverbridge.org/~varmel/zmud/xmlnotes.txt

I also found some possible bugs while writing this:
Align right 32
Inset 32 <- bug in zScript?

This means that when a button is aligned right, it is also inset.

Also you might be able to fool the parser about what is an idname and what is a name.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Aug 30, 2006 3:47 pm   
 
I see that you've made great strides with that xml to zmud php script!!
From this entire thing (click for the code)
To this:
Code:
#class window_ToTrain
#alias stt {
 #VARIABLE counter 0
 #T+ triggers
  #WAIT 1000
 skill spells
  #WAIT 2000
 #T- triggers
}
#alias ptt {
 #VARIABLE counter 0
 #T+ Triggers
  #WAIT 1000
 skill prof
  #WAIT 2000
 #T- Triggers
}
#class Triggers
#trigger {~[ ~# ~] ~[(%s)(%w) Name(%s)~](*)} {
 #var skilltype %2
 #if (@skilltype == "Spell") {#var skilltype "spells"}
 #if (@skilltype == "Proficiency") {#var skilltype "proficiencies"}
}
#trigger {(%d)(*){@schools}%s%d~%%s&percent~%} {
 #IF (@percent < 74) {#SUBSTITUTE %ansi( yellow, bold)%trigger} {
   #IF (@percent > 74) {
     #IF (@percent < 85) {
       #SUBSTITUTE %ansi( green, bold)%trigger
       #ADD counter 1
     } {
       #IF (@percent > 99) {
         #SUBSTITUTE %ansi( red, bold)%trigger
         #ADD counter 1
       } {
         #IF (@percent > 85 and @percent < 100) {
           #SUBSTITUTE %ansi( blue, bold)%trigger
           #ADD counter 1
         }
       }
     }
   }
 }
}
#trigger {(%d)(*){@schools}%s%d%s(%d)~%%s&percent~%} {
 #IF (@percent < 74) {#SUBSTITUTE %ansi( yellow, bold)%trigger} {
   #IF (@percent > 74) {
     #IF (@percent < 85) {
       #SUBSTITUTE %ansi( green, bold)%trigger
       #ADD counter 1
     } {
       #IF (@percent > 99) {
         #SUBSTITUTE %ansi( red, bold)%trigger
         #ADD counter 1
       } {
         #IF (@percent > 85 and @percent < 100) {
           #SUBSTITUTE %ansi( blue, bold)%trigger
           #ADD counter 1
         }
       }
     }
   }
 }
}
#trigger {~[C~]ontinue ~[R~]edraw ~[B~]ack ~[E~]xit:} {
 #GAG
 #CR
} "" {nocr|prompt}
#trigger {^You have the ability to learn ~[&total]} {#math totaltrain (@total-@counter)}
#trigger {^You have ~[%d~] practice sessions.} {#echo %ansi( grey)You have %ansi( blue, high)~[%ansi( grey)@totaltrain%ansi( blue, high)~]%ansi( grey) @skilltype left to train.}
#trigger {^Color Key: ~[Active~] ~[Inactive~] ~[Altered +~] ~[Altered -~] ~[Unavailable~]} {#GAG}
#class 0 // Triggers
#variable counter {45}
#variable skilltype {spells}
#variable percent {Mys: 100}
#variable total {128}
#variable totaltrain {60}
#class 0 // window_ToTrain


IS SO MUCH BETTER!!
There's just the small things like:
#class 0 // Triggers
#class 0 // window_ToTrain

And of course my complete lack of knowledge to know if everything else ported over.
But the previous version that you had up gave me tons of errors before the script even showed.
I always used your script before I printed out my scripts anyway so going back and forth is not a problem at all. But at least NOW i can actually read them again :-)
*GROVEL*

NOW, know what would be SWEET!?
A zmud script that would load the xml format, and output it into a new file in the zmud style ;-)
_________________
http://www.Aardwolf.com
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Aug 30, 2006 5:04 pm   
 
For reference anyone, previous discussions are in
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=24295
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=24216&start=30

Might be worth locking those threads to continue with just this one?
(since Zugg mentioned it was an important topic, wanna get it in one place)
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Aug 30, 2006 5:12 pm   
 
I just posted another thread at Import/Export and XML format vs zMUD format for discussion of this in CMUD. But let's use this thread for discussing Rorso's converter script. So if you find problems in Rorso's script, post to this thread, but if you want to talk about what CMUD is doing, then go post in the CMUD thread.

Rorso, you have put a lot of work into this! But you might want to put a disclaimer on your site that the current XML format is BETA and subject to change. I expect there to be many changes to the XML format before the public release is ready, and I don't want people to give you grief if your stuff breaks with a future beta version of CMUD.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed Aug 30, 2006 7:15 pm   
 
Zugg wrote:
I just posted another thread at Import/Export and XML format vs zMUD format for discussion of this in CMUD. But let's use this thread for discussing Rorso's converter script. So if you find problems in Rorso's script, post to this thread, but if you want to talk about what CMUD is doing, then go post in the CMUD thread.

Rorso, you have put a lot of work into this! But you might want to put a disclaimer on your site that the current XML format is BETA and subject to change. I expect there to be many changes to the XML format before the public release is ready, and I don't want people to give you grief if your stuff breaks with a future beta version of CMUD.

I added the disclaimer as you suggested. The reason I uploaded my notes is so we can discuss the format on the forum. Not really use it to build applications.

Just so everyone knows, the Syntax Colourizer's Xml2zScript part isn't about converting cMUD scripts to zMUD. The goal was to turn the xml file more readable. After all the discussions about its readability I decided that it would be a fun and good coding practice to try parse the XML file. The full XML file format isn't supported and much data is lost in the process.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Aug 30, 2006 7:18 pm   
 
Rorso wrote:
Align right 32
Inset 32 <- bug in zScript?

This means that when a button is aligned right, it is also inset.

Just curious Zugg, any word on this? YES i know it's beta!! *inno* Cool
_________________
http://www.Aardwolf.com
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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