Quests: Objectives and Triggers
The Plan
I dove in today with a good idea of what I wanted to work on. It took me a few minutes of review to actually remember, but I got there eventually. Today I needed to work on the dialogue system in relation to quests. Specifically, I had an issue with how the quest objectives were being tracked. Turns out I completely misunderstood how it was set to work, and my JSON file didn't even match my resource definition!
What Was That?
After a lot of back and forth with Gemini, I was able to get to the source of my misunderstandings and re-write portions of my JSON file. I also had to modify my data manager. I found it wasn't even loading my entire quest definition properly! I'll be straight with you, I'm not even 100% certain about all that was changed today. I'll relay what I did, but keep in mind that I'm not sure exactly what order everything was done in.
I added a bit of debug logging throughout in an attempt to find the source of my issues. This is how I was able to figure out certain issues (there were a few) in my code. As I mentioned, I had to change my quests JSON file because the one that was output by Gemini as an example wasn't even accurate to what it was supposed to be. The data manager had to be modified to properly load in the missing pieces of the quest definition.
The dialogue system was modified to actually mark a quest completed. It also updates the available buttons once a quest is completed. The actual quest completion part was what really broke me in so many ways. And in reality, it was working the way it was intended, I just had issues in my data and order of operations.
How It Works
So now, the player hits the Quests button in the dialogue system and a button appears for every quest that's active and related to the NPC. When that button is pressed, new text is shown to the player, the quest is marked complete, the completion is processed giving rewards, taking away items, and assigning new quests as assigned. The dialogue is also updated to remove that button, leaving behind any other relevant buttons for other quests.
What's Next?
I guess my next step is going to be addressing my player's skin. . . That's not going to be too much fun, but I think I need to redo the whole player character skin thing anyway. After that I need to build out a simple system for tracking state changes in my city. And finally I will need to update my savegame manager to deal with those changes (and others)!
Xenodochium
The future is what you make of it!
Status | In development |
Author | Munchmo |
Genre | Role Playing |
Tags | 2D, Cozy, Godot, Indie, Life Simulation, Pixel Art, Sci-fi, Singleplayer |
Languages | English |
More posts
- Getter Functions: A New Approach1 day ago
- Lazy Dev: Day Off?3 days ago
- Dialogue System: Quests4 days ago
- Displaying: Quest Objectives5 days ago
- Induction Terminal: Raycast Refit6 days ago
- Induction Terminal: What's in a Name?7 days ago
- Now Hiring?8 days ago
- Documentation: Is Everything9 days ago
- Housekeeping: Placeholders10 days ago
Leave a comment
Log in with itch.io to leave a comment.