V1 8 beta release notes: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
No edit summary
No edit summary
 
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Releasing Soon
<poem style="border: 2px solid #d6d2c5; background-color: #ffd789; padding: 1em;">
'''Version 1.8 beta'''
beta: 17 February 2024
beta p1: 29 February 2024
</poem>
==MAJOR CHANGES==
==MAJOR CHANGES==
*New recording type [[RecordingTypes|PLAYER_RECORDING_TYPE_ALL]]. Previously if the player was on foot, <source inline>PLAYER_RECORDING_TYPE_ONFOOT</source> has to be used. If the player was on vehicle <source inline>PLAYER_RECORDING_TYPE_DRIVER</source> has to be used. This new type eliminates the condition player has to be on car, on foot or even spawned.  
*New recording type [[RecordingTypes|PLAYER_RECORDING_TYPE_ALL]] for [[StartRecordingPlayerData]]. Previously if the player was on foot, <source inline>PLAYER_RECORDING_TYPE_ONFOOT</source> has to be used. If the player was on vehicle <source inline>PLAYER_RECORDING_TYPE_DRIVER</source> has to be used. This new type eliminates the condition player has to be on car, on foot or even spawned.  
The following [[Recording_Flags|events]] can be captured under <source inline>PLAYER_RECORDING_TYPE_ALL</source>:
The following [[Recording_Flags|events]] can be captured under <source inline>PLAYER_RECORDING_TYPE_ALL</source>:
<source lang="mediawiki">
<source lang="mediawiki">
Line 11: Line 15:
- Player Chat, Player Command, Private Messages and ClientScriptData
- Player Chat, Player Command, Private Messages and ClientScriptData
</source>
</source>
*StartRecordingAllPlayerData - One function to start recording on all players (including future players which may join the server later)
*[[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.
*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''
*ConnectMultipleNpcs - Connects multiple npcs from an hrec file produced by [[PutServerInRecordingMode]]
==OTHER CHANGES==
*<source inline>recdir 2</source> in server.cfg to save playback recordings to <source inline>npcscripts/recordings</source>. Use <source inline>recdir 1</source> for <source inline>recordings</source> folder which is default. This configuration is not mandatory.
*Npcs can be called with a string like <source inline>"function OnNPCSpawn(){SendChat("I have spawned");}</source>. See changelog for more details or examples.
 
==MINOR CHANGES==
*Npcs can be called with a string like <source inline>"function OnNPCSpawn(){SendChat("I have spawned");}</source>. See below for examples.
*Logfiles are written by each npc in npcscripts folder
*Logfiles are written by each npc in npcscripts folder
*Following functions has been added for use by npcscripts
*Following functions has been added for use by npcscripts
Line 27: Line 33:
*fixed bug npc getting kicked (acquired weapon 0) occuring sometimes
*fixed bug npc getting kicked (acquired weapon 0) occuring sometimes
*fixed bug npcs not holding weapons ruger etc on spawn.
*fixed bug npcs not holding weapons ruger etc on spawn.
*fixed npc angle wrong for newly streamed player.
*Npcs can now send private messages.
===Fixed in Patch1 2024/2/29===
<poem>
*Fixed Npc not able to enter into ships
*Fixed Server crashing when ConnectMultipleNpcs is called on 64 bit machines.
</poem>
===Rec Files===
===Rec Files===
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.
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.
Line 36: Line 51:
ConnectNPC("bot7","",false,"","","function OnNPCSpawn(){SendChat(\\\"I spawned.\\\")}")
ConnectNPC("bot7","",false,"","","function OnNPCSpawn(){SendChat(\\\"I spawned.\\\")}")
</source>
</source>
Note that original <source inline>function OnNPCSpawn(){SendChat("I spawned.")}</source> is an argument to <source inline>npcclient.exe -e </source> when it calls the program. So <source inline>"</source> must be escaped when passed to cmd, so the string must have one <source inline>\</source> character for each backslash and double quote. Hence the final element will be <source inline>\\\"</source> inside the string. The npc will send a chat message ''I spawned'' to server when spawned (each time).
<poem>
The equivalent [[Command-line_usage|commandline]] version is:</poem>
<source lang="lua">npcclient -n bot7 -e "function OnNPCSpawn(){SendChat(\"I spawned\")}"</source>
==API Version==
The API for developing plugins for npc which must be placed in <source inline>npcscripts/plugins</source> folder, the new version is 1.6
==RecEdit v2==
See [[RecEdit]] program for editing rec file datas.
==Screenshots==
<poem>
*In <source inline>npcscripts/logs</source>:
[[File:Logfiles of npcs.png|550px|Log files of npcs saved in npcscripts/logs. Note that only npcs connected without console have logfiles written]]
[[File:Logfile-sample.png|550px]]
</poem>
== Downloads ==
<poem style="border: 2px solid #7EACB8; background-color: #F6D5C1; padding: 1em;">
'''Version Information'''
The version for .rec files is not changed from [[V1_7_beta2_release_notes|v1.7 beta2]]. If you are using rec files created before v1.7 beta2, use recupdate tool to convert them.
</poem>
{| class="wikitable"
|-
! Operating system !! Version !! Link
|-
| Windows || rel006 || [https://sourceforge.net/projects/npc-for-vcmp/files/npc_vcmp_rel006_windows_v1.8-beta-p1.zip/download npc_vcmp_rel006_windows_v1.8-beta-p1.zip]
|-
| Linux x64 || rel006 || [https://sourceforge.net/projects/npc-for-vcmp/files/npc_vcmp_rel006_linux_x64_v1.8-beta-p1.zip/download npc_vcmp_rel006_linux_x64_v1.8-beta-p1.zip]
|-
| Linux x86 || rel006 || [https://sourceforge.net/projects/npc-for-vcmp/files/npc_vcmp_rel006_linux_x86_v1.8-beta-p1.zip/download npc_vcmp_rel006_linux_x86_v1.8-beta-p1.zip]
|-
| Windows/Linux (rel004) || rel004 || [https://sourceforge.net/projects/npc-for-vcmp/files/npc_vcmp_rel004_win_lin_v1.8-beta-p1.zip/download npc_vcmp_rel004_win_lin_v1.8-beta-p1.zip]
|-
| Windows Setup || rel006+rel004 || [https://sourceforge.net/projects/npc-for-vcmp/files/npcclient-setup-v1.8-beta-p1.exe/download npcclient-setup-v1.8-beta-p1.exe]
|-
| Source Code || rel006 || [https://sourceforge.net/projects/npc-for-vcmp/files/NPC-VCMP-master-v1.8-beta-p1.zip/download NPC-VCMP-master-v1.8-beta-p1.zip]
|-
| API Plugin || 1.6 || [https://sourceforge.net/projects/npc-for-vcmp/files/npc_vcmp_plugin_API_1_6.zip/download npc_vcmp_plugin_API_1_6.zip]
|}
==Related==
*[[V1_7_beta3_release_notes| 1.7 beta3]] (08.October.2023)
*[[V1_7_beta2_release_notes| 1.7 beta2]] (28.August.2023)
*[[V1_7_beta_release_notes| 1.7 beta]] (24.August.2023)
*[[V1_6_beta5_release_notes| 1.6 beta5]] (27.June.2023)
*[[V1_6_beta4_release_notes| 1.6 beta4]] (05.May.2023)
*[[V1_6_beta3_release_notes| 1.6 beta3]] (20.Feb.2023)

Latest revision as of 18:04, 29 February 2024

Version 1.8 beta
beta: 17 February 2024
beta p1: 29 February 2024

MAJOR CHANGES[edit]

  • New recording type PLAYER_RECORDING_TYPE_ALL for StartRecordingPlayerData. 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
  • recdir 2 in server.cfg to save playback recordings to npcscripts/recordings. Use recdir 1 for recordings folder which is default. This configuration is not mandatory.

MINOR CHANGES[edit]

  • Npcs can be called with a string like "function OnNPCSpawn(){SendChat("I have spawned");}. See below for 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
  • fixed bug npc getting kicked (acquired weapon 0) occuring sometimes
  • fixed bug npcs not holding weapons ruger etc on spawn.
  • fixed npc angle wrong for newly streamed player.
  • Npcs can now send private messages.

Fixed in Patch1 2024/2/29[edit]

  • Fixed Npc not able to enter into ships
  • Fixed Server crashing when ConnectMultipleNpcs is called on 64 bit machines.

Rec Files[edit]

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[edit]

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

execArg usage in ConnectNPC[edit]

ConnectNPC("bot7","",false,"","","function OnNPCSpawn(){SendChat(\\\"I spawned.\\\")}")

Note that original function OnNPCSpawn(){SendChat("I spawned.")} is an argument to npcclient.exe -e when it calls the program. So " must be escaped when passed to cmd, so the string must have one \ character for each backslash and double quote. Hence the final element will be \\\" inside the string. The npc will send a chat message I spawned to server when spawned (each time).

The equivalent commandline version is:

npcclient -n bot7 -e "function OnNPCSpawn(){SendChat(\"I spawned\")}"

API Version[edit]

The API for developing plugins for npc which must be placed in npcscripts/plugins folder, the new version is 1.6

RecEdit v2[edit]

See RecEdit program for editing rec file datas.

Screenshots[edit]

  • In npcscripts/logs:

Log files of npcs saved in npcscripts/logs. Note that only npcs connected without console have logfiles written


Logfile-sample.png

Downloads[edit]

Version Information
The version for .rec files is not changed from v1.7 beta2. If you are using rec files created before v1.7 beta2, use recupdate tool to convert them.

Operating system Version Link
Windows rel006 npc_vcmp_rel006_windows_v1.8-beta-p1.zip
Linux x64 rel006 npc_vcmp_rel006_linux_x64_v1.8-beta-p1.zip
Linux x86 rel006 npc_vcmp_rel006_linux_x86_v1.8-beta-p1.zip
Windows/Linux (rel004) rel004 npc_vcmp_rel004_win_lin_v1.8-beta-p1.zip
Windows Setup rel006+rel004 npcclient-setup-v1.8-beta-p1.exe
Source Code rel006 NPC-VCMP-master-v1.8-beta-p1.zip
API Plugin 1.6 npc_vcmp_plugin_API_1_6.zip

Related[edit]