def _init_event_data(params)
      # set state
      @state = {
        reloaded: !params[:evnt].nil?,
        saved: true
      }

      # set options
      initial_options = {
        exceptions: false,
        silent: false
      }
      default_options = _safe_default_options || {}
      params_options = params[:_options] || {}
      @options = initial_options.merge(default_options)
                                .merge(params_options)

      # set name and attributes
      @name = _safe_name
      @attributes = _safe_attributes

      # set payload
      payload = params.reject { |k, _v| k[0] == '_' }
      @payload = @state[:reloaded] ? payload : _generate_payload(payload)

      # set extras
      @extras = {}
      extras = params.select { |k, _v| k[0] == '_' }
      extras.each { |k, v| @extras[k[1..-1].to_sym] = v }
    end
def _init_event_data(params)
      # set state
      @state = {
        reloaded: !params[:evnt].nil?,
        saved: true
      }

      # set options
      initial_options = {
        exceptions: false,
        silent: false
      }
      default_options = _safe_default_options || {}
      params_options = params[:_options] || {}
      @options = initial_options.merge(default_options)
                                .merge(params_options)

      # set name and attributes
      @name = _safe_name
      @attributes = _safe_attributes

      # set payload
      payload = params.reject { |k, _v| k[0] == '_' }
      @payload = @state[:reloaded] ? payload : _generate_payload(payload)

      # set extras
      @extras = {}
      extras = params.select { |k, _v| k[0] == '_' }
      extras.each { |k, v| @extras[k[1..-1].to_sym] = v }
    end
This function initializes the event required data.