Lua

Ideas that are too old (too many things have changed since) and ones which won't be implemented for certain reasons or if there are obviously better suggestions.

Moderator: ickputzdirwech

Post Reply
gabberworld
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat Aug 17, 2019 11:06 pm
Contact:

Lua

Post by gabberworld »

can you enable the package.loadlib in lua
soo i can use other stuff like mysql

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Lua

Post by Bilka »

No, modding is sandboxed for a reason.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

gabberworld
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat Aug 17, 2019 11:06 pm
Contact:

Re: Lua

Post by gabberworld »

is there any info what this game not actually support what lua self supports??

soo i would not faste my time at lua manual

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Lua

Post by Bilka »

I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: Lua

Post by slippycheeze »

gabberworld wrote:
Mon Aug 26, 2019 8:16 am
is there any info what this game not actually support what lua self supports??
soo i would not faste my time at lua manual
I saw your comment elsewhere, gabberworld, that you already gave up on modding Factorio. So, this is more for any audience that happens along here:

Factorio runs Lua 5.2, with modifications exactly as described in the API documentation. Which, frankly, are entirely trivial and in no way change anything in the core language. The mistake is to think that the Lua language, as opposed to Lua the extended environment available through the stand-alone interpreter, is what matters here.

So, for anyone else along, Lua in Factorio is like Lua in most games. An embedded language, with limited and controlled facilities for interaction, used exclusively to make some interaction with the internals possible. In times long past it would have been a custom scripting language, and things like the Unreal Engine still have their own exciting layers of custom languages, but Lua is ... designed for the purpose.

So, in terms of the manual: when it describes the language, (almos) all of it will be available. When it describes the extended ecosystem, such as loading external code in an uncontrolled fashion, or interacting with C language extensions, it is not applicable to the embedded language case. Which, of course, mirrors exactly how it is used in other games - WoW and clones, etc, which long since followed the same path.

gabberworld
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat Aug 17, 2019 11:06 pm
Contact:

Re: Lua

Post by gabberworld »

i understand , i'm not that noob actually about stuff like Delphi, c++, lua, c#.

that link explained for me already what Bilka posted ,why i can't use loadlib

even if they enable that, i can't use that like i was planned and i only get the either a crash or error

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: Lua

Post by slippycheeze »

gabberworld wrote:
Wed Aug 28, 2019 6:06 am
i understand , i'm not that noob actually about stuff like Delphi, c++, lua, c#.
Sorry, didn't mean to suggest you were ignorant or anything. I guess I failed at that goal, though.

Not knowing how Lua the "embedded language for game modding" works is entirely reasonable and, well, everyone starts there some time. I figured I'd explain the difference for the next person who came along so they didn't hit the same issue. A jump-start if you will, on the parts that are specific to Lua in games, rather than Lua in general.

That is: make it easier for the next person to learn what you now know. :)

Post Reply

Return to “Outdated/Not implemented”