Implementation Tasks

nh_99

New Member
Contributor
Name: Tasks (Old Name: Questing)
Summary: A system that adds some gameplay features to the, such as quests, achievements, and missions.
Scope: Mod
Current Goal: Fixing some of the system, and adding a UI.
Phase: Implementation
Curator: nh_99
Details:
This mod adds support for questing in Terasology. The structure uses prefabs that are registered with the system to work. Each prefab is more of a questing storyline than a single quest because it has all of the quests stored in an array.

To Do:
A lot. I need to fix a bunch of ugly hacks that I am using to make the quests work. Other features also need to be implemented, but at a later point in time. The system is a little bit buggy so I am working on that too. It will eventually have integration with a combat system, but that needs to be fixed first.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
It works! Yeah, I see the ugly hacks and it needs some polish, but I finished a three-part collection quest, I'd say that's a first! Nicely done :D

Edit: Oh, be sure to rely on "gradlew idea" to make your project structure - it'll prep the module definitions for IntelliJ locally, nothing like that should need to be checked in (you have a "questing.iml" in there)
 

nh_99

New Member
Contributor
Refined the whole system earlier and pushed a commit to my GitHub. The structure now rely's on "questing items" that, when right clicked, update information for a quest. A UI is in progress for questing so that you have to accept a quest before the info is updated and so you can see the quest's information while you are playing.
 

UberWaffe

Member
Contributor
Design
I'm trying to draw up MoSCoW requirements for all incubator threads (First test release, first playable release, full release). In an effort to help the contributors flesh out ideas and importance of features.
Would you like me to do so for this thread?
 

UberWaffe

Member
Contributor
Design
--First test version requirements--
MUST:
  • Have a framework for implementing questing, where a quest:
    • Consists of a list of tasks to be performed
    • Where each task has a single condition that has to be met in order to be completed
    • Where he condition is "Fetch X of Y blocks"
    • Upon completion of the quest (i.e. all tasks done), display message to player
    • Allow parameters to be assigned to each task (for condition checking)
SHOULD:
  • Have the following predefined condition types:
    • Fetch X of Y items/blocks
COULD:
  • Provide a quest text-message GUI
WOULD LIKE TO:
  • N/A

--First playable release version requirements--
MUST:
  • Have a framework for implementing questing, where a quest:
    • Consists of a list of tasks to be performed
    • Where each task has a single condition that has to be met in order to be completed
    • Where he condition is "Fetch X of Y blocks"
    • Upon completion of the quest (i.e. all tasks done):
      • Can execute a predefined script with parameters
    • Allow parameters to be assigned to each task (for condition checking)
SHOULD:
  • Have the following predefined condition types:
    • Fetch X of Y items/blocks
    • Be closer than X to position X, Y, Z
    • Be further than X from position X, Y, Z
  • Have the following predefined quest completion effect types:
    • Create X of Y items/blocks at position X, Y, Z
COULD:
  • Provide a quest text-message GUI
WOULD LIKE TO:
  • N/A

--Full release version requirements--
MUST:
  • Have a framework for implementing questing, where a quest:
    • Consists of a list of tasks to be performed
    • Where each task has a single condition that has to be met in order to be completed
    • Where a condition can be:
      • A predefined quest task-type with setup parameters (ex: Fetch X of Y)
      • Run a custom script with parameters, which returns completed/not completed
    • Can be assigned to a group of players, consisting of 1 or more players
    • Upon completion of the quest (i.e. all tasks done):
      • Can execute a predefined script with parameters
      • Can execute a custom script with parameters
    • Allow parameters to be assigned to each task (for condition checking)
    • Allow parameters to be assigned to the quest (for quest completion)
  • Have a framework for exposing quest information to other components, such as GUI or modules.
  • Allow a player to have multiple simultaneously active quests
SHOULD:
  • Have the following predefined condition types:
    • Fetch X of Y items/blocks
    • Be closer than X to position X, Y, Z
    • Be further than X from position X, Y, Z
    • Kill entity X
    • Kill X amount of entity type Y
  • Have the following predefined quest completion effect types:
    • Add X of Y items/blocks to each inventory in INVENTORY LIST
    • Create X of Y items/blocks at position X, Y, Z
    • Move all entities in ENTITY LIST to position X, Y, Z
COULD:
  • Provide standard quest GUI, that can be overwritten if desired
WOULD LIKE TO:
  • N/A

Sidenote on MoSCoW:
[+] Means a new requirement.
[-] Means a requirement was removed.
[~] Means the requirement was slightly changed (or just reworded).
[?] Means the requirement is undecided, and requires debate/revision.
An requirement changing priorities would be shown as a [-] on the old priority, and a [+] in the new priority.

You'll note that the first test version essentially echoes what you already have done, since your quest system is currently already to the point of being testable.:)

Let me know if you are happy with the other requirements (first playable, full release).
I had to mostly guess, since there hasn't been much discussion about this, and I couldn't find any specific future goals by looking at your GitHub code.
So, feel free to chop and change as required.;)
 

nh_99

New Member
Contributor
New commit & pull request. I added a UI into this, but items are slightly buggy. If you use the book too much your hand will keep right-clicking. It is not just this mod either, I think it is a bug. But, I am going to do some combat work now and then add it into questing at a later point.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
nh_99 - thanks, merged! :)

Item to add to the MoSCoW somewhere (first playable, should?): Be within x range of entity matching y conditions (so you can trigger quests based on being near a specific NPC) - edit: this might actually be the same as location since you'd probably indicate that using an entity anyway ...

Location is also very important for L&S - those two would be next on my list, as well as improving the GUI - but that might have a dependency on some general GUI refactoring so harder to do :)
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Something simple(?) to play around with may be achievements. You may want to give every player an initial set of quests (without the journal and quest cards) and show a notification when the quest is fulfilled.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
FYI nh_99 - looks like a partial / unfinished implementation of the quest beacon stuff is hanging out in your develop along with the combat refresh, and it causes immediate crash on world load for me :)

Code:
20:06:15.683 [main] ERROR org.terasology.game.TerasologyEngine:510 - Unhandled exception in main loop!
java.lang.NullPointerException: null
    at org.terasology.questing.systems.QuestBeaconSystem.update(QuestBeaconSystem.java:31) ~[na:na]
    at org.terasology.game.modes.StateSinglePlayer.update(StateSinglePlayer.java:139) ~[Terasology/:na]
 

nh_99

New Member
Contributor
Yeah, my next task is to finish up the quest beacons and then I will get back to some combat stuff :)
 

UberWaffe

Member
Contributor
Design
Sorry for the slow response time.

Cervator: Yes, I figured location X,Y,Z can be grabbed from an entity/block/anything and passed to the function.

nh_99: Have not spent much time on the internet the past two months. Got several things eating up my (short) attention span.

But here is an updated MoSCoW below.;)

--First playable release version requirements--
MUST:
  • Have a framework for implementing questing, where a quest:
    • Consists of a list of tasks to be performed
    • Where each task has a single condition that has to be met in order to be completed
    • Where he condition is "Fetch X of Y blocks"
    • Upon completion of the quest (i.e. all tasks done):
      • Can execute a predefined script with parameters
    • Allow parameters to be assigned to each task (for condition checking)
SHOULD:
  • Have the following predefined condition types:
    • Fetch X of Y items/blocks
    • Be closer than X to position X, Y, Z
    • Be further than X from position X, Y, Z
  • Have the following predefined quest completion effect types:
    • Create X of Y items/blocks at position X, Y, Z
COULD:
  • Provide a quest text-message GUI
WOULD LIKE TO:
  • N/A

--Full release version requirements--
MUST:
  • Have a framework for implementing questing, where a quest:
    • Consists of a list of tasks to be performed
    • Where each task has a single condition that has to be met in order to be completed
    • Where a condition can be:
      • A predefined quest task-type with setup parameters (ex: Fetch X of Y)
      • Run a custom script with parameters, which returns completed/not completed
    • Can be assigned to a group of players, consisting of 1 or more players
    • Upon completion of the quest (i.e. all tasks done):
      • Can execute a predefined script with parameters
      • Can execute a custom script with parameters
    • Allow parameters to be assigned to each task (for condition checking)
    • Allow parameters to be assigned to the quest (for quest completion)
    • [+] Can be rendered active or inactive via scripts/triggers (example: Completing one quests unlocks another.)
  • Have a framework for exposing quest information to other components, such as GUI or modules.
  • Allow a player to have multiple simultaneously active quests
SHOULD:
  • Have the following predefined condition types:
    • Fetch X of Y items/blocks
    • Be closer than X to position X, Y, Z
    • Be further than X from position X, Y, Z
    • Kill entity X
    • Kill X amount of entity type Y
  • Have the following predefined quest completion effect types:
    • Add X of Y items/blocks to each inventory in INVENTORY LIST
    • Create X of Y items/blocks at position X, Y, Z
    • Move all entities in ENTITY LIST to position X, Y, Z
  • [+]Support Achievements that:
    • [+] Allow default quests to be specified that are automatically added to all players
    • [+] Can display (in some form of GUI) a completed/uncompleted achievements
    • [+] Can display icons and text for each achievement in the achievements GUI
    • [+] Allow achievement tracking linked to player profile (I.e. tracking across multiple games and servers)
COULD:
  • Provide standard quest GUI, that can be overwritten if desired
WOULD LIKE TO:
  • N/A

Sidenote on MoSCoW:
[+] Means a new requirement.
[-] Means a requirement was removed.
[~] Means the requirement was slightly changed (or just reworded).
[?] Means the requirement is undecided, and requires debate/revision.
An requirement changing priorities would be shown as a [-] on the old priority, and a [+] in the new priority.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Worth noting is that I tested it too and get no errors (in particular after I remember to use Questing's develop branch, rather than default master). But it persists for nh_99 even after recloning the whole workspace clean.

It feels like a bad game data issue, incomplete compilation, a pathing issue, or something like that, but ...
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
It may be related to the module sandboxing, particularly the use of javassist to alter classes loaded from modules to remove the private flag from constructors of Components and Events. Will need to investigate.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
I fixed a similar but distinct issue with console commands defined in modules not working, will look at this issue tomorrow.
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Hey,
any news on the questing system, nh_99? I was wondering whether we could bring the town generation and the questing module together. Skaldarnar has a neat name generator, which we're currently trying to adapt to town names. If it works (and it will!), we can create a quest like "Go to the church in town XY" for you. Would it be possible to get that into the questing module? I can also derive block position, so we can add a spinning question mark at the right spot. I think that it would be really awesome, if we could get that thing working together.

Maybe Immortius can give us a few hints on how to create text-based billboards for town names and quest markers!?
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Hmm...

Ultimately what would be nice is to render a NUI element to a texture and then have an entity with MeshComponent using a billboard mesh + appropriate material using the texture, I think? Or alternatively allowing systems the opportunity to draw 2D elements into the world, once again through a NUI canvas.

Even without NUI complete, you can use Font's createTextMesh() method to create a set of mesh + material pairs for rendering some text.

This also touches on the rendering of player names over player heads.
 

nh_99

New Member
Contributor
msteiger Cities! Yay! We will definitely have to put some quests into the cities too. I will work hard to get my code working and some beacons and whatnot.
 
Top