Maintain either wiki or lua-api subdomains, or keep them in sync

Things that already exist in the current mod API
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Maintain either wiki or lua-api subdomains, or keep them in sync

Post by DRY411S »

In a recent bug hunt for in my mod's code, I was very surprised to see just how different the lua-api and wiki documentation is in a specific area of interest for me, recipes:

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

https://wiki.factorio.com/Prototype/Recipe

Since I started the mod back in factorio 0.12, I've always assumed that 'latest' in the lua-api subdomain meant 'latest'.

About 80% of my bugs I've needed to fix have been because of other mods using recipe constructs that are 'off specification' according to lua-api. Now I realise that the wiki documentation is more up to date, and my code is what was 'off specification'.

I suggest that:
  • either both these great resources are kept in sync,
  • or one is retired,
  • or that there are 'health warnings' advising modders to cross reference between the two.
Thanks for considering this suggestion.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5304
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Maintain either wiki or lua-api subdomains, or keep them in sync

Post by Klonan »

The runtime API and the data stage modding API are very different

If you are adding new prototypes, doing things with data stage, etc. you need the wiki prototype docs

If you are doing things with control scripting, such as making a in-game recipe GUI, you need the API docs
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Maintain either wiki or lua-api subdomains, or keep them in sync

Post by DRY411S »

That's clear thank you, and explains a lot.. May I suggest that information is included in the respective locations?
Last edited by DRY411S on Tue May 05, 2020 3:13 pm, edited 1 time in total.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Maintain either wiki or lua-api subdomains, or keep them in sync

Post by Bilka »

DRY411S wrote: Tue May 05, 2020 2:16 pm That's clear thank you. May I suggest that information is included in the respective locations?
https://lua-api.factorio.com/latest/index.html
Image

https://wiki.factorio.com/Prototype_definitions
Image

https://wiki.factorio.com/Modding
Image

Moving to already exists since both locations are updated, both mention what they are about and both point to the respective other documentation.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Maintain either wiki or lua-api subdomains, or keep them in sync

Post by DRY411S »

Thanks Bilka. It apears I have a very stale cache in my browser. Maybe because the lua-api latest page doesn't have any obvious cache control settings?
Post Reply

Return to “Already exists”