Download the PHP package littlecubiclegames/quests without Composer

On this page you can find all versions of the php package littlecubiclegames/quests. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package quests

Build Status

Quest System

Installation

composer require littlecubiclegames/quests

Usage

If you are not using Silex have a look at the ServiceProvider to see how to initialize all the services and to see which event listeners need to be registered. You will have to implement LittleCubicleGames\Quests\Initialization\QuestBuilderInterface which will create a Entity class out of the quest definition data. You might also want to overwrite the currently used ArrayStorage with you own persistent storage.

Inside your Silex application you can:

Quest Components

Task

Quests can have a list of tasks which are required to be completed before the quest can be finished (e.g. User needs to login 5x). A quest can have multiple tasks. The boolean operators AND and OR can be used to combine tasks. These operators can also be nested (e.g. User needs to login 5x OR The Sun is shining).

Trigger

To decide which quest will be started after another quest was finished trigger conditions can be defined. The first quests which matches all the trigger conditions will then be started.

Slot

With slots it is possible to limit the amount of quests open at the time. Each slot allows one open quest. The availability of quests can be limited with a start and end date which can be useful for limited events. Slots are tied to a registry.

Progress Listener

Every quest that gets started automatically registers for all events necessary to track the progress. This happens whenever a quest gets started or during a request you can register individual quests that you load from you database storage via ProgressListener::registerQuest(QuestInterface $quest). Quests which upon progress change get completed, automatically change state into the completed state. You can use the QuestInitializer to manually register all quests.

Task Completion Guard

The IsCompletedListener is a guard to make sure the quest can only change state to the completed state if the task are all finished.

No Reward Listener

Some quests might not have any reward for completion. Such quests will automatically be advanced from the completed to the closed state.

Rewards

Quests can have multiple rewards. Every reward type needs to have a Collector which implements the CollectorInterface. Multiple rewards for one quest can be combined with the MultipleRewards class. Rewards itself must only contain a type. Everything else should be customized to the needs of the collector.

Log

The quest log allows logging of every state change. It can serve two purposes:

Quest States

Available

The initial state the quest reaches once it leaves the quest pool.

In Progress

The quest was started and the user is working on completing all tasks.

Completed

The tasks in this quests are completed

Finished

The tasks are completed and the reward, if any, was collected. The user is done with the quest and it should not be displayed anymore.

Rejected

The user or the system decided to abort or reject the quest. The user is done with the quest and it should not be displayed anymore.

Slot definition data (using the static slot loader)

Note: start and end are optional.

Quest definition data

Creating your own components


All versions of quests with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2||^8
symfony/workflow Version ^5.3
roave/security-advisories Version dev-master
doctrine/orm Version ^2.5
symfony/console Version ^5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package littlecubiclegames/quests contains the following files

Loading the files please wait ....