Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated AI/MD-script universeID documentation

...

 
pass to an FFI function
pass to a Lua function
pass to a script value (AI/MD-scripts)
FFI ID(tick)(warning) use ConvertStringTo64Bit(tostring(ffiUniverseID))(warning) use ConvertStringToLuaID(tostring(ffiUniverseID))
or as an alternative, if only tunneling values is required use ConvertStringTo64BitID(tostring(ffiUniverseID))1)
Lua ID(warning) use ConvertIDTo64Bit(luaUniverseID)(tick)(tick)

(tick) 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.

...