Skip to content

Commit 7043164

Browse files
Update README.md
adding images, fixing typos, update old json infos
1 parent 4c6979e commit 7043164

File tree

1 file changed

+56
-14
lines changed

1 file changed

+56
-14
lines changed

README.md

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- [The FmvMaker Nodes](#nodes-fmvmaker)
99
- [The FmvMaker Event Nodes](#event-nodes-fmvmaker)
1010
- [The FmvMaker Control Nodes](#control-nodes-fmvmaker)
11-
- [Using JSON files (the complicated approach)](#complicated-approach)
11+
- [Using JSON files (the complex approach)](#complex-approach)
1212
- [How do I build a video JSON list?](#json-basics)
1313
- [What does a “VideoElement” look like?](#video-element)
1414
- [Basic structure](#basic-structure-video)
@@ -41,7 +41,7 @@ You can get **FmvMaker** either via the Unity AssetStore (https://assetstore.uni
4141

4242
Important for you are the Resources folder (within the **FmvMaker** folder) where you'll be placing your content (videos, images, etc...) as well as your configuration files. The Prefabs folder contains default prefabs, especially for prototyping. In the Scenes folder are demo scenes, to give you an overview of the comprehensive possibilities of **FmvMaker**.
4343

44-
If you want to use the demo videos provided by us (Unity doesn't like video files in their AssetStore assets), pls check out the Releases section of this repository. Each release will contain a separate .zip file with the current demo videos in it. See https://github.com/FireDragonGameStudio/FmvMaker/releases for details. For an easier start, we decided to add an online reference for all demo videos. For how to use videos from within your Assets folder, check the [FmvMaker configuration](#fmvMaker-configuration) section.
44+
If you want to use the demo videos provided by us (Unity doesn't like video files in their AssetStore assets), pls check out the Releases section of this repository. Each release will contain a separate .zip file with the current demo videos in it. See https://github.com/FireDragonGameStudio/FmvMaker/releases for details. For an easier start, we decided to add an online reference for all demo videos. For how to use videos from within your Assets folder, check the [**FmvMaker** configuration](#configuration) section.
4545

4646
<a name="simple-approach"></a>
4747
# Using the visual editor (the simple approach)
@@ -59,7 +59,7 @@ The next chapters will explain how the various nodes work and what they are doin
5959
### The FmvMaker Nodes
6060
These nodes are used to control the flow of the graph. Although not every output trigger is needed, we added them in case someone wants to add custom logic or graph elements.
6161

62-
All the event nodes can be found under the script graph context menu category **FmvMaker\**.
62+
All the event nodes can be found under the script graph context menu category **FmvMaker/**.
6363

6464
#### Fmv Video Node
6565
The main node, which handles video playback and creation of the current "state". The **Clickables** property lets the user define how many **Clickables** are within the current screen and is clamped between 0 and 10. Which video should be played is handled by the selection of dropdown, which consists of every video entered in **FmvVideoEnum**.
@@ -70,6 +70,8 @@ On the left upper corner is the **InputTrigger** for receiving the graph flow. O
7070

7171
**FmvTargetVideo** either gets the **FmvGraphElementData** from a previous flow node, or an **ItemNode** or a **NagivationNode**.
7272

73+
![image](https://user-images.githubusercontent.com/23502690/230207845-ea1360b8-6f65-496f-80b6-a92059d8b3d3.png)
74+
7375
| Field | Type | Default value | Optional | Description |
7476
| --- | --- | --- | --- | --- |
7577
| ClickablesCount | int | 2 | | The number of clickables, that are available in the current "state". |
@@ -78,6 +80,8 @@ On the left upper corner is the **InputTrigger** for receiving the graph flow. O
7880
#### Fmv LoopVideo Node
7981
In general the same node as **FmvVideoNode**, but this video is looping, which makes it perfect for idle states or "background videos".
8082

83+
![image](https://user-images.githubusercontent.com/23502690/230208081-4662d6e2-a037-4021-b889-040850b64af3.png)
84+
8185
| Field | Type | Default value | Optional | Description |
8286
| --- | --- | --- | --- | --- |
8387
| ClickablesCount | int | 2 | | The number of clickables, that are available in the current "state". |
@@ -86,6 +90,8 @@ In general the same node as **FmvVideoNode**, but this video is looping, which m
8690
#### Fmv Navigation Node
8791
Used for creating a **Clickable**, which enables a transition between "states". This **Clickable** is NOT an item and can be configured via the graph inspector. The node creates an **FmvGraphElementData**, which can be used as input for e.g. an **FmvVideoNode**.
8892

93+
![image](https://user-images.githubusercontent.com/23502690/230208230-766a685e-d351-4036-9d11-7ac37fbe52fc.png)
94+
8995
| Field | Type | Default value | Optional | Description |
9096
| --- | --- | --- | --- | --- |
9197
| Name | string | "" | | The video element needs a unique name, which is set via the *Name* field. |
@@ -97,6 +103,8 @@ Used for creating a **Clickable**, which enables a transition between "states".
97103
#### Fmv Item Node
98104
Again creating a **Clickable**, but this time it's an item, which can be added to the players inventory by clicking on it. Similar to the **FmvNavigationNade** a video is played when picking it up. But in addtion, another video is played, when used in the right "state".
99105

106+
![image](https://user-images.githubusercontent.com/23502690/230208321-aa16fc7e-8165-4a74-a02c-d2cd1a4f1cbd.png)
107+
100108
| Field | Type | Default value | Optional | Description |
101109
| --- | --- | --- | --- | --- |
102110
| Name | string | "" | | The video element needs a unique name, which is set via the *Name* field. |
@@ -109,41 +117,51 @@ Again creating a **Clickable**, but this time it's an item, which can be added t
109117
#### Fmv Exit State Node
110118
As we're talking about "states", which are not real states, this node is used to clean up after leaving "states". Originally this was part of **FmvVideoNode** and **FmvLoopVideoNode**, but in order to give users more flexibility, this was implemented as a separte node, which will just be integrated into the graph flow.
111119

120+
![image](https://user-images.githubusercontent.com/23502690/230208460-4e613fd8-b8fb-4253-b896-2a076856d550.png)
121+
112122
#### Fmv Load Inventory Node
113123
The name already explains, what this node is doing. Placed at the start of our graph, this node will load inventory items, if present.
114124

125+
![image](https://user-images.githubusercontent.com/23502690/230208549-a6101584-16c5-4961-8af0-2cdcb53b6903.png)
126+
115127
<a name="event-nodes-fmvmaker"></a>
116128
### The FmvMaker Event Nodes
117129
All events available via **FmvMaker** can be used via event nodes too. These event nodes are fired, when a connected state triggerd a corresponding event. E.g. if a **FmvNavigationNode** **Clickable** is clicked in a "state", all connected **OnFmvNavigationClicked** events are fired. The result of such an event is a **FmvGraphElementData** object, which can be used as input for other **FvmMaker** nodes.
118130

119131
The available events are:
120-
- OnFmvInventoryClicked
121-
- OnFmvItemPickupClicked
122-
- OnFmvNavigationClicked
123-
- OnFmvVideoPaused
124-
- OnFmvVideoSkipped
125-
- OnFmvVideoStarted
126-
- OnFmvVideoFinished
132+
* OnFmvInventoryClicked
133+
* OnFmvItemPickupClicked
134+
* OnFmvNavigationClicked
135+
* OnFmvVideoPaused
136+
* OnFmvVideoSkipped
137+
* OnFmvVideoStarted
138+
* OnFmvVideoFinished
127139

128140
Users can furthermore add custom logic to theses events, without having to use C# code and the **IFmvMakerVideoEvents** interface.
129141

130-
All the event nodes can be found under the the script graph context menu category **Events\FmvMaker\**.
142+
All the event nodes can be found under the the script graph context menu category **Events/FmvMaker/**.
143+
144+
![image](https://user-images.githubusercontent.com/23502690/230208973-80b351c0-ecf9-4be8-b4b7-7529b41e3bd0.png)
131145

132146
<a name="control-nodes-fmvmaker"></a>
133147
### The FmvMaker Control Nodes
134148
While Unity's VisualScripting already contains a bunch of control nodes, one had to be added for **FmvMaker**, the **SwitchOnFmvVideoEnum**, to enable users check for specific videos, when entering a "state". This switch will always contain ALL videos from **FmvVideoEnum**, but this list can be quite long, so we added 2 index fields, for limiting the available possibilities by only displaying options within a certain range. For this to work property, users must ensure to create the **FmvVideoEnum** in a "chuncked" way, where e.g. videos from chapters are on close positions within the **FmvVideoEnum**.
135149

136150
The upper left corner hat the **InputTrigger** for the graph flow. Each switch option is an **OutputTrigger** to pass on the graph flow to the next node. The second input entry, is an **FmvGraphElementData** element to do the selection on. This is usually set via an event node, where the values may vary, depending which "state" you're coming from.
137151

138-
All the control nodes can be found under the the script graph context menu category **Control\FmvMaker\**.
152+
All the control nodes can be found under the the script graph context menu category **Control/FmvMaker/**.
153+
154+
![image](https://user-images.githubusercontent.com/23502690/230209100-560a0c7a-82c2-42ca-aacf-cb78e82c82c7.png)
139155

140156
| Field | Type | Default value | Optional | Description |
141157
| --- | --- | --- | --- | --- |
142158
| StartIndex | int | 0 | | The inclusive start index. |
143159
| EndIndex | int | **FmvVideoEnum** length | | The inclusive end index of all videos in **FmvVideoEnum**. |
144160

145-
<a name="complicated-approach"></a>
146-
# Using JSON files (the complicated approach)
161+
<br><br>
162+
163+
<a name="complex-approach"></a>
164+
# Using JSON files (the complex approach)
147165
**VideoData** for FmvMaker is a configuration file stored within its Resources folder (*FmvMaker/Resources/*) and is basically a JSON list of single video elements, which are qualified via their names. This means that there is no complex hierarchy to build, each video element stands for its own. Please always choose simple, but unique names for your video elements. You can compare a video element to some kind of *state*, which will lead to *1 to n* next *states*. The previous *state* doesn't matter at all. Yes, this leads to a long list of elements, but it also helps to keep things simple.
148166

149167
The next kind of important data are so called **Clickables**. Information about **Clickables** is also stored within the **FmvMaker** Resources folder in the Unity project (*FmvMaker/Resources/*) in a separate configuration file. These elements stand for triggering actions when clicking on it. It doesn't matter if these actions are e.g. items or the trigger for the next video. The only difference is the item handling, of which a basic version is already included in **FmvMaker** and will be explained in the further sections.
@@ -417,6 +435,7 @@ The new **VideoData** element (DifferentUniqueVideoName) will basically be the s
417435
{
418436
"VideoList": [{
419437
"Name": "UniqueVideoName",
438+
"VideoTarget": "UniqueVideoName",
420439
"NavigationTargets": [{
421440
"Name": "UniqueClickable"
422441
}, {
@@ -425,18 +444,21 @@ The new **VideoData** element (DifferentUniqueVideoName) will basically be the s
425444
]
426445
}, {
427446
"Name": "NextUniqueVideoName",
447+
"VideoTarget": "NextUniqueVideoName",
428448
"NavigationTargets": [{
429449
"Name": "NextClickable"
430450
}
431451
]
432452
}, {
433453
"Name": "AnotherUniqueVideoName",
454+
"VideoTarget": "AnotherUniqueVideoName",
434455
"NavigationTargets": [{
435456
"Name": "AnotherClickable"
436457
}
437458
]
438459
}, {
439460
"Name": "DifferentUniqueVideoName",
461+
"VideoTarget": "DifferentUniqueVideoName",
440462
"NavigationTargets": [{
441463
"Name": "UniqueClickable"
442464
}, {
@@ -445,6 +467,7 @@ The new **VideoData** element (DifferentUniqueVideoName) will basically be the s
445467
]
446468
}, {
447469
"Name": "UniqueToDifferentVideoName",
470+
"VideoTarget": "UniqueToDifferentVideoName",
448471
"NavigationTargets": [{
449472
"Name": "AnotherClickable"
450473
}
@@ -505,6 +528,7 @@ Sometimes you want to jump from video element directly to another, without letti
505528
{
506529
"VideoList": [{
507530
"Name": "UniqueVideoName",
531+
"VideoTarget": "UniqueVideoName",
508532
"NavigationTargets": [{
509533
"Name": "UniqueClickable"
510534
}, {
@@ -513,18 +537,21 @@ Sometimes you want to jump from video element directly to another, without letti
513537
]
514538
}, {
515539
"Name": "NextUniqueVideoName",
540+
"VideoTarget": "NextUniqueVideoName",
516541
"NavigationTargets": [{
517542
"Name": "NextClickable"
518543
}
519544
]
520545
}, {
521546
"Name": "AnotherUniqueVideoName",
547+
"VideoTarget": "AnotherUniqueVideoName",
522548
"NavigationTargets": [{
523549
"Name": "AnotherClickable"
524550
}
525551
]
526552
}, {
527553
"Name": "DifferentUniqueVideoName",
554+
"VideoTarget": "DifferentUniqueVideoName",
528555
"NavigationTargets": [{
529556
"Name": "UniqueClickable"
530557
}, {
@@ -533,6 +560,7 @@ Sometimes you want to jump from video element directly to another, without letti
533560
]
534561
}, {
535562
"Name": "UniqueToDifferentVideoName",
563+
"VideoTarget": "UniqueToDifferentVideoName",
536564
"NavigationTargets": [{
537565
"Name": "InstantAnotherUniqueClickable"
538566
}
@@ -596,36 +624,42 @@ It often makes sense to have some kind of hub, where the player originates from,
596624
{
597625
"VideoList": [{
598626
"Name": "UniqueVideoName",
627+
"VideoTarget": "UniqueVideoName",
599628
"NavigationTargets": [{
600629
"Name": "InstantUniqueIdleClickable"
601630
}
602631
]
603632
}, {
604633
"Name": "NextUniqueVideoName",
634+
"VideoTarget": "NextUniqueVideoName",
605635
"NavigationTargets": [{
606636
"Name": "NextClickable"
607637
}
608638
]
609639
}, {
610640
"Name": "AnotherUniqueVideoName",
641+
"VideoTarget": "AnotherUniqueVideoName",
611642
"NavigationTargets": [{
612643
"Name": "AnotherClickable"
613644
}
614645
]
615646
}, {
616647
"Name": "DifferentUniqueVideoName",
648+
"VideoTarget": "DifferentUniqueVideoName",
617649
"NavigationTargets": [{
618650
"Name": "InstantUniqueIdleClickable"
619651
}
620652
]
621653
}, {
622654
"Name": "UniqueToDifferentVideoName",
655+
"VideoTarget": "UniqueToDifferentVideoName",
623656
"NavigationTargets": [{
624657
"Name": "InstantAnotherUniqueClickable"
625658
}
626659
]
627660
}, {
628661
"Name": "UniqueIdleVideoName",
662+
"VideoTarget": "UniqueIdleVideoName",
629663
"IsLooping": true,
630664
"NavigationTargets": [{
631665
"Name": "UniqueClickable"
@@ -701,18 +735,21 @@ Create a **Clickable** and a **VideoData** element for every **Item** you'd like
701735
{
702736
"VideoList": [{
703737
"Name": "UniqueVideoName",
738+
"VideoTarget": "UniqueVideoName",
704739
"NavigationTargets": [{
705740
"Name": "InstantUniqueIdleClickable"
706741
}
707742
]
708743
}, {
709744
"Name": "NextUniqueVideoName",
745+
"VideoTarget": "NextUniqueVideoName",
710746
"NavigationTargets": [{
711747
"Name": "NextClickable"
712748
}
713749
]
714750
}, {
715751
"Name": "AnotherUniqueVideoName",
752+
"VideoTarget": "AnotherUniqueVideoName",
716753
"NavigationTargets": [{
717754
"Name": "AnotherClickable"
718755
}
@@ -723,18 +760,21 @@ Create a **Clickable** and a **VideoData** element for every **Item** you'd like
723760
]
724761
}, {
725762
"Name": "DifferentUniqueVideoName",
763+
"VideoTarget": "DifferentUniqueVideoName",
726764
"NavigationTargets": [{
727765
"Name": "InstantUniqueIdleClickable"
728766
}
729767
]
730768
}, {
731769
"Name": "UniqueToDifferentVideoName",
770+
"VideoTarget": "UniqueToDifferentVideoName",
732771
"NavigationTargets": [{
733772
"Name": "InstantAnotherUniqueClickable"
734773
}
735774
]
736775
}, {
737776
"Name": "UniqueIdleVideoName",
777+
"VideoTarget": "UniqueIdleVideoName",
738778
"IsLooping": true,
739779
"NavigationTargets": [{
740780
"Name": "UniqueClickable"
@@ -837,6 +877,7 @@ Create a **Clickable** and a **VideoData** element for every **Item** you'd like
837877
| P | Pauses/Unpauses the playing video. |
838878
| Escape | Skips the currently playing video. Note that the videos has to be watched at least once, to be able to skip it. |
839879
| Q | Quits the game, when running the build. Doesn't stop the Editor from running. |
880+
| S | Saves game data. Will be loaded automatically if game data is present. |
840881
| I | Toggles the inventory visibility. |
841882

842883
<a name="icons"></a>
@@ -849,6 +890,7 @@ In the previous created FMV prototype, every **NavigationTarget** as well as the
849890
{
850891
"VideoList": [{
851892
"Name": "UniqueVideoNameToChoose",
893+
"VideoTarget": "UniqueVideoNameToChoose",
852894
"IsLooping": false,
853895
"NavigationTargets": [{
854896
"Name": "..."

0 commit comments

Comments
 (0)