Jump to content
Sign in to follow this  
V3ct0r

Fixing instant respawn of killed monsters after GameServer restart

Recommended Posts

[Mod] Fixing instant respawn of killed monsters after GameServer restart

 

screenshot_1.png

 

This mod for the "PKODev.NET mod loader" system fixes the problem of instant respawn of killed monsters after restarting the server. Imagine a situation: you have a boss monster on your server, for example "Black Dragon", the respawn time of which is 168 hours (a week). Your players kill it and, according to the rules of the game, next time they can kill it in a week. Then you decide to restart the server (update, maintenance, etc), but the game server is designed in such a way that all the monsters written in the scripts appear immediately after it starts. As a result, the respawn of the "Black Dragon" will occur much earlier than in 168 hours. This situation can hit the server economy or give an advantage to some players and guilds.

 

This is the second version of this mod - 1.1. In version 1.0, there was a critical bug related to the fact that one binary file for several instances of GameServer.exe was used to store information about killed monsters. For example, GameServer "A" writes a list of killed monsters to a file, then GameServer "B" writes a different list of killed monsters to the same file. As a result, the list of killed GameServer "A" monsters is lost due to the overwriting of the data file. In the new version of the mod, all data about killed monsters are stored in separate files for each map of the game world.

 

 

Requirements

 

Installed mod loading system for server and client (PKOdev.NET mod loader).

 

 

Modification information

 

Name: pkodev.mod.mobspawn;

Version: 1.1;

Author: V3ct0r;

Type: for server (GameServer.exe);

Supported executable .exe files: GAMESERVER_136 and GAMESERVER_138.

 

 

Installation

 

1) In the "mods" directory of your GameServer, create a "pkodev.mod.mobspawn" folder;

2) Place into it the mod DLL file "pkodev.mod.mobspawn.server.13<x>.dll" for your version of GameServer.exe;

3) Place into it the "pkodev.mod.mobspawn.cfg" configuration file;

4) In the mod directory "pkodev.mod.mobspawn" create an empty "data" folder;

5) Write to the configuration file "pkodev.mod.mobspawn.cfg" the IDs of the monsters you want to control the respawn. Each ID is written on a new line.

 

 

Download

 

1) Binary release (.dll);

2) The source code of the mod for Visual Studio 2019 Community (C++).

 

 

If you encounter any problem, bug or have any questions, then feel free to write in this thread.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Hello @elara,

 

Describe in more detail what you did.


Share this post


Link to post
Share on other sites
1 hour ago, eatsangels said:

The bosses keep appearing.

Hello @eatsangels,

 

describe what you did step by step.

 

Make sure that the mod has loaded (there will be a corresponding message in the GameServer.exe console window). Also make sure you have entered the correct boss id in the mod's settings file.

 

P.S. Please don't quote the whole post next time. Thank you!


Share this post


Link to post
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.   Restore formatting

  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.

Sign in to follow this  

×
×
  • Create New...