anyone know what the hidden ffi.C functions do?
for example, what does ffi.C.SellPlayerShip do?
some assume that it recycles the ship and gives all the resources to the buying faction. but nothing in the code actually suggests that.
would love to see all the code for these hidden functions
hidden ffi.C functions?
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 349
- Joined: Sun, 12. Oct 08, 04:04
-
- Moderator (Script&Mod)
- Posts: 13480
- Joined: Sun, 15. Feb 04, 20:12
Re: hidden ffi.C functions?
It's not really "hidden" if you check the UI folder where it's used frequently. I'm not that much into UI modding but think it's a Foreign function interface between the lua and C.
Cheers Euclid
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
-
- Posts: 349
- Joined: Sun, 12. Oct 08, 04:04
Re: hidden ffi.C functions?
some are. for example:
ui\addons\ego_detailmonitor\menu_map.lua:
C.SellPlayerShip(data[1], menu.contextMenuData.shipyard)
the function C.SellPlayerShip isn't defined in the publicly available lua files. it's imported from ffi.C which i believe is hidden within the .exe's lua files.
wait, there are c files? imma go find them if so.
edit: tried extracting all files *.*c* but couldn't find any cpp or .c files
ui\addons\ego_detailmonitor\menu_map.lua:
C.SellPlayerShip(data[1], menu.contextMenuData.shipyard)
the function C.SellPlayerShip isn't defined in the publicly available lua files. it's imported from ffi.C which i believe is hidden within the .exe's lua files.
wait, there are c files? imma go find them if so.
edit: tried extracting all files *.*c* but couldn't find any cpp or .c files
-
- Moderator (Script&Mod)
- Posts: 13480
- Joined: Sun, 15. Feb 04, 20:12
Re: hidden ffi.C functions?
If you're using something like AstroGrep then search for lua files which contain ffi. That provides many examples on how to use it.
Cheers Euclid
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
-
- Posts: 349
- Joined: Sun, 12. Oct 08, 04:04
Re: hidden ffi.C functions?
Thanks ^^
yeah, i use notepad++ to find all instances of things i'm curious about within all files within a parent and its children directories.
i did find out that c.sellplayership adds the command.recycle to ships, i'm not sure if it is actually using the recycle aiscript tho.
would love to see the definitions of ffi.C.functions
would the devs be willing to release those/add them to the lua section of the wiki?
yeah, i use notepad++ to find all instances of things i'm curious about within all files within a parent and its children directories.
i did find out that c.sellplayership adds the command.recycle to ships, i'm not sure if it is actually using the recycle aiscript tho.
would love to see the definitions of ffi.C.functions
would the devs be willing to release those/add them to the lua section of the wiki?