-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
baf83d6
commit 03fa095
Showing
19 changed files
with
206 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Choose Your Own Adventure Player | ||
A plugin to adapt Choose Your Own Adventure Games to the Stash VideoJS player. | ||
|
||
## Setup | ||
|
||
The plugin provides various settings, but only the `Game tag`, `Resource path`, and `Scene directory path` settings are required for it to work. | ||
|
||
### Game tag (Required) | ||
This is the name of the tag created to indicate that the selected game clip is the starting video for the game. (I would recommend setting your default filters up to hide other related videos that are not the starting video) | ||
|
||
### Resource path (Required) | ||
This is the path where the non-video game resources would live. For example, the path to the `Sample` directory would be the `Resource path`, which contains one game with the id `1234`. Each game within this directory is expected to have a choices directory with all the necessary JSON files as well as an `images` directory with all the relevant images for the game. You can configure assets directly in this plugin if you want. I would just recommend against it to prevent your game files from being deleted if you ever uninstalled this plugin from the Stash plugin page. I would recommend setting up a custom-served folder for your Stash; see: [Custom served folders](https://docs.stashapp.cc/in-app-manual/configuration/#custom-served-folders). | ||
|
||
### Scene directory path (Required) | ||
This is the path within your Stash library directories where your game scenes are stored. For example, the path to the `Sample` directory would be the `Scene directory path`, which contains one game with the id `1234`. In your case, the videos do not have to live under a videos directory within the `1234` directory. |
34 changes: 34 additions & 0 deletions
34
plugins/chooseYourAdventurePlayer/Sample/1234/choices/0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"id": "0", | ||
"type": null, | ||
"title": "Game Start", | ||
"map": { | ||
"title": "Demo", | ||
"description": "Your are viewing a demo of the Choose Your Adventure Player" | ||
}, | ||
"mapItem": [ | ||
{ | ||
"choice_id": "TBD", | ||
"title": "TBD", | ||
"picture": "TBD.png" | ||
} | ||
], | ||
"skipto": "2", | ||
"choices": [ | ||
{ | ||
"description": "Good Choice", | ||
"id": "1a", | ||
"type": "", | ||
"photo": "TBD" | ||
}, | ||
{ | ||
"description": "Bad Choice", | ||
"id": "1b", | ||
"type": "", | ||
"photo": "TBD" | ||
} | ||
], | ||
"resource": { | ||
"resolved_content": "Scene0.mp4" | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
plugins/chooseYourAdventurePlayer/Sample/1234/choices/1a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"id": "1a", | ||
"type": null, | ||
"title": "Good Choice", | ||
"skipto": "2", | ||
"choices": [ | ||
{ | ||
"description": null, | ||
"id": "2", | ||
"type": null, | ||
"photo": "TBD" | ||
} | ||
], | ||
"resource": { | ||
"resolved_content": "Scene1a.mp4" | ||
}, | ||
} |
10 changes: 10 additions & 0 deletions
10
plugins/chooseYourAdventurePlayer/Sample/1234/choices/1b-e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"id": "1b-e", | ||
"type": "exit", | ||
"title": "Bad Choice", | ||
"skipto": null, | ||
"choices": null, | ||
"resource": { | ||
"resolved_content": null | ||
}, | ||
} |
17 changes: 17 additions & 0 deletions
17
plugins/chooseYourAdventurePlayer/Sample/1234/choices/1b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"id": "1b", | ||
"type": null, | ||
"title": "Bad Choice", | ||
"skipto": null, | ||
"choices": [ | ||
{ | ||
"description": null, | ||
"id": "1b-e", | ||
"type": "exit", | ||
"photo": "TBD" | ||
} | ||
], | ||
"resource": { | ||
"resolved_content": "Scene1b.mp4" | ||
}, | ||
} |
10 changes: 10 additions & 0 deletions
10
plugins/chooseYourAdventurePlayer/Sample/1234/choices/2-e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"id": "2-e", | ||
"type": "end", | ||
"title": "", | ||
"skipto": null, | ||
"choices": null, | ||
"resource": { | ||
"resolved_content": null | ||
}, | ||
} |
72 changes: 72 additions & 0 deletions
72
plugins/chooseYourAdventurePlayer/Sample/1234/choices/2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"id": "2", | ||
"type": null, | ||
"title": "Action choice", | ||
"fragments": [ | ||
{ | ||
"id": "frag-a", | ||
"photo": { | ||
"id": "frag-a_photo", | ||
"content": "frag-a.jpg", | ||
}, | ||
"video": { | ||
"id": "frag-a_video", | ||
"resolved_content": "Scene2A.mp4" | ||
}, | ||
"actions": [ | ||
{ | ||
"id": "frag-a-action-a", | ||
"photo": { | ||
"id": "frag-a-action-a_photo", | ||
"content": "frag-a-action-a.jpg" | ||
}, | ||
"video": { | ||
"id": "frag-a-action-a_video", | ||
"resolved_content": "Scene2A-1.mp4" | ||
}, | ||
"title": "TBD", | ||
}, | ||
{ | ||
"id": "frag-a-action-b", | ||
"photo": { | ||
"id": "frag-a-action-b_photo", | ||
"content": "frag-a-action-b.jpg" | ||
}, | ||
"video": { | ||
"id": "frag-a-action-b_video", | ||
"resolved_content": "Scene2A-1.mp4" | ||
}, | ||
"title": "TBD", | ||
} | ||
], | ||
"title": "TBD", | ||
}, | ||
{ | ||
"id": "frag-b", | ||
"photo": { | ||
"id": "frag-b_photo", | ||
"content": "frag-b.jpg" | ||
}, | ||
"video": { | ||
"id": "frag-b_video", | ||
"resolved_content": "Scene2B.mp4" | ||
}, | ||
"actions": null, | ||
"title": "TBA", | ||
"subtitles": "Scene3-08" | ||
} | ||
], | ||
"skipto": null, | ||
"choices": [ | ||
{ | ||
"description": null, | ||
"id": "2-e", | ||
"type": "end", | ||
"photo": "TBD" | ||
} | ||
], | ||
"resource": { | ||
"id": "empty", | ||
"resolved_content": null | ||
}, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions
30
plugins/chooseYourAdventurePlayer/chooseYourAdventurePlayer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Choose Your Own Adventure Player | ||
description: Plugin to adapt Choose Your Own Adventure Games to the VideoJS player. | ||
version: 1.0 | ||
# requires: CommunityScriptsUILibrary | ||
ui: | ||
requires: | ||
- CommunityScriptsUILibrary | ||
assets: | ||
/: assets | ||
settings: | ||
gameTag: | ||
displayName: Game tag | ||
description: Name of the tag indicating a scene is the starting point of game. Player will initialize once scene with this tag is loaded. Only use this tag on the starting scene. | ||
type: STRING | ||
enableGameSave: | ||
displayName: Enable game save | ||
description: When enabled you will be giving the opportunity to resume your games from where you last left off which all your choices in tack. | ||
type: BOOLEAN | ||
resourcePath: | ||
displayName: Resource path | ||
description: Location where game resources live (images, jsons). It is recommended to create custom served folder for this. | ||
type: STRING | ||
rootScenesPath: | ||
displayName: Root scenes directory path | ||
description: Data path where game scenes live. | ||
type: STRING | ||
useCustomPosters: | ||
displayName: Use custom game posters | ||
description: When enabled the t=start game screen will use provided poster instead of default scene cover. Poster should be named with the following comvention {resourcePath}/{gameId}/poster_{number}.jpg | ||
type: BOOLEAN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters