How can I use C++ code in Lua?
How can I use C++ code in Lua?
Im tring to make a mod and I hope I can use my previous code.
Re: How can I use C++ code in Lua?
Factorio mods only support writing them in Lua. So the answer is: you can't.
If you want to get ahold of me I'm almost always on Discord.
-
DarkShadow44
- Filter Inserter

- Posts: 254
- Joined: Thu Jun 01, 2017 12:05 pm
- Contact:
Re: How can I use C++ code in Lua?
Even if you could, I don't see how it would be useful to recycle old code. You need to use a lot of factorio specific features. What exactly are you trying to do/reuse?
Re: How can I use C++ code in Lua?
If you don't want to reinvent the wheel, take a look at some of the existing mod libraries, like Factorio Library . You can use any of them as a dependency for your mod, and use the functions they maintain.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk

