CFAnim (Animator for Gridarta) is a server plugin to make animations for NPCs.
It uses a simple text file format, described below.
Not all commands are actually implemented, and the plugin overall status is experimental - maybe it can crash the server.
There is an example map in /test/cfanim
, with associated scripts /test/cfanim.animation
and /test/cfanim.button
.
more details?
In short: Plugin animator file specs
This must be the first section. It defines the overall animation configuration.
Parameters:
Name | Meaning |
---|---|
name | “anystring” |
victimtype | player must be a player, object is an object, any means it doesn't matter, byname means the victim is the name of the object to animate |
victim | who for the object containing the event object, activator for the object which caused who to activate, who_owner and activator_owner for the containing object, object's name for an arbitrary object (in which case victimtype should be byname ) |
unique | yes or no |
always_delete | yes or no |
parallel | yes or no |
paralyzed | yes or no |
time_representation | second or tick |
errors_allowed | yes or no |
verbose | yes or no |
animation | Animation |
invisible | yes or no |
wizard | yes or no |
explain all parameters, make sure they work
This is the actual animation definition. Each line is a move, in the format:
time command parameters #comment #not a comment. wrong line!! time command parameters time command parameters
Commands available:
Command | Parameters | Description |
---|---|---|
say | saywhat: string | Says saywhat (behaviour depend on victim being object or player |
apply | Apply first applicable object on ground | |
apply_object | object_name | Apply object object_name (ground checked first then inventory) |
drop_object | object_name | Drop object object_name from inventory |
pickup | Pickup first object on ground | |
pickup_object | object_name | Pickup object_name from ground |
ghosted | yes or no | Players leave their corpse at the current location and become a soul. Usefull for camera effects. Puts the invisible flag and wizard flag to yes |
invisible | yes or no | Show or hide player |
wizard | yes or no | Can or not walk through walls and monster (dungeon master) |
teleport | x y mapname | Teleport object to mapname at position x,y |
notice | noticewhat | Put a beautifull text (noticewhat) in Navy in the console of player |
moveto | x y | Will make the object move towards the specified point in its map till it reaches the spot. One move per animation tick |
north | Moves in the specified direction | |
north_east | Moves in the specified direction | |
east | Moves in the specified direction | |
south_east | Moves in the specified direction | |
south | Moves in the specified direction | |
south_west | Moves in the specified direction | |
west | Moves in the specified direction | |
north_west | Moves in the specified direction | |
fire_north | Fires in the specified direction | |
fire_north_east | Fires in the specified direction | |
fire_east | Fires in the specified direction | |
fire_south_east | Fires in the specified direction | |
fire_south | Fires in the specified direction | |
fire_south_west | Fires in the specified direction | |
fire_west | Fires in the specified direction | |
fire_north_west | Fires in the specified direction | |
turn_north | Turns in the specified direction | |
turn_north_east | Turns in the specified direction | |
turn_east | Turns in the specified direction | |
turn_south_east | Turns in the specified direction | |
turn_south | Turns in the specified direction | |
turn_south_west | Turns in the specified direction | |
turn_west | Turns in the specified direction | |
turn_north_west | Turns in the specified direction |