Ludeon Forums

RimWorld => Mods => Help => Topic started by: milon on July 15, 2016, 02:55:38 PM

Title: XML Auto-Documentation
Post by: milon on July 15, 2016, 02:55:38 PM
RimWorld XML Auto-Documentation

Version: 1.0


(https://www.dropbox.com/s/9meloqdrsfnsy02/DropboxDownloadButton.png?raw=1)
Download from Dropbox (https://www.dropbox.com/s/4iwkblmljz777b8/CoreXML%201.0.html?dl=0)

Note: Due to IRL constraints, this is the last update I'll provide.  But since it's 1.0, I expect there won't be anymore major releases.



About

In case you're not sure what it is, this is an HTML help file for modders. It contains a listing of all Core (ie. vanilla) uses of RimWorld's XML code.  It's great for learning what tags are parents or children of what.  It's not necessarily exhaustive since the game engine may support options that aren't actually used by the base game.  I'm purposefully confining this to XML only.  I don't get into DLL modding, but anyone else is more than welcome to do that if they see fit.

As an additional feature, I track the grandparent/grandchild relationship for some of the common XML tags.  They're listed as SOME_TAG<SOME_CHILD>, which should be clear enough on its own but I'm always open to suggestions/requests.  I've also begun tracking tags with a CompProperties_ attribute separately, as they're handled separately.  The tags currently given special attention are:

Feel free to request others to be tracked separately as you see the need.
Enjoy!



Auto-Doc Tool
For anyone who cares, I wrote the tool in a Windows-only language called AutoIt (https://www.autoitscript.com/).  It should be compatible with Wine or ReactOS for any non-Windows users.  It's kinda inefficient, but it's what I was familiar with at the time and it gets the job done.
Link: https://www.dropbox.com/s/9aywpn55k5m728n/XML%20Auto-Doc.au3?dl=0


Old Stuff

Archive:
Beta 19: https://www.dropbox.com/s/qumdcbalw7fuwkm/CoreXML%20B19.html?dl=0
Beta 18: https://www.dropbox.com/s/nrwtwtzh706oouw/CoreXML%20A18.html?dl=0
Alpha 17: https://www.dropbox.com/s/dgh9pzv3o1jy98p/CoreXML%20A17.html?dl=0
Alpha 16: https://www.dropbox.com/s/a68vmnbpj8tr3vm/CoreXML%20A16.html?dl=0
Alpha 15: https://www.dropbox.com/s/5su98l69qn7j19e/CoreXML%20A15.html?dl=0
Alpha 14: https://www.dropbox.com/s/l9y2orqyszrrcrv/CoreXML%20A14.html?dl=0
Alpha 13: https://www.dropbox.com/s/jeysicdh1tjutf6/CoreXML%20A13.html?dl=0

New Modding Features
See the new A17 modding features here:
https://ludeon.com/forums/index.php?topic=32735.0

Patch Modding
Zhentar has made guide covering the new Patch process. Read about it here:
https://gist.github.com/Zhentar/4a1b71cea45b9337f70b30a21d868782

xpath troubleshooting
Skullywag is running an xpath clinic at this thread:
https://ludeon.com/forums/index.php?topic=33186.0

Modder's Guide to Abstracts (obsolete, but link kept for historical purposes):
https://ludeon.com/forums/index.php?topic=19499.0
Title: Re: [A14] XML Auto-Documentation
Post by: kaptain_kavern on July 16, 2016, 08:51:13 AM
Thx  8)
Title: Re: [A14] XML Auto-Documentation
Post by: Asero on July 16, 2016, 09:39:23 PM
Very useful, thanks  ;D
Title: Re: [A14] XML Auto-Documentation
Post by: Man_Jones on July 16, 2016, 10:47:52 PM
Pardon me for being a noob on these forums but what is this for?
Title: Re: [A14] XML Auto-Documentation
Post by: kaptain_kavern on July 17, 2016, 12:15:49 AM
It's for modding purpose. It's a list of all the tags and the parameter that they can take
Title: Re: [A14] XML Auto-Documentation
Post by: kaptain_kavern on July 21, 2016, 02:35:37 PM
[BUMP]

Just because this should already been stickied :p
Title: Re: [A14] XML Auto-Documentation
Post by: milon on July 24, 2016, 09:34:12 AM
I'll sticky it.  It always feels a little pretentious to sticky my own thread, but if someone else wants it stickied that's different, right?  ;)
Title: Re: [A14] XML Auto-Documentation
Post by: milon on July 28, 2016, 02:32:21 PM
I just realized this morning that the reference I had online was for A14a.  It's now updated to A14d.  As a bonus, defName is now linked to its parent just like li.
Title: Re: [A14] XML Auto-Documentation
Post by: kaptain_kavern on July 28, 2016, 02:53:49 PM
Your my hero <3
Title: Re: [A14] XML Auto-Documentation
Post by: srauon on August 01, 2016, 07:03:58 AM
The documentations are incredibly helpful. Thanks for posting it, Milon!  ;D
Title: Re: [A14] XML Auto-Documentation
Post by: milon on August 02, 2016, 12:22:08 PM
Welcome!  And this is for A14E build 1249 now.  I put that in my sig but forgot to update this page.  ^_^
Title: Re: [A14] XML Auto-Documentation A14e build 1249
Post by: kaptain_kavern on August 02, 2016, 06:11:41 PM
I know i don't have to bump up the post anymore but again thank you ;)

Can i ask you which tool you use to generate/compile this please ?
Title: Re: [A14] XML Auto-Documentation A14e build 1249
Post by: milon on August 04, 2016, 11:15:17 AM
Just a script I wrote myself.  I did it in AutoIt (www.autoitscript.com) if you care.  And I can post it if you or anyone else is interested.
Title: Re: [A14] XML Auto-Documentation A14e build 1249
Post by: Jdalt40 on August 05, 2016, 10:07:52 PM
Sorry if this is not where I should ask this, but what is 'HediffComp_VerbGiver'.
I just need to know because I need to set a Comp for my new Hediff :)
Title: Re: [A14] XML Auto-Documentation A14e build 1249
Post by: milon on August 10, 2016, 12:19:35 PM
Hey, just saw your post.

See an example of it in ...\Mods\Core\Defs\HediffDefs\Hediffs_Local_AddedParts.xml

It goes in a <HediffDef> block (which modifies Health and related effecets) and is responsible for giving Verbs (attack options) to pawns.  In vanilla, this applies to the BionicArm, PowerClaw, and ScytherBlade.
Title: Re: [A14] XML Auto-Documentation A14e build 1249
Post by: Morgrav on August 18, 2016, 02:06:41 PM
Thank you Kavern and Bucket,  I'll try to build my new folder tonight with the information you provided.  I will let you know how it goes.
Title: Re: [A15] XML Auto-Documentation A15b build 1280
Post by: milon on August 31, 2016, 07:26:40 AM
Updated to 15b :)
Title: Re: [A15] XML Auto-Documentation A15b build 1280
Post by: Master Bucketsmith on August 31, 2016, 07:48:53 AM
Updated to 15b :)
Thanks for the update! :D
Title: Re: [A15] XML Auto-Documentation A15b build 1280
Post by: kaptain_kavern on August 31, 2016, 01:30:36 PM
Updated to 15b :)
YaY!
(https://i.imgflip.com/iqus9.jpg)
Thx buddy
Title: Re: [A15] XML Auto-Documentation A15b build 1280
Post by: Falc on August 31, 2016, 05:13:17 PM
Minor nitpick: your 15b version still says 'for RimWorld 0.14.1249' at the top.
Title: Re: [A15] XML Auto-Documentation A15b build 1280
Post by: milon on September 01, 2016, 03:41:00 PM
LOL, whoops!  :)

Thanks for pointing that out.  I'll fix it for 15c (https://ludeon.com/blog/2016/08/alpha15c-in-testing-on-unstable-branch/).



Also, how is the formatting, accessibility, etc?

And FYI, Dropbox will soon (October 3, 2016) disable their HTML rendering for shared files.  Which means you'll have to download the file rather than just view it online.  So keep an eye on this thread / my signature to be aware of updates!.
Title: Re: [A15] XML Auto-Documentation A15b build 1280
Post by: SpaceDorf on September 02, 2016, 07:39:27 AM
Thanks for hosting and updating :)
Title: Re: [A15] XML Auto-Documentation A15b build 1280
Post by: milon on September 03, 2016, 05:08:21 AM
Updated to A15c!
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: BaconBits on September 06, 2016, 08:31:09 PM
Thanks for creating and maintaining this. It really helps to have reference material.
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: milon on September 12, 2016, 06:46:19 PM
No problem.  :)
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: Onion on September 13, 2016, 08:19:15 PM
I'd like to add my thanks too for you creating and hosting this milon, I really appreciate it.  As a beginning modder, XML was very confusing at first - the only way to know what was possible was to scan through every core def and to look at other people's mods.  Now all I need is your auto-document and ctrl+f to see what's possible.  I don't think even the best tutorial could teach me as much as exploring your XML document has.  I really can't stress enough that this is a HUGE resource for beginning XML modders.  Thanks again for your work!

By the way, the formatting and accessibility seem perfectly fine to me.  However I've never even used a HTML document before (is that the right term?) so you should probably take my opinion with a grain of salt  ;D
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: Deimos Rast on September 14, 2016, 02:29:33 AM
why did I not find this earlier >:(
Anyway, thanks!
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: milon on September 26, 2016, 03:57:07 PM
You're both very welcome!

I've been MIA lately due to IRL craziness (ongoing, hopefully done soon), but I'll still maintain this and I'll pop in now and then as time permits.  Thanks for the feedback!
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: Dingo on September 26, 2016, 04:24:06 PM
We should make a community effort to add descriptions to any XML def/tag/operator somewhere. Kind of a huge project but would really simplify making mods.

For example, if you could just look at a reference recipeDef which tells you EVERYTHING you can add or change about it, which defs are required and which are optional etc.
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: kaptain_kavern on September 26, 2016, 07:30:38 PM
I started something like this some times ago...
But was alone working on it and the A15 happened so fast ...

https://github.com/RimWorldMod/RimworldModdingFiles/blob/master/Defs/RecipeDefs/Recipes_Empty.xml

I choose Github because code can be commented and it has a wiki feature in it but I will participate to project like that on any platform or with any tools  ;)


On a similar theme I also have started spreadsheets with extracted values from XML files : https://ludeon.com/forums/index.php?topic=25433.0
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: Dingo on September 27, 2016, 12:24:59 AM
I didn't even know this existed. I'll spend some free time trying to make XMLs for it this week.
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: Nimrod on October 13, 2016, 07:32:43 AM
I didn't even know this existed. I'll spend some free time trying to make XMLs for it this week.

lol, I found yours and then saw the sticky one :)

Anyway, good work and thank you!
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: jecrell on October 16, 2016, 12:42:07 AM
So the HeDiffDef has no children? Is that right?
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: kaptain_kavern on October 16, 2016, 12:50:27 AM
I'm not sure about the precise english terms so I may be wrong, but doesn't all the ones listed under HediffDef<defName> are Hediffdef's children ?
Title: Re: [A15] XML Auto-Documentation A15c build 1284
Post by: milon on October 31, 2016, 03:00:34 PM
Everything under HediffDef<defName> is a child or property of a <defName> which is itself a child of <HediffDef>.  I track <defName> and <li> *with* their parents because they are the most common tags and show up EVERYWHERE.  It would be a nightmare to read otherwise.  (I'm not convinced this is the best way to represent it.  I'm open to suggestions for improvement!)
Title: Re: [A16] XML Auto-Documentation Test Build
Post by: milon on December 13, 2016, 12:34:49 PM
Updated to latest test build.
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on December 20, 2016, 01:18:41 PM
Updated to the official Alpha 16 (0.16.1393 rev540)
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: jjcm04 on January 05, 2017, 06:56:32 PM
I like this, but I am a real noob when it comes to xml. I did read on what Xml is and a tutorial on the basics, but I don't understand like workerclass ? what is it and can I make my own. perlin frequency?, stuff like that, so I also would need notes with the examples to explain in detail. I know.. I know, it's a lot of work, but I am sure you have thought about this for people who want to get into modding RimWorld, but have no prior knowledge of Xml or .dll files (how to use them, code them for RimWorld) I know that these <> in Unity is how you get a component of a gameobject like getcomponent<rigidbody>. Sorry for being a total noob. I hope I  am/not the only one who needs verbal help with code examples.
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on January 07, 2017, 12:50:19 PM
No worries - everyone is a noob at least once.  ;)

First, the difference (for RimWorld only) between XML and DLL: XML is used only to define content, such as what a Simple Meal is: graphic, value, flammability, nutrition, etc.  You can find virtually every object/mood/template/etc defined in the XML somewhere.  DLL is for coding RimWorld's systems and functions, such as temperature mechanics, how lighting works, how to generate a batch of raiders, how to draw a pawn's inventory on-screen, etc.

DLL isn't something I have touched, and I don't plan to.  But there's guides floating around if you dig for them.  All DLL stuff is coded in C#, by the way.

XML in general is basically the idea of HTML formatting, but with no predefined tags.  You can use any tag you like as long as the structure is valid.  Applied to RimWorld, it has to follow certain guidelines that RimWorld expects.  For example, you can't create a new kind of animal and neglect to define a graphic for it - that would cause an error.

The best way to learn the XML is to look at RimWorld's own Core files (see your mods folder) to see examples.  It's not feasible for me to break down and learn each tag in order to write a guide.  This document is auto-created by a script I wrote that just grabs every known Core usage of each XML tag.  It even lists source files so you can go look up how they work in the XML file.  I'm sure myself and others will contribute XML modding knowledge to the wiki once RimWorld is stable, but right now the XML changes from one release to another - this is the reason mods break & have to be updated each release.

Hope that helps!  Let me know if you have other questions.

Bonus for reading this far:
I also wrote a little script to join all Core XML files into 1 file for learning (to CTRL+F for examples of a given tag).  This is a learning tool and is NOT meant to replace anything in your Core folder.  But use it if that sounds helpful!
https://www.dropbox.com/s/twt386qtukeppzn/CoreXML%20A16.xml?dl=0
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: jjcm04 on January 07, 2017, 05:14:43 PM
No worries - everyone is a noob at least once.  ;)

First, the difference (for RimWorld only) between XML and DLL: XML is used only to define content, such as what a Simple Meal is: graphic, value, flammability, nutrition, etc.  You can find virtually every object/mood/template/etc defined in the XML somewhere.  DLL is for coding RimWorld's systems and functions, such as temperature mechanics, how lighting works, how to generate a batch of raiders, how to draw a pawn's inventory on-screen, etc.

DLL isn't something I have touched, and I don't plan to.  But there's guides floating around if you dig for them.  All DLL stuff is coded in C#, by the way.

XML in general is basically the idea of HTML formatting, but with no predefined tags.  You can use any tag you like as long as the structure is valid.  Applied to RimWorld, it has to follow certain guidelines that RimWorld expects.  For example, you can't create a new kind of animal and neglect to define a graphic for it - that would cause an error.

The best way to learn the XML is to look at RimWorld's own Core files (see your mods folder) to see examples.  It's not feasible for me to break down and learn each tag in order to write a guide.  This document is auto-created by a script I wrote that just grabs every known Core usage of each XML tag.  It even lists source files so you can go look up how they work in the XML file.  I'm sure myself and others will contribute XML modding knowledge to the wiki once RimWorld is stable, but right now the XML changes from one release to another - this is the reason mods break & have to be updated each release.

Hope that helps!  Let me know if you have other questions.

Bonus for reading this far:
I also wrote a little script to join all Core XML files into 1 file for learning (to CTRL+F for examples of a given tag).  This is a learning tool and is NOT meant to replace anything in your Core folder.  But use it if that sounds helpful!
https://www.dropbox.com/s/twt386qtukeppzn/CoreXML%20A16.xml?dl=0
Thank you! I really appreciate this. For any docs that I have found for .dll, normally doesn't relate to RimWorld, but more for building libraries, like MCCORLIB for the Microsoft Core Library, and I do have a C++ book (The Dummies Series), but this would be fore making a general library. I would need the exact minimum I need to make a RimWorld .dll, like which files I really need to include.

When it comes to the Xml, I have looked at some base-game files and can't find exactly which tags I need so I don't receive the error "Can't find typeDef" (or some idea of that error), What file would I need to mod in order to "fix/resolve" that error. Thanks Again so much for your help.
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on January 09, 2017, 03:02:55 AM
Glad to help. I'll try to take this a little further:

On DLL modding: DLL stands for Dynamic Link Library. As such, a dll file is a bunch of compiled code, much like an .exe file. The difference between an exe and a dll is that an exe is meant to be run directly while a dll isn't. The dll contains a bunch of functions and acts as a "helper" to whatever exe calls the dll. A dll can be coded in any language. In RimWorld, they must be coded in C# and certain standards must be followed (remember, the same code has to work on Windows, Mac, and Linux).  This means other languages like C++ won't help you much, beyond deepening your language of programming in general.  If you want to create new systems/functions/features, then C# coding is the only way to go.

For XML stuff, directory structure is important. You can't define a sound effect in a file that sits in the research folder. The concept of ParentName (see OP) is important too. You have to define your Thing from scratch for it to be recognized in RimWorld.

The way I got started is the same way I suggest you get started: copy a chunk of the Core mod into a new mod folder. Change one thing, like the description text, and start a new game using your mod. Did it work? If not, try to figure it out. Look at other mods and see what's different about yours. If you can't figure it out, post in Mods/Help.  In no time you'll be modding up a storm. :)

For those other XML tags that you don't understand yet, refer to the auto-doc. It lists all the ways Core uses each tag & attribute, so you can see a mostly complete list of options. If you still can't figure it out, don't delete it (it's probably important) - just keep them the way Core uses them.
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: pablous on January 15, 2017, 09:55:21 AM
Hi milon, i am a noob too like jjcm04. Thanks for your usefull comment.
Is it difficult to create a mod to add one event? If i want to make the mod i need to learn how to use XML or DLL? thx
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on January 17, 2017, 02:25:01 PM
It depends on what you want to do with the event.  I personally haven't looked into events very much, so it's hard for me to say.  In general, if you're using existing mechanics and creating new content, you can do XML-only.  But if you want new mechanics or new behaviors, then you need to code that in C# and compile it into a DLL (way beyond me).

If I wanted to create an event, I'd look in the help file for the word event and see what XML tags I find.  Then I'd look at the Core examples to see how it works.  I might also download a basic event-adding mod or two and see how they work.  Then I'd try to figure out how I could make a slightly different event and package it as a mod.  Test, tweak, and repeat until it works (or until I've given up :P ).

Good luck!

PS - Feel free to start a new thread under Mods/Help with specific questions.  You'll get better help there than I can offer you.  ;)
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: Spdskatr on February 12, 2017, 03:19:37 AM
The XML Autodoc doesn't have documentation for CompProperties, only that they use it. Shouldn't we add compProperties documentation as well? Or has this already been done?
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on March 03, 2017, 05:23:45 AM
Sorry for the belated reply - I haven't had time to dig into the XML to see what you're referring to. If you're asking for specific documentation of what it does, that would defeat the purpose of it being an Auto Doc. If you're asking for more detailed analysis/use of compProperties, could you elaborate a bit on what you're looking for?
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: Spdskatr on March 17, 2017, 07:06:04 AM
Sorry for the belated reply - I haven't had time to dig into the XML to see what you're referring to. If you're asking for specific documentation of what it does, that would defeat the purpose of it being an Auto Doc. If you're asking for more detailed analysis/use of compProperties, could you elaborate a bit on what you're looking for?
Basically, in the same way you did ThingDef, maybe create a similar Autodoc for BuildingProperties and CompProperties, maybe StuffProperties (Include field names, where it is found)? Someone on discord was talking about how these classes were often used in defs without any proper documentation in the autodoc so I thought I would pass it over.
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on March 17, 2017, 03:02:45 PM
Ah, okay.  Thanks for passing that along.  I haven't been on Discord yet, and probably won't get into that, tbh.  I'm willing to add more parsing/tracking, but I need a little clarity yet.  (Sorry if I'm being thick-skulled here; I'm just still not getting it.)

Here's what I understand: According to the A16 XML, there's only 3 different attributes that show up in Core as Class="???Properties_..." and they are ALWAYS applied to a <comps><li ... > tag.  They are:
(Note: There is no BuildingProperties or StuffProperties in the A16 XML.  If you're referring to something that isn't public knowledge, please PM me rather than posting it publicly.)  The point of this isn't manual documentation, but I don't think that's what you're after.  These attributes are all grouped under comps<li> and they shouldn't be that hard to find.  Their names give really good clues as to what they do.  So what exactly are you asking me to track?  Again, I'm willing to make it happen, I'm just not sure what I'm being asked for.
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: Spdskatr on March 19, 2017, 03:03:40 AM
Ah, okay.  Thanks for passing that along.  I haven't been on Discord yet, and probably won't get into that, tbh.  I'm willing to add more parsing/tracking, but I need a little clarity yet.  (Sorry if I'm being thick-skulled here; I'm just still not getting it.)

Here's what I understand: According to the A16 XML, there's only 3 different attributes that show up in Core as Class="???Properties_..." and they are ALWAYS applied to a <comps><li ... > tag.  They are:
  • CompProperties_...
  • HediffCompProperties_...
  • StorytellerCompProperties_...
(Note: There is no BuildingProperties or StuffProperties in the A16 XML.  If you're referring to something that isn't public knowledge, please PM me rather than posting it publicly.)  The point of this isn't manual documentation, but I don't think that's what you're after.  These attributes are all grouped under comps<li> and they shouldn't be that hard to find.  Their names give really good clues as to what they do.  So what exactly are you asking me to track?  Again, I'm willing to make it happen, I'm just not sure what I'm being asked for.

Part 1 was: To possibly make another section for each CompProperties class so for example:

Class="CompProperties_Art"
Fields:Examples:
(same as normal)



Part 2: I actually checked the newest version, this is already implemented under <building> and <stuffProps>. No further action needed :)
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on March 19, 2017, 09:38:10 PM
Okay, I think I get what you're saying now. And that would probably be very useful to have. I'll think on it this week and do a little tweaking. I should have an update by the end of this week. Please bug me about it if it looks like I've forgotten (I do get sidetracked at times).
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: milon on March 22, 2017, 01:39:27 PM
Okay, I made a test build of the above.  It now parses separately any "special" tag (currently just <li> and <defName>) with an attribute containing 'Properties_' .  That seems to catch all of the various CompProperties without grabbing anything else.

Here's the test build (not updated on the main page): https://www.dropbox.com/s/q896td291evktld/CoreXML%20A16%20Test.html?dl=0

Let me know if that's what you're looking for, and if it's useful.  I don't want to get lost in the feature-creep end of things either.  ;)

Oh, and how's the overall formatting & usability?  Anyone have ideas how to improve the layout?  Having two pseudo-columns via Float in a >1MB HTML file isn't exactly ideal, but it's the best I can think of to allow independent vertical scrolling.
Title: Re: [A16] XML Auto-Documentation for 0.16.1393 rev540
Post by: Spdskatr on March 28, 2017, 10:10:02 PM
Okay, I made a test build of the above.  It now parses separately any "special" tag (currently just <li> and <defName>) with an attribute containing 'Properties_' .  That seems to catch all of the various CompProperties without grabbing anything else.

Here's the test build (not updated on the main page): https://www.dropbox.com/s/q896td291evktld/CoreXML%20A16%20Test.html?dl=0

Let me know if that's what you're looking for, and if it's useful.  I don't want to get lost in the feature-creep end of things either.  ;)

Oh, and how's the overall formatting & usability?  Anyone have ideas how to improve the layout?  Having two pseudo-columns via Float in a >1MB HTML file isn't exactly ideal, but it's the best I can think of to allow independent vertical scrolling.

Perfect. Thanks, this is great.

Also, usability is fine, considering this is auto-documentation.
Title: Re: [A17] XML Auto-Documentation for 0.17.1546 rev891
Post by: milon on May 25, 2017, 11:00:24 AM
Alpha 17 auto doc is released.  I'm tracking all CompProperties attributes separately, and it seems to come out well.  Enjoy!
Title: Re: [A17] XML Auto-Documentation for 0.17.1546 rev891
Post by: kaptain_kavern on May 25, 2017, 11:05:05 AM
Hey Milon you made us waiting long this time  ;D

THANK YOU very much for this, as usual.

You rocks, buddy !
Title: Re: [A17] XML Auto-Documentation for 0.17.1546 rev891
Post by: milon on May 25, 2017, 11:07:00 AM
Wow, you jumped on this fast!  Glad to be of help, and sorry I kept you waiting a couple hours, LOL!  ;D

FYI, I haven't learned the new field-replacement technique for A17, but there either is or will be documentation coming out about that.  Some of the other modders were putting that together during A17 testing.

Finally, there's a new A17 mod announcement sticky thread:
https://ludeon.com/forums/index.php?topic=32817.0
Title: Re: [A17b] XML Auto-Documentation
Post by: milon on June 08, 2017, 08:46:39 PM
Updated to A17b
Title: Re: [A17b] XML Auto-Documentation
Post by: DestroyX on October 11, 2017, 04:04:59 AM
Omg i love you dude!
Title: Re: [A18] XML Auto-Documentation
Post by: milon on November 20, 2017, 07:09:22 PM
Updated to A18.  I haven't *touched* A18 yet, beyond downloading and running the Auto-Doc on it.  I'm still "on vacation" because IRL is insane in milon-land.  Please PM me if there's any weirdness or anything else I should be alerted to.

Enjoy!
Title: Re: [A18] XML Auto-Documentation
Post by: Dfid on November 20, 2017, 07:31:20 PM
Updated to A18.  I haven't *touched* A18 yet, beyond downloading and running the Auto-Doc on it.  I'm still "on vacation" because IRL is insane in milon-land.  Please PM me if there's any weirdness or anything else I should be alerted to.

Enjoy!

I know it seems kinda nickpicky but it isnt A18 its B18 now.
Title: Re: [A18] XML Auto-Documentation
Post by: kaptain_kavern on November 20, 2017, 08:04:52 PM

Enjoy!

As always, many thanks man. You know I nearly started to think about how to do one myself this time? ;-)

And good luck with the IRL. It is what matters in the end

Cheers
Title: Re: [A18] XML Auto-Documentation
Post by: larSyn on November 21, 2017, 09:43:13 AM
Updated to A18.

Nice. Thanks!  These are essential. 

Also want to say good luck w/ IRL. kaptain is right about it.

Title: Re: [A18] XML Auto-Documentation
Post by: milon on November 22, 2017, 06:59:05 PM
I know it seems kinda nickpicky but it isnt A18 its B18 now.

Good catch, thanks. I'm about to leave town for US Thanksgiving, so I'll correct it after that if I don't forget. ;)
Title: Re: [A18] XML Auto-Documentation
Post by: Heymom on December 23, 2017, 04:06:34 AM
How does this work? if i download the html page, its not translating the code. aka not much auto about it :D
Title: Re: [A18] XML Auto-Documentation
Post by: kaptain_kavern on December 23, 2017, 09:15:02 AM
It's automatically made with a script, hence for the auto.

This is "just" a list of all XML tags used by the game
Title: Re: [A18] XML Auto-Documentation
Post by: Heymom on December 24, 2017, 10:37:00 AM
It's automatically made with a script, hence for the auto.

This is "just" a list of all XML tags used by the game
Ahh, thought it was like a F1 ref. in compilers..
Title: Re: [A18] XML Auto-Documentation
Post by: pliniojrm on February 26, 2018, 06:28:54 AM
Hi quick question, because there is not in documentation:
What are values for <eType> ?
---Edit---
Nevermind it! But the XML Auto-Documentation A18 need a revision to add this:
List of <eType>:
Undefined, Pawn, Item, Chunk, Apparel, Equipment, Filth, Fire, Corpse, Puddle, DropPod, Medicine, Plant, Floor, Roof, Mote, Blueprint, Projectile, ItemSkyFalling, Ethereal, Rock, SteamGeyser, BuildingComplex, BuildingInert, Frame, Wall, Door, Bed, Building_Table, Building_PowerPlantGeothermal, Building_PowerConduit, Building_Battery, Building_ResearchBench, Building_Turret, Building_Chair, Building_Cryptosleepcasket, Building_TempController
Title: Re: [A18] XML Auto-Documentation
Post by: ilikegoodfood on March 06, 2018, 07:21:22 AM
Hi, this is a fantastic tool that I have only just started using, should probably have started with it earlier, and I had a thought...

I assume that this code is directed to the RimWorld Core folder and parses the information from the XML files.
Would it not be possible to target it to the RimWorld Mods folder and have it parse mods in addition to the Core folder?

I don't know how much work would be involved in that or how useful it would actually be, but I figured there was no harm in suggesting it.

Thank you for this fantastic tool.
Title: Re: [A18] XML Auto-Documentation
Post by: milon on March 08, 2018, 07:16:59 PM
@pliniojrm, I'm back from my hiatus now. I'll look into that, thanks for the suggestion.

@ilikegoodfood, yes it's an automated tool that I made. It shouldn't be hard to point it at Core or even a specific mod, but that would only yield info about any mods I have installed. And I typically run less than half a dozen mods. I could release the tool, but it's Windows-only and I don't want to have to support it too, lol.

However, anyone who PM's me can get a copy of it for their own (unsupported) purposes.  ;)
Title: Re: [A18] XML Auto-Documentation
Post by: milon on May 09, 2018, 06:23:23 PM
Hi quick question, because there is not in documentation:
What are values for <eType> ?
---Edit---
Nevermind it! But the XML Auto-Documentation A18 need a revision to add this:
List of <eType>:
Undefined, Pawn, Item, Chunk, Apparel, Equipment, Filth, Fire, Corpse, Puddle, DropPod, Medicine, Plant, Floor, Roof, Mote, Blueprint, Projectile, ItemSkyFalling, Ethereal, Rock, SteamGeyser, BuildingComplex, BuildingInert, Frame, Wall, Door, Bed, Building_Table, Building_PowerPlantGeothermal, Building_PowerConduit, Building_Battery, Building_ResearchBench, Building_Turret, Building_Chair, Building_Cryptosleepcasket, Building_TempController

I'm finally working on this again. IRL has been incredibly hectic lately, and still kind of is.  ;)  Anyway, what version of RimWorld are you running?  There's no <eType> currently in it, there hasn't been for a long time.
Title: Re: [1.0 Beta] XML Auto-Documentation
Post by: milon on July 13, 2018, 06:11:04 PM
Oh, look!  An update!  :D
Public beta 1.0 is uploaded!
Find it in the first post (https://ludeon.com/forums/index.php?topic=21440.0).
Title: Re: [Beta 19] XML Auto-Documentation
Post by: milon on September 20, 2018, 09:14:31 AM
Updated to public Beta 19
Title: Re: [Beta 19] XML Auto-Documentation
Post by: SickBoyWi on October 29, 2018, 01:01:42 PM
This was insanely helpful! You have no idea. After searching for hours for an example of what I was trying to do, I finally decided to actually look up the XSD files. You are a life saver!
Title: Re: [Beta 19] XML Auto-Documentation
Post by: milon on November 28, 2018, 05:21:21 PM
Awesome! I'm glad to hear it! :D
Title: Re: [Beta 19] XML Auto-Documentation
Post by: TheMysticDreamer on March 02, 2019, 06:18:23 PM
Is this still accurate for 1.0?
Title: Re: [Beta 19] XML Auto-Documentation
Post by: milon on May 06, 2019, 10:13:46 AM
PM is better for me than a regular post.  I'm pretty much never around here anymore, mostly due to IRL stuff.

Anyway, I think Beta 19 was quite similar to 1.0, but maybe not 100%.  And I actually migrated from Windows to Linux several months ago, and totally forgot about this.  It's definitely a Windows-only tool, but when I have some time I'll use Wine or ReactOS to create an XML doc for 1.0.  I doubt I'll be supporting it beyond that, but the tool itself is still available for anyone who is interested.  (It's just an XML parser script for RimWorld.)

EDIT - I updated the OP to include a link to the tool itself, and the script language necessary to run it.

EDIT 2 - Updated again.  Version 1.0 is out.  Sorry for the delay!
Title: Re: XML Auto-Documentation
Post by: niciusb on October 19, 2019, 11:10:11 AM
For anyone interested, I have recreated this project from scratch using nodejs, with many modifications.
In some ways it's better, in some worse. I have uploaded a version with the xml from the core 1.0 game: https://balbona.me/rimworld-data-extractor/core/ and another one using the Hardcore SK modpack: https://balbona.me/rimworld-data-extractor/hsk/
Ultimately, I would like to use it to generate auto-updating wikis of materials for construction, smithing, etc. But I don't understand enough about how the whole mod system works.

Check the github repo (https://github.com/NiciusB/rimworld-data-extractor) for the code, contributions welcome!
Title: Re: XML Auto-Documentation
Post by: Knight on February 21, 2020, 09:59:33 AM
RimWorld AutoDocs for 1.1.2551 rev106

I've run the tool the OP provided for documentation on v1.1. It's on MEGA because it's 3041KB and the maximum attachment size here is 1000KB.

https://mega.nz/#!9vw3mCZT!KZnzu5MsuNSouOv3LMK4DnJ7-zbrMnR05JjD7YLVSQg

Edit: Sorry, wrong link. Fixed now.
Title: Re: XML Auto-Documentation
Post by: Pangaea on February 24, 2020, 08:41:35 AM
Thanks. Downloaded it just in case I want to look at it later.
Title: Re: XML Auto-Documentation
Post by: velcroboy on September 30, 2020, 11:18:09 AM
Any chance there will be an updated version for 1.2?
Title: Re: XML Auto-Documentation
Post by: PnutButtrCrepes on December 15, 2020, 08:34:12 PM
I've run the tool that the OP provided for v1.2 and also reformatted the file. I have listed the changes that I personally made in an HTML comment at the top of the file.

https://mega.nz/file/ZnoUzBzJ#pVGb6_bc1uqDzvF8ejAUOmt40vh0r4hGH56MbftHpS0
Title: Re: XML Auto-Documentation
Post by: velcroboy on July 21, 2021, 02:45:11 PM
@PnutButtrCrepes, I ran the tool with the edits you made and it spit out a .txt file. Is it supposed to create a HTML? Or did I miss something?