--- title: raise_lua_event summary: An MD action that sends a named event to Lua UI. section: reference kind: api status: reference tags: ["X4","modding","raise","lua","event"] sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/"] --- ## Return value | Type | Meaning | | --- | --- | | [none (MD action)](wiki:type-md-values) | No Lua return. The param expression supplies a value to the receiving Lua handler. | [Types and methods](wiki:types) ## Observed form Layer: Mission Director, inside `actions`. `name` is an MD expression returning the event name; `param` is a payload expression. Inner quotes form MD string literals. Register the Lua receiver beforehand with [RegisterEvent](wiki:register-event). ```xml ``` **What happens:** Lua receives a Wiki.Pong event with the payload "pong". A visible message requires an explicit action by the Lua handler. ## Returning a result The project uses strings for small results and an agreed begin/chunk/end series for larger ones. Receiving one chunk does not establish snapshot completeness. ## Limits An event delivers UI data; it does not automatically persist an operation journal. Define the persistence boundary for both effect and outcome. Encode user values before putting them into a delimiter-separated wire format. The simple pong example intentionally avoids complex user text.