Photo requests

A photo request is a quest for a photo: "photograph the horse", "catch any animal mid-jump", "a zebra at the pond". Requests are assets built from rules, with no code. They are optional: photos work without them.

Make one #

Select a photographable object, open Tools > Photoworthy > Photo Studio, the Requests tab, and press a template: Photograph It, A Good Shot, Doing Something, At A Place or Two Together. The new request is added to the catalog and selected so you can change it.

Or make one by hand: Create > Photoworthy > Photo Request, then add it to the Photo Catalog's Requests list.

The request asset #

Setting What it does
Id The key saved in the journal. Keep it once players have saves.
Title, Description What players read in the journal's Requests tab.
Reward A line of words shown with the request. Hand out the real reward from the completed event.
Rule lists One or more lists of rules. Inside a list, choose All (every rule) or Any (at least one). Between lists, choose All or Any again. That gives AND and OR with no code.
Offered From Start On offer as soon as the game starts. Off waits for your code or an event to offer it.
Repeatable Can be completed again and again.
Show Rules Lists the rules under the description, each with a tick as a photo meets it.

The 18 rules #

Rule Passes when
Shows Subject The photo shows the subject (at least Count of them). With no subject chosen: any subject.
Shows Category It shows subjects from a journal section, such as Animals.
Shows Tag It shows subjects with a tag, such as "bird".
Subject Is Doing A subject is doing something (the behaviour key). With no subject chosen: any subject.
Shows Detail A named detail of a subject shows (a face, a plate).
Different Subjects Together At least Count different kinds of subject are in the photo.
Score At Least The score reaches a share of the top score.
Medal At Least The photo earned at least this medal.
Rarity At Least The behaviour seen is at least this rare (tier 1 to 4).
Subject Visible At Least At least this much of the subject can be seen.
Subject Fills At Least The subject fills at least this much of the picture.
Subject Faces Camera The subject faces the camera.
Camera In Place The camera stood inside a Photo Region.
Subject In Place The subject was inside a Photo Region.
Data Equals One of your own values on the photo or subject equals something.
Taken With The photo came from the handheld camera, the photo mode or a script.
Subject Within Distance The subject is within a number of metres.
Custom Your own rule asset decides.

Every rule has a Not box that turns it round ("no guard in the picture"), and a Words box for your own sentence when the automatic one does not read well.

What players see #

The journal's Requests tab lists each request on offer with its title, description, reward and, when Show Rules is on, its rules. When a kept photo meets a request, it completes: a notice shows, the journal marks it done, and RequestCompleted is raised. The result card lists the requests a photo completed.

Offer and withdraw #

Requests marked Offered From Start in the camera's catalog are on offer at once. For the rest:

PhotoRequests.Offer(request);      // put it on offer (from a quest giver, a story beat)
PhotoRequests.Withdraw(request);   // take it off again

Both can be called from a UnityEvent through a small script of your own, or from a Photo Trigger.

React to a completed request #

With no code: add a Photo Trigger component, set When to Request Completed, pick the request, and wire its event (open a gate, give a reward, start a dialogue).

In code:

PhotoEvents.RequestCompleted += (request, photo) => Debug.Log(request.Title + " done with " + photo.id);

Your own rule #

using RareGeometry.Photoworthy;
using UnityEngine;

[CreateAssetMenu(menuName = "My Game/Rule: At Night")]
public class AtNightRule : CustomPhotoRule
{
    public override bool Passes(Photo photo, PhotoContext context) => photo.GetData("time") == "night";
    public override string Describe() => "Taken at night";
}

Set a rule's kind to Custom and give it the asset. Stamp your own values on photos with the Photo Camera's SetStamp("time", "night").

A selfie carries the value selfie = yes by itself, so "a selfie with the llama" is two rules: Shows Subject (Llama) and Data Equals (selfie, yes).

Something unclear or wrong? Tell us · Get help