Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

spacer.png

 

This guide introduces an upgraded Group Private Messaging system designed to improve communication among players. Below, you will find a step-by-step process to implement this feature seamlessly into your existing code.

Prerequisites

Before you start, ensure you have the uiwhisper.py and whisperdialog.py files ready for modification.

Implementation Steps

Step 1: Modify uiwhisper.py

  1. Open the uiwhisper.py file.

  2. Import Necessary Modules:
    At the beginning of the file, add the following imports:

     
  • This is the hidden content, please

     

  • Adjust Player Name Length:
    Below the imports, set the maximum player name length:

     
  • This is the hidden content, please

     

  • Add Group Chat and Add Objects:
    Search for this line:

     
This is the hidden content, please

and insert the following lines underneath:

 
  • This is the hidden content, please

     

  • Hide Group Add on Gamemaster Mark Hide:
    Locate the line:

     
This is the hidden content, please

Add the following line immediately below it:

 
  • This is the hidden content, please

     

  • Set Toggle Events:
    Find:

     
This is the hidden content, please

and append these lines just after:

 
  • This is the hidden content, please

     

  • Modify the Minimize Button:
    Search for self.minimizeButton.Show() and add the following conditional block:

     
  • This is the hidden content, please

     

  • Define Group Functions:
    Under the IgnoreTarget method, introduce these functions:

     
  1. This is the hidden content, please

     

Step 2: Update Send Whisper Function

Search for the method SendWhisper and replace its contents with the following code:

 
This is the hidden content, please

Step 3: Update constinfo.py

Open the constinfo.py file and add the following variables:

 
This is the hidden content, please

Step 4: Modify game.py

In the game.py file, find and replace the method definition:

 
This is the hidden content, please

with the following implementation:

 
This is the hidden content, please

Step 5: Update whisperdialog.py

Finally, navigate to uiscript/whisperdialog.py and add the following configuration for the group messaging buttons:

 
This is the hidden content, please

 

After completing all these modifications, ensure you save your changes. You can now test the new Group Private Messaging functionality in-game. If anyone needs ready-to-use .py files, they can be provided as needed.

 

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

 

 

Link to comment
Share on other sites


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...