|
Since Beta 2, Synergy supports Customizable NPCs for level creators. That means, certain properties for an NPC can be changed to give the game some more variety, or make levels more interesting by changing the appearance of an NPC.
Synergy uses external script files to define these unique properties for custom NPCs, known as "Custom (NPC) Script Files" or "CSF" for short. These files are located in the "scripts/csf/" directory.
These are the current keys that are being used in the game now:
Variable Name | Description |
classname | Entity classname of NPC the file is for (optional, but recommended) |
name | Name that will show for this NPC on the HUD |
model | Model this NPC is to use |
sound | Sound prefix to use for sounds |
blood | Blood color of this NPC |
class | Class relationship |
skin | Skin group of model to use |
health | Health and maximum health of NPC |
ignite | Allow NPC to ignite (0/1) |
The values of "name", "model", "skin", "health" and "ignite" should be obvious to you, so I will not have to explain those to you.
The value of the "sound" key can either be "MUTE" or something else of your choice. When "MUTE" is used, the NPC will no longer play or use any sounds.
Should you decide to use something else, the sounds that are played by the NPC will be different. The sounds will be named as "<soundValue>.<soundFromList>" (for example, "NPC_ShockSoldier.Die").
The list of sounds for the specific NPCs can be found right here.
The value of "blood" can be any one of these:
0 = None
1 = Red
2 = Yellow
3 = Green
4 = Machine
And here are the values for "class":
4 = CLASS_PLAYER_ALLY
5 = CLASS_PLAYER_ALLY_VITAL
6 = CLASS_ANTLION
7 = CLASS_BARNACLE
9 = CLASS_CITIZEN_PASSIVE
10 = CLASS_CITIZEN_REBEL
11 = CLASS_COMBINE
12 = CLASS_COMBINE_GUNSHIP
14 = CLASS_HEADCRAB
15 = CLASS_MANHACK
16 = CLASS_METROPOLICE
17 = CLASS_MILITARY
18 = CLASS_SCANNER
19 = CLASS_STALKER
20 = CLASS_VORTIGAUNT
21 = CLASS_ZOMBIE
22 = CLASS_PROTOSNIPER
25 = CLASS_EARTH_FAUNA
27 = CLASS_BULLSQUID
28 = CLASS_HOUNDEYE
29 = CLASS_GARGANTUA
30 = CLASS_TENTACLE
31 = CLASS_HUMAN_MILITARY
32 = CLASS_ALIEN_MILITARY
You will end up with something like this, once you've completed your CSF:
"MyCustomNPC"
{
"classname" "npc_metropolice"
"health" 50
"class" 19
"blood" 0
}
Every CSF has an ID Tag - the name of the set of keyvalue data, in the file.
Refer to the example above; this CSF has an ID Tag value of "MyCustomNPC".
In Valve Hammer Editor, the CSF ID Tag value will be used as the value for the keyvalue in the NPC's Properties:
"customid" "MyCustomNPC"
|