# TISP
The Isle Server Plus is a mod for The Isle dedicated servers to provide Discord integration and additional functionality.
It is in early testing and may stop working or even crash. This repository is for the open source injector/updator. The compiled DLL is currently not open source.

You can see it in action here: https://discord.gg/RWyFx4h


### Features:
- Forward messages from The Isle to your Discord server.
![From game to Discord](https://github.com/Pathos0925/TISP/blob/master/screenshots/1ZGrIXVkDw.gif)
- Forward messages your Discord server to The Isle.
![From Discord to Game](https://github.com/Pathos0925/TISP/blob/master/screenshots/3BDilCFHkH.gif)
- Attack log.                                     

![Attack log](https://raw.githubusercontent.com/Pathos0925/TISP/master/screenshots/Discord_xppT04vNQ7.png)
- Command log. Both official commands and TISP command usage.
![Command Log](https://github.com/Pathos0925/TISP/blob/master/screenshots/Discord_WkjlVVevqu.png)

- Forward console log to Discord Channel
- View Player list and information. (Updated every 10 seconds)
![Player information list](https://github.com/Pathos0925/TISP/blob/master/screenshots/Discord_D6mkUWPP0I.png)
- Map of player locations (Still testing)
- Safezones. Place locations that players are immune to damage. Check the commands page for how to setup.
- Moderate via commands (e.g. Kick, Ban. Check command channel for complete list.) (UNDER CONSTRUCTION)
- Optional player commands (see below for list)

### How to use (if using the included injector):
- Download the latest release zip from the release tab under v1.0.0.6 and extract it. You can find it here: https://github.com/Pathos0925/TISP/releases/download/v1.0.0.6/Release.zip
- When launched, the injector will update the dll if it is outdated or missing.
- You can launch the injector before or after starting your server. If you launch it after starting your server, you may need to wait about 10 seconds or so before injecting, as injecting too early may sometimes cause issues. The injector does this automatically when launched before the server/
- If you have not configured your Discord server yet, follow the instructions below.

## How to configure:

- If you have not launched the injector yet, do so. You should see a new text file that contains a GUID. Copy that to the clipboard.
- Add the TIServerPlus bot to your discord server by visiting the following link: https://discordapp.com/oauth2/authorize?client_id=511324164184080385&scope=bot&permissions=0
- Create a role for the bot with the permission to Manage Webhooks.
- After the bot joins your sever, send it the following message: !register [id] [server name], replacing [id] with the id you copied earlier, and replace [server name] with a name you can remember, such as the name of your discord or server. (e.g. !register 1234ABC567 server1)
- You should get the response "Successfully registered server ..."

### Create up to 4 channels, each optional, with the following names and uses:
- Chat. This channel is where you will chat between Discord and game server. Certain information such as attacks and deaths will also show up here. 
- World. The list of players and possibly a map will be forwarded here. It is reccomended to disable all chat in this channel so the player list is always at last message and is easy to find. You will probably want to limit access to this channel as information such as location and health will be displayed
- Log. All messages sent to the game servers console will also be forwarded here. I reccomend giving no one, or only trusted individuals access to this channel as infomation about your server could be shown.
- Command. Any person with access to this channel can use the list of commands on any player. Give only your moderators access to this channel as commands such as ban and kick are options here. If you enable any optional in-game commands, the result of those will also show up here.

### After creating the channel, inside the channel send the following command: !set_channel [channel type] [server name]. (e.g. !set_channel chat server1)
- Repeat for each channel you would like to have.

- Thats it! Start the injector and start yor server. You will need to run the injector each time you start your server. 

### If using your own injector
- Call https://7d1odhf1jh.execute-api.us-east-1.amazonaws.com/prod/v1/checkver?newId=true To get an ID.
- Check this github periodically for any updates.
- Make sure you wait long enough before injecting.

### Also
- Currently, TISP will work with up to 20 players in your server. If more than that join, TISP will pause working until there are less than that, then contiue. If you would like to use TISP with more players, please contact me.


### Issues
- If after injecting your server never shows up in the list of servers, you may need to wait longer before injecting. Ideally, wait until your console reads "Match State Changed from WaitingToStart to InProgress"
- Server crashes: Could be a number of things. Some player commands may crash the server. Also it may not work with beta versions of the isle.


### Global Commands
- !set_greeting [greeting]. Will display a custom greeting in-chat once the player joins.
- !allow_command [command name] [true | false] Lets players use these commands in game on themslves (e.g.: /spectate)
- !add_admin [steamid]
- !remove_admin [steamid]
- !list_admins

### **Swapping to or spawning an unreleased species or actor has been disabled and is also explicitly forbidden. Any server caught somehow bypassing this will be banned!**

### Player Commands (Will affect the player in some way)
View the full list of commands here:
https://github.com/Pathos0925/TISP-Injector/wiki/TISP-Commands
