Talk:Modding: Lua API

From Noita Wiki
Jump to navigation Jump to search

Using AI to Generate Documentation (For the Lazy (me))

I absolutely hate writing and whatever so I was trying out ChatGPT using the following template:

Create documentation for the following function:

-- (write comments or short description here if applicable)
(paste lua function signature here)


from (example code 1 lua filename).lua:
(example code 1 containing the function)


from (example code 2 lua filename).lua:
(example code 2 containing the function)

...

The examples are from searching for usage in both Noita and modded code, you just need to add a few to give it enough context to understand how it's used.

In some cases I got really nice outputs that I just needed to touch up, and in other cases it was terrible. You can then follow-up and tell it corrections or ask for it to write specific examples of code.
Please consider that the output is unlikely to be correct most of the time, it can and will be wrong about a lot of things.

--Heinermann (talk) 08:09, 5 December 2022 (UTC)