XCOM 2
[WotC] Twitch Integration
 此主题已被置顶,因此可能具有重要性
Delicious  [开发者] 5 月 2 日 上午 11:46
Console Commands
Twitch Integration adds the following console commands:

  • TwitchListRaffledViewers - If you're raffling units, this can help you quickly see which viewers have won the raffle. Note that to see the output you need to use the full dev console (accessed with tilde, not backslash). This actually outputs all owned units and not just raffled ones.
  • TwitchRaffleUnitUnderMouse - This re-raffles the unit closest to your mouse cursor (but will not raffle XCOM soldiers). You can use this if someone with an offensive username has won the raffle.
  • TwitchReassignUnitUnderMouse <name> - Similar to the previous command, but you get to choose which viewer owns the unit. Remember that any viewer can only own one object at a time.
  • TwitchStartPoll <PollGroup> - Starts a viewer poll. You can specify the poll group (see `XComTwitchPolls.ini` for options) but the actual options will be chosen randomly, per the normal poll logic.
  • TwitchEndPoll [ApplyResults=true] - Ends the current poll immediately without waiting for its timer. If ApplyResults is true, the currently winning option will take effect. Otherwise the poll's results are thrown away and not displayed.
  • TwitchRigRaffle <name> - Rigs the next unit raffle so that the provided user wins, if eligible. If used multiple times, subsequent raffles will be rigged in order. Rigged raffles will not persist if a save game is loaded or if a tactical/strategy transition occurs.
  • TwitchClearRiggedRaffles - Clears out the list of rigged raffles from the previous command.

These commands are mainly for testing/debugging:
  • TwitchChatCommand <ViewerName> <Command> [commandBody] - Executes a chat command as though it had come from the given viewer. For technical reasons, emotes will not function properly for commands invoked this way.
  • TwitchUnassignViewer <name> - Removes any unit ownership for the given viewer. May be needed if something breaks in the mod.
  • TwitchExecuteAction <ActionName> - Executes the action with the given name. Mainly used for testing.
  • TwitchRedeemChannelPointRewardById <RewardId> <ViewerName> - Simulates a channel point reward redemption based on the reward's ID. Mainly used for testing.
  • TwitchRedeemChannelPointRewardByTitle <RewardTitle> <ViewerName> - Simulates a channel point reward redemption based on the reward's title. Mainly used for testing.