...
pass to an FFI function | pass to a Lua function | pass to a script value (AI/MD-scripts) | |
---|---|---|---|
FFI ID | use ConvertStringTo64Bit(tostring(ffiUniverseID)) | use ConvertStringToLuaID(tostring(ffiUniverseID)) or as an alternative, if only tunneling values is required use ConvertStringTo64BitID(tostring(ffiUniverseID))1) | |
Lua ID | use ConvertIDTo64Bit(luaUniverseID) |
indicates cases where you can pass the variable directly
1) It's important to pass universe IDs as real ID values to MD. Not doing so will cause problems when loading savegames, if the passed value is saved to the savegame. Examples where this applies at the time of writing this:
- Helper.closeMenuAndReturn()
- Lua function: SignalObject()
- Lua function: SetNPCBlackboard()
As presented in this table, there are some conversion functions available which are required when passing Lua/FFI-IDs to FFI/Lua functions and/or scripts.
...