header image
Home arrow VICE 3rd Party Support
VICE 3rd Party Support PDF Print E-mail
Written by VICE Admin   
Apr 02, 2009 at 02:37 AM

The VICE package offers VICE sensor scripts that have support for the Terra Combat System (TCS) integrated into them. The goal of these addon scripts is to allow multiple combat systems that support legacy products like TCS, without increasing the number of scripts. TCS support emulates TCS v2.5, which was the last publically available version (2007) at the time of this writing. VICE TCS emulates the original system as closely as possible, while eliminating bugs, unnecessary script lag, and the excessive chatter of the original.

As of VICE 1.2.0, CCC support has been dropped, as the combat system has been unsupported since 2006, is rarely used anymore, and there is no need for two separate sensor based systems that essentially do the same thing.

Unit Availability
The VICE+TCS integrated script currently comes available for the following unit types:

  • Infantry (INF)
  • Light aircraft (ALA)
  • Medium aircraft (AMA)
  • Heavy aircraft (AHA)

Other unit types are not supported because TCS is not well-equipped for heavily-amoured units, or units which might exist near barriers. It would be possible to make a script for a heavy tank with 100 HP in TCS, but it would perform unrealistically (you can shoot through walls and mountains in sensor based combat), and that HP level is well beyond the maximum HP normally available for TCS.

Using VICE+TCS script
The VICE package comes with several VICE+TCS scripts, each associated with a VICE unit type. They function exactly the same as regular VICE scripts, but also monitor for link messages sent by your control script that are related to TCS.

To make things easier for the scripter, TCS link messages follow a similar format as VICE link messages:

integer

string

key

Description

is_seated

"seated"

gunner_key

Sent by the vehicle/weapon's control script to associate or dissociate an avatar with a vehicle or weapon's combat. is_seated=0 dissociates the vehicle/weapon from the current gunner; any other value of is_seated will associate the vehicle/weapon with an avatar whose UUID is gunner_key. If gunner_key is not a valid avatar in the sim, combat cannot be enabled. This link message is used by the VICE, TCS, and VICE+TCS integrated sensor scripts.

tcs_on

"tcs ctrl"

""

Sent by the vehicle/weapon's control script to toggle TCS on/off. tcs_on=0 disables TCS; any other integer enables TCS.

gun_fire

"gun ctrl"

""

Sent by the vehicle/weapon's control script to control the guns. gun_fire=0 ceases fire; any other integer initiates fire. This link message is used by the VICE & VICE+TCS integrated sensor scripts.

tcs_stats

"tcs stats"

""

Sent by the VICE+TCS integrated script to indicate TCS stats. Message format is the same as the "vice stats" message, except that link_hit is always "", due to the limitations of sensor-based combat.

crash_code

"crash"

killer_key

Sent by either the VICE sensor script or the VICE+TCS integrated script when the player has died. See the crash code table below to decipher crash_code


Crash Codes used by TCS


crash_code

Meaning

0

uncrash (unit has regenerated)

1

TCS-initiated crash

Parsing TCS Stats


Variable

How to extract from *_stats

tcs_kills

(tcs_stats>>26)&63

tcs_deaths

(tcs_stats>>20)&63

tcs_hits

(tcs_stats>>8)&4095

tcs_hp

tcs_stats&255

Notes

  • A popular feature of TCS vehicles is a particle script that generates particle "bullets" whenever the gunner fires the weapons. These particles are completely cosmetic and optional of course, and only serve as tracers, providing a very rough estimate of the sensor cone's direction (the TCS instant hit cone is actually ~24m in size @ 80m, or pi/20; an accurate particle representation of the TCS sensor cone would fire particles in a very large scattered cone). The VICE package does not provide these particles or other gun effects, but is recommend that you consider adapting TCS's gun particle system to react to the "gun ctrl" message Also, consider disabling TCS bullet particles when VICE is enabled, as the VICE bullets are decent tracers by themselves.

  • It would be trivial to add bomb support to TCS, as it is not well adapted to bombs (usually each hit takes away exactly 1 HP, for instance, so multi-HP damage would be klunky). Furthermore, the purpose of the integrated VICE+TCS scripts is to mimic the performance of the original scripts as much as possible; changing the systems would break this goal.
Last Updated ( Apr 02, 2009 at 09:39 PM )
Login Form
Username

Password

Remember me
Password Reminder
No account yet? Create one