IMIsle Modkit
Pages in this area

reports

Server

Every player on an Isle Modkit server has a report window. It opens where the game's own report form would open, in the pause menu and on the death screen. The game's form is not shown on modded servers. Reports go to the staff of the server, not to the developers of The Isle.

The window shows the players who are online, the reasons the server set up, and a text box. One fixed reason is always at the end of the list: Cheating (sent to Isle Modkit). A report with that reason goes to Isle Modkit, not to the server. Everything else goes to the server's Discord webhook when one is set, and to your scripts in any case.

A player can send one report every 30 seconds.

Setting it up

Two keys in server.cfg:

set sv_reportreasons "Rule break,Harassment,Griefing,Other"
set sv_reportwebhook "https://discord.com/api/webhooks/..."

sv_reportreasons is a comma separated list, up to 16 entries of up to 60 characters. Without it the list is Rule break, Harassment, Griefing, Other. sv_reportwebhook is a Discord webhook URL. It is hidden from modkit.config.get. Without it reports reach only your scripts.

Cheating reports need the data\server.key file that the runner writes. A server started without the runner cannot send them.

modkit.reports.setReasons

modkit.reports.setReasons(reasons)

Parameter Type Description
reasons array of strings the reasons in the order they appear. At least one, up to 16, each up to 60 characters. Longer or empty entries are dropped.

Replaces the list from server.cfg. Players who already have the window open keep the old list until they open it again.

modkit.reports.setReasons({ "Mixpacking", "Combat logging", "Toxic chat", "Other" })

modkit.reports.reasons

modkit.reports.reasons()

Returns: array of the current reasons, without the cheating entry.

Event playerReported

playerReported(reporter, target, reason, text)

Argument Type Description
reporter player who sent the report
target player who was reported. The player was online when the report came in.
reason string one of the reasons, or "Cheating"
text string what the player wrote, may be empty, up to 1000 characters

Fires before the report is forwarded. return true marks the report as handled: nothing goes to Discord or to Isle Modkit, the player still gets a thank you. Use that when you want the reports in your own system.

modkit.events.add("playerReported", function(reporter, target, reason, text)
  modkit.storage.set("report:" .. os.time(), {
    by = reporter.steamId, against = target.steamId, reason = reason, text = text,
  })
  for _, p in ipairs(modkit.players.list()) do
    if p.admin then p:message(reporter.name .. " reported " .. target.name .. ": " .. reason) end
  end
end)

What Discord gets

An embed with the reported player and their Steam ID, the reporter, the reason and the text. The embed uses the server name from sv_hostname as its author.