Crossfire Server, Trunk
anim.cpp
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 1999-2014 Mark Wedel and the Crossfire Development Team
5  * Copyright (c) 1992 Frank Tore Johansen
6  *
7  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
8  * welcome to redistribute it under certain conditions. For details, please
9  * see COPYING and LICENSE.
10  *
11  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
12  */
13 
19 #include "global.h"
20 
21 #include <assert.h>
22 #include <errno.h>
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 
27 #include "assets.h"
28 #include "AssetsManager.h"
29 
44 void animate_object(object *op, int dir) {
45  int max_state; /* Max animation state object should be drawn in */
46  int base_state; /* starting index # to draw from */
47  uint16_t oldface = op->face->number;
48 
49  if (!op->animation || !NUM_ANIMATIONS(op)) {
50  StringBuffer *sb;
51  char *diff;
52 
53  LOG(llevError, "Object lacks animation.\n");
54  sb = stringbuffer_new();
55  object_dump(op, sb);
56  diff = stringbuffer_finish(sb);
57  LOG(llevError, "%s", diff);
58  free(diff);
59  return;
60  }
61 
62  if (op->head) {
63  dir = op->head->direction;
64 
65  if (NUM_ANIMATIONS(op) == NUM_ANIMATIONS(op->head))
66  op->state = op->head->state;
67  } else if (QUERY_FLAG(op, FLAG_IS_TURNABLE)) {
68  dir = op->direction;
69  }
70 
71  /* If object is turning, then max animation state is half through the
72  * animations. Otherwise, we can use all the animations.
73  */
74  max_state = NUM_ANIMATIONS(op)/NUM_FACINGS(op);
75  base_state = 0;
76  /* at least in the older aniamtions that used is_turning, the first half
77  * of the animations were left facing, the second half right facing.
78  * Note in old the is_turning, it was set so that the animation for a monster
79  * was always towards the enemy - now it is whatever direction the monster
80  * is facing.
81  */
82  if (NUM_FACINGS(op) == 2) {
83  if (dir < 5)
84  base_state = 0;
85  else
86  base_state = NUM_ANIMATIONS(op)/2;
87  } else if (NUM_FACINGS(op) == 4) {
88  if (dir == 0)
89  base_state = 0;
90  else
91  base_state = ((dir-1)/2)*(NUM_ANIMATIONS(op)/4);
92  } else if (NUM_FACINGS(op) == 8) {
93  if (dir == 0)
94  base_state = 0;
95  else
96  base_state = (dir-1)*(NUM_ANIMATIONS(op)/8);
97  } else if (QUERY_FLAG(op, FLAG_IS_TURNABLE)) {
98  base_state = (NUM_ANIMATIONS(op) / 9) * (dir);
99  max_state = NUM_ANIMATIONS(op) / 9;
100  }
101 
102  /* If beyond drawable states, reset */
103  if (op->state >= max_state) {
104  op->state = 0;
105  if (op->temp_animation) {
106  op->temp_animation = 0;
107  animate_object(op, dir);
108  return;
109  }
110  }
111  SET_ANIMATION(op, op->state+base_state);
112 
113  if (op->face == blank_face)
114  op->invisible = 1;
115 
116  /* This block covers monsters (eg, pixies) which are supposed to
117  * cycle from visible to invisible and back to being visible.
118  * as such, disable it for players, as then players would become
119  * visible.
120  */
121  else if (op->type != PLAYER && QUERY_FLAG((&op->arch->clone), FLAG_ALIVE)) {
122  if (op->face->number == 0) {
123  op->invisible = 1;
125  } else {
126  op->invisible = 0;
128  }
129  }
130 
131  if (op->more)
132  animate_object(op->more, dir);
133 
134  /* object_update() will also recursively update all the pieces.
135  * as such, we call it last, and only call it for the head
136  * piece, and not for the other tail pieces.
137  */
138  if (!op->head && (oldface != op->face->number))
140 }
141 
150 void apply_anim_suffix(object *who, const char *suffix) {
151  const Animations *anim;
152  object *head, *orig;
153  char buf[MAX_BUF];
154 
155  assert(who);
156  assert(suffix);
157 
158  if (who->temp_animation)
159  /* don't overlap animation, let the current one finish. */
160  return;
161 
162  head = HEAD(who);
163  orig = head;
164  snprintf(buf, MAX_BUF, "%s_%s", (head->animation ? head->animation->name : ""), suffix);
166  if (anim) {
167  for (; head != NULL; head = head->more) {
168  head->temp_animation = anim;
169  head->temp_anim_speed = anim->num_animations / anim->facings;
170  head->last_anim = 0;
171  head->state = 0;
172  }
173  animate_object(orig, orig->facing);
174  }
175 }
176 
180 void dump_animations(void) {
181  fprintf(stderr, "id name faces\n");
182  getManager()->animations()->each([] (const auto anim) { fprintf(stderr, "%5d %50s %5d\n", anim->num, anim->name, anim->num_animations); });
183 }
give.next
def next
Definition: give.py:44
archetypes
in no particular where with items from archetypes(create new archetypes where appropriate) *Find out where there are copies of the Nexus and HallOfSelection maps in this patch *Check maps for balance issues *Play test maps *Any other corrections or updates *Arrange maps in to directory structure such as/shops
building
*going from world map to inside a things get roughly times bigger *going from town to inside a building
Definition: scaling.txt:2
UP_OBJ_FACE
#define UP_OBJ_FACE
Definition: object.h:524
PLAYER
@ PLAYER
Definition: object.h:112
global.h
llevError
@ llevError
Definition: logger.h:11
it
**Media tags please refer to the protocol file in doc Developers protocol Quick for your pleasure an example[/b][i] This is an old full of dirt and partially destroyed[hand] My dear as you two years i had to leave quickly Words have come to me of powerful magic scrolls discovered in an old temple by my uncle I have moved to study them I not forgot your knowledge in ancient languages I need your help for[print][b] Some parts of document are to damaged to be readable[/b][arcane] Arghis[color=Red] k h[color=dark slate blue] ark[color=#004000] fido[/color][hand] please come as fast as possible my friend[print][b] The bottom of letter seems deliberatly shredded What is it
Definition: media-tags.txt:28
LOG
void LOG(LogLevel logLevel, const char *format,...)
Definition: logger.cpp:51
SET_FLAG
#define SET_FLAG(xyz, p)
Definition: define.h:224
patch
other than new code I created new revised altered the treasures file and created new object types and a flag It therefore may be enjoyable to install this patch(incl code) and *not *define ALCHEMY in define.h. In particular
player
Definition: player.h:105
Short
Short(and likely incomplete) list of items on the TODO list
difficult
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 difficult(you needed to first port over eutl.) An example such of this is the Java client. Also
QUERY_FLAG
#define QUERY_FLAG(xyz, p)
Definition: define.h:226
FLAG_IS_TURNABLE
#define FLAG_IS_TURNABLE
Definition: define.h:256
stringbuffer_new
StringBuffer * stringbuffer_new(void)
Definition: stringbuffer.cpp:57
guildoracle.list
list
Definition: guildoracle.py:87
TODO
this information may not reflect the current implementation This brief document is meant to describe the operation of the crossfire as well as the form of the data The metaserver listens on port for tcp and on port for udp packets The server sends updates to the metaserver via udp The metaserver only does basic checking on the data that server sends It trusts the server for the ip name it provides The metaserver does add the ip address and also tracks the idle time(time since last packet received). The client gets its information from the metaserver through connecting by means of tcp. The client should retrieve http the body s content type is text plain The current metaserver implementation is in Perl But the metaserver could be in any language perl is fast enough for the amount of data that is being exchanged The response includes zero or more server entries Each entry begins with the line START_SERVER_DATA and ends with the line END_SERVER_DATA Between these lines key value pairs("key=value") may be present. The entries are sent in arbitrary order. A client should apply some ordering when displaying the entries to the user. TODO b additional information outside BEGIN_SERVER_DATA END_SERVER_DATA TODO
Definition: arch-handbook.txt:150
SET_ANIMATION
#define SET_ANIMATION(ob, newanim)
Definition: global.h:162
you
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 you
Definition: survival-guide.txt:37
island
Story behind my Island The human king of the mainland has explorers scout for new territory On one expedition to an island
Definition: lore.txt:5
town
*going from world map to inside a town
Definition: scaling.txt:1
blank_face
const Face * blank_face
Definition: image.cpp:36
AssetsManager.h
is
And the skill structure used by the skills[] table is
Definition: arch-handbook.txt:577
buf
StringBuffer * buf
Definition: readable.cpp:1552
getManager
AssetsManager * getManager()
Definition: assets.cpp:305
FLAG_ALIVE
#define FLAG_ALIVE
Definition: define.h:230
Animations::name
sstring name
Definition: face.h:26
autojail.who
who
Definition: autojail.py:3
NUM_FACINGS
#define NUM_FACINGS(ob)
Definition: global.h:172
stringbuffer_finish
char * stringbuffer_finish(StringBuffer *sb)
Definition: stringbuffer.cpp:76
object_update
void object_update(object *op, int action)
Definition: object.cpp:1429
object::temp_anim_speed
uint8_t temp_anim_speed
Definition: object.h:430
disinfect.map
map
Definition: disinfect.py:4
times
Please do NOT use caps expect for enums and defines Section sending in and not make mega patches A diff that changes things is first more difficult for me to look over and understand as unrelated changes might be going on It is also harder for me to reject part of a I get patches which is just a bunch of source and I have no idea if I want to incorporate or even if the bug is still there Please also state what version of crossfire the diff is for I will assume any patches mailed directly to me are to be included If posting a patch on the mailing please explicity state whether or not you want that patch incorporated into the master source Many times
Definition: style-guide.txt:244
things
other than new code I created new revised altered the treasures file and created new object types and a flag It therefore may be enjoyable to install this this patch does the following things
Definition: arch-handbook.txt:33
fire
void fire(object *op, int dir)
Definition: player.cpp:2396
of
a copper bar weighs and has a value of
Definition: ore.txt:3
object_dump
void object_dump(const object *op, StringBuffer *sb)
Definition: object.cpp:645
apply_anim_suffix
void apply_anim_suffix(object *who, const char *suffix)
Definition: anim.cpp:150
HEAD
#define HEAD(op)
Definition: object.h:598
necessary
in no particular where necessary
Definition: TODO.txt:6
object::last_anim
uint8_t last_anim
Definition: object.h:428
often
Story behind my Island The human king of the mainland has explorers scout for new territory On one expedition to an the explorers found some flecks of gold in the river they settled next to Upon notification of the king ordered a permanent colony be established in order to find and harvest the gold A while after the colony was they found out an ancient fire dragon lives in a dormant volcano on the island It was very and attacked often
Definition: lore.txt:11
maps
this information may not reflect the current implementation This brief document is meant to describe the operation of the crossfire as well as the form of the data The metaserver listens on port for tcp and on port for udp packets The server sends updates to the metaserver via udp The metaserver only does basic checking on the data that server sends It trusts the server for the ip name it provides The metaserver does add the ip address and also tracks the idle time(time since last packet received). The client gets its information from the metaserver through connecting by means of tcp. The client should retrieve http the body s content type is text plain The current metaserver implementation is in Perl But the metaserver could be in any language perl is fast enough for the amount of data that is being exchanged The response includes zero or more server entries Each entry begins with the line START_SERVER_DATA and ends with the line END_SERVER_DATA Between these lines key value pairs("key=value") may be present. The entries are sent in arbitrary order. A client should apply some ordering when displaying the entries to the user. TODO b additional information outside BEGIN_SERVER_DATA END_SERVER_DATA maps
Definition: arch-handbook.txt:189
however
**Media tags please refer to the protocol file in doc Developers protocol Quick for your pleasure an example[/b][i] This is an old full of dirt and partially destroyed[hand] My dear as you two years i had to leave quickly Words have come to me of powerful magic scrolls discovered in an old temple by my uncle I have moved to study them I however
Definition: media-tags.txt:19
animate.anim
string anim
Definition: animate.py:20
object::facing
int8_t facing
Definition: object.h:345
object::animation
const Animations * animation
Definition: object.h:426
MAX_BUF
#define MAX_BUF
Definition: define.h:35
there
Story behind my Island The human king of the mainland has explorers scout for new territory On one expedition to an the explorers found some flecks of gold in the river they settled next to Upon notification of the king ordered a permanent colony be established there
Definition: lore.txt:7
temples
in no particular where with items from temples
Definition: TODO.txt:11
try_find_animation
Animations * try_find_animation(const char *name)
Definition: assets.cpp:278
to
**Media tags please refer to the protocol file in doc Developers protocol Quick for your pleasure an example[/b][i] This is an old full of dirt and partially destroyed[hand] My dear as you two years i had to leave quickly Words have come to me of powerful magic scrolls discovered in an old temple by my uncle I have moved to study them I not forgot your knowledge in ancient languages I need your help for[print][b] Some parts of document are to damaged to be readable[/b][arcane] Arghis[color=Red] k h[color=dark slate blue] ark[color=#004000] fido[/color][hand] please come as fast as possible my friend[print][b] The bottom of letter seems deliberatly shredded What is but not limited to
Definition: media-tags.txt:30
is_valid_types_gen.found
found
Definition: is_valid_types_gen.py:39
above
Magical Runes Runes are magical inscriptions on the dungeon which cast a spell or detonate when something steps on them Flying objects don t detonate runes Beware ! Runes are invisible most of the time They are only visible occasionally ! There are several runes which are there are some special runes which may only be called with the invoke and people may apply it to read it Maybe useful for mazes ! This rune will not nor is it ordinarily invisible Partial Visibility of they ll be visible only part of the time They have so the higher your the better hidden the runes you make are Examples of whichever way you re facing invoke magic rune transfer as above
Definition: runes-guide.txt:50
make_face_from_files.out
out
Definition: make_face_from_files.py:81
alchemy
int alchemy(object *op, object *caster, object *spell_ob)
Definition: spell_effect.cpp:2304
AssetsCollection::each
void each(std::function< void(T *)> op)
Definition: AssetsCollection.h:158
order
in no particular order
Definition: TODO.txt:6
give.op
op
Definition: give.py:33
animate_object
void animate_object(object *op, int dir)
Definition: anim.cpp:44
are
non standard information is not specified or uptime this means how long since the executable has been started A particular host may have been running a server for quite a long but due to updates or the length of time the server instance has been up may be much shorter MN US< br > link< br >< a href="http: text_comment=Latest SVN 1.x branch, Eden Prairie, MN US archbase=Standard mapbase=Standard codebase=Standard num_players=3 in_bytes=142050710 out_bytes=-1550812829 uptime=909914 version=1.11.0 sc_version=1027 cs_version=1023 last_update=1214541369 END_SERVER_DATA ---- Multigod -------- This is a brief description of the MULTIGOD hack. It is preserved here for mostly historical reasons. Introduction ~~~~~~~~~~~~ The intention of this code is to enhance the enjoy-ability and playability of clerical characters in the new skills/exp scheme. This is done by giving players gods to worship who in turn effect clerical magic and powers. Included in this patch are several new spells which (hopefully) will allow the priest characters a better chance to gain xp at higher levels. Notably, the "holy orb" and "holy word" spells have been revamped. When MULTIPLE_GODS flag is defined in include/config.h, this code is enabled. This code (described below) encompasses 3 main parts: an array of gods that players/NPCs may worship, new clerical spells which rely on the worshiped god's attrib- utes in Gods[] array and, altars/praying--the interface between a worshiper and their god. b.t. thomas@astro.psu.edu Implementation Details ~~~~~~~~~~~~~~~~~~~~~~ This code is flexible and easy to configure (just edit the god archetypes). Part of the reason for creating this code was to allow server maintainers to develop their own "mythos". From my personal point of view, I hate having the old "Christian" aligned mythos, but if that's what you like, you can replicate it with this code too (see below). Properties of the Gods ~~~~~~~~~~~~~~~~~~~~~~ Here is a fuller description of Gods archetype values. ---- name - name of the god (required) other_arch - archetype that will be used for the summon holy servant spell. title - diametrically opposed god, leave blank if none exists attacktype - favored attack of this god, used in spells of summon avatar, holy word. Recipients of "holy possession" get this too. immune - Avatars/holy servants/recipient of "holy possession" gets this. protected - all of the above AND recipient of god's blessing and the priest of this god gets this. vulnerable - Avatar/servant/recipient of gods curse/priest of this god get this. path_attuned - priest of this god and recipient of "bless" gets this path_repelled - priest and recipient of "curse" gets this path_denied - priest and recipient of "curse" gets this slaying - comma delimited list of the races of creatures that are aligned with the god. "summon cult monsters" uses. this list to find creatures. Summon avatar/call servant code assigns this value to prevent them from attacking aligned races. Value is blank if no race(s) exists. race - comma delimited list of the races of creatures "holy word", "holy possession" spells will effect. Value entry is blank if no such race(s) exists. hp,dam,ac,wc - base stats for the summoned avatar. ---- IF MORE_PRIEST_GIFTS is defined (in gods.c) then ADDITIONAL gifts/limitations will be assigned to the priest: Flags ^^^^^ Now, the following flags, in addition to being used by the god (if planted on a map) are assigned to the worshiping priest: can_use_weapon, can_use_armour, is_undead, is_blind, reflect_missile, reflect_spell, make_invisible, stealth, can_see_in_dark, xrays NOTE: if can_use_armour/can_use_weapon flags are NOT present, then the priest will be forbidden the use of these items. Stats ^^^^^ The following stats are used: ---- luck - how lucky the god (and the priest) are. last_eat - how fast priest digestion is last_hp - how fast priest healing is last_sp - how fast priest mana regeneration is last_grace - how fast priest grace regeneration is ---- Designing New Gods ~~~~~~~~~~~~~~~~~~ To examine the gods properties, use the '-m8' flag (ie 'crossfire -m8'). Note some of the big differences here in terms of spell_paths, races, etc. Most of these entries were designed with roughly polar opposite gods. For designing new gods. You should make sure that worshiping a god will be "unique" in some way. But playbalance first! You must consider the balance between the following: . spellpaths . priest gifts . priest limitations . special spells . attacktypes . summoned monster lists . properties of the avatar and holy servant. Here are some hard and fast rules for designing gods: - Decide how the cleric will get experience. The god should be either a 'summoning', 'turning' *or* a 'wounding' god. If summoning/turning, make sure the aligned_race/enemy_race list(s) has enough creatures to summon/slay at low, medium and high levels. DONT give a god attuned to wounding AND turning||summoning (in fact, at minimum, one of these 3 paths should be repelled/denied). - make sure the summoned avatar is stronger than the servant (!) - examine the avatar/servant stats. If set inproperly, you will give wimpy/super values. For example, Avatars/servants with less than 50 hp (and a high ac/no armour) will vanish quickly. Shoot for stats like: ---- type | A V E R A G E S T A T S | hp | ac | wc | arm | dam | speed ----------|----------------------------------- servant | 50 | 5 | 5 | 20 | 5 | 0.15 avatar | 350 | -5 | -1 | 50 | 50 | 0.25 ---- Its difficult to give measurements on how to trade these off. To help guide your choices try to conserve the value of speed*dam and (armour+1)*hp. * avoid giving the potent attacktypes of death, weaponmagic and paralysis. * gods have a vulnerability for every immunity. Not all attacktypes are the same. Immunity to physical, magic and common attacktypes (like fire/cold/electric) are very potent. Similarly, vuln to these is a big negative. * SPELL paths. Carefull treatment is needed here. Give a path_denied/ or a couple path_repelled for every path_attuned. BUT note: not all paths are of equal use. (ex path_abjuration has a very large list of spells). The main clerical paths are restoration, abjuration, protection, turning, wounding and summoning. For balance, make 3-4 of these repelled/denied and 1 or 2 attuned. Be sure to check out the special spells list (below). Attuned paths like DEATH, WOUNDING and (especially) PROTECTION are very potent. Allow for some balance else where if you assign (one!) of these as a path_attuned. * If using the MORE_PRIEST_GIFTS define: priest limitations of no weapons and no armour are very negative, be sure to compensate with more than an attunded path. Of course, you may break these 'rules' to create your god. When you do that, you had better make up for the bonus elsewhere! Otherwise, you will create a 'mega-god' whose worship (by the player priests) will unbalance the game. Designing a good god takes a bit of work. Special Spells ~~~~~~~~~~~~~~ Here is a possibly *incomplete* list of the special spells that a god may grant use to a worshiper. Check the file spellist.h for the 0 bookchance clerical spells to find all of these. (This list was complete on 10/96). ---- INFO perceive self PROTECTION defense; immuntity to cold, fire, electricity, poison, slow, paralysis, draining, attack, and magic RESTORE remove damnation; reincarnation; raise dead; resurrection; regeneration WOUNDING cause critical wounds; retributive strike LIGHT daylight; nightfall DEATH face of death; finger of death SUMMONING insect plague CREATE wall of thorns ---- Ideas ~~~~~ * Allow sacrifices. This is an excellent way to give a cleric xp. Need to create enemy_race creatures w/ bodyparts we can sacrifice, and designate a pointer in Gods to the appropriate array of stuff we can sacrifice for xp. Experience ---------- Obsolete file kept for historical reasons. Introduction ~~~~~~~~~~~~ This patch represents a "developer 's" version of the exp/skills system. While I have now achieved all of the objectives in sections "B" and "C" of the coding proposal (see README.PROPOSAL) and have play-tested as much of the code as possible, I am sure some big bugs must remain. (One for sure is that exp gained when using rod/horn/wand is wrong.) Below this section I outline 1) coding philosophy, 2) gross description of how the code impinges/interacts within older code. 3) designer's notes on the changes to the code. Comments on any area of this coding would be appreciated. Personally, I would like to see the Pow stat and a 2-type system of magic come into being. After all of you check out the code, I would like to discuss enhancements/bug fixes/implementation. For instance, is it too hard to figure out how to use the code! Sometime tomorrow exp2.tar.gz will be available in pub/thomas on ftp.astro.psu.edu. b.t. Code Philosophy ^^^^^^^^^^^^^^^ To move CF over to a new skills-based experience system. In this implementation several kinds of experience will exist. Players will gain experience in each kind of experience (or category) based on their actions in the game. The sum of all the various categories of experience equals the player "score", from which dam, wc, and hp are determined. All experience gaining actions will be through the use of certain skills -- so called "associated skills". Associated skills are each related to 1 kind of experience. Thus, for example, "stealing" is a skill associated with "agility" experience. There exists also "miscellaneous" skills which allow the use of a unique skill, but which are not related to any kind of experience and whose use does not generate experience points. In this implementation, skills and objects are both treated as objects in the inventory of the user. Experience "objects" each represent one kind of experience and are always invisible. Skills objects each represent one kind of skill available in the game. Skills objects may either be invisible or have an associated bitmap (in which case they are "tools"). All experience gaining actions will be through the use of certain skills -- called "associated skills". Associated skills are each related to 1 kind of experience. Thus, for example, "stealing" is a skill associated with "agility" experience. Both Players and NPC's may only use skills which are in their inventories. NPC's do not use experience objects. A breakdown of the properties of skills and exp objects objects is as follows: ---- Object Property NPC use? ------ ----------------------------------- ------- Experience Each represents a different kind of NO experience in the game. The object in the player inventory keeps track of player experience in that category. Always is invisible. Skill- Represents a skill the player may YES associated perform. May be either invisible or visible as a "tool". Successful use of this skill generates experience. Experience is allocated to appropriate experience object. Skill- Same as above, *but* this skill is not YES miscell. related to any experience category, and use of this skill generates *no* experience. ---- Linking of associated skills to experience categories is done during initialization of the code (in init()) based on the shared stats of both. How skills and experience categories are named and linked may be changed by editing the skills/experience object archetypes. Implementation Details ~~~~~~~~~~~~~~~~~~~~~~ The most important thing is that I moved most of the code into the server/skills.c and server/skill_util.c files. The skills code is loosely implemented along the lines of the spell code. This is to say that: . skills use (do_skill) is called from fire(). . there is a skills[] table similar to spells[]. . server files skills.c and skill_util.c parallel spell_effect.c and spell_util.c in respective functionallity. Particular notes about the implementation are outlined below. Defines ^^^^^^^ #define MAX_EXP_CAT be > I had to make use of several global parameters These are
Definition: arch-handbook.txt:525
pshop.bank
bank
Definition: pshop.py:14
assets.h
python_pickup.where
where
Definition: python_pickup.py:7
CLEAR_FLAG
#define CLEAR_FLAG(xyz, p)
Definition: define.h:225
houses
in no particular where with items from houses
Definition: TODO.txt:11
NUM_ANIMATIONS
#define NUM_ANIMATIONS(ob)
Definition: global.h:171
nlohmann::detail::get
auto get(const nlohmann::detail::iteration_proxy_value< IteratorType > &i) -> decltype(i.key())
Definition: json.hpp:4475
dump_animations
void dump_animations(void)
Definition: anim.cpp:180
volcano
Story behind my Island The human king of the mainland has explorers scout for new territory On one expedition to an the explorers found some flecks of gold in the river they settled next to Upon notification of the king ordered a permanent colony be established in order to find and harvest the gold A while after the colony was they found out an ancient fire dragon lives in a dormant volcano on the island It was very and attacked so one night when it was in the volcano
Definition: lore.txt:11
a
Magical Runes Runes are magical inscriptions on the dungeon which cast a spell or detonate when something steps on them Flying objects don t detonate runes Beware ! Runes are invisible most of the time They are only visible occasionally ! There are several runes which are there are some special runes which may only be called with the invoke and people may apply it to read it Maybe useful for mazes ! This rune will not nor is it ordinarily invisible Partial Visibility of they ll be visible only part of the time They have a(your level/2) chance of being visible in any given round
dangerous
Story behind my Island The human king of the mainland has explorers scout for new territory On one expedition to an the explorers found some flecks of gold in the river they settled next to Upon notification of the king ordered a permanent colony be established in order to find and harvest the gold A while after the colony was they found out an ancient fire dragon lives in a dormant volcano on the island It was very dangerous
Definition: lore.txt:11
object::state
uint8_t state
Definition: object.h:359
Animations
Definition: face.h:25
CFBank.open
def open()
Definition: CFBank.py:70
object::more
object * more
Definition: object.h:303
AssetsManager::animations
AllAnimations * animations()
Definition: AssetsManager.h:49
StringBuffer
Definition: stringbuffer.cpp:25
available
Release notes for Crossfire This is see the Changelog file included with the software Major changes since but slower than players without that skill *weather system is hopefully fixed *misc bug fixes Once you have installed the you MUST download a map set point to where you installed Crossfire install Grab map set from official SourceForge page The following sets are available
Definition: Release_notes.txt:38
built
Story behind my Island The human king of the mainland has explorers scout for new territory On one expedition to an the explorers found some flecks of gold in the river they settled next to Upon notification of the king ordered a permanent colony be established in order to find and harvest the gold A while after the colony was built
Definition: lore.txt:9
quests
static struct_quest ** quests
Definition: mapper.cpp:894
object::temp_animation
const Animations * temp_animation
Definition: object.h:429
have
**Media tags please refer to the protocol file in doc Developers protocol Quick for your pleasure an example[/b][i] This is an old full of dirt and partially destroyed[hand] My dear as you two years i had to leave quickly Words have come to me of powerful magic scrolls discovered in an old temple by my uncle I have moved to study them I have
Definition: media-tags.txt:19
armour
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 armour
Definition: stats.txt:162
castle_read.suffix
string suffix
Definition: castle_read.py:30
work
vs only yadda is in because all tags get reset on the next draw_ext_info In the second since it is all in one everything is bold How does it work
Definition: media-tags.txt:65