In our great quest of API unification, perhaps we have long forgotten one important candidate

Place to report issues and suggest improvements to the API documentation.
Post Reply
User avatar
micromario
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Thu Apr 05, 2018 11:53 am
Contact:

In our great quest of API unification, perhaps we have long forgotten one important candidate

Post by micromario »

Maybe a more difficult request, but I think it would be very helpful :lol:

Right now we have a list of all data.raw prototypes:
https://gist.githubusercontent.com/Bilk ... 3c1ae7/raw

It's very nice but issue is this document is just plaintext. It can be difficult to search for stuffs without having the advantage of collapsible fields
My plan is to join this document into the existing factorio prototypes API.

For example the "radar" prototype (https://lua-api.factorio.com/latest/pro ... otype.html) would have a footer listing all instances in vanilla that use the prototype.

What do you think? :D I love having everything in one place

EDIT: seems you have already started this process? I just checked out the accumulators page (https://lua-api.factorio.com/latest/pro ... otype.html)

Xorimuth
Filter Inserter
Filter Inserter
Posts: 626
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: In our great quest of API unification, perhaps we have long forgotten one important candidate

Post by Xorimuth »

I don’t think that data.raw dumps belong in the docs. If you care about what base mod is doing, then open it up in your editor like you would any other mod and search through it using your editor’s “Find in files” functionality. Then you can see it exactly as it was defined, which is more useful/readable than just a json dump in alphabetical order.

You’ve always got https://jackhugh.github.io/factorio-dat ... isualiser/ as an option too.
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

User avatar
micromario
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Thu Apr 05, 2018 11:53 am
Contact:

Re: In our great quest of API unification, perhaps we have long forgotten one important candidate

Post by micromario »

Agreed, its definitely helpful to open those base data.lua files in vscode.

The only issue is many things are obfuscated by several layers of functions... for example noise expressions and tile transitions.
Many times I just want to see the raw output. :|

That's a great link you shared! much better than @bilkas raw text dump. Thank you 8-)

Bilka
Factorio Staff
Factorio Staff
Posts: 3140
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: In our great quest of API unification, perhaps we have long forgotten one important candidate

Post by Bilka »

Like Xorimuth says, data.raw dumps don't really belong in the docs. However, you point to an example on the AccumulatorPrototype page and those definitely do belong in the docs! We tend to trim down examples to highlight only what is important, so that they are more useful than the (sometimes huge) raw dumps of the prototypes. And for that we'd like to know what examples to prioritize to include, which is what this request forum is for :D
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Documentation Improvement Requests”