RecipePrototype: Missing field `trash`

Place to report issues and suggest improvements to the API documentation.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 420
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

RecipePrototype: Missing field `trash`

Post by Hares »

RecipePrototype's documentation lacks available in the game field `trash`
Left - API docs; right - in-game prototype viewer
Left - API docs; right - in-game prototype viewer
11-30-2024, 03-44-37.png (293.9 KiB) Viewed 222 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14412
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: RecipePrototype: Missing field `trash`

Post by Rseding91 »

The trash field is auto generated for internal use and included so you can view the data on the prototype. There is nothing to document about it since mods don't have control over it.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 420
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: RecipePrototype: Missing field `trash`

Post by Hares »

Rseding91 wrote: Sat Nov 30, 2024 1:12 am The trash field is auto generated for internal use and included so you can view the data on the prototype. There is nothing to document about it since mods don't have control over it.
Is there a way to determine if a field in Prototype Viewer is a prototype field or a derived field? From what I noticed, fields that have two and more words w/o underscore are derived, but what's for the 1-word fields?
curiosity
Filter Inserter
Filter Inserter
Posts: 483
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: RecipePrototype: Missing field `trash`

Post by curiosity »

Hares wrote: Sat Nov 30, 2024 3:56 pm Is there a way to determine if a field in Prototype Viewer is a prototype field or a derived field? From what I noticed, fields that have two and more words w/o underscore are derived, but what's for the 1-word fields?
You check the docs and hope it's named similarly enough.

But in general, it would be nice if the less obvious fields in prototype explorer had a brief explanation to what they are. For example, tiles have a field `representative` that seemingly always refers to the tile itself. Why? What's the point?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14412
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: RecipePrototype: Missing field `trash`

Post by Rseding91 »

The prototype explorer was implemented in a “least intrusive” method possible on the engine side because for each field shown at least one new line of code has to be added to make it show in the explorer and that adds friction with working on anything engine wise, bugs, features, and so on.

To then add comments to them makes it even worse to the point that a single new field and using it is around 1/4th of the total work needed. Between lua prototype docs, the lua API, those docs, tests, and the actual game logic it decentivizes developers from adding or changing anything.

There’s too much boilerplate to work on the engine these days and adding more sucks.
If you want to get ahold of me I'm almost always on Discord.
curiosity
Filter Inserter
Filter Inserter
Posts: 483
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: RecipePrototype: Missing field `trash`

Post by curiosity »

Rseding91 wrote: Sat Nov 30, 2024 6:58 pm The prototype explorer was implemented in a “least intrusive” method possible on the engine side because for each field shown at least one new line of code has to be added to make it show in the explorer and that adds friction with working on anything engine wise, bugs, features, and so on.

To then add comments to them makes it even worse to the point that a single new field and using it is around 1/4th of the total work needed. Between lua prototype docs, the lua API, those docs, tests, and the actual game logic it decentivizes developers from adding or changing anything.

There’s too much boilerplate to work on the engine these days and adding more sucks.
Good thing Wube has employees whose job is specifically to maintain documentation. So you don't have to.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14412
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: RecipePrototype: Missing field `trash`

Post by Rseding91 »

curiosity wrote: Sat Nov 30, 2024 7:39 pm Good thing Wube has employees whose job is specifically to maintain documentation. So you don't have to.
It would be nice if that was the case. Unfortunately it’s not, and part of every change is either adding the docs yourself or getting a comment to “please add/update the docs”.

I don’t mean this as a slight against anyone, it’s simple the state that things are and I don’t see any current way to reduce the not-actual-programming work.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Documentation Improvement Requests”