NPCHide

From NPC for VCMP 0.4 Servers
Revision as of 13:17, 9 April 2023 by Habi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Ezgif-1-59186a6cc7.gif

This VCMP 0.4 server module will
1. withhold information about npcs ( now playing in server) to the 'VCMP Browsers'. So the player count will be 0 even if some 10 player slots are used by npc and actual player is zero. On the player list of Browser also, the names of npcs will not be seen.
2. Replace npc names with a space in the list of players the server gives to the client. So when a client connects, the name of the npc will be blank. This is not directly possible, since server 'replaces' spaces with 'underscore'. When the name of npc is blank, nothing will be shown as name in it's tag. Only health bar will be shown. Also in the F5 screen, the name field will be blank perhaps making easier to read entire F5 screen and note data about other players( the npcs not coming in between).
3. It exports two functions-
(a)Set Max Players
This will set in the VCMP Browser the maximum players allowed in the server. This might be needed as in (1), we are hiding information about some npcs and that slots are marked available whereas it is not.
(b)Set Name All NPC
By default, space is the name of all npc. You can specify custom tags like 'npc' or 'VCMP 0.4' which will be the name of every npc as appearing for a player.
In short: this two functions are there, but how will you call it? NPCHIDE has not touched squirrel, because it will fail for non-squirrel servers.

4. Plugin Commands

Incoming

Parameter Type Value
commandIdentifier unsigned integer 0x10001001
message const char* "NPCHIDE_SETVAL "i

Where i is the Flag described as below.

Flag Name Value
SHOWCOUNT_INBROWSER 1
SHOWNAMES_INBROWSER 2
SHOWNAMES_INGAME 4

For example, if you loaded the plugin and want to disable it completely the message must be "NPCHIDE_SETVAL 7" as it has 7=1+2+3 means ->show count of npc in browser (1/100), show name of npc in browser, and show name of npc as tagname and in F5 menu in game.

Outgoing

Parameter Value
commandIdentifier 0x10001000 unsigned integer
message NPCHideExportsReady const char*
Purpose Functions exported can now be imported by other Server plugins

The npc04relxx plugin makes use of the functions exported (3) and offers the following functions if loaded with hidenpcxx plugin.

Note:

  • By using this, one npc cannot get name of another npc!. The GetPlayerName returns " " (two spaces) in npcscripts.
  • Function 3 (b) has effect only to players connecting after this function has been called.

See Downloads