Quest Manager: Tool Level
Different Approach
I'm still feeling a little anxious about working on the game. So I'm taking a different approach, one that's worked well for me in the past. I'm going to break down what I want to accomplish before I even dig in. This will give me specific goals to achieve as well as allow me to break the problem down into smaller parts.
So, I need to continue working on the player progression. I've got my initial quests setup and working. The player can progress through initial spawn to talk to their first NPC, complete the initial quest. They are then given a follow-up quest which is currently not completable. Let's take a look under the hood at what exactly happens when they try. The induction terminal does become "active" and allows the player to interact. When the player interacts, a sound is played. There is currently a commented out line that sets the player's tool level. When the player's tool level is upgrade the quest is not completed.
What Should Happen
Now that I've investigated what is happening, I need to figure out what else needs to happen. I want a scene to open up for the player to input a name. The induction terminal scene exists but the internal functionality isn't there. After the player submits a name, I want a cutscene to play, that means I need to build a new cutscene definition. I want the quest to complete when the player's tool levels up, so I need to add that functionality to my quest manager. The next quest in the series should automatically be assigned. I think that's all that needs to happen.
So, that's a pretty straightforward breakdown of what I want to happen. This means a few things need to happen to accomplish all of this. I need to add a new game state for this new scene and I need to tie it into the UI manager. I need to add the tool level quest completion functionality to my quest manager. I need to build out the actual functionality in the induction terminal interface scene. I need to build out a whole new cutscene. This shouldn't be too bad.
And Then . . . ?
I dug into the code myself looking for the best approach to handling quest completion when the tool levels up. First, I added a connection from my quest manager to my playerstats manager's signal. Then I copied another function to use for processing. But as it turns out, that was a mistake. So now I need to figure out the right logic for completing a quest when all I know is that my tool level has changed and what level it is currently.
Let's break this down into what I need to do! I need to iterate through my active quests, looking for an objective of type "tool_level". Once I find one I compare the actual tool level with the objective. If it looks good, I then package my data up and send it to another function that then actually marks objectives complete. But does it work? No. . .
Turns out I wasn't looking at my data quite correctly and I had a typo. Took me a little while to realize I was treating an array of dictionaries as a single dictionary. Once I was treating the data right, everything fell into place. I even went so far as to check what would happen if the player's tool level was way too high for the quest and it still completed properly!
What's Next
Well, I have a decent list of things to accomplish in relation to today's work. I still need to add the new game state, add the induction terminal interface to my UI manager, add the player name functionality (and more) to the terminal interface, add the tool level up, and create and implement the cutscene. That's still a lot, for just this one little thing. Luckily though, that's tomorrow's problem, for now I'm at ease because I made a major step in my game's development. I now have my quest manager setup to deal with any quests that rely on the player's tool level (mostly). Still so much more to do!
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
- Quitting: No More Ghosts1 day ago
- Induction: Complete(ish)2 days ago
- Stepping Back: Keep Going3 days ago
- Induction? Terminal!4 days ago
- Playerstats Manager: Starving To Death6 days ago
- A Minimal Day7 days ago
- Inventory: Now On Display9 days ago
- Inventory: Item Slots and Updates10 days ago
- Inventory: An Empty Display11 days ago
Leave a comment
Log in with itch.io to leave a comment.