IRnifty

[KSP 1.2.X] Draft Twitch Viewers v2.4.6 - Draft, tour with, or rescue your twitch viewers as in-game Kerbals!

Recommended Posts

FtqXphU.png

Draft Twitch Viewers

v2.4.6: Release

This software is provided "as-is" with no warranties.

Presented under the GPL v3 license.

Creation and/or publication of media (images, videos, etc.) while using this software is authorized.

Created by: Nifty255

Copyright 2015 All rights reserved.

This mod is in RELEASE. However, bugs can still happen. If you have a bug, or a suggestion, please leave it in a mature manner.

 

DOWNLOAD: SpaceDock OR GitHub

SOURCE: GitHub

Get DTV on CKAN!

 

 

FEATURES:

Draft Twitch Viewers (DTV) uses web requests to connect to Twitch, and can pick a random user from any channel, and create a Kerbal in-game with that viewer's name.

 

 

- Easy to use interface.

- Draft from any channel, specified in the GUI. Or launch a viewer drawing without adding the winner to the game!

- While getting the channel viewer list, DTV can remove bots (specified by the player/streamer) and viewers with distasteful names.

- Upon attempted draft, an alert is displayed in-game indicating success or failure.

- Customize the draft success message and the drawing success message.

- Fully compatible with both Crew Manifest and Ship Manifest.

- Players can add the viewer directly to the current vessel.

- Rescue your viewers or take them on tours with DTV modified Career Mode Contracts!

 

CHANGELOG:

 

v2.4.6:

- KSP 1.2.1 compatibility update.

- Added a now required client ID to all Twitch web API requests.

 

v2.4.5:

- Fixed bug with job setting.

 

v2.4.4:

- DTV now ensures the player can afford a draft in career mode.

 

v2.4.3:

- Corrected career draft cost.

 

v2.4.2:

- Fixed bug which caused the draft app to blank out on the flight scene.

- Fixed bug which caused scene switching issues after entering one save, leaving, and then entering another.

 

v2.4.1:

- Modified DraftKerbal method to invoke success using a generic Dictionary instead of a specialized DraftInfo object.

- ScenarioDraftManager now destroys itself when returning to the main menu (and reloads when entering another save) to prevent potential load/save issues.

 

v2.4:

- Drafts are now saved directly to each save's persistent file, allowing reverts to free drafted names.

- An upgrade system was left in place which will migrate pre-existing drafts over to the new system.

- Fixed drafting for specific jobs still yeilding Kerbals with random jobs.

- Changed the Quick Draft hotkey to Alt+Insert.

 

v2.3.2:

- Made the Quick Draft hotkey togglable.

- All settings except for the "Bots to Remove" list now autosave when changed.

 

v2.3.1:

- Incremented version info.

 

v2.3:

- KSP 1.1 PRE-RELEASE Kompatibility Update. BUGS ARE EXPECTED.

- Fixed a UI bug which mishandled window positioning on >1080p resolutions.

- Due to inkompatibilities, right clicking the app icon no longer drafts.

- Alt+D is the new drafting shortcut.

 

v2.2:

- All compatible contracts can now be retroactively modified to include drafted viewers.

- Careeer Mode Tourism Contracts are now modified by DTV to replace stock Kerbals with drafted viewers.

- When a tourism contract is offered, DTV silently drafts and replaces the old Kerbals with the new.

- The DTV contract system will deactivate after 5 consecutive failures and notify the player.

- The DTV contract system will skip a contract if there is no channel name and notify the player.

- NOTE: DTV can have up to 4 times the usual delay because tourism contracts can have up to 4 tourists.

- NOTE: Unknown results can occur if a contract is accepted before it can be modified. A fix is in the works.

- NOTE: To alleviate the above issue, modified contracts show a pre-completed "Modified By DTV" objective.

 

v2.1.3:

- Fixed the Draft Manager App not saving at all.

 

v2.1.2:

- Fixed improper saving of the "Add Kerbal to Craft" setting.

 

v2.1.1:

- DTV's Draft App now toggles visibility with the game UI.

 

v2.1:

- Careeer Mode Rescue Contracts are now modified by DTV to replace stock Kerbals with drafted viewers.

- When a rescue contract is offered, DTV silently drafts and replaces the old Kerbal with the new.

- The DTV contract system will deactivate after 5 consecutive failures and notify the player.

- The DTV contract system will skip a contract if there is no channel name and notify the player.

- NOTE: Unknown results can occur if a contract is accepted before it can be modified. A fix is in the works.

- NOTE: To alleviate the above issue, modified contracts show a pre-completed "Modified By DTV" objective.

 

v2.0.1:

- Downgraded target framework from .NET 4.5 to 3.5 to fix mod integration issues.

- Added parameter which can suppress drafts being saved.

- Suppressed saves allow for situations in which it is unclear whether or not the drafted viewer will be used.

- If an unsaved Kerbal will be used, the draft caller can save the name manually through "SaveSuppressedDraft".

 

v2.0:

- Large code refactor to allow for third-party mod integration.

- Settings reworked for consolidation and added stability.

- Added error handling to the web side of the draft system.

- Removed unnecessary "using"s to clean up code.

- Performing any draft or drawing saves the current settings.

- Made the alert window slightly larger.

 

v1.1.4:

- Added ability to add drafted Kerbals directly into the craft.

- The option to add directly into crafts is togglable in the Customize menu.

- Kerbals can be added into any part with available seating, simply by clicking it.
 

v1.1.3:

- Fixed bug which prevented the DTV App from appearing in the flight scene.

 

v1.1.2:

- Added version label to the bottom of the App window.

 

v1.1.1.1:

- Fixed "Kerman" toggle and custom messages not loading from file.

 

v1.1.1:

- Added toggle for adding "Kerman" to the end of Kerbal names.

 

v1.1:

- Added "Do a Viewer Drawing" which picks a random viewer independent of the draft.

- Viewers pulled for a drawing are stored in its own list to prevent repeat pulls.

- Added "Empty Drawn User List" button which resets the list and allows repeat pulls.

- Added ability to draft viewers of specific jobs.

- Users can still draft viewers, accepting any job.

- NOTE: Drafting for specific jobs may take longer and may fail on low-viewer channels.

- NOTE: The default action for right clicking is to draft with any job.

- Added fund requirement for users in career mode just like normal hiring.

- NOTE: KSP 1.0.2 displays a false hire cost in the Astronaut Complex. DTV shows the correct amount.

 

v1.0.5:

- Users already drafted are now removed before randomly drafting, skipping them completely.

- The list of users already drafted is stored in individual files for each game save.

 

v1.0.4.1:

- Fixed icon duplication bug.

 

v1.0.4:

- KSP 1.0 "Kompatibility" update ;3

 

v1.0.3:

- Fixed weird audio panning effects.

- Set draft audio to the game UI level.

 

v1.0.2:

- Removed twitch login requirement.

- Mod no longer posts to twitch chat.

- Mod now requests a user list, parses the list, and then drafts as usual.

- Mod now plays sounds on draft button click, draft success, and failure.

- Added username filtering which removes vulgar usernames form the draft.

- Right clicking the app launcher button will automatically draft a Kerbal.

- The draft alert now shows the drafted user's skill type.

 

v1.0.1:

- Fixed App window bug on resolutions other than 1080p.

- Fixed Draft alert window always showing "Draft Failed".

 

v1.0:

- INITIAL RELEASE

Edited by IRnifty

Share this post


Link to post
Share on other sites

It may take some time. I don't know how long it takes Kerbal Stuff to update CKAN.

Share this post


Link to post
Share on other sites

Hey guys :) unfortunately KS -> ckan is not automatic, someone from the team needs to review and accept the metadata first. We are doing our best to keep up but lately we are all really tangled with real life... :(

Share this post


Link to post
Share on other sites

Updated!

v1.0.1:

- Fixed App window bug on resolutions other than 1080p.

- Fixed Draft alert window always showing "Draft Failed".

Share this post


Link to post
Share on other sites

Hello,

I was lookin thru my AI Bot research and this popped up...cute ! I plan on streaming it for testing today !

Edit: Where the instructions ?! I created a Twitch Bot; grabbed it's API and transferred it to the screen in KSP; username is my Twitch Bot (?) and added my stream channel; your program which sounds like its a bot as it is connecting to a channel on twitch (like nightbot), is not connecting; so I am just wondering if your program is a twitch bot and we need to ues IT's Channel name for the Username?

Cmdr Zeta

Edited by Cdr_Zeta

Share this post


Link to post
Share on other sites

My mod is not a bot in and of itself. It requires your own bot to log into a channel. You will need the bot's username, exactly as you spelled it, the API key (you can click a button inside the mod to get that), and a channel to join (which MUST be lowercase). Click connect, and you should be good!

Share this post


Link to post
Share on other sites

Updated! v1.0.2:

- Removed twitch login requirement.

- Mod no longer posts to twitch chat.

- Mod now requests a user list, parses the list, and then drafts as usual.

- Mod now plays sounds on draft button click, draft success, and failure.

- Added username filtering which removes vulgar usernames form the draft.

- Right clicking the app launcher button will automatically draft a Kerbal.

- The draft alert now shows the drafted user's skill type.

Share this post


Link to post
Share on other sites
Updated! v1.0.2:

- Removed twitch login requirement.

- Mod no longer posts to twitch chat.

- Mod now requests a user list, parses the list, and then drafts as usual.

- Mod now plays sounds on draft button click, draft success, and failure.

- Added username filtering which removes vulgar usernames form the draft.

- Right clicking the app launcher button will automatically draft a Kerbal.

- The draft alert now shows the drafted user's skill type.

I think the bold one make's the mod instructions "idiot proof" <-- (mostly)

Share this post


Link to post
Share on other sites

Hi,

I got it to work last night...tho I could not see where the drafted viewer went; they didnt show up anywhere not even in an empty seat ! I may be missing something again.

I downloaded Crew Manifest to see if that was required to do anything with the draftees or if they show up in there 'only'; are the draftees persistent or only one time? IE if you use them and revert are they still located somewhere?

On the API call I still had to manually write in the API; I take it this was necessary as I could not copy or paste nor could I add the API in the box after the call.

Kool Mod Thank You !!

Cdr Zeta

Share this post


Link to post
Share on other sites

Try the newest version. No need for bots or API keys! As for the Kerbal, drafting them puts them in your crew, but if you revert to before you drafted them, they do disappear.

Share this post


Link to post
Share on other sites

Updated! v1.0.3:

- Fixed weird audio panning effects.

- Set draft audio to the game UI level.

Share this post


Link to post
Share on other sites

Awesome concept. Will be using this for sure when I start streaming KSP at some point this month.

Share this post


Link to post
Share on other sites

I was trying to use this on linux when I try to draft a twitch viewer I get the following error message:

[EXC 22:27:18.421] ArgumentOutOfRangeException: Argument is out of range.

Parameter name: startIndex

System.String.Substring (Int32 startIndex)

DraftTwitchViewers.DraftManagerApp.ParseIntoNameArray (System.String toParse, System.String parsingFrom)

DraftTwitchViewers.DraftManagerApp+<DraftIntoKrew>d__1.MoveNext ()

If you need anything else I'll be happy to provide anything you need.

Share this post


Link to post
Share on other sites

Updated!

v1.0.4:

- KSP 1.0 "Kompatibility" update ;3

EDIT: Updated again!

v1.0.4.1:

- Fixed icon duplication bug.

Edited by IRnifty

Share this post


Link to post
Share on other sites

used this tonight while streaming, killed 2 viewers. 11/10 would use again

Share this post


Link to post
Share on other sites

Nifty! I have a feature request and a question, sir!

Could you make an option box so that it would select from subscribers only?

In career mode, do drafting viewers cost Kerbucks to hire? If not, could you make it so it scales like hiring them out of the astronaut complex?

Share this post


Link to post
Share on other sites

scerion, I unfortunately don't know how to determine the subscriber status of a viewer, and I'm actually working on changing the behavior of the mod in Career such that, instead of drafting directly into your Krew, it will fill the applicants roster with viewers every time you go into it. If you have any design advice on how you'd like that to work, let me know!

- - - Updated - - -

Updated! v1.0.5:

- Users already drafted are now removed before randomly drafting, skipping them completely.

- The list of users already drafted is stored in individual files for each game save.

Share this post


Link to post
Share on other sites

Hmm would this help for the sub issue?

https://github.com/justintv/Twitch-API/blob/master/v3_resources/subscriptions.md

Also not sure how thetwitch api shows it, but when viewing users via chatty it has an icon in front of their name. If that shows up in the twitch api like that, then should be kinda easy to determine? just search and limit to that symbol.

Ohhh so in career it wouldn't include any random named ones just ones from your channel? What if you don't have enough folks in your channel? still would pull random named kerbals?

Share this post


Link to post
Share on other sites

Updated! v1.1:

- Added "Do a Viewer Drawing" which picks a random viewer independent of the draft.

- Viewers pulled for a drawing are stored in its own list to prevent repeat pulls.

- Added "Empty Drawn User List" button which resets the list and allows repeat pulls.

- Added ability to draft viewers of specific jobs.

- Users can still draft viewers, accepting any job.

- NOTE: Drafting for specific jobs may take longer and may fail on low-viewer channels.

- NOTE: The default action for right clicking is to draft with any job.

- Added fund requirement for users in career mode just like normal hiring.

- NOTE: KSP 1.0.2 displays a false hire cost in the Astronaut Complex. DTV shows the correct amount.

Share this post


Link to post
Share on other sites

Updated! v1.1.1:

- Added toggle for adding "Kerman" to the end of Kerbal names.

(I forgot to add this in 1.1, sorry!)

Share this post


Link to post
Share on other sites

Updated!

v1.1.2:

- Added version label to the bottom of the App window.

v1.1.1.1:

- Fixed "Kerman" toggle and custom messages not loading from file.

Share this post


Link to post
Share on other sites

Updated!

v1.1.3:

- Fixed bug which prevented the DTV App from appearing in the flight scene.

Share this post


Link to post
Share on other sites

Finaly a version for 1.0.4:D was waiting for it

Edited by CosmoBro

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now