QDT Sprite Scripting

There a few examples of qdt scripting under Kingpin:

Kingpin\main\models\weapons\v_colt\test.qdt
Kingpin\main\models\weapons\v_colt\testmag.qdt
Kingpin\main\models\weapons\v_hmgt\test.qdt
Kingpin\main\models\weapons\v_hmgcool\test.qdt

Where you open v_colt\test.qdt with a notepad editor and see:

// Add SFX to gun
$sfx_load pistol

$sfx_define
101       // type (fire)
0        // flags
0        // VEL_TYPE_UP (will move upwards)
3        // vel_speed
0        // gravity
2        // spawn interval, 2 = 0.1 seconds
0.5        // random spawn interval (sprite will be spawned 80% of the time)
0.9       // start alpha
0.0        // end alpha
0.2       // fadein time
4.0       // lifetime
0.2        // random time scale (fadein and lifetime will be multiplied by (x * 0.5), where x is a random number between -1 and 1
4.25       // start width
4.25       // end width
4.25       // start height
4.25       // end height
0.5       // random size scale (same as random time scale, but effects onle sizes)

$sfx_add
2       // INDEX (assigned to the first vertex)
0        // uses the first sfx_define (above)
0       // tells the engine to use the above INDEX is a vertex index
8 - 8    // frame ranges to enable the effect for

$sfx_save pistol

Most of the stuff should mostly explainable, you can edit stuff and change effects of the pistol.

Get kpdata.exe from the Kingpin_SDK_121.zip.

Put kpdata in the folder of the qdt file you want to alter for in this example:
Kingpin\main\models\weapons\v_colt\

Run a batch or cmd prompt:

kpdata test.qdt

It should say now:

--------------------------

Succesfully loaded pistol.mdx

Added sfx define #0
Added sfx entry, using sfx_define #0

Succesfully saved pistol.mdx.

--------------------------

It applied the QDT script file to the pistol.mdx.

If you did not alter the qdt file you probably would not see any difference in game.

If you alter 101 (fire sprite) to the QDT Sprite List to a other number you will defenly see a effect.
That effect will applied at vertices 2 on the gun during frames 8-8 (one frame) as defined in this script.


FREDZ | Monday 18 March 2019 - 00:23
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • email
  • Facebook
  • Google
  • PrintFriendly