About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  This topic is locked: you cannot edit posts or make replies.     Home » Forums » CMUD Beta Forum Goto page Previous  1, 2
TheLastHawk Posted: Sat Aug 19, 2006 12:29 pm
Why change and change and change???
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Mon Aug 21, 2006 9:11 pm   
 
Just use any XML editor to help by allowing you to view it with syntax highlighting or a treeview. Stylus Studio is a good, commercial editor. XML Cooktop is a good, basic, freeware editor.
Reply with quote
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: Mon Aug 21, 2006 10:10 pm   
 
Honestly, for a novice user to manually edit the file I don't think XML is the answer, but we probably should start a new topic on it. For starters, you have to work out that <kind>3</kind> is a variable, and <kind>5</kind> is a trigger... having the command-line-style syntax is much easier eg #ALIAS/#TRIGGER/etc.

Now I understand why XML is good for software to software import, but it's not very good for software to human import. I would probably recommend still having a plaintext export, if it's not too impossible.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Thu Aug 24, 2006 9:34 am   
 
I tried adding xml-support to my syntax colourizer
http://www.silverbridge.org/~varmel/zmud/syntax/

It is a bit buggy at the moment though. Try paste an exported zScript xml-file instead of the usual zMUD zScript.
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Thu Aug 24, 2006 10:51 am   
 
Well to me, the XML the way it is, loos to crazy and all just thrown together... If <kind> is really the only thing that is the dirrence in how a varible and like trigger look. I'd rather see something like the XML from MUSHclient.
Code:
- <triggers>
- <trigger custom_colour="9" enabled="y" group="Reflex" match="^You are jolted violently northwards by powers unseen(.*?)$" regexp="y" send_to="12" sequence="100" other_text_colour="black" other_back_colour="black">
  <send>send "south"</send>
  </trigger>
</triggers>

Something like this is just easier to read for me, as well as it groups everything together based on the type making it more organized and easier to read even for the average day user dont you think?
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Thu Aug 24, 2006 2:08 pm   
 
I kinda agree with Strakc that the XML could be formatted in an easier-to-read way. Attributes are useful for the simple settings, such as type, option flags, etc, while child items should really only be used for grouping complex settings together or for larger blocks of text. I also like how the names of things in MUSHclient XML are more human readable, even if they are longer. I don't know what subkind, valkind, userint, and names like that mean.
Reply with quote
Vitae
Enchanter


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

PostPosted: Thu Aug 24, 2006 3:43 pm   
 
WAIT A SEC!!
Your gonna say that ALL OF THIS

Code:

<?xml version="1.0" encoding="UTF-8" ?>
<package name="ToTrain">
  <record id="1048708">
    <id>1048708</id>
    <kind>0</kind>
    <parent>2097151</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>ToTrain</idname>
    <options/>
    <userval/>
    <val/>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>256</opt>
    <owner>2097151</owner>
    <userint>0</userint>
    <priority>0</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>45037888</memref>
  </record>
  <record id="1048710">
    <id>1048710</id>
    <kind>2</kind>
    <parent>1048708</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>stt</idname>
    <options/>
    <userval/>
    <val>#VARIABLE counter 0&#x0D;&#x0A;#T+ triggers&#x0D;&#x0A;#WAIT 1000&#x0D;&#x0A;skill spells&#x0D;&#x0A;#WAIT 2000&#x0D;&#x0A;#T- triggers</val>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>1048708</owner>
    <userint>0</userint>
    <priority>1340</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>45673264</memref>
  </record>
  <record id="1048711">
    <id>1048711</id>
    <kind>2</kind>
    <parent>1048708</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>ptt</idname>
    <options/>
    <userval/>
    <val>#VARIABLE counter 0&#x0D;&#x0A;#T+ Triggers&#x0D;&#x0A;#WAIT 1000&#x0D;&#x0A;skill prof&#x0D;&#x0A;#WAIT 2000&#x0D;&#x0A;#T- Triggers</val>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>1048708</owner>
    <userint>0</userint>
    <priority>1350</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>45673648</memref>
  </record>
  <class name="Triggers">
    <record id="1048712">
      <id>1048712</id>
      <kind>1</kind>
      <parent>1048708</parent>
      <pkgid>1048576</pkgid>
      <enabled>0</enabled>
      <idname>Triggers</idname>
      <options/>
      <userval/>
      <val/>
      <comment/>
      <name>{*}</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>2</opt>
      <owner>1048708</owner>
      <userint>0</userint>
      <priority>0</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>69072336</memref>
    </record>
    <record id="1048701">
      <id>1048701</id>
      <kind>5</kind>
      <parent>1048712</parent>
      <pkgid>1048576</pkgid>
      <enabled>-1</enabled>
      <idname>~[ ~# ~] ~[(%s)(%w) Name(%s)~](*)</idname>
      <options/>
      <userval/>
      <val>#var skilltype %2;#if (@skilltype == "Spell") {#var skilltype "spells"};#if (@skilltype == "Proficiency") {#var skilltype "proficiencies"}</val>
      <comment/>
      <name>{*}</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>137</opt>
      <owner>1048712</owner>
      <userint>0</userint>
      <priority>1250</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>76383824</memref>
    </record>
    <record id="1048702">
      <id>1048702</id>
      <kind>5</kind>
      <parent>1048712</parent>
      <pkgid>1048576</pkgid>
      <enabled>-1</enabled>
      <idname><![CDATA[(%d)(*){@schools}%s%d~%%s&percent~%]]></idname>
      <options/>
      <userval/>
      <val><![CDATA[#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}}}}}]]></val>
      <comment/>
      <name>{*}</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>137</opt>
      <owner>1048712</owner>
      <userint>0</userint>
      <priority>1260</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>76383984</memref>
    </record>
    <record id="1048703">
      <id>1048703</id>
      <kind>5</kind>
      <parent>1048712</parent>
      <pkgid>1048576</pkgid>
      <enabled>-1</enabled>
      <idname><![CDATA[(%d)(*){@schools}%s%d%s(%d)~%%s&percent~%]]></idname>
      <options/>
      <userval/>
      <val><![CDATA[#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}}}}}]]></val>
      <comment/>
      <name>{*}</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>137</opt>
      <owner>1048712</owner>
      <userint>0</userint>
      <priority>1270</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>76384144</memref>
    </record>
    <record id="1048704">
      <id>1048704</id>
      <kind>5</kind>
      <parent>1048712</parent>
      <pkgid>1048576</pkgid>
      <enabled>-1</enabled>
      <idname>~[C~]ontinue ~[R~]edraw ~[B~]ack ~[E~]xit:</idname>
      <options/>
      <userval/>
      <val>#GAG;#CR</val>
      <comment/>
      <name>{*}</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>138</opt>
      <owner>1048712</owner>
      <userint>0</userint>
      <priority>1280</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>76384304</memref>
    </record>
    <record id="1048705">
      <id>1048705</id>
      <kind>5</kind>
      <parent>1048712</parent>
      <pkgid>1048576</pkgid>
      <enabled>-1</enabled>
      <idname><![CDATA[^You have the ability to learn ~[&total]]]></idname>
      <options/>
      <userval/>
      <val>#math totaltrain (@total-@counter)</val>
      <comment/>
      <name>{*}</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>137</opt>
      <owner>1048712</owner>
      <userint>0</userint>
      <priority>1290</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>76384464</memref>
    </record>
    <record id="1048706">
      <id>1048706</id>
      <kind>5</kind>
      <parent>1048712</parent>
      <pkgid>1048576</pkgid>
      <enabled>-1</enabled>
      <idname>^You have ~[%d~] practice sessions.</idname>
      <options/>
      <userval/>
      <val>#echo %ansi( grey)You have %ansi( blue, high)~[%ansi( grey)@totaltrain%ansi( blue, high)~]%ansi( grey) @skilltype left to train.</val>
      <comment/>
      <name>{*}</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>137</opt>
      <owner>1048712</owner>
      <userint>0</userint>
      <priority>1300</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>76384624</memref>
    </record>
    <record id="1048707">
      <id>1048707</id>
      <kind>5</kind>
      <parent>1048712</parent>
      <pkgid>1048576</pkgid>
      <enabled>-1</enabled>
      <idname>^Color Key: ~[Active~] ~[Inactive~] ~[Altered +~] ~[Altered -~] </idname>
      <options/>
      <userval/>
      <val>#GAG</val>
      <comment/>
      <name>^Color Key: ~[Active~] ~[Inactive~] ~[Altered +~] ~[Altered -~] ~[Unavailable~]</name>
      <subkind>0</subkind>
      <valkind>0</valkind>
      <opt>137</opt>
      <owner>1048712</owner>
      <userint>0</userint>
      <priority>1310</priority>
      <flag>128</flag>
      <state>0</state>
      <memref>76384784</memref>
    </record>
  </class>
  <record id="1048713">
    <id>1048713</id>
    <kind>3</kind>
    <parent>1048708</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>counter</idname>
    <options/>
    <userval/>
    <val>45</val>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>1048708</owner>
    <userint>0</userint>
    <priority>1370</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>84115528</memref>
  </record>
  <record id="1048728">
    <id>1048728</id>
    <kind>3</kind>
    <parent>1048708</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>skilltype</idname>
    <options/>
    <userval/>
    <val>spells</val>
    <comment/>
    <name>{*}</name>
    <subkind>3</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>1048708</owner>
    <userint>0</userint>
    <priority>1520</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>84115632</memref>
  </record>
  <record id="1048729">
    <id>1048729</id>
    <kind>3</kind>
    <parent>1048708</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>percent</idname>
    <options/>
    <userval/>
    <val>Mys: 100</val>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>1048708</owner>
    <userint>0</userint>
    <priority>1530</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>84115736</memref>
  </record>
  <record id="1048730">
    <id>1048730</id>
    <kind>3</kind>
    <parent>1048708</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>total</idname>
    <options/>
    <userval/>
    <val>128</val>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>1048708</owner>
    <userint>0</userint>
    <priority>1540</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>84115840</memref>
  </record>
  <record id="1048731">
    <id>1048731</id>
    <kind>3</kind>
    <parent>1048708</parent>
    <pkgid>1048708</pkgid>
    <enabled>-1</enabled>
    <idname>totaltrain</idname>
    <options/>
    <userval/>
    <val>60</val>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>1048708</owner>
    <userint>0</userint>
    <priority>1550</priority>
    <flag>128</flag>
    <state>0</state>
    <memref>84115944</memref>
  </record>
</package>


Comes out to BE THIS:
Code:
#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
}
#trigger {~[ ~# ~] ~[(%s)(%w) Name(%s)~](*)} {
 #var skilltype %2
 #if (@skilltype == "Spell") {#var skilltype "spells"}
 #if (@skilltype == "Proficiency") {#var skilltype "proficiencies"}
}
#trigger {~[C~]ontinue ~[R~]edraw ~[B~]ack ~[E~]xit:} {
 #GAG
 #CR
} "" {nocr|prompt}
#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 -~]} {#GAG}
#trigger {^Color Key: ~[Active~] ~[Inactive~] ~[Altered +~] ~[Altered -~]} {#GAG}
#variable counter {45}
#variable skilltype {spells}
#variable percent {Mys: 100}
#variable total {128}
#variable totaltrain {60}
#variable totaltrain {60}
#variable totaltrain {60}


Actually, there's alot missing from that apparently, but since Varmels script is beta that's okay.

???......dear lord....I'm shocked at the big difference.
More than ever now I want Varmels code for that :-)
_________________
http://www.Aardwolf.com
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Thu Aug 24, 2006 4:01 pm   
 
That would be correct. Why i said i wasnt posting a complex script lol.
This is the export from ZMUD

Code:

#ALIAS stt {#VARIABLE counter 0;#T+ totrain;#WAIT 1000;skill spells;#WAIT 2000;#T- totrain}
#ALIAS ptt {#VARIABLE counter 0;#T+ totrain;#WAIT 1000;skill prof;#WAIT 2000;#T- totrain}
#variable counter {45}
#variable skilltype {spells}
#variable percent {Mys: 100}
#variable total {128}
#variable totaltrain {60}
#variable totaltrain {60}
#variable totaltrain {60}
#CLASS {Totrain}
#VAR Schools {DEF|COM|WEA|TEK|MYS|CON|NEC|ABJ|INV|ILL|SUM|ALT|ENC|CHA|DIV|ELE|ILL|FUN|THO|SUM|NEC|EVO}
#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
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Aug 24, 2006 4:13 pm   
 
I think if CMUD doesn't allow exports to text then people will find supporting other users quite tiring.
A lot of times I've put something into zmud to troubleshoot a forum query then exported it and pasted back into the forums once fixed. If CMUD only exports to XML I don't think I'd bother, since the export isn't particularly readable for the experienced user and probably just incomprehensible for the novice. IMHO it *needs* to be something that almost anyone can look at and understand the structure.
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Vitae
Enchanter


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

PostPosted: Thu Aug 24, 2006 6:27 pm   
 
*nodnod*
I agree.
No one has answered one of my questions yet tho.
While I now know that it exports to XML how does it look internally in that screen when you click on a folder?
Does it look the way it does in zmud or does it show only the XML version as well?
_________________
http://www.Aardwolf.com
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Thu Aug 24, 2006 7:16 pm   
 
looks the same.

And remember there are package libraries now so you dont need to export the scripts
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Vitae
Enchanter


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

PostPosted: Thu Aug 24, 2006 7:30 pm   
 
I export them to print them so I can go over them on the train.
So that's really the only reason I wondered.

My OTHER question wasn't answered either now that I think about it.

In zMUD, if there is one single inherited setting in a folder, you can't see the folder in that script view for some reason. Same thing if the entire folder is inherited. (I know I had a posting on here with regards to this in the zmud section, but it's not there anymore so I can't remember WHY it does that), but is that resolved now?
Cause then being able to see the code in that view would still be pointless.
_________________
http://www.Aardwolf.com
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Aug 30, 2006 4:46 pm   
 
OK, shame on you guys for not making a new post on such an important topic. I'm going to go make a new topic for this and lock this topic. But how in the world was I supposed to remember in 6 months that this thread contained a discussion of XML and import/export. Please *ALWAYS* make a new topic if your post doesn't have anything to do with this original poster.
Reply with quote
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.     Home » Forums » CMUD Beta Forum All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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