Page 1 of 1

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

Posted: Tue May 05, 2020 12:59 pm
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.

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

Posted: Tue May 05, 2020 1:23 pm
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

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

Posted: Tue May 05, 2020 2:16 pm
by DRY411S
That's clear thank you, and explains a lot.. May I suggest that information is included in the respective locations?

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

Posted: Tue May 05, 2020 2:18 pm
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.

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

Posted: Tue May 05, 2020 3:14 pm
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?