Recently there has been a discussion on the Steam discussions about various basic features that are missing from GameGuru, one of the features that has come up is an easy to use basic questing system, so i have decided to give it a try.
This set of scripts will be a system of quest scripts that are as user friendly as possible, with as little script editing needed as possible, there will be some minor editing involved (much like the music scripts) which can't in GameGurus current form be avoided.
I've been working (with the help of AmenMoses, Smallg, and DVader) on this and it will consists of 3 scripts:
1- simplequestcontrol.lua :
This is the script that handles the quest descriptions (you will need to edit this script and enter your quest descriptions in the available sections), just place it in a dynamic, always active entity.
2 - simplequestjournal.lua :
This handles displaying the quest journal when you press J, listing the descriptions from simplequest.lua on a sprite background, including a counter for the quest steps (this script can be edited to change the locations of the text and sprite), it also contains a code to display text on screen to tell you the journal has updated, it also displays the score in ithe top middle of the screen, just place it in a dynamic, always active entity.
3 - simplequest.lua :
This is the main quest script for quest items, just put it in an entity and name it:
,total number of steps
,type of task
.. then place as many copies as there are steps listed, when items are picked up it progresses the quest.
The quest types for the 4th parameter (type of task) in the name are:
1: Pickup -
Items will prompt you to press [E] to collect them.
2: Collect -
Items will be automatically collected when you walk over them.
3: Trigger Zone -
Works with a trigger zone marker to update the quest log when you enter the area (note this option will only work in a zone marker).
4: Win Zone -
Works with the winzone marker to update the quest and load the next level (note this option will only work in a zone marker).
So for example:
Five entities on the map:
Entity 1: name,1,1,1,100
Entity 2: name,2,3,1,100
Entity 3: name,2,3,1,100
Entity 4: name,2,3,1,100
Entity 5: name,3,1,3,100
This would make the first task to pick up one entity, then the second task would be to pick up three entities, then the last task would be to enter a trigger zone, and for each task and step you will get 100 points.
For multi-step tasks you can have different variables in the task type and points slots, but the quest id and the number of steps must be the same for all entities in that quest, for example if entities 2, 3 and 4 were like this:
Entity 2: name,2,3,1,50
Entity 3: name,2,3,2,100
Entity 4: name,2,3,3,200
You would have to pickup an object for 50 points, walk over an object for 100 points, and enter a trigger zone for 200 points, in any order for that task.
I've tried to make it as easy to use as possible, and you can now download it from the attachment in this post, to install simply open up the zip and drag the folders into you gameguru/files folder.
Important: Because you have to edit the scripts for the quest descriptions this system will only work on one map per simplequest.lua, if you want to use a different set of quests on a different map you will need to create another folder in the scriptbank, copy simplequest.lua into the new folder, and use it from there in the new map.
Please Note: This quest chain system is just a series of user editable tasks, with a basic scoring system, there's no provision for rewards or effecting anything else, all it does is update progression along the quest chain in the journal, if people want anything more than that then they'll have to do it themselves, that's a little more advanced than i can do, and outside the scope of this project, all i'm trying to achieve is a very basic, user friendly system, that users can use as a base to work from.
Here's a quick video of the "pickup" script working so far:
I will be including various quest entities, a green gem, red question mark, blue star, and gold and silver coins, these are all animated to spin. There will also be custom trigger zone and win zone markers (these will have to live in the entitybank because for some reason GG doesn't read custom markers from the _markers folder).
I'll keep you updated as i add new parts.
Edited to include updated description of system (15/01/19)
Edited to add the inclusion of a fifth script to the system (16/01/19)
Edited description, I've cut down the number of scripts needed, now there is only 3 (17/01/19)
Added information about quest pick up entities (20/01/19)
Added information about score and points (01/02/19)
Edited and added the instructions to be clearer for multi-step tasks (05/02/19)
Uploaded the first release version of the system (15/02/19)
Uploaded a new zip file due to an error in the original zip, also added a demo map saved in DX11 (24/02/19)
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.