PowerQuest v0.12.4 - 9-Verb Template
As a little side project last week I made a Monkey Island style 9-verb interface in the demo project. New projects can now select between the default one/two click interface, or the 9-verb one.
The 9-verb interface is a bit more complicated to code for, since you have to check which verb is used. And of course, all those extra verbs mean a lot more writing interactions, be prepared to write a LOT of reasons you cant "push" things :P Personally, I'd never want to make a big game in this interface, but I get the retro appeal ;)
Here's a gif of it in action:
To update- Just download the new version from the project page, and import into your project (in Unity, click Assets -> Import Package -> Custom Package). As always, back up your project first!
9 Verb Quick Guide!
When you create the project with the template there's a readme in the Assets/Game folder, but here's a copy of it-
Licence note:
I ripped the inventory items from Monkey Island 2, so they shouldn't be used in your games, unless you can out-lawyer Disney!
Game Resolution:
It's set to 384x216 by default.
This is the 16:9 resolution that's closest to Lucasarts games, without going to 320x180, which is pretty small with the 9-verb GUI.
Default Verbs:
All 'Clickables' have a "Default Verb" that can be selected from the object's inspector (under Data).
The default verb highlights when players hover over it, and players can right click to use the verb.
Using Verbs:
Interactions are a bit more complicated with this template, since you have to check which verb is used.
The "Look at" verb automatically uses the "Look" interaction in scripts.
For other verbs, and inventory use, you have to check in the script function, which verb to use.
To do this in OnInteract and OnUseInv functions, use the `E.VerbIs...` functions.
if ( E.VerbIsPickUp ) { Display: You pick up the bucket I.Bucket.Add(); } else if ( E.VerbIsPush ) { Display: I don't want to pick up the bucket }
Autocomplete makes this pretty easy though, you can just type E.Look, and it'll autocomplete to E.VerbIsLookAt.
You can get and set the active verb with E.Verb, which returns the eVerb enum. Eg:
if ( E.Verb == eVerb.Closed ) E.Verb = eVerb.Open;
Check the interactions for the "bucket" as an example to get you started.
Customising Verbs (Advanced)
If you want to change the verbs you're using, there's a few places you'll have to edit them.
The things you'll want to edit are:
PowerQuestExtentions.cs - This is a file you can hack in changes to the PowerQuest system while still being able to update PowerQuest later without losing your changes. Functions you add here are easy to access from quest scripts, eg:`E.MyFunction();`
Inside that file, there's a few places you'll see the verbs listed. Copy/paste/edit these how you want:
- The public enum eVerb at the top
- The properites in the interface IPowerQuest eg: bool VerbIsOpen {get;}
- The strings in VERB_TEXT are how the verbs are displayed
- The properties below that. eg. public bool VerbIsOpen { get { return m_verb == eVerb.Open; } }
GuiVerbs prefab - This prefab has the actual buttons for the verbs, so you'll need to change the text on those at the very least.
GlobalScript.cs - This is the main game script, and controls what happens when players click on things in-game. See the OnMouseClick function in particular. You shouldn't need to change this just to add/remove/rename verbs.
GuiVerbsComponent.cs - This is the code for the actual verbs GUI, and says which buttons do what. You shouldn't need to change this just to add/remove/rename verbs.
Files
Get PowerQuest
PowerQuest
A Nifty 2D Adventure Toolkit for Unity
Status | In development |
Category | Tool |
Author | Powerhoof |
Genre | Adventure |
Tags | Point & Click, powerquest, Unity |
More posts
- PowerQuest v0.19 - Enum to it all5 days ago
- PowerQuest v0.18 - Parsers and PolygonsJul 19, 2024
- PowerQuest v0.17 - Super SVGANov 24, 2023
- PowerQuest v0.16 - Get OrganizedMay 22, 2023
- PowerQuest v0.15 - GooeyFeb 18, 2022
- PowerQuest v0.14 - SolidAug 24, 2021
- PowerQuest v0.13.1 - Dial-a-logApr 19, 2021
- PowerQuest v0.12.6 Beta - Eyeball FriendlyFeb 26, 2021
- PowerQuest v0.12 - Spell gudFeb 05, 2021
Comments
Log in with itch.io to leave a comment.
Awesome update! :)