![](templates/Classic/images/spacer.gif) |
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: 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. |
|
|
![](templates/Classic/images/spacer.gif) |
Vitae Enchanter
![](images/avatars/6054352674a564a4da8af6.jpg)
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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 ;-) |
|
|
![](templates/Classic/images/spacer.gif) |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
![](templates/Classic/images/spacer.gif) |
Zugg MASTER
![](images/avatars/164475849040f41c23b22fe.gif)
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
![](templates/Classic/images/spacer.gif) |
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: 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. |
|
|
![](templates/Classic/images/spacer.gif) |
Vitae Enchanter
![](images/avatars/6054352674a564a4da8af6.jpg)
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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](images/smiles/icon_cool.gif) |
|
|
![](templates/Classic/images/spacer.gif) |
|
|