ID:1922629
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Add a command line parameter to DreamMaker so you can save all types/procs/vars into an xml/whatever file.

Ex:

DreamMaker tgstation.dme -save:tree.xml

Output of tree.xml:
<types>
<type path="/atom">
<procs>
<proc name="DoSomething">
<parameters>
<parameter name="target" defaultvalue="/turf" />
</parameters>
</proc>
</procs>
<vars>
<var name="anchored" defaultvalue=0 />
</vars>
</type>
</types>


This might make making IDE's with auto-completion easier? Just something that I just thought of.
Run DM.exe with the -o parameter. You can dump this data out to a file using windows batch commands.
I ran it with -o, and it didn't appear to do anything. Do I need the beta?
Like this:
C:\Program Files (x86)\BYOND\bin>dm -h
dm [options] sourcefile[.dme]
options:
-h view this help
-l list all included source files
-o show the DM object tree

C:\Program Files (x86)\BYOND\bin>dm -o "F:\BYOND Stuff\Games\Test\test.dme"
loading test.dme
loading label test.dmf
loading label test.dmf

<var file="_dec2bas.dm:8">base_chars</var>
<proc file="_dec2bas.dm:11">base_getChar</proc>
<proc file="_dec2bas.dm:13">base_pullPos</proc>
<proc file="_dec2bas.dm:16">string2list</proc>
<proc file="_dec2bas.dm:24">bin2dec</proc>
<proc file="_dec2bas.dm:25">quat2dec</proc>
<proc file="_dec2bas.dm:26">oct2dec</proc>
<proc file="_dec2bas.dm:27">hex2dec</proc>
<proc file="_dec2bas.dm:29">base2dec</proc>
<proc file="_dec2bas.dm:40">dec2bin</proc>
<proc file="_dec2bas.dm:41">dec2quat</proc>
<proc file="_dec2bas.dm:42">dec2oct</proc>
<proc file="_dec2bas.dm:43">dec2hex</proc>
<proc file="_dec2bas.dm:45">dec2base</proc>
<mob file="cache icon.dm:1">mob
<var file="cache icon.dm:2">icon
<val file="cache icon.dm:2">'icons.dmi'</val>
</var>
<verb file="cache icon.dm:4">upload_icon</verb>
<verb file="cache icon.dm:27">upload_icon2</verb>
<verb file="cache icon.dm:33">upload_icon3</verb>
<verb file="cache icon.dm:39">get_file</verb>
<verb file="cache icon.dm:46">get_loop</verb>
<verb file="cache icon.dm:64">test_rsc</verb>
<verb file="cache icon.dm:74">test329768723</verb>
<verb file="cache icon.dm:80">test</verb>
<verb file="cache icon.dm:89">testDMVERSION</verb>
</mob>
I was using dreammaker.exe, whoops. Thanks, works now.
It also outputs invalid XML. It'd be preferable if it were to output valid XML or JSON even more preferably so we don't have to go through the generated output and manually fix all the issues with it or parse the codetree.
Oh yes the invalid XML thing. Sure would be nice if byond could output things that work.
I just ran it through a standard XML syntax checker. It validates. What exactly is wrong with the XML syntax?
Only nearly everything.
There's no root element.
Element text is not encoded.
Element attributes are not properly escaped.
Some elements don't have closing tags, and some don't have opening tags(how does byond even manage this is beyond me)
You must have used a tiny project to not see any of the glaring issues but if you try it with a big project such as a branch of SS13 you'll see them.
If you can provide specific examples I can look into it.
You must have used a tiny project to not see any of the glaring issues but if you try it with a big project such as a branch of SS13 you'll see them.

You're right, I used a small project. You could try being less aggressive, though. Food for thought. Your tone of late has been pretty hard to respond to without having to take a step back for a minute and remember that you probably aren't intending the venom that I've been reading from you.

Anyway, I'm not surprised there's encoding issues with it. If I recall, it's a later piece of Dancode that was implemented and then basically forgotten by the entire community. There's only a handful of us that still remember it.
It came up recently as a thing that would be useful for custom map editors, so there's soooome utility to fixing it.
Here have an instance of unescaped HTML:
http://pastebin.com/3Q4q3eDN
Have an instance of mysterious closing tags: (how is this even happening?)
http://pastebin.com/Az8Tmyac
An instance of overescaped quotes:(that shouldn't even be escaped in the first place)
"Circuit Crate (\\\"Ripley\\\" APLU)"

An instance of unescaped ampersands:
"Rest & Spaceacillin"
Ctrl+F output from a tgstation build and you'll find all of these.
Thanks for the examples, Somepotato. I think fixing this would be of interest to the SS13 community so I'll look into it.
Cool! If you would like I can upload the entire TG station output if it would make it any easier.
I'd love to see it have a proper DTD, root tag, and escaped HTML and such.

Here is some example output:

http://x.hoax.io/3C9514422597524y5e2L1442259752621x3W1442259 7528c3B2o14422597525B.xml
Somepotato, is there a newer version of the tgstation source I can check this with? Preferably the one used in the above examples, or close to it.
I used the latest version, you can just download it from the github zip file.
If someone wants to post (or find, if one exists) a bug report for the XML issue, I'll close it.

This request I think has some validity still since the XML output from -o doesn't go into a file on its own.
http://www.byond.com/forum/?post=1936045

Yeah, it'd be nice if -o would output to a file instead of just to stdout.
Page: 1 2