-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update script code to use method notation where possible - add READMEs specific to most plug-ins - update yellow sign icon - update Prototype plug-in's reference to an application icon
- Loading branch information
1 parent
0803c0e
commit 57d6a70
Showing
37 changed files
with
426 additions
and
164 deletions.
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
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
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
13 changes: 13 additions & 0 deletions
13
Plug-in Authoring Kit/Game-component-examples/Bleed Margins/README.md
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,13 @@ | ||
# Bleed Margins | ||
|
||
This demonstrates how to include a bleed margin and/or rounded edges | ||
in your component design. All of the interesting bits are in | ||
`bleed-margin.settings`. | ||
|
||
Right click and **Run** `bleed-margin-diy.js` to play with the example. | ||
Then try the various **View/Edge Finish** options to see the component | ||
with or without its bleed margin and rounded edges. | ||
|
||
You can also try **View/Unsafe Area** and **View/True Face Edge** | ||
to see the effect of these options. (Try enabling them with | ||
**Edge Finish** set to **Include Bleed Margin** first. |
23 changes: 23 additions & 0 deletions
23
Plug-in Authoring Kit/Game-component-examples/Design Support/README.md
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,23 @@ | ||
# Design Support | ||
|
||
This demonstrates how to create design supports. A design support | ||
is an extra user interface element that provides feedback on | ||
the design. For example, if the design breaks one of the game's | ||
rules, the design support could indicate that. | ||
|
||
There are three examples you can right click and **Run**. | ||
For each, be sure to edit the field to see how the design | ||
feedback changes. | ||
|
||
`design-support-diy1.js` | ||
Creates a simple support using the default "verbal feedback" | ||
design support component. | ||
|
||
`design-support-diy2.js` | ||
A more complex use of the same "verbal feedback" model that | ||
highlights how the user's actions change the provided | ||
feedback over time. | ||
|
||
`design-support-diy3.js` | ||
Demonstrates how to create your own custom "view" (user interface | ||
element) instead of the built-in verbal feedback component. |
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
19 changes: 19 additions & 0 deletions
19
...n Authoring Kit/Game-component-examples/Multiple and Custom Portraits/README.md
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,19 @@ | ||
# Multiple and Custom Portraits | ||
|
||
This contains three examples you can right click and **Run** | ||
to test some more advanced uses of portraits: | ||
|
||
`multi-portrait-diy.js` | ||
Demonstrates how to create a component with more than one | ||
portrait. Also demonstrates how to create a portrait that | ||
the user can rotate. | ||
|
||
`linked-multi-portrait-diy.js` | ||
Demonstrates how to create a linked portrait. That is, a | ||
portrait that uses the same image as another portrait, | ||
but is drawn separately and has its own pan and scale settings. | ||
|
||
`roving-portrait-region.js` | ||
Demonstrates how to create a portrait that can move to different | ||
locations depending on how the user changes the game component | ||
state. |
20 changes: 20 additions & 0 deletions
20
Plug-in Authoring Kit/Game-component-examples/Prefab/README.md
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,20 @@ | ||
@ -0,0 +1,19 @@ | ||
# Prefab | ||
|
||
This example includes two "prefab" components you can try by right clicking | ||
and **Run**ning their script files. | ||
|
||
A [prefab component](http://se3docs.cgjennings.ca/dm-diy-prefab.html) | ||
is one whose design is controlled by its `.settings` file. | ||
The `-diy` script is just a *stub* that loads the `prefab` library and | ||
says which setting keys to use. | ||
|
||
`prefab-diy.js` | ||
This prefab includes a heading, body text, and portrait. | ||
|
||
`prefab2-diy.js` | ||
This example demonstrates how the default behaviour of a prefab component | ||
can be customized using before and after functions. It adds a page | ||
shape that restricts the text to fit inside the white oval. | ||
(Use **View/Region Boxes** to make the page shape visible as a dashed | ||
blue line.) |
88 changes: 88 additions & 0 deletions
88
Plug-in Authoring Kit/Game-component-examples/Prototype/README.md
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,88 @@ | ||
# Prototype | ||
|
||
This example plug-in registers six new game component types. | ||
They are intended to be used to create quick prototype cards | ||
for games. The six card types are two different common | ||
playing card sizes (poker and bridge) in portrait layout, | ||
landscape layout, and with a portrait image. | ||
|
||
## Running the examples | ||
|
||
One way to test the plug-in is to right click on it and choose | ||
**Test Plug-in**, then choose **Test**. The new card types | ||
will be found in the **Miscellaneous** category. | ||
|
||
You can also try it out without building it by running the | ||
diy scripts directly. If you try right clicking on | ||
`poker.js` and choosing **Run**, the card will appear but | ||
you will also get an error message (`#proto-deck` is not defined). | ||
This happens because this plug-in is designed to be translated | ||
into multiple languages, and the translated strings are missing. | ||
You can get around this by right clicking on the string table | ||
(`game.properties`) and choosing **Merge Strings Into/Game Language**. | ||
Now if you right click and **Run** `poker.js` it will work as expected. | ||
You still won't get the same experience as using **Test Plug-in**, | ||
because the custom font used by the cards hasn't been | ||
loaded—but it will run! | ||
|
||
## Tour of the files | ||
|
||
`plugin.js` | ||
This is the main plug-in script. It loads the translatable strings, | ||
card template settings, custom font, and the class map (which adds | ||
the new card types). | ||
|
||
`plug-in.png` | ||
This image is used to create an icon for the plug-in. (You'll see | ||
this icon in the **Plug-in Manager**, for exmaple.) | ||
|
||
`prefab-ext` | ||
This is a shared library used by all of the card DIY scripts. It | ||
loads the standard `prefab` library and then customizes it. | ||
(See the **Prefab** example for an introduction to prefabs.) | ||
|
||
`bridge.js`, `bridge-ls.js`, `bridge-im.js` | ||
The diy scripts for the bridge-sized cards (portrait, landscape, | ||
and portrait with image). | ||
|
||
`poker.js`, `poker-ls.js`, `poker-im.js` | ||
The diy scripts for the poker-sized cards. | ||
|
||
*The diy scripts are all simple stubs because this example uses | ||
prefab components.* | ||
|
||
`poker-tpl.png`, `bridge-tpl.png` | ||
The template images for the poker and bridge-sized cards. | ||
|
||
`poker-ls-tpl.js`, `bridge-ls.js` | ||
These are [resource creation scripts](http://se3docs.cgjennings.ca/dm-res-image.html#resource-creation-scripts). | ||
When loading using `ResourceKit.getImage()` they will create the | ||
landscape versions of the template images using script code that | ||
rotates the portrait images. | ||
This is a fancy way to do it. You could just as easily | ||
rotate the templates in a paint program and save them as `.png` | ||
images just like the portrait images. | ||
|
||
**Note:** These scripts won't work as expected unless you install | ||
the plug-in or run it with **Test Plug-in**. | ||
|
||
`Unkepmpt-Regular.ttf` | ||
This is the font file that contains the custom font used on the | ||
prototypes. As mentioned above, to see it in use you have to | ||
build and install the plug-in or use **Test Plug-in**. However, | ||
you can explore the font by double-clicking on it. | ||
|
||
`game.properties` | ||
This is the string table. It assigns named keys to a set of strings. | ||
Then those strings can be referred to by their key, so that | ||
translated versions will be used when running in a different game | ||
language. You can add a translation by right clicking and choosing | ||
**Add Locale**. | ||
|
||
`layout.settings` | ||
This file defines settings that direct the prefab library as to how | ||
to lay out the cards. | ||
|
||
`proto.classmap` | ||
This is used to register the new card types with Strange Eons. | ||
(The registration step happens in `plugin.js`.) |
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
33 changes: 33 additions & 0 deletions
33
Plug-in Authoring Kit/Game-component-examples/Register Game/README.md
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,33 @@ | ||
# Register Game | ||
|
||
This example demonstrates how to | ||
[register a new game, and how to register an expansion for that game](http://se3docs.cgjennings.ca/dm-register-game.html). | ||
|
||
## Registering a game | ||
Registering a game lets you group all of the related game components under that | ||
game's name. For example, in the **File/New** dialog, you can choose to filter | ||
the listed components so that only those from a certain game are shown. | ||
Plug-ins can also declare that they add on to a certain game (in their | ||
[root file](http://se3docs.cgjennings.ca/dm-eons-plugin.html#for-game)). | ||
This lets users search for plug-ins related to a given game. | ||
|
||
Games also have their own settings that are shared between all components | ||
for that game. This lets you load a single collection of settings for | ||
all of your components. These will be "inherited" automatically and | ||
if you change them in a future update, all components for that game | ||
will get those changes automatically. (This is unlike the settings | ||
set directly on a component's "private settings", which are are unique | ||
to each individual component.) | ||
|
||
## Registering an expansion | ||
Registering expansions for a game lets you take advantage of the built-in | ||
system for adding expansion symbols to your designs: a few lines each | ||
near the end of `register-game-plugin.js`. | ||
|
||
### Expansion symbol templates | ||
Most of the code in the plug-in script is used to create an | ||
[expansion symbol template](http://se3docs.cgjennings.ca/dm-register-game.html#custom-expansionsymboltemplates). | ||
This is used to add custom "variants" of expansion symbols. | ||
(For example, a light version for some card designs and a dark verison for others.) | ||
In most cases, you can ignore this code and stick with the default template | ||
by passing `null` to `registerGame` as the `ExpansionSymbolTemplate`. |
Oops, something went wrong.