Skip to content

Commit

Permalink
More docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
iChun committed May 28, 2021
1 parent 2ffe34c commit 3853da2
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 32 deletions.
34 changes: 34 additions & 0 deletions docs/gettingstarted/ccionservers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
CCI on Servers
==============

### Why is CCI needed on a Server?

CCI was written to work mostly on the Client, but some things require a Server back-end to work. This is where CCI needs to be installed on a server.

Where this plays the most significance is when the Client is using a `CommandOutcome` and has a command that is too long. Generally, In-Game Chat can only send messages up to 256 characters. The limit for a command in `CommandOutcome` is closer to 32,000 characters, similar to Command Blocks. To work around this, the Server Backend is needed, and the user needs to be whitelisted.

<br/>

### The CCI Command

The CCI Command (`/cci`) is fairly simple, as I did not want to give users too much control over editing the Server Mod Config and would rather the Server Owner edit the Mod Config file manually. Just three simple commands.

| Command | Argument |
| ------------ | ------------------------------------------------ |
| whitelist | Whitelists a player |
| dewhitelist | Removes a player from the whitelist |
| setBlacklist | Sets the whitelist as a blacklist and vice versa |

<br/>

### The Server Mod Config File

To start off, here's the breakdown of the Server Mod Config file. This is also generated on the Client but is only used when a Client opens up their Integrated Server to LAN.

| Name | Type | In-Mod Description | Additional Info |
| ---------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| whitelistedUsers | List | Whitelisted Users. These users will be able to trigger serverside outcomes. | |
| enableBlacklist | Boolean | Converts the list of whitelisted users to be the list of blacklisted users. | There is no separate whitelist and blacklist. Either you allow all and block a few, or allow a few and block the rest. |
| commandPermissionLevel | Integer | Permission level required to use the server commands for CCI | Similar to the `op-permission-level` in [server.properties](https://minecraft.fandom.com/wiki/Server.properties), but for the CCI command. |
| disallowedCommands | List | Disallowed Commands. These commands are prevented from being executed by CommandOutcome. EG: To disable "/time set day", add the "time" command to the list. Does not cover for aliases (EG: /tp and /teleport) | |
| logTypes | List | Types of log types to write to disk. Putting socket_event in is the only way to see the raw event information (from the log file) as it is not printed to console. Everything else will still be print to console. Client config overrides this on Clients! | Available log types: cci, debug, event, socket_status, socket_event |
44 changes: 44 additions & 0 deletions docs/gettingstarted/clientconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
The Client Mod Config File
==========================

This page details the Mod Config file for Clients. If you are looking for information on the Server Mod Config, go [here](../ccionservers/).

The Mod Config file is broken down to three categories: `general`, `boxesAndStuff`, `socket`

They are as follows:

**General**

| Name | Type | In-Mod Description | Additional Info |
| -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| allowOutcomesRequiringServerWait | Boolean | Allow outcomes that require a server to wait until the user connects to a server that allows them to send outcomes? Outcomes are normally discarded otherwise. | |
| defaultProfile | String | Default profile name. Defaults to "default". If set, will read from that folder within the main CCI directory instead. Change in-game with the editor. | Changing your profile in the editor also saves your latest profile to the config file. |
| enableInformationToasts | Boolean | The sockets we use can be unreliable at times. Turn this on to get toasts about their status and other events. | |
| firstRun | Boolean | Keeping this on/true makes CCI trigger the first run wizard settings. Turned off by CCI later. | If you set this to true manually in the config file, CCI will reenable the First Launch prompts on next start up. |
| logTypes | List | Types of log types to write to disk. Putting socket_event in is the only way to see the raw event information (from the log file) as it is not printed to console. Everything else will still be print to console. | Available log types: cci, debug, event, socket_status, socket_event |
| maxAutomaticReconnects | Integer | Maximum amount of automatic reconnects before trying giving up. | |
| maxEventCache | Integer | Maximum size of the event cache. Caching prevents retriggers of events and allows you to play back events in the CCI gui, but takes more memory. | |
| onlineConfigs | List | URLs to pull online configs from. These should link to a raw file of the configuration. These configs will override local configs. | |
| overrideToastGui | Boolean | The Minecraft Toast Renderer has a bug where toasts with different heights might overlap. This override fixes it if the renderer is still the default renderer. | If you have any issues with Toasts, turning this off may help. |
| stats | Boolean | Enable local statistics collection? This information is for your own personal reference. None of it is be sent externally. | Access your stats in the Help window of the Editor |
| streamerName | String | Set this if your streamer name is different from your Minecraft name for the $streamer global variable. | [Variables](./events/#variables) reference |

<br/>

**Boxes & Stuff**

| Name | Type | In-Mod Description | Additional Info |
| ------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| editorGuiScale | Integer | Adjust the scale of the Event Configuration editor. Setting it to 0 makes it follow Minecraft's GUI scale. Set to -1 to do nothing. | If you are having weird GUI scaling issues, set this to -1 |
| guiDockBorder | Integer | Number of pixels before Boxes & Stuff thinks you're trying to dock a window | Not actually used in CCI |
| guiDockPadding | Integer | How much padding to add to the docked windows | Not actually used in CCI |
| guiDoubleClickSpeed | Integer | Speed, in ticks, to register a double click | 20 ticks = 1 second |
| guiListExpand | Integer | When you select a config in the editor it automatically expands all items with AT MOST this many items. | |
| guiMinecraftStyle | Integer | Renders Boxes & Stuff's GUIs in a Minecraft Style instead. 1 = Vanilla Style, 2 = Texture Pack Style | B&S feature. Change this only if you really want to, cause it only works well for GUIs designed to immitate Minecraft GUIs |
| guiTooltipCooldown | Integer | Number of ticks before showing a tooltip | 20 ticks = 1 second |

<br/>

**Socket**

Socket configs are created by the Socket Provider. Usually it's just one List (per socket) to store your keys. YouTube Chat support has an extra config for the Google API Key.
4 changes: 2 additions & 2 deletions docs/gettingstarted/eventconfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Let's take a look at an Event Configuration as it appears in the Editor. In this
<br />
<br />

| Reminder |
|--------|
| Reminder |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The left window, the navigator, is only for navigation. You cannot manipulate any of its Objects. That has to be done on the right side, the contents window. |

Similar to our screenshot of the Editor from earlier, now, the Event Configuration has been selected on the left side, by the top. The Contents window on the right now shows the fields of this Object.
Expand Down
28 changes: 14 additions & 14 deletions docs/gettingstarted/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ Our example here will already have an example event (A chat message), so yours w
The Events Viewer:
![](./images/events/eventviewer.png){: class="img_center"}

| No. | Name | Description | Additional Info |
|-----|-----------------------------|--------------------------------------------------------------|----------------------------------------------------------------------------|
| 1 | Event Index | The cached event index | |
| 2 | Hide Variable Values Toggle | Toggles whether to hide the variable values or not | Hold Shift when opening the Event Viewer to enable this by default |
| 3 | List of sockets | The list of sockets you have available | Clicking between these will change which events you're looking at, for your selected socket |
| 4 | Global Variables | This lets you look at the Global Variables available | |
| 5 | Notes | This lets you look at the Notes that have been loaded | |
| 6 | Variables List | List of variables associated with this event | Left side are variable names. Right are their values. Ctrl+C copies the name, Ctrl+Shift+C copies the value, to your clipboard |
| 7 | Left Event Index | Shifts the index to see a more recent event | <-- |
| 8 | Replay Event Button | Replays the event so CCI will act on it again | |
| 9 | Right Event Index | Shifts the index to see an older event | --> |
| 10 | Dump Events | Dumps all cached events' variables into a dump.json file | Use this for debugging purposes. If you're testing, consider using a `LogArgsCondition` |
| 11 | Clear Queues Button | Clears all the events in the queue, if you have one set up | |
| 12 | OK | OK | OK |
| No. | Name | Description | Additional Info |
| --- | --------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| 1 | Event Index | The cached event index | |
| 2 | Hide Variable Values Toggle | Toggles whether to hide the variable values or not | Hold Shift when opening the Event Viewer to enable this by default |
| 3 | List of sockets | The list of sockets you have available | Clicking between these will change which events you're looking at, for your selected socket |
| 4 | Global Variables | This lets you look at the Global Variables available | |
| 5 | Notes | This lets you look at the Notes that have been loaded | |
| 6 | Variables List | List of variables associated with this event | Left side are variable names. Right are their values. Ctrl+C copies the name, Ctrl+Shift+C copies the value, to your clipboard |
| 7 | Left Event Index | Shifts the index to see a more recent event | <-- |
| 8 | Replay Event Button | Replays the event so CCI will act on it again | |
| 9 | Right Event Index | Shifts the index to see an older event | --> |
| 10 | Dump Events | Dumps all cached events' variables into a dump.json file | Use this for debugging purposes. If you're testing, consider using a `LogArgsCondition` |
| 11 | Clear Queues Button | Clears all the events in the queue, if you have one set up | |
| 12 | OK | OK | OK |

This event viewer will be helpful in building a custom Event. In the variables list (that's #6), you can see the list of variables and their values **after** the event had already been processed, meaning there may have been variable manipulation, including changes, deletion, or addition. Be mindful of this.

Expand Down

0 comments on commit 3853da2

Please sign in to comment.