Page 1 of 1

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

Posted: Wed Aug 16, 2023 10:58 pm
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)

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

Posted: Wed Aug 16, 2023 11:25 pm
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.

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

Posted: Wed Aug 16, 2023 11:33 pm
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-)

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

Posted: Fri Sep 01, 2023 10:36 am
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