ID:134400
 
I think it would be useful if someone making a library could include a file or something of the sort that could be included in the F1 help window, under a seperate tab. It would only be included if the person using the library has it included, and would contain information about a certain procedeures, variables, etc. This would be easier to view, and maybe be more helpful, than a long readme file or html file.
Seconded. I would love to have something like this.
In response to Audeuro
Thirdereded!
In response to SSJ-Chao
Teh fourthed.
Seventhed. Er, uh... eleventhed? *Starts counting on his fingers*
secksed
In response to CaptFalcon33035
CaptFalcon33035 wrote:
secksed
Definitely! This would be awesome.


A simple solution for procs will be to add a "desc" string var (same type as the "background" var etc) and read that from the reference. A little complexer for variables, but hey, leave that for DanTom. :P
In response to Kaioken
I think it'd be easier to add support for updated HTML files than modify the compiler.
In response to Popisfizzy
You should be able to have an indexing thing like in the normal F1 reference. Suppose they could just make #included HTML files show in a separate tab there, but that's not enough. Maybe some format in the HTML to separate indexes. Though in my suggestion for procs, the "changing the compiler" shouldn't be hard. I guess you shouldn't use set because it isn't a real var, it shouldn't be compiled. Anyway though my way is a proc-only optional way, but at least it will make automatic indexes, like so: <typename> proc (<typepath>)
In response to Kaioken
A proc has a 'desc' setting (same as verbs), so you can easily read the description of a proc from there.

proc/testproc()
set desc = "This proc ends the world."
del(world)


mob/Login()
var/a = /proc/testproc
src << a:desc


Though this probably isn't what Popisfizzy is suggesting to add, but this could be handy in some other people's games.
In response to Unknown Person
My bad, I thought it was verb-only. Other than pointing out it isn't, the rest of your post is offtopic, yes.
Just imagine I said "ref_desc" instead.
In response to Kaioken
It's still far easier to program in something to utilize HTML files then to parse out data directly from the procedures.
In response to Popisfizzy
I still say it isn't hard at all. DM parses code anyway. Think of it as a proc-specific #define. Again, it would automatically make index entries for it like the default reference, other than just displaying an HTML file, which isn't as good. We can probably agree the F1 window is superior to http://www.byond.com/docs/ref/ .
This has actually been brought up before and most people agree it would be a good solution.

The problem here is coming up with a good interface. A desc setting for procs wouldn't quite cut it because we would need to have HTML-formatted files in the same format as the reference. But we could augment that:

mob/proc/kibitz(mob/M, range=5)
set see_also = "/client/proc/Click, /mob/proc/chutzpah"
set format = "kibitz(target, range); kibitz(target)"
set arguments = "target: the target to affect; range: the maximum distance the target can be (optional)"
//set default_action = ""
set desc = "Performs a Kibitz Maneouvre on <i>target</i> if the target is within <i>range</i> tiles of the originating mob."
set example = \
{"mob/verb/kibitz(mob/M as mob in view())
src.kibitz(M)"}


//...


Which would produce HTML resembling:

<big>kibitz proc (mob)</big>

See also:
Click proc (client)
chutzpah proc (mob)

Format:
kibitz(target, range)
kibitz(target)

Args:
target: the target to affect
range: the maximum distance the target can be (optional)

Performs a Kibitz Maneouvre on target if the target is within range tiles of the originating mob.

Example:

<code>mob/verb/kibitz_maneouvre(mob/M as mob in view()) src.kibitz(M)</code>
In response to Jtgibson
Thats somewhat what I had in mind. A ref_desc setting is enough really, you could set it to a text string or html file. What I want autogenerated is an entry in the F1 window index. The file format will already be done in the desc var, it's not hard, just following a template. Also not all indexes have all "sections", like "args", "Called when" etc. I think just the ref_desc setting should be enough.
In response to Jtgibson
That should be put in a new file type in DM, like a DMR meaning DM Reference. :D
In response to CaptFalcon33035
_> Maybe. I still say for procs, blending it in with the DM code should do fine.
proc
Random()
set ref_desc = {"<b>Pretty much a useless proc</b><br>
<font size=4> Args:</font><br>
None<br>
Returns:<br>
Either 0 or 1, chosen randomly."}

return rand(0,1)
//second ref_desc method
SuperRandom()
set ref_desc = 'srand.htm'
return rand(0,10)
In response to Kaioken
All settings are obviously optional.

I think my interface is much cleaner than inline HTML. Let the settings get plugged into a template instead of forcing the developer to do all of the hard work himself, I say.
In response to Kaioken
I dunno, that seems like too much crap to include in the DM file especially when we're trying to keep it small. I think a DMR variable with a similar syntax that the compiler has no control over would be better. That way, you don't have to compile in order to see the reference.
In response to CaptFalcon33035
Compiling to see it isn't that bad. Most of the times you just won't care. :)

Let the settings get plugged into a template instead of forcing the developer to do all of the hard work himself, I say.

Forcing? :P It's not like the developer can't copy and paste the template himself if he wants to use it.
Like, damn, they can add a new entry in the File->New menu for HTML Reference File or something. It will create an HTML already filled with the template. Maybe it will have a renamed extension like CaptFalcon suggested, DMR, HTR whatever.
Also, you suggest a lot of variables in turn for a single one to hold the HTML. That's overdoing it, and definetly clutters up the code.

Anyway guys, you didn't suggest something about variables.
Page: 1 2