Go to the documentation of this file.
128 extern const char *
i18n(
const object *
who,
const char *
code);
162 extern void change_exp(
object *
op, int64_t exp,
const char *skill_name,
int flag);
165 extern void share_exp(
object *
op, int64_t exp,
const char *
skill,
int flag);
218 extern
int on_same_map(const
object *op1, const
object *op2);
225 extern
char *
ob_describe(const
object *
op, const
object *observer,
int use_media_tags,
char *
buf,
size_t size);
255 extern
void object_copy(const
object *src_ob,
object *dest_ob);
275 extern
object *
object_split(
object *orig_ob, uint32_t nr,
char *err,
size_t size);
296 extern
int dirdiff(
int dir1,
int dir2);
354 extern const
char *
re_cmp(const
char *
str, const
char *regexp);
356 extern
int nstrtok(const
char *buf1, const
char *buf2);
357 extern
char *
strtoktolin(const
char *buf1, const
char *buf2,
char *retbuf,
size_t size);
420 extern
long timespec_diff(struct timespec *end, struct timespec *start);
437 extern int64_t
random_roll64(int64_t min, int64_t
max, const
object *
op,
int goodbad);
438 extern
int die_roll(
int num,
int size, const
object *
op,
int goodbad);
439 extern
int rndm(
int min,
int max);
445 extern
void replace(const
char *src, const
char *
key, const
char *replacement,
char *
result,
size_t resultsize);
451 extern
size_t split_string(
char *
str,
char *array[],
size_t array_size,
char sep);
468 extern
void yyfree(
void *ptr);
int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy)
void clear_friendly_list(void)
void path_normalize(char *path)
void share_exp(object *op, int64_t exp, const char *skill, int flag)
void object_remove_from_active_list(object *op)
void yyset_out(FILE *out_str)
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
recipelist * get_formulalist(int i)
int get_dex_bonus(int stat)
void object_unset_flag_inv(object *op, int flag)
const char * get_periodofday(const int index)
void object_add_weight(object *op, signed long weight)
void clear_los(player *pl)
mapstruct * get_empty_map(int sizex, int sizey)
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
method_ret ob_process(object *op)
object * object_find_by_flag_applied(const object *who, int flag)
void query_short_name(const object *op, char *buf, size_t size)
int dirdiff(int dir1, int dir2)
unsigned int tick_length(float seconds)
StringBuffer * stringbuffer_new(void)
int object_set_value(object *op, const char *key, const char *value, int add_key)
bool object_value_set_shared(const object *op, sstring key)
void register_describe(int ob_type, describe_func method)
const Face * try_find_face(const char *name, const Face *error)
void fix_object(object *op)
void tailor_readable_ob(object *book, int msg_type)
int object_can_pick(const object *who, const object *item)
void free_player(player *pl)
const char * player_get_own_title(const struct player *pl)
int player_has_own_title(const struct player *pl)
void free_objectlinkpt(oblinkpt *obp)
FILE * tempnam_secure(const char *dir, const char *pfx, char **filename)
const char * get_region_longname(const region *r)
void write_todclock(void)
void transmute_materialname(object *op, const object *change)
int calculate_difficulty(mapstruct *m)
method_ret(* trigger_func)(object *, object *, int)
based on the size of the this randomly makes land number of spaces randomly lower or higher The default is Note that this is run also based on the the altitude amount will likely be less So if you do something like l and n
void create_template_pathname(const char *name, char *buf, size_t size)
int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply)
void init_msgfile(FILE *file, const char *filename)
const Face * find_face(const char *name)
void free_experience(void)
int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy)
void query_base_name(const object *op, int plural, char *buf, size_t size)
void init_attackmess(BufferReader *reader, const char *filename)
object * object_find_by_type_applied(const object *who, int type)
const char * i18n(const object *who, const char *code)
void dump_arch(archetype *at, StringBuffer *sb)
object * object_find_by_type(const object *who, int type)
void animate_turning(object *op)
const Face * get_face_by_id(uint16_t id)
mapstruct * ready_map_name(const char *name, int flags)
char * path_combine(const char *src, const char *dst, char *path, size_t size)
void dump_experience(void)
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
int is_type_valid(uint8_t type)
int nstrtok(const char *buf1, const char *buf2)
int object_count_free(void)
size_t get_faces_count(void)
object * arch_present_in_ob(const archetype *at, const object *op)
void init_regions(BufferReader *reader, const char *filename)
int object_can_merge(object *ob1, object *ob2)
void make_sure_seen(const object *op)
void player_get_title(const struct player *pl, char *buf, size_t bufsize)
const object * find_god(const char *name)
void object_replace_insert_in_map(const char *arch_string, object *op)
float get_speed_bonus(int stat)
language_t i18n_get_language_by_code(const char *code)
void object_update_speed(object *op)
#define PRINTF_ARGS(x, y)
int out_of_map(mapstruct *m, int x, int y)
int object_matches_string(object *pl, object *op, const char *name)
void object_dump_all(void)
void query_weight(const object *op, char *buf, size_t size)
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
int is_identified(const object *op)
int get_randomized_dir(int dir)
void set_tick_duration(long t)
void treasure_free(treasure *t)
void clear_player(player *pl)
int64_t level_exp(int level, double expmul)
method_ret(* process_func)(object *)
int remove_depletion(object *op, int level)
object * check_inv_recursive(object *op, const object *trig)
void drain_specific_stat(object *op, int deplete_stats)
int load_object_from_reader(BufferReader *reader, object *op, int map_flags, bool arch_init, bool artifact_init)
int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval)
void apply_death_exp_penalty(object *op)
int get_button_value(const object *button)
void get_search_arr(int *search_arr)
int calc_item_power(const object *op)
static const flag_definition flags[]
archetype * find_archetype_by_object_type_name(int type, const char *name)
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
object * object_find_by_flag(const object *who, int flag)
linux kernel c mode(defun linux-c-mode() "C mode with adjusted defaults for use with the Linux kernel."(interactive)(c-mode)(c-set-style "K&R")(setq c-basic-offset 8))
void make_list_like(char *input)
treasurelist * find_treasurelist(const char *name)
void object_update(object *op, int action)
void check_inv(object *op, object *trig)
object * get_random_mon(int level)
void treasure_remove_item(treasurelist *list, int position)
void object_free_all_data(void)
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
archetype * get_archetype_by_type_subtype(int type, int subtype)
long usec_elapsed(struct timespec first, struct timespec second)
void object_give_identified_properties(object *op)
void add_statbonus(object *op)
void set_materialname(object *op)
int adjust_dir(int dir, int destination_dir)
int object_check_move_on(object *op, object *originator)
void yyset_in(FILE *in_str)
int load_object(FILE *fp, object *op, int bufstate, int map_flags, bool artifact_init)
client_spell * get_client_spell_state(player *pl, object *spell)
const artifact * find_artifact(const object *op, const char *name)
int is_wraith_pl(object *op)
void void init_block(void)
void free_all_recipes(void)
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
void free_objectlink(objectlink *ol)
void decay_objects(mapstruct *m)
void generate_artifact(object *op, int difficulty)
void make_path_to_file(const char *filename)
const char * object_get_value(const object *op, const char *const key)
void create_overlay_pathname(const char *name, char *buf, size_t size)
sstring stringbuffer_finish_shared(StringBuffer *sb)
const object * get_rand_god(void)
void free_charlinks(linked_char *lc)
void update_all_los(const mapstruct *map, int x, int y)
void yyset_lineno(int line_number)
void clean_tmp_map(mapstruct *m)
void object_free_drop_inventory(object *ob)
object * object_find_by_type2(const object *who, int type1, int type2)
const char * get_colorname(uint8_t index)
const typedata * get_typedata_by_name(const char *name)
Plugin animator file specs[Config] name
method_ret ob_trigger(object *op, object *cause, int state)
int exp_level(int64_t exp)
uint32_t get_weight_limit(int stat)
int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
const char * re_cmp(const char *str, const char *regexp)
sstring get_message_body(const GeneralMessage *message)
const char * get_name_of_region_for_map(const mapstruct *m)
uint8_t find_color(const char *name)
void yyset_debug(int bdebug)
void update_all_map_los(mapstruct *map)
void set_dragon_name(object *pl, const object *abil, const object *skin)
mapstruct * has_been_loaded(const char *name)
static event_registration m
int64_t new_exp(const object *ob)
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
int find_smooth(const Face *face, const Face **smoothed)
int is_valid_faceset(int fsn)
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
int load_png_file(FILE *file, const char *full_path)
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy)
bool check_formulae(void)
object * create_singularity(const char *name)
int object_count_active(void)
void update_los(object *op)
Animations * find_animation(const char *name)
int allowed_class(const object *op)
void add_button_link(object *button, mapstruct *map, int connected)
artifactlist * get_empty_artifactlist(void)
void object_clear_owner(object *op)
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
artifact * get_empty_artifact(void)
void(* describe_func)(const object *, const object *, int use_media_tags, char *buf, size_t size)
void update_buttons(mapstruct *m)
void object_remove(object *op)
void register_trigger(int ob_type, trigger_func method)
object * object_find_by_tag_global(tag_t i)
int die_roll(int num, int size, const object *op, int goodbad)
int object_count_used(void)
int region_is_child_of_region(const region *child, const region *r)
object * object_find_by_name(const object *who, const char *name)
const GeneralMessage * get_message_from_identifier(const char *identifier)
object * object_get_player_container(object *op)
void object_merge_spell(object *op, int16_t x, int16_t y)
const char * get_region_msg(const region *r)
treasure * treasure_insert(treasurelist *list, int position)
uint16_t artifact_get_face(const artifact *art)
object * arch_to_object(archetype *at)
int load_face_file(FILE *file, const char *full_path)
void yypop_buffer_state(void)
int legal_artifact_combination(const object *op, const artifact *art)
object * get_next_friend(object *current)
oblinkpt * get_objectlinkpt(void)
void give_artifact_abilities(object *op, const object *artifact)
int get_face_fallback(int faceset, uint16_t imageno)
void print_monsters(void)
void dump_artifacts(void)
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
void dump_animations(void)
object * object_insert_in_map(object *op, mapstruct *m, object *originator, int flag)
void free_map(mapstruct *m)
int get_learn_spell(int stat)
void init_ob_types(ob_methods *base_type)
recipe * get_random_recipe(recipelist *rpl)
char * create_pathname(const char *name, char *buf, size_t size)
void free_all_readable(void)
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your message
int is_identifiable_type(const object *op)
size_t stringbuffer_length(StringBuffer *sb)
const char * get_month_name(const int index)
void change_luck(object *op, int value)
archetype * get_archetype_by_skill_name(const char *skill, int type)
object * object_insert_in_ob(object *op, object *where)
with a maximum of six This is not so if you are wearing plate you receive no benefit Armour is additive with all the supplementry forms of which means that it lasts until the next semi permanent spell effect is cast upon the character spell
int8_t get_attr_value(const living *stats, int attr)
int strtoint(const char *buf)
int object_distance(const object *ob1, const object *ob2)
archetype * find_archetype_by_object_name(const char *name)
language_t i18n_find_language_by_code(const char *code)
const char * time_format_time(const timeofday_t *tod, char *buf, size_t bufsize)
void add_abilities(object *op, const object *change)
void apply_anim_suffix(object *who, const char *suffix)
void object_copy_with_inv(const object *src_ob, object *dest_ob, bool update_speed)
void object_free_inventory(object *ob)
object * object_find_by_arch_name(const object *who, const char *name)
void animation_load_block(FILE *file, const char *full_path, const char *animation_name)
int save_object(FILE *fp, object *op, int flag)
int is_old_wraith_pl(object *op)
void fatal(enum fatal_error err) __attribute__((noreturn))
long timespec_diff(struct timespec *end, struct timespec *start)
const artifact * locate_recipe_artifact(const recipe *rp, size_t idx)
void dump_map(const mapstruct *m)
archetype * get_archetype_struct(void)
void object_set_flag_inv(object *op, int flag)
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
object * object_new(void)
char * stringbuffer_finish(StringBuffer *sb)
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your and press< Return > You can also use say if you feel like typing a little extra Other NPCs may not speak to but display intelligence with their movement Some monsters can be and may attack the nearest of your enemies Others can be in that they follow you around and help you in your quest to kill enemies and find treasure SPECIAL ITEMS There are many special items which can be found in of these the most important may be the signs all a player must do is apply the handle In the case of the player must move items over the button to hold it down Some of the larger buttons may need very large items to be moved onto before they can be activated Gates and locked but be for you could fall down into a pit full of ghosts or dragons and not be able to get back out Break away sometimes it may be worth a player s time to test the walls of a map for secret doors Fire such as missile weapons and spells you will notice them going up in smoke ! So be careful not to destroy valuable items Spellbooks sometimes a player can learn the other times they cannot There are many different types of books and scrolls out there Improve item have lower weight
void object_reset(object *op)
mapstruct * get_linked_map(void)
How to Install a Crossfire Server on you must install a python script engine on your computer Python is the default script engine of Crossfire You can find the python engine you have only to install them The VisualC Crossfire settings are for d
struct face_sets * fallback
void object_insert_to_free_spot_or_free(object *op, mapstruct *map, int x, int y, int start, int stop, object *originator)
void get_levelnumber(int i, char *buf, size_t size)
key_value * object_get_key_value(const object *ob, const char *key)
void load_treasures(void)
int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad)
void get_tod(timeofday_t *tod)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
int get_power_from_ench(int ench)
void update_position(mapstruct *m, int x, int y)
void write_book_archive(void)
void change_attr_value(living *stats, int attr, int8_t value)
const Face * get_message_face(const GeneralMessage *message)
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
method_ret(* move_on_func)(object *, object *, object *)
void map_remove_unique_files(const mapstruct *map)
pluglist shows those as well as a short text describing each the list will simply appear empty The keyword for the Python plugin is Python plugout< keyword > Unloads a given identified by its _keyword_ So if you want to unload the Python you need to do plugout Python plugin< libname > Loads a given whose _filename_ is libname So in the case of you d have to do a plugin cfpython so Note that all filenames are relative to the default plugin path(SHARE/plugins). Console messages. ----------------- When Crossfire starts
object * object_find_by_type_and_race(const object *who, int type, const char *race)
void animate_object(object *op, int dir)
void init_experience(void)
void remove_directory(const char *path)
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
void dump_all_archetypes(void)
int get_thaco_bonus(int stat)
void yyrestart(FILE *input_file)
const char * map_get_path(const object *item)
void stringbuffer_delete(StringBuffer *sb)
mapstruct * mapfile_load(const char *map, int flags)
void dump_monster_treasure(const char *name)
void object_handle_death_animation(object *op)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
void dump_alchemy_costs(void)
objectlink * get_friends_of(const object *owner)
object * object_get_owner(object *op)
void first_arch_pass(FILE *fp, const char *filename)
int set_variable(object *op, const char *buf)
archetype * get_next_archetype(archetype *current)
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
void set_abs_magic(object *op, int magic)
int64_t check_exp_adjust(const object *op, int64_t exp)
bool object_value_set(const object *op, const char *const key)
static ob_methods base_type
void object_set_enemy(object *op, object *enemy)
void replace_unprintable_chars(char *buf)
object * object_find_by_type_subtype(const object *who, int type, int subtype)
void calc_perm_exp(object *op)
int is_magical(const object *op)
treasure * get_empty_treasure()
object * object_create_arch(archetype *at)
int did_make_save(const object *op, int level, int bonus)
void object_clear(object *op)
void push_button(object *op)
const char * get_weekday(const int index)
long get_sleep_remaining(void)
method_ret ob_apply(object *op, object *applier, int aflags)
object * give_skill_by_name(object *op, const char *skill_name)
void trigger_connected(objectlink *ol, object *cause, const int state)
object * object_get_env_recursive(object *op)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
int atnr_is_dragon_enabled(int attacknr)
void object_free_key_values(object *op)
const typedef char * sstring
const char * get_god_for_race(const char *race)
int get_fear_bonus(int stat)
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
region * get_region_by_map(mapstruct *m)
void LOG(LogLevel logLevel, const char *format,...) PRINTF_ARGS(2
void register_move_on(int ob_type, move_on_func method)
int is_dragon_pl(const object *op)
void object_update_turn_face(object *op)
int change_abil(object *op, object *tmp)
const Face * recipe_get_face(const recipe *rp)
int on_same_map(const object *op1, const object *op2)
void remove_friendly_object(object *op)
Python Guilds Quick outline Add a guild(mapmakers) this is still a problem *after dropping the token to gain access to the stove a woodfloor now appears which is Toolshed Token(found in Guild_HQ) *Note also have multiple gates in place to protect players and items from the mana explosion drop x for Jewelers room *Jewelers room works just need to determine what x is drop x for Thaumaturgy room *Thaumaturgy room works just need to determine what x is drop gold dropping the Firestar named fearless allows access to but I suspect that the drop location of the chest is not as intended because the player is in the way once you enter the chest the exit back to the basement is things such as the message et al reside on teleporters which then transport items to the map as they are when the map is already purchased items reappear in that area From my this does not cause any problems at the moment But this should be corrected fixed Major it s now possible to buy guilds Ryo Update Uploaded guild package to CVS Changes the cauldrons and the charging room I spent a while agonizing over They were natural guild enhancements but much too much value for any reasonable expense to buy them Then I thought that they should be pay access but at a greatly reduced rate SO when you buy a forge or whatever for your guild it is available on a perplayer daily rate but it will be accessable for testing and to DMs to play with Like I said lots still to do with the especially comingt up with quest items for buying things like the new workshops and stuff One of the things I would like some input on would be proposals for additional fields for either the guildhouses or guild datafiles to play with Currently the Guildhouse but there is no reason we can t have more than one measure of a guild perhaps have dues relate to Dues and use points for some other suspended or inactive or when a guild is founded inactive active Guilds have the format
void artifact_compute_chance_for_item(const object *op, const artifact *art, int *numerator, int *denominator)
const typedata * get_typedata(int itemtype)
void clean_object(object *op)
object * object_present_in_ob(uint8_t type, const object *op)
object * object_find_by_type_without_flags(const object *who, int type, int *flags, int num_flags)
int operate_altar(object *altar, object **sacrifice)
void register_process(int ob_type, process_func method)
region * get_region_by_name(const char *region_name)
void player_set_dragon_title(struct player *pl, int level, const char *attack, int skin_resist)
void object_sub_weight(object *op, signed long weight)
int check_trigger(object *op, object *cause)
void player_set_own_title(struct player *pl, const char *title)
object * object_find_by_type_and_skill(const object *who, int type, const char *skill)
void i18n_list_languages(object *who)
objectlink * get_objectlink(void)
int64_t check_exp_loss(const object *op, int64_t exp)
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various stats
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
void object_copy(const object *src_ob, object *dest_ob)
sstring i18n_get_language_code(language_t language)
object * identify(object *op)
void set_attr_value(living *stats, int attr, int8_t value)
int random_roll(int min, int max, const object *op, int goodbad)
void dump_friendly_objects(void)
int get_cleric_chance(int stat)
void stringbuffer_append_string(StringBuffer *sb, const char *str)
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
object * object_find_by_type_and_slaying(const object *who, int type, const char *slaying)
void delete_map(mapstruct *m)
int object_matches_pickup_mode(const object *item, int mode)
object * map_find_by_type(mapstruct *m, int x, int y, uint8_t type)
void object_set_msg(object *op, const char *msg)
void register_apply(int ob_type, apply_func method)
void free_all_artifacts(void)
sstring get_message_title(const GeneralMessage *message)
char * path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size)
void object_copy_no_speed(const object *src_ob, object *dest_ob)
object * object_find_by_type_and_name(const object *who, int type, const char *name)
void object_set_cheat(object *op)
Crossfire Protocol most of the time after the actual code was already omit certain important and possibly make life miserable any new developer or curious player should be able to find most of the relevant information here If inconsistencies are found or this documentation proves to be consider the latest server side protocol code in the public source code repository as the authoritative reference Introduction If you were ever curious enough to telnet or netcat to a Crossfire chances are you were sorely disappointed While the protocol may seem to use plain text at first
int get_cha_bonus(int stat)
signed long object_sum_weight(object *op)
recipe * find_recipe_for_tool(const char *tool, recipe *from)
archetype * find_treasure_by_name(const treasure *t, const char *name, int depth)
object * object_decrease_nrof(object *op, uint32_t i)
void object_fix_multipart(object *tmp)
void tick_game_time(void)
void object_set_owner(object *op, object *owner)
object * object_find_by_tag(const object *who, tag_t tag)
object * create_archetype_by_object_name(const char *name)
int object_find_multi_free_spot_around(const object *ob, const object *gen, int16_t *hx, int16_t *hy)
int has_ability(const object *ob)
object * generate_treasure(treasurelist *t, int difficulty)
object * get_jail_exit(object *op)
Crossfire Architecture the general intention is to enhance the enjoyability and playability of CF In this code
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove)
int check_path(const char *name, int prepend_dir)
void object_copy_owner(object *op, object *clone)
archetype * find_archetype(const char *name)
method_ret ob_move_on(object *op, object *victim, object *originator)
void load_image_info(FILE *file, const char *filename)
void add_friendly_object(object *op)
int has_carried_lights(const object *op)
const char * destination_dir
void set_map_reset_time(mapstruct *map)
const char * get_season_name(const int index)
void object_dump(const object *op, StringBuffer *sb)
object * object_create_clone(object *asrc)
StringBuffer * describe_monster(const object *op, int use_media_tags, StringBuffer *buf)
void strip_endline(char *buf)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
object * create_archetype(const char *name)
void dump_abilities(void)
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various what they and how they effect the player s actions Also in this section are the stat modifiers that specific classes professions bring Player and sps the current and maximum the Current and Maximum The Current Sp can go somewhat negative When Sp is negative not all spells can be and a more negative Sp makes spell casting less likey to succeed can affect Damage and how the characters as well as how often the character can attack this affects the prices when buying and selling items if this drops the player will start losing hit points wd Cleric or Dwarf sm Elf wd Fireborn ft Human ra Mage C Monk se Ninja hi Priest C Quetzalcoatl mw Swashbuckler si Thief st Viking ba Warrior or Wizard C Wraith C Class Prof Str Dex Con Wis Cha Int Pow Net Skills Enclosed are codes used for the skills above The ones in and fighting should all be pretty self explanatory For the other a brief description is for a more detailed look at the skills doc file Skill remove use magic items phys no fire cold Fireborns are supposed to be fire spirits They re closely in tune with magic and are powerful and learn magic easily Being fire they are immune to fire and and vulnerable to cold They are vulnerable to ghosthit and drain because being mostly non anything which strikes directly at the spirit hits them harder race attacktype restrictions immunities prot vuln Quetzalcoatl physical no armour fire cold Quetzalcoatl s are now born knowing the spell of burning but because of their negative wisdom bonus
int save_map(mapstruct *m, int flag)
int get_turn_bonus(int stat)
archetype * try_find_archetype(const char *name)
Animations * try_find_animation(const char *name)
void free_dialog_information(object *op)
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
materialtype_t * name_to_material(const char *name)
Crossfire Protocol most of the time after the actual code was already omit certain important and possibly make life miserable any new developer or curious player should be able to find most of the relevant information here If inconsistencies are found or this documentation proves to be consider the latest server side protocol code in the public source code repository as the authoritative reference Introduction If you were ever curious enough to telnet or netcat to a Crossfire chances are you were sorely disappointed While the protocol may seem to use plain text at it actually uses a mix of ASCII and binary data This handbook attempts to document various aspects of the Crossfire protocol As consult the README file to find out how to get in touch with helpful people via mailing and more History the communications plan was set to be a text based system It was up to the server and client to parse these messages and determine what to do These messages were assumed to be line per message At a reasonably early stage of Eric Anderson wrote a then the data itself you could send many data and after the other end could decode these commands This works fairly but I think the creation of numerous sub packets has some performance hit the eutl was not especially well so writing a client for a different platform became more Eric left to work on other products shortly after writing his which didn t really leave anyone with a full understanding of the socket code I have decided to remove the eutl dependency At least one advantage is that having this network related code directly in the client and server makes error handling a bit easier cleaner Packet Format the outside packet method the byte size for the size information is not included here Eutl originally used bytes for the size to bytes seems it makes a least some sense The actual data is something of the nature of the commands listed below It is a text followed by possible other data The remaining data can be binary it is up to the client and server to decode what it sent The commands as described below is just the data portion of the packet If writing a new remember that you must take into account the size of the packet There is no termination of other than knowing how long it should be For most everything that is sent is text This is more or less how things worked under except it packed the ints into bytes in a known order In some we handle ints as in they are sent as binary information How any command handles it is detailed below in the command description The S and C represent the direction of the we use MSB as well as any ints or shorts that get sent inside the packets All packets are defined to have at least one word of text
int get_dam_bonus(int stat)
void remove_statbonus(object *op)
object * object_merge(object *op, object *top)
void init_archetype_pointers(void)
void use_trigger(object *op)
region * get_region_from_string(const char *name)
void time_info(object *op)
void stringbuffer_append_multiline_block(StringBuffer *sb, const char *start, const char *content, const char *end)
void clean_friendly_list(void)
void print_los(object *op)
void init_formulae(BufferReader *reader, const char *filename)
void link_player_skills(object *op)
const readable_message_type * get_readable_message_type(object *readable)
int find_dir_2(int x, int y)
int rndm(int min, int max)
object * object_find_by_name_global(const char *str)
void remove_button_link(object *op)
int change_map_light(mapstruct *m, int change)
void free_arch(archetype *at)
region * get_region_struct(void)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
void drain_stat(object *op)
void make_sure_not_seen(const object *op)
void query_name(const object *op, char *buf, size_t size)
void save_object_in_sb(StringBuffer *sb, object *op, const int flag)
void player_lvl_adj(object *who, object *op)
size_t split_string(char *str, char *array[], size_t array_size, char sep)
artifactlist * find_artifactlist(int type)
int is_friendly(const object *op)
void update_button(object *op)
method_ret(* apply_func)(object *, object *, int)
void object_free(object *ob, int flags)