From cbd65aabcef59aba3fd42c92da9eb73a06bffc45 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 3 Sep 2021 02:33:24 +0000 Subject: [PATCH] chore(release): 1.0.0 [skip ci] # 1.0.0 (2021-09-03) ### Features * initial commit ([d1bfeef](https://github.com/ashblue/unity-quest-journal/commit/d1bfeef78371bb6486938e3c72a21d3a4fc30303)) --- Assets/com.fluid.quest-journal/LICENSE.md | 22 +- Assets/com.fluid.quest-journal/README.md | 217 +++++++++++++++++++- Assets/com.fluid.quest-journal/package.json | 40 +++- CHANGELOG.md | 6 + package-lock.json | 2 +- package.json | 2 +- 6 files changed, 275 insertions(+), 14 deletions(-) create mode 100644 CHANGELOG.md diff --git a/Assets/com.fluid.quest-journal/LICENSE.md b/Assets/com.fluid.quest-journal/LICENSE.md index 08ccd1a..d234f8b 100644 --- a/Assets/com.fluid.quest-journal/LICENSE.md +++ b/Assets/com.fluid.quest-journal/LICENSE.md @@ -1 +1,21 @@ -Edit LICENSE.md in root, contents will be replaced. +MIT License + +Copyright (c) 2021 Ash Blue + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Assets/com.fluid.quest-journal/README.md b/Assets/com.fluid.quest-journal/README.md index 2f05ff9..908a89b 100644 --- a/Assets/com.fluid.quest-journal/README.md +++ b/Assets/com.fluid.quest-journal/README.md @@ -1 +1,216 @@ -Edit README.md in root, contents will be replaced. +# Unity Quest Journal + +![Unity Quest Journal](docs/unity-quest-journal.png) + +A Unity 3D package for managing quests with sub-tasks. Inspired by Skyrim and The Witcher 3's task management systems. + +**Features** + +* Quests with support for task lists +* Quests and tasks as ScriptableObject(s) for easy reference in your inspectors +* Debug utilities to try out different quest/task combinations +* Customizable drop in example prefab to easily get a quest GUI up and running in minutes +* Save / load support out of the box +* Heavily tested with TDD + +**Support** + +Join the [Discord Community](https://discord.gg/8QHFfzn) if you have questions or need help. + +See upcoming features and development progress on the [project board](https://github.com/ashblue/unity-quest-journal/projects/2). + +## Getting Started + +Unity Quest Journal is extremely easy to use. Here's a code sample that automatically updates a quest and prints out the status. + +```c# +public class MyFirstQuest : MonoBehavior { + private IQuestInstance _questInstance; + public QuestDefinitionBase quest; + + void Start () { + _questInstance = QuestJournalManager.Instance.Quests.Add(quest); + + // Prints Ongoing + Debug.Log(_questInstance.Status); + } + + public void NextTask () { + _questInstance.Next(); + + // Prints the current task name + Debug.Log(_questInstace.ActiveTask.Title); + } +} +``` + +### Installation + +Unity Quest Journal is used through [Unity's Package Manager](https://docs.unity3d.com/Manual/CustomPackages.html). In order to use it you'll need to add the following lines to your `Packages/manifest.json` file. After that you'll be able to visually control what specific version of Unity Quest Journal you're using from the package manager window in Unity. This has to be done so your Unity editor can connect to NPM's package registry. + +```json +{ + "scopedRegistries": [ + { + "name": "NPM", + "url": "https://registry.npmjs.org", + "scopes": [ + "com.fluid" + ] + } + ], + "dependencies": { + "com.fluid.quest-journal": "1.0.0" + } +} +``` + +**Create A Database** + +Next you'll need to create a database to put your quests and tasks in. You can do so by right clicking on the project window -> Create -> Fluid -> Quest Journal -> Database. + +![Create quest database](docs/create-quest-database.png) + +You can create a task by selecting the database and adding an item. + +![Create Quest](docs/create-quest.png) + +Double click the quest name to edit it. Here you can manage tasks and quest meta details. + +![Create Quest Task](docs/create-quest-task.png) + +**Configure Settings** + +Next you'll need to create a Settings object. You can do this by right clicking on the project window -> Create -> Fluid -> Quest Journal -> Settings. This **must** be placed in a `Resources` folder and you can't change the name of the object (or it won't load correctly at runtime). + +Make sure to attach your database we recently created to the settings object. + +![Quest Settings](docs/quest-settings.png) + +### Example Projects + +To use any of the example projects, simply clone this scene and open the `Assets/Examples` folder in Unity. + +**Quickstart Quest Menu** + +Located at `Assets/Examples/QuickStart/QuestJournalQuickStart.scene`. The prefab used in this scene can be exported and dropped into any project to quickly setup a sample quest GUI for Unity Quest Journal. This can also act as a good boiler plate to write your own quest display. + +![Unity Quest Journal Quick Start Menu](docs/unity-quest-journal-quick-start.png) + +To run this in your project simply instantiate the quick start prefab and it should automatically pull in all of your current quest data. + +**Quest Debugging Scene** + +Found in `Assets/Examples/DebugQuestPrint/DebugQuestPrint.scene`. A useful scene for debugging the quest editor. Prints out lots of meta data and has buttons to adjust quests at runtime. A great place to start if you're curious as to Unity how Quest Journal works under the hood. + +## Recipes + +### Save And Load + +Unity Quest Journal supports save and load functionality out of the box. You can execute a save of your current quest states as so. + +```c# +string mySave = QuestJournalManager.Instance.Save(); +``` + +To load the save simply run the following. Note that loading a save overwrites all present quest data. + +```c# +QuestJournalManager.Instance.Load(mySave); +``` + +### Custom Quest Definitions + +You can create your own quest definitions. This is useful for marking side quests, nav points, and other important details. + +```c# +using CleverCrow.Fluid.QuestJournals; +using CleverCrow.Fluid.QuestJournals.Quests; + +[CreateMenu("My Custom Quest")] +public class MyCustomQuestDefinition : QuestDefinitionBase { + public bool sideQuest; + + public void CustomMethodsGoHere () { + } +} +``` + +In order to pull the custom definition at runtime you'll need to do a cast. + +```c# +var definition = QuestJournalManager.Instance.Quests.Get(definitionTarget).Definition as MyCustomQuestDefinition; +``` + +### Custom Task Definitions + +Tasks support custom definitions. This is a good place to include micro details about accomplishing a task (locations, exp, rewards, ect). + +```c# +using CleverCrow.Fluid.QuestJournals; +using CleverCrow.Fluid.QuestJournals.Tasks; +using UnityEngine; + +[CreateMenu("My Custom Task")] +public class MyCustomTaskDefinition : TaskDefinitionBase { + public Vector3 waypointLocation; + + public void CustomMethodsGoHere () { + } +} +``` + +Similar to custom quest definitions. You'll need to cast the Task definition to access it at runtime. + +```c# +var taskDefinition = QuestJournalManager.Instance.Quests + .Get(questDefinition) + .ActiveTask + .Definition as MyCustomTaskDefinition; +``` + +## Releases + +Archives of specific versions and release notes are available on the [releases page](https://github.com/ashblue/unity-quest-journal/releases). + +## Nightly Builds + +To access nightly builds of the `develop` branch that are package manager friendly, you'll need to manually edit your `Packages/manifest.json` as so. + +```json +{ + "dependencies": { + "com.fluid.quest-journal": "https://github.com/ashblue/unity-quest-journal.git#nightly" + } +} +``` + +Note that to get a newer nightly build you must delete this line and any related lock data in the manifest, let Unity rebuild, then add it back. As Unity locks the commit hash for Git urls as packages. + +## Development Environment + +If you wish to run the development environment you'll need to install the [Node.js](https://nodejs.org/en/) version in the [.nvmrc](.nvmrc) file. The easiest way to do this is install [NVM](https://github.com/nvm-sh/nvm) and run `nvm use`. + +Once you've installed Node.js, run the following from the root once. + +`npm install` + +If you wish to create a build run `npm run build` from the root and it will populate the `dist` folder. + +### Making Commits + +All commits should be made using [Commitizen](https://github.com/commitizen/cz-cli) (which is automatically installed when running `npm install`). Commits are automatically compiled to version numbers on release so this is very important. PRs that don't have Commitizen based commits will be rejected. + +To make a commit type the following into a terminal from the root. + +```bash +npm run commit +``` + +### How To Contribute + +Please see the [CONTRIBUTIONS.md](CONTRIBUTING.md) file for full details on how to contribute to this project. + +--- + +This project was generated with [Oyster Package Generator](https://github.com/ashblue/oyster-package-generator). diff --git a/Assets/com.fluid.quest-journal/package.json b/Assets/com.fluid.quest-journal/package.json index 11b6f0c..538c94d 100644 --- a/Assets/com.fluid.quest-journal/package.json +++ b/Assets/com.fluid.quest-journal/package.json @@ -1,12 +1,32 @@ { - "name": "com.fluid.quest-journal", - "version": "0.0.0", - "displayName": "Unity Quest Journal", - "description": "A Unity 3D package for managing quests with sub-tasks. Inspired by Skyrim and The Witcher 3's task management system.", - "unity": "2020.1", - "dependencies": { - "com.fluid.adnc-utilities": "1.0.0", - "com.fluid.simple-settings": "1.0.1", - "com.fluid.simple-singleton": "1.0.0" - } + "name": "com.fluid.quest-journal", + "version": "1.0.0", + "displayName": "Unity Quest Journal", + "description": "A Unity 3D package for managing quests with sub-tasks. Inspired by Skyrim and The Witcher 3's task managment system.", + "unity": "2020.1", + "dependencies": { + "com.fluid.adnc-utilities": "1.0.0", + "com.fluid.simple-settings": "1.0.1", + "com.fluid.simple-singleton": "1.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ashblue/unity-quest-journal.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ashblue/unity-quest-journal/issues" + }, + "homepage": "https://github.com/ashblue/unity-quest-journal#readme", + "keywords": [ + "Unity 3D", + "quests", + "quest manager", + "quest tasks" + ], + "author": { + "name": "Ash Blue", + "email": "ash@blueashes.com", + "url": "https://twitter.com/ashbluewd" + } } diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..840f837 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# 1.0.0 (2021-09-03) + + +### Features + +* initial commit ([d1bfeef](https://github.com/ashblue/unity-quest-journal/commit/d1bfeef78371bb6486938e3c72a21d3a4fc30303)) diff --git a/package-lock.json b/package-lock.json index 9797bd1..f7e8c87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "com.fluid.quest-journal", - "version": "0.0.0", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f6948a1..1cdf488 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.fluid.quest-journal", - "version": "0.0.0", + "version": "1.0.0", "unity": "2020.1", "displayName": "Unity Quest Journal", "description": "A Unity 3D package for managing quests with sub-tasks. Inspired by Skyrim and The Witcher 3's task managment system.",