V1 8 beta release notes: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
Line 27: Line 27:


===Rec Files===
===Rec Files===
The new version of rec files produced by npcclient04relxx will be v5(1005). However npcclient.exe is backward compatible with v4(1004). You can see the [[.rec_file_1005|structure of new rec file]] here.
The new version of rec files produced by npcclient04relxx will be <source inline>v5(1005)</source>. However npcclient.exe is backward compatible with v4(1004). You can see the [[.rec_file_1005|structure of new rec file]] here.
 
===Plugin Commands===
===Plugin Commands===
To make the plugin usable by non-squirrel scripters, recording players, etc is possible through plugin commands. See the list [[NPC_PluginCommands|here]].
To make the plugin usable by non-squirrel scripters, recording players, etc is possible through plugin commands. See the list [[NPC_PluginCommands|here]].

Revision as of 13:12, 24 January 2024

Releasing Soon

MAJOR CHANGES

  • New recording type PLAYER_RECORDING_TYPE_ALL. Previously if the player was on foot, PLAYER_RECORDING_TYPE_ONFOOT has to be used. If the player was on vehicle PLAYER_RECORDING_TYPE_DRIVER has to be used. This new type eliminates the condition player has to be on car, on foot or even spawned.

The following events can be captured under PLAYER_RECORDING_TYPE_ALL:

- Name of the Player
- Spawn Class of Player
- Player Updates:   Onfoot  Onfoot-Aim  Driver   Passenger
- Death of Player
- Pickup Events, Checkpoint Events, Object Touch/Shot Events
- Player Chat, Player Command, Private Messages and ClientScriptData
  • StartRecordingAllPlayerData - One function to start recording on all players (including future players which may join the server later)
  • Server Recording - Same as above except a hrec file will be produced which contain time each player joined and name of corresponding rec file of the player. This file can be used to replay. Those players will be connected as npc and they will do the same actions the players did.
  • ConnectMultipleNpcs - Connects multiple npcs from an hrec file produced by PutServerInRecordingMode

OTHER CHANGES

  • Npcs can be called with a string like "function OnNPCSpawn(){SendChat("I have spawned");}. See changelog for more details or examples.
  • Logfiles are written by each npc in npcscripts folder
  • Following functions has been added for use by npcscripts
Suicide, SetMyHealth, GetMyHealth, LookAtPos, LookAtPlayer, GetMyClass, RequestClassAbs, AmISpawned, GetMySkin, GetMyTeam, GetMyArmour, SendPrivMsg, SetConfig, GetPlayerColor, IsPlaybackRunning, IsPlaybackPaused, IsServerInRecordingMode,
  • The npc04relxx plugin has these additional functions:
KickAllNPC, IsPlayerRecording, StartRecordingAllPlayerData, StopRecordingAllPlayerData, PutServerInRecordingMode, StopServerInRecordingMode, IsServerInRecordingMode
  • addded max_npc in server.cfg. If supplied it limits no:of npcs in server. value can be 0 to 100. Additionally, -1 means any number of npcs. Note that this config is optional only.
  • Now print Name of the npc in console like
    Connected. ID: 03 Name: John

Rec Files

The new version of rec files produced by npcclient04relxx will be v5(1005). However npcclient.exe is backward compatible with v4(1004). You can see the structure of new rec file here.

Plugin Commands

To make the plugin usable by non-squirrel scripters, recording players, etc is possible through plugin commands. See the list here.