Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Script Documentation [u4.1]  (Read 2838 times)

0 Members and 1 Guest are viewing this topic.

Offline TABLESPOON DEV COMMITTEE

  • *
  • +4% chance to make useful post
  • TABLESPOON DEV COMMITTEE has no influence.
Script Documentation [u4.1]
« on: February 11, 2015, 07:32:26 AM »
Script Documentation; Current Version - u4.1



Table of Contents
I ..... Introduction
II .... Custom Ammo
III ... Custom Combine Soldiers



Introduction
This thread contains information on the various script files included with TABLESPOON that allow users to customize the game to their personal preference.  More will be added as development continues.
« Last Edit: February 19, 2015, 06:37:25 PM by BIZ »

Offline TABLESPOON DEV COMMITTEE

  • *
  • +4% chance to make useful post
  • TABLESPOON DEV COMMITTEE has no influence.
Re: Script Documentation [u4.1]
« Reply #1 on: February 11, 2015, 07:55:14 AM »
Custom Ammo

The Custom Ammo script allows a user to define different types of ammo which can be used in conjunction with custom weapons.  Each user created ammo type can have different values set that control everything from damage and force to in-game item pickups.  The script is very simple to understand and there are currently no limits as to how many different types of ammo you can define (however larger script files may translate to longer load times).

The Custom Ammo script may be found in this directory:  .../scripts/custom_ammo.txt

Here is an example script:
Code: [Select]
"Custom_Ammo"  //Main block, always include once at top of script
{
"YourAmmoType"  //Ammo Type class, change to whatever you want. No duplicates please.
{
"DamageType" "1" //Type of Damage this bullet does. Different values will have different effects. Default: 1
"TracerType" "4" //Type of tracer this bullet uses. Different values will have different effects. Def: 0
"FromPlayerDamage" "25" //Damage this bullet does when fired by player. Def: 100
"FromNpcDamage" "20" //Damage this bullet does when fired by NPC. Def: 100
"MaxCarry" "250" //How much of this ammo can the player carry? Def: 10
"Grains" "200" //This helps calculate the impact force of the bullet. Def: 200
"FtPerSec" "1225" //Same as Grains only this is how fast it's flying in Feet Per Second. Def: 1225
"Flags" "0" //You got 2 choices here: 0 = nothing, 1 = Force drop if carried Def: 0
"YourAmmoPickup"  //This block contains information about item pickups in the game for this ammo type.
{
"model" "models/items/yourmodelname.mdl"  //Set the model for this ammo type's item pickup.
"MinAmount" "3" //Set the minimum amount of ammo this pickup can give.
"MaxAmount" "10" //Set the max amount of ammo this pickup can give.
}
"AmmoPickup2"  //You may have as many AmmoPickup blocks as you need for different item pickups, just make sure they have different names!
{
"model" "models/items/yourmodelname.mdl"
"MinAmount" "24" //Setting Min & Max to the same amount will always give that much ammo.
"MaxAmount" "24"
}
}
}

Once you have made your own Custom Ammo type, you can spawn it in-game via MapAdd by using the code:
Code: [Select]
"item_custom_ammo" {
"origin" "x y z"
"angle" "p y r"
"KeyValues" {
"AmmoType" "AmmoType" //This must match the name of a Custom Ammo type!
"EntityName" "YourAmmoPickup" //This must match the name of a Ammo Pickup type!

}
}


DAMAGE TYPE LIST:
Code: [Select]
0 : DMG_GENERIC
1 : DMG_CRUSH
2 : DMG_BULLET
3 : DMG_SLASH
4 : DMG_BURN
5 : DMG_VEHICLE
6 : DMG_FALL
7 : DMG_BLAST
8 : DMG_CLUB
9 : DMG_SHOCK
10 : DMG_SONIC
11 : DMG_ENERGYBEAM
12 : DMG_PREVENT_PHYSICS_FORCE
13 : DMG_NEVERGIB
14 : DMG_ALWAYSGIB
15 : DMG_DROWN
16 : DMG_PARALYZE
17 : DMG_NERVEGAS
18 : DMG_POISON
19 : DMG_RADIATION
20 : DMG_DROWNRECOVER
21 : DMG_ACID
22 : DMG_SLOWBURN
23 : DMG_REMOVENDRAGDOLL
24 : DMG_PHYSGUN
25 : DMG_PLASMA
26 : DMG_AIRBOAT
27 : DMG_DISSOLVE
28 : DMG_BLAST_SURFACE
29 : DMG_DIRECT
30 : DMG_BUCKSHOT

TRACER TYPE LIST:
Code: [Select]
0 : NONE
1 : TRACER_LINE
4 : TRACER_LINE_AND_WHIZ
« Last Edit: February 19, 2015, 06:57:25 PM by BIZ »

Offline TABLESPOON DEV COMMITTEE

  • *
  • +4% chance to make useful post
  • TABLESPOON DEV COMMITTEE has no influence.
Re: Script Documentation [u3]
« Reply #2 on: February 11, 2015, 07:56:19 AM »
Custom Combine Soldiers

This script allows you to create Custom NPC's based on the Combine Soldier.
« Last Edit: February 18, 2015, 02:15:54 AM by TABLESPOON DEV COMMITTEE »