Link API Prototype pages to WIKI-API Prototype pages

Place to report issues and suggest improvements to the API documentation.
PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Link API Prototype pages to WIKI-API Prototype pages

Post by PyroFire »

API Prototype page:
https://lua-api.factorio.com/latest/Lua ... otype.html

is related to the WIKI-API Prototype page:
https://wiki.factorio.com/Prototype/Technology

But they do not reference eachother.


You may be asking, but aren't LuaTechnologyPrototype and Prototype/Technology the same?
... No.

Code: Select all

research_unit_count_formula :: string [R]	The count formula used for this infinite research or nil if this isn't an infinite research.
research_unit_ingredients :: array of Ingredient [R]	Ingredients labs will require to research this technology.
...

Code: Select all

unit

Type: table
table with the following key/value pairs:

    count — double — How many units are needed. Must be positive. May not be specified if count_formula is specified.
    count_formula — string — Formula that specifies how many units are needed per level of the infinite technology. May not be specified if count is specified. The formula is executed following the BODMAS order.
    
.. They are not.

The main difference is WIKI-API is the prototypes in the data stage (and also has the lua tutorials) and API is everything else.

Why?
Because it's really frustrating working with a particular prototype between all the stages of its lifecycle and needing to maintain tabs which are in distinctly separate "domains", despite being essential documentation of the same subject and of the same topic.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3713
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Link API Prototype pages to WIKI-API Prototype pages

Post by DaveMcW »

PyroFire wrote:
Thu Nov 07, 2019 11:32 am
working with a particular prototype between all the stages of its lifecycle
The data.lua prototype is destroyed halfway through the "lifecycle". The control.lua API builds a completely different prototype using only a subset of the original values.

It is unfortunate that some of the names are different between the stages. Fixing it involves a lot of work, and a lot of broken mods.

PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: Link API Prototype pages to WIKI-API Prototype pages

Post by PyroFire »

DaveMcW wrote:
Thu Nov 07, 2019 11:46 am
"lifecycle"
PyroFire wrote:
Thu Nov 07, 2019 11:32 am
lifecycle
https://en.wikipedia.org/wiki/Object_lifetime wrote:In object-oriented programming (OOP), the object lifetime (or life cycle) of an object is the time between an object's creation and its destruction.
In the situation i'm describing, the object is everything related to say, an entity.
Technology to unlock it.
Recipes to create it.
The item to place it.
The item stack it came from.
The events to control it.
Its place in the global table
etc.

I'm tweaking an object's prototype in the data.lua while affecting new code in control.lua that is reliant on the prototype, and in such manner that they influence each other as the project grows over time.
Having this link there would not only be highly convenient, but also teach that these are separate "domains" in such manner as you have described -- They are different, and very purposefully so, but are also related.

And to make sure no one gets confused.
When i say link, i mean it literally.

Code: Select all

technology-prototype.html <a href="prototype/technology.html">Link to data stage prototype</a>
prototype/technology.html <a href="technology-prototype.html">Link to control stage prototype</a>
And a literal "modding interface" request.

Post Reply

Return to “Documentation Improvement Requests”