Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Quest Management in C++: The Reload and Crash Fish Fixes


Recommended Posts

In this guide, we will enhance your game’s quest management system by implementing new functionality that allows you to handle quest windows more effectively. This tutorial will cover code modifications necessary for properly managing active quests and addressing issues related to quest visibility. Let's get started!

Required Code Modifications

Step 1: Update questmanager.h

Open up the questmanager.h file and add a new function declaration to facilitate stopping all running quests. Below the existing function:

 
This is the hidden content, please

Add the following line:

 
This is the hidden content, please

Step 2: Implement Functionality in questmanager.cpp

Next, navigate to questmanager.cpp and locate the method responsible for disconnecting players:

 
This is the hidden content, please

Just below, implement the logic for stopping all active quests:

 
This is the hidden content, please

Next, find the Reload function in the same file:

 
This is the hidden content, please

And add the cleanup function we just created:

 
This is the hidden content, please

Step 3: Modify PythonNetworkStream.h

Locate the header file PythonNetworkStream.h and add a new method to handle hiding quest windows:

 
This is the hidden content, please

Insert this line below:

 
This is the hidden content, please

Step 4: Implement HideQuestWindows in PythonNetworkStream.cpp

Go to the bottom of PythonNetworkStream.cpp and add the implementation of the HideQuestWindows function:

 
This is the hidden content, please

Step 5: Update PythonNetworkStreamPhaseGame.cpp

In the method bool CPythonNetworkStream::RecvScriptPacket(), right after the line:

 
This is the hidden content, please

Add the following piece of code to handle the new destroy packet:

 
This is the hidden content, please

Step 6: Edit interfacemodule.py

Open interfacemodule.py and add the following function just before:


    
This is the hidden content, please

Step 7: Integrate in game.py

In game.py, beneath the function:

 
This is the hidden content, please

Insert the method which calls to hide all quest windows:

 
This is the hidden content, please

 

By following these steps, you’ve successfully implemented additional functionality to manage quests effectively within your game. The new commands allow quests to be canceled and their respective windows hidden, contributing to a cleaner user interface and better user experience.

Link to comment
Share on other sites


  • 100% changed the title to Quest Management in C++: The Reload and Crash Fish Fixes

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...