Page 1 of 1

RecipePrototype: Missing field `trash`

Posted: Sat Nov 30, 2024 12:47 am
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 225 times

Re: RecipePrototype: Missing field `trash`

Posted: Sat Nov 30, 2024 1:12 am
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.

Re: RecipePrototype: Missing field `trash`

Posted: Sat Nov 30, 2024 3:56 pm
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?

Re: RecipePrototype: Missing field `trash`

Posted: Sat Nov 30, 2024 4:25 pm
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?

Re: RecipePrototype: Missing field `trash`

Posted: Sat Nov 30, 2024 6:58 pm
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.

Re: RecipePrototype: Missing field `trash`

Posted: Sat Nov 30, 2024 7:39 pm
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.

Re: RecipePrototype: Missing field `trash`

Posted: Sat Nov 30, 2024 7:42 pm
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.