Crossfire Server, Trunk  1.75.0
land.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdlib.h>
3 
4 #define MAX_SIZE 3000
5 #define MAX(x,y) ((x)>(y)?(x):(y))
6 
7 #define BASE_ALT -100
8 
9 /* make this a global to avoid stack overflow */
11 
12 /* This function writes out the crossfire maps. So shoot me for
13  * using compiled in constants - I'm not going to use this so much
14  * that I wanted to do anything too easy.
15  */
16 
17 #define MAP_FORMAT "world_%03d_%03d"
18 
19 /* Maps are square */
20 
21 #define MAP_SIZE 50
22 
23 /* There will be a total of 2500 maps (eek) - 50 in
24  * each direction. startx and starty are where to start
25  * numbering from. I chose 100 for a few reasons - 1) it
26  * gives room to the left and above to add some things (another
27  * continent for that matter), and 2) since the format allows
28  * for up to 1000 in each direction, this seemed reasonable.
29  * Note - if you do the math, and have 1000 * 1000 maps, each
30  * with 50*50 spaces, you have a total of 2.5 billion spaces.
31  * So hopefully that should be large enough.
32  */
33 
34 int startx=100, starty=100;
35 
36 typedef enum {
37  None=0,
41  Swamp=4,
43  Grass=6,
44  Desert=7,
45  Brush=8,
47  Jungle=10,
48  Tree1=11,
49  Tree2=12,
50  Woods1=13,
51  Woods2=14,
52  Woods3=15,
53  Hills=16,
55  Steppe=18,
58  WasteLand=21, /*Now just higher mountain */
59  Beach = 22,
62 
63 char *Terrain_Names[][2] = {
64  /* these are the archetype names. They are in the same order
65  * as the Terrain_Types above. Note many terrain types are not
66  * included because handling them would be too difficult.
67  */
68  {"None", "0, 0, 0 "},
69  {"deep_sea", "0 0 127 "},
70  {"sea", "0 0 192 "},
71  {"shallow_sea", "0 0 255 "}, /* wading depth */
72  {"swamp", "12 161 64 "},
73  {"deep_swamp", "155 175 164 "},
74  {"grass", "0 255 0 "},
75  {"desert", "222 218 135 "},
76  {"brush", "1 144 1 "},
77  {"evergreens", "0 128 0 "},
78  {"jungle_1", "0 176 0 "},
79  {"tree", "4 133 01 "},
80  {"evergreen", "20 209 0 "},
81  {"woods", "4 115 01 "},
82  {"woods_2", "1 182 02 "},
83  {"woods_3", "4 153 02 "},
84  {"hills", "166 160 70 "},
85  {"hills_rocky", "166 155 70 "},
86  {"steppe", "150 97 34 "},
87  {"mountain", "183 190 190 "},
88  {"mountain2", "191 196 185 "},
89  {"mountain4", "215 215 215 "},
90  /* Maybe need to put in order? */
91  {"beach", "232 228 165 "},
92  {"mountain5", "255 255 255 "},
93 };
94 
95 
96 
97 void write_crossfire_maps(int mapy, int mapx)
98 {
99  int x, y,n,q, nx, ny,r1,r2,ax=0,ay=0, j, k;
100  char name[512];
101  FILE *fp;
102  Terrain_Types *terrain;
103 
104  terrain = calloc(mapx * mapy * sizeof(Terrain_Types), sizeof(Terrain_Types));
105 
106  /* First fill in the water and the highest of peaks */
107  for (x=0; x<mapx; x++) {
108  for (y=0; y<mapy; y++) {
109  if (altitude[y][x] < -5000) {
110  terrain[x + y * mapx] = DeepWater;
111  } else if (altitude[y][x] < -99) {
112  terrain[x + y * mapx] = MediumWater;
113  } else if (altitude[y][x] < 1) {
114  terrain[x + y * mapx] = ShallowWater;
115  } else if (altitude[y][x] >=25000) {
116  terrain[x + y * mapx] = VeryHighMountain;
117  }
118  }
119  }
120  /* Basically, take a random bit and populate the area with terrain.
121  * We do this so it won't be totally monolithic (have several forest types
122  * for example), yet patches will be the same thing, eg, a stretch of
123  * desert, which wouldn't work very well if we just chose randomly
124  * for each space.
125  */
126 
127  for (n=0; n<(mapx * mapy) / 100; n++) {
128  do {
129  x = random() % mapx;
130  y = random() % mapy;
131  } while ( terrain[x + y * mapx] == None);
132 
133  nx = x + 40;
134  if (nx > mapx) nx=mapx;
135  ny = y + 40;
136  if (ny > mapy) ny = mapy;
137  r1 = random();
138  r2 = random();
139  for (x = nx-40; x<nx; x++) {
140  for (y=ny-40; y<ny; y++) {
141  if (terrain[x + y * mapx] != None) continue;
142 
143  /* near the edges, don't always fill in so that hopefully something
144  * else will fill in and smooth these out some
145  */
146  if ( (x < (nx -30) || y < (ny - 30) || x > (nx -10) || y > (ny - 10)) &&
147  random() % 2) continue;
148 
149  if (altitude[y][x] < 10) {
150  terrain[x + y * mapx] = Swamp + (r1 % 2);
151  }
152  else if (altitude[y][x] < 75){
153  terrain[x + y * mapx] = Beach;
154  }
155  else if (altitude[y][x] < 1000) {
156  terrain[x + y * mapx] = Grass + (r1 % 3);
157  } else if (altitude[y][x] < 3000) {
158  terrain[x + y * mapx] = EverGreens + (r1 % 9);
159  } else if (altitude[y][x] < 5000) {
160  terrain[x + y * mapx] = Hills + (r2 % 3);
161  } else if (altitude[y][x] < 9000) {
162  terrain[x + y * mapx] = Mountain;
163  } else if (altitude[y][x] < 12000) {
164  terrain[x + y * mapx] = HighMountain;
165  } else if (altitude[y][x] < 25000) {
166  /* Not really precisely wasteland, but wastelands are impassable */
167  terrain[x + y * mapx] = WasteLand;
168  }
169  else fprintf(stderr,"altitude %d did not get filled in?\n", altitude[y][x]);
170  }
171  }
172  }
173  /* Now just fill in the spaces randomly. */
174  n=0;
175  r1 = random();
176  r2 = random();
177  for (x=0; x<mapx; x++) {
178  for (y=0; y<mapy; y++) {
179  if (terrain[x + y * mapx] != None) continue;
180  n++;
181  if (altitude[y][x] < 10) {
182  terrain[x + y * mapx] = Swamp + (r1 % 2);
183  }
184  else if (altitude[y][x] < 75){
185  terrain[x + y * mapx] = Beach;
186  }
187  else if (altitude[y][x] < 1000) {
188  terrain[x + y * mapx] = Grass + (r1 % 3);
189  } else if (altitude[y][x] < 3000) {
190  terrain[x + y * mapx] = EverGreens + (r2 % 9);
191  } else if (altitude[y][x] < 5000) {
192  terrain[x + y * mapx] = Hills + (r2 % 3);
193  } else if (altitude[y][x] < 9000) {
194  terrain[x + y * mapx] = Mountain;
195  } else if (altitude[y][x] < 12000) {
196  terrain[x + y * mapx] = HighMountain;
197  } else if (altitude[y][x] < 25000) {
198  terrain[x + y * mapx] = WasteLand;
199  }
200  }
201  }
202  fprintf(stderr,"Filled in %d spaces\n",n);
203  if ((mapx / MAP_SIZE) * MAP_SIZE != mapx ||
204  (mapy / MAP_SIZE) * MAP_SIZE != mapy) {
205  fprintf(stderr,"Warning - generated map does not evenly tile.\n");
206  }
207  for (nx= startx; nx<(startx + (mapx/ MAP_SIZE)); nx++) {
208  for (ny= starty; ny<(starty + (mapy/ MAP_SIZE)); ny++) {
209  ax = (nx - startx) * MAP_SIZE;
210  ay = (ny - starty) * MAP_SIZE;
211 
212  sprintf(name,MAP_FORMAT,nx,ny);
213  if ((fp=fopen(name, "w"))==NULL) {
214  fprintf(stderr,"unable to open %s\n", name);
215  }
216  /* Write the header for the map */
217  fprintf(fp,"arch map\n");
218  fprintf(fp,"name %s\n", name);
219  fprintf(fp,"width %d\n", MAP_SIZE);
220  fprintf(fp,"height %d\n", MAP_SIZE);
221  /* Not used right now, but useful to include */
222  fprintf(fp,"outdoor 1\n");
223 
224  /* don't do difficult, reset time, or enter coordinates */
225  /* Set up the tile paths */
226  if (ny != starty) {
227  fprintf(fp,"tile_path_1 ");
228  fprintf(fp,MAP_FORMAT,nx, ny-1);
229  fprintf(fp,"\n");
230  }
231  if ((nx+1) < startx + (mapx/ MAP_SIZE)) {
232  fprintf(fp,"tile_path_2 ");
233  fprintf(fp,MAP_FORMAT,nx+1, ny);
234  fprintf(fp,"\n");
235  }
236  if ((ny+1) < starty + (mapy/ MAP_SIZE)) {
237  fprintf(fp,"tile_path_3 ");
238  fprintf(fp,MAP_FORMAT,nx, ny+1);
239  fprintf(fp,"\n");
240  }
241  if (nx != startx) {
242  fprintf(fp,"tile_path_4 ");
243  fprintf(fp,MAP_FORMAT,nx-1, ny);
244  fprintf(fp,"\n");
245  }
246  fprintf(fp,"end\n");
247  for (x = 0; x<50; x++) {
248  for (y = 0; y < 50; y++) {
249  q = terrain[x + ax + (y + ay)* mapx];
250  fprintf(fp, "arch %s\n",Terrain_Names[q][0]);
251  fprintf(fp,"x %d\n", x);
252  fprintf(fp,"y %d\n", y);
253  q = altitude[y + ay ][x + ax];
254  if (q< -32000) q = -32000;
255  if (q > 32000) q = 32000;
256  fprintf(fp,"elevation %d\n", q);
257  fprintf(fp,"end\n");
258  }
259  }
260  fclose(fp);
261  }
262  }
263 
264  fp = fopen("cmap", "w");
265  fprintf(fp, "P3 %d %d 255\n", mapy, mapx);
266  for (y=0; y < mapy; y++) {
267  for (x=0; x < mapx; x++) {
268  fprintf(fp, "%s", Terrain_Names[terrain[x + y * mapx]][1]);
269  }
270  fprintf(fp, "\n");
271  }
272  exit(0);
273 }
274 
275 
276 
277 main(int argc, char *argv)
278 {
279  int x, y, max_x=500, max_y=500, seed, land=300000, npasses=40, newalt, wpasses=50, water=50000;
280  int n, i, j, k, l, z, w, r, a, write_maps=0;
281  FILE *fp, *lp;
282  int junk;
283  char c;
284  extern char *optarg;
285 
286  seed = time(NULL);
287  while ((c = getopt(argc, argv,"x:y:X:Y:s:l:n:w:p:m"))!=-1) {
288  switch (c) {
289  case 'l':
290  land = atoi(optarg);
291  if (land < 11 ) {
292  fprintf(stderr,"-l must be at least 11\n");
293  exit(1);
294  }
295  break;
296 
297  case 'w':
298  water = atoi(optarg);
299  if (water < 1 ) {
300  fprintf(stderr,"-w must be at least 1\n");
301  exit(1);
302  }
303  break;
304 
305  case 'p':
306  wpasses = atoi(optarg);
307  if (wpasses < 1 ) {
308  fprintf(stderr,"-w must be at least 1\n");
309  exit(1);
310  }
311  break;
312 
313  case 'n':
314  npasses = atoi(optarg);
315  if (npasses < 10 ) {
316  fprintf(stderr,"-n must be at least 10\n");
317  exit(1);
318  }
319  break;
320 
321  case 'x':
322  max_x = atoi(optarg);
323  break;
324 
325  case 'y':
326  max_y = atoi(optarg);
327  break;
328 
329  case 'X':
330  startx = atoi(optarg);
331 
332  case 'Y':
333  starty = atoi(optarg);
334  break;
335 
336  case 's':
337  seed = atoi(optarg);
338  break;
339 
340  case 'm':
341  write_maps=1;
342  break;
343  }
344  }
345  if (max_x > MAX_SIZE || max_y > MAX_SIZE) {
346  fprintf(stderr,"Max X and Y size is %d\n", MAX_SIZE);
347  exit(1);
348  }
349 
350  fprintf(stderr,"Making %d X %d map, seed %d, land %d, passes = %d\n", max_x, max_y, seed, land, npasses);
351  fprintf(stderr,"wpasses =%d, water=%d\n", wpasses, water);
352  fprintf(stderr,"-x %d -y %d -X %d -Y %d -s %d -p %d -n %d -w %d -l %d\n",
353  max_x, max_y, startx, starty, seed, wpasses, npasses, water, land);
354 
355  srandom(seed);
356 
357  for (x=20; x < max_x-20; x++)
358  for (y=20; y < max_y-20; y++)
359  altitude[x][y] = BASE_ALT;
360 
361  for (x=0; x<max_x; x++) {
362  for (y=0; y<20; y++) {
363  altitude[x][y] = (y -20 ) * 100;
364  altitude[x][max_y - y] = (y -20 ) * 100;
365  }
366  }
367 
368  for (y=10; y<max_y-10; y++) {
369  for (x=0; x<20; x++) {
370  altitude[x][y] = (x - 20) * 100;
371  altitude[max_x - x][y] = (x - 20) * 100;
372  }
373  }
374 
375  /* This basically produces areas of high variance (eg, islands, peaks, valleys, etc) */
376 
377  for (l=0; l<npasses; l++) {
378  x = random()%max_x;
379  y = random()%max_y;
380  /* Weigh our selected starting position a little more towards the center
381  * so the continent is more in the center
382  */
383  if (random() % 2) {
384  x += random()%max_x;
385  y += random()%max_y;
386  x /=2;
387  y /=2;
388  }
389  n = random()%500+800;
390 
391  /* For some portion, try to find a pixel we have yet to modify */
392  if (l> (npasses * 15) / 20) {
393  int tries=0;
394  while (altitude[x][y] == BASE_ALT) {
395  x = random()%max_x;
396  y = random()%max_y;
397  if (random() % 2) {
398  x += random()%max_x;
399  y += random()%max_y;
400  x /=2;
401  y /=2;
402  }
403  tries++;
404  if (tries > 50) {
405  fprintf(stderr,"did not find free space within %d tries\n", tries);
406  break;
407  }
408  }
409 
410  }
411 
412  for (k=1; k< land ; k++) {
413  r = random()%4;
414  switch (r) {
415  case 0: if (x<max_x-1) x++; else x -= random() % (max_x/2); break;
416  case 1: if (y<max_y-1) y++; else y -= random() % (max_y/2); break;
417  case 2: if (x) x--; else x+= random() % (max_x/2); break;
418  case 3: if (y) y--; else y+= random() % (max_y/2); break;
419  }
420  altitude[x][y] += n;
421  if (random()%k < 100)
422  n -= 1;
423  }
424  }
425 
426  /* Make lakes and ocean trenches.
427  * General note - it works better to have more passes, but each
428  * pass doing less working - this results in more consistent lakes
429  * and ocean trenching.
430  */
431  for (l=0; l<wpasses; l++) {
432  /* for a small portion, we lower the area we make */
433  n = random()%1500-2000;
434 
435  x = random()% max_x;
436  y = random()% max_y;
437 
438  while (altitude[x][y] > BASE_ALT || altitude[x][y]<-7000) {
439  x = random()% max_x;
440  y = random()% max_y;
441  }
442  for (k=1; k< water ; k++) {
443  r = random()%4;
444  switch (r) {
445  case 0: if (x<max_x-1) x++; break;
446  case 1: if (y<max_y-1) y++; break;
447  case 2: if (x) x--; break;
448  case 3: if (y) y--; break;
449  }
450  altitude[x][y] += n;
451  if (random()%k < 100)
452  n += 1; /*less dramatic as things go on */
453  }
454  }
455 
456 
457  /* This block seems to average out the spaces somewhat to prevent
458  * cliffs and the like.
459  */
460 #define NUM_PASSES 3
461  r = 10;
462  for (k=0; k<NUM_PASSES; k++) {
463  for (x=2; x<max_x-2; x++) {
464  for (y=2; y<max_y - 2; y++) {
465  newalt = (altitude[x][y] * r + altitude[x-1][y] +
466  altitude[x][y-1] + altitude[x-1][y-1] +
467  altitude[x+1][y] + altitude[x][y+1] +
468  altitude[x+1][y+1] + altitude[x+1][y-1] +
469  altitude[x-1][y+1]) / (r+8);
470  if (altitude[x][y] < 10 || altitude[x][y] > newalt) altitude[x][y] = newalt;
471  }
472  }
473  for (x=max_x-2; x>2; x--) {
474  for (y=max_y-2; y>2; y--) {
475  newalt = (altitude[x][y] * r + altitude[x-1][y] +
476  altitude[x][y-1] + altitude[x-1][y-1] +
477  altitude[x+1][y] + altitude[x][y+1] +
478  altitude[x+1][y+1] + altitude[x+1][y-1] +
479  altitude[x-1][y+1]) / (r+8);
480  if (altitude[x][y] < 10 || altitude[x][y] > newalt) altitude[x][y] = newalt;
481  }
482  }
483  }
484 
485 /* Make this 100 so that we eliminate/reduce the lakiness of
486  * the map that is otherwise generated - otherwise, the map
487  * looks like an archipelago
488  */
489 #define AVG_PT -10
490 
491  /* water - does the same as above, but try to more equally balance the spaces*/
492  r = 1;
493  for (k=0; k<40; k++) {
494  for (x=2; x<max_x-2; x++) {
495  for (y=2; y<max_y -2; y++) {
496  if (altitude[x][y] < AVG_PT)
497  altitude[x][y] = (altitude[x][y] * r + altitude[x-1][y] +
498  altitude[x][y-1] + altitude[x-1][y-1] +
499  altitude[x+1][y] + altitude[x][y+1] +
500  altitude[x+1][y+1] + altitude[x+1][y-1] +
501  altitude[x-1][y+1]) / (r+8);
502  }
503  }
504  for (x=max_x-2; x>2; x--) {
505  for (y=max_y-2; y>2; y--) {
506  if (altitude[x][y] < AVG_PT)
507  altitude[x][y] = (altitude[x][y] * r + altitude[x-1][y] +
508  altitude[x][y-1] + altitude[x-1][y-1] +
509  altitude[x+1][y] + altitude[x][y+1] +
510  altitude[x+1][y+1] + altitude[x+1][y-1] +
511  altitude[x-1][y+1]) / (r+8);
512  }
513  }
514  }
515  if (write_maps)
516  write_crossfire_maps(max_x, max_y);
517 
518  /* Now write the data out */
519 
520  fp = fopen("lmap", "w");
521  lp = fopen("pmap", "w");
522  fprintf(fp, "P3 %d %d 255\n", max_y, max_x);
523  for (j=0; j < max_x; j++) {
524  for (k=0; k < max_y; k++) {
525  junk = altitude[j][k];
526  fprintf(lp, "%d ", altitude[j][k]);
527  if (junk < -5000)
528  fprintf(fp, "0 0 127 ");
529  /* Shallow water should really be just at the coastal
530  * area, so put a big gap between shallow and deep.
531  * this also evens out the occurrence of the different types
532  * to be more equal
533  */
534  else if (junk < -99)
535  fprintf(fp, "0 0 192 ");
536  else if (junk < 1)
537  fprintf(fp, "0 0 255 ");
538  else if (junk < 1000)
539  fprintf(fp, "0 240 0 ");
540  else if (junk < 2000)
541  fprintf(fp, "0 220 0 ");
542  else if (junk < 3000)
543  fprintf(fp, "0 200 0 ");
544  else if (junk < 4000)
545  fprintf(fp, "0 180 0 ");
546  else if (junk < 5000)
547  fprintf(fp, "0 160 0 ");
548  else if (junk < 6000)
549  fprintf(fp, "255 130 71 ");
550  else if (junk < 8000)
551  fprintf(fp, "238 121 66 ");
552  else if (junk < 10000)
553  fprintf(fp, "205 104 57 ");
554  else if (junk < 12000)
555  fprintf(fp, "139 71 38 ");
556  else
557  fprintf(fp, "255 255 255 ");
558  }
559  fprintf(fp, "\n");
560  }
561  exit(0);
562 }
here
if you malloc the data for the make sure to free it when done There is also the newclient h file which is shared between the client and server This file contains the definition of the as well as many defined values for constants of varying you will need to grab these constant values for yourself Many of the constants in this file are used in the protocol to denote types Image Caching ~ Image caching has been implemented on the with necessary server support to handle it This section will briefly describe how image caching works on the protocol as well as how the current client does it the client checks for an option denoting the image caching is desired If we initialize all the images to a default value this means we don t need to put special checks into the drawing code to see if we have an image we just draw the default we know what filename to store it as we request the server to do image caching This is done by or ing the cache directive to the image mode we want C when the server finds an image number that it has not send to the it sends us a name command information us the number to name and there is no space between that the and the name Such formating is difficult here
Definition: protocol.txt:2139
banquet.l
l
Definition: banquet.py:164
AVG_PT
#define AVG_PT
diamondslots.x
x
Definition: diamondslots.py:15
n
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
Definition: land.6.txt:25
BASE_ALT
#define BASE_ALT
Definition: land.c:7
command
same as sound ncom command like but with extra the client want tick commands so it knows animation timing the client wants to be informed of pickup mode changes Mode will be sent when the player successfully logs and afterward any time the value is but over many options have become defaults This documents those now obsolete client can handle the bit exp values that are now used values are sent as bit Setting this flag also means that skill exp will be and it will be sent in revised method as described in the stats command Value is an integer in string format else Deprecated client should presume all servers support this server will return FALSE Deprecated replaced with sound2 setup command
Definition: protocol.txt:461
write_crossfire_maps
void write_crossfire_maps(int mapy, int mapx)
Definition: land.c:97
c
static event_registration c
Definition: citylife.cpp:422
if
if(!(yy_init))
Definition: loader.cpp:36428
mail_login.total
total
Definition: mail_login.py:30
time
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 time
Definition: arch-handbook.txt:206
in
same as sound ncom command like but with extra the client want tick commands so it knows animation timing the client wants to be informed of pickup mode changes Mode will be sent when the player successfully logs in
Definition: protocol.txt:408
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
note
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 note
Definition: survival-guide.txt:24
Note
this value can differ from the given one if it has been adjusted Updated ground view will be sent to the client if the connection is for a player Note
Definition: protocol.txt:395
Terrain_Types
Terrain_Types
Definition: land.c:36
source
Almost all the spell_ *base png files are taken from JXClient s source
Definition: readme-icons.txt:1
ShallowWater
@ ShallowWater
Definition: land.c:40
is
And the skill structure used by the skills[] table is
Definition: arch-handbook.txt:577
Moving_Fog.z
z
Definition: Moving_Fog.py:17
Grass
@ Grass
Definition: land.c:43
name
Plugin animator file specs[Config] name
Definition: animfiles.txt:4
DeepWater
@ DeepWater
Definition: land.c:38
Steppe
@ Steppe
Definition: land.c:55
diamondslots.results
results
Definition: diamondslots.py:39
Terrain_Names
char * Terrain_Names[][2]
Definition: land.c:63
m
static event_registration m
Definition: citylife.cpp:422
item.q
q
Definition: item.py:32
Woods1
@ Woods1
Definition: land.c:50
main
main(int argc, char *argv)
Definition: land.c:277
files
the server will also quite happily load unpacked files as long as they have the right file which is convenient if you want to edit your maps and archetypes live It also contains a few files
Definition: server-directories.txt:53
However
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 they have a very hard time learning new spells Their maximum natural wisdom is With the high intelligence they will typically have many spellpoints They can be very devastating at low level due to their low natural ac and can make mincemeat out of low level monsters However
Definition: stats.txt:180
DeepSwamp
@ DeepSwamp
Definition: land.c:42
this
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 this
Definition: lore.txt:7
Tree1
@ Tree1
Definition: land.c:48
output
**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 book signs rules Media tags are made of with inside them the name of tag and optional parameters for the tag Unlike html or there is no notion of opening and closing tag A client not able to understand a tag is supposed to ignore it when server is communicating with and old client that does not understand a a specific extended it will issue a classical message output
Definition: media-tags.txt:36
contain
Ores are double the weight of a bar of pure metal They contain(by weight) of the metal that a pure bar does. For example
of
a copper bar weighs and has a value of
Definition: ore.txt:3
means
if you malloc the data for the make sure to free it when done There is also the newclient h file which is shared between the client and server This file contains the definition of the as well as many defined values for constants of varying means(ie, that in the stats command, a stat value of 1 is hit points, etc.) When porting to a new system
Jungle
@ Jungle
Definition: land.c:47
passes
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 passes(-n). Note that each additional pass of land(-l)
same
**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 book signs rules Media tags are made of with inside them the name of tag and optional parameters for the tag Unlike html or there is no notion of opening and closing tag A client not able to understand a tag is supposed to ignore it when server is communicating with and old client that does not understand a a specific extended it will issue a classical message with all tags removed Don t be confused by the name of some tags The fact there exist a pair[b][/b] does not mean there is an opening and a closing bold tag It simply mean there is a bold and a no bold tag You might think it s the same
Definition: media-tags.txt:40
t
in that case they will be relative to whatever the PWD of the crossfire server process is You probably shouldn t
Definition: server-directories.txt:28
Hills
@ Hills
Definition: land.c:53
starty
int starty
Definition: land.c:34
Woods2
@ Woods2
Definition: land.c:51
http
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 at http
Definition: Release_notes.txt:40
Brush
@ Brush
Definition: land.c:45
say.max
dictionary max
Definition: say.py:148
MAX_SIZE
#define MAX_SIZE
Definition: land.c:4
instead
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 instead
Definition: survival-guide.txt:15
so
if you malloc the data for the make sure to free it when done There is also the newclient h file which is shared between the client and server This file contains the definition of the as well as many defined values for constants of varying you will need to grab these constant values for yourself Many of the constants in this file are used in the protocol to denote types Image Caching ~ Image caching has been implemented on the with necessary server support to handle it This section will briefly describe how image caching works on the protocol as well as how the current client does it the client checks for an option denoting the image caching is desired If so
Definition: protocol.txt:2119
weight
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
Definition: survival-guide.txt:100
HillsRocky
@ HillsRocky
Definition: land.c:54
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
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
that
Install Bug reporting Credits so make sure you have that
Definition: README.txt:6
EXIT
@ EXIT
Definition: object.h:186
WasteLand
@ WasteLand
Definition: land.c:58
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
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
convert.default
default
Definition: convert.py:25
line
Install Bug reporting Credits so make sure you have version or later There are files involved in the automatic convert convertall guilds and filelist py guilds py is what is used by the install script for setting up the maps It has columns in the first is the name of the no spaces The second is the region of the the third is the destination folder for the the fourth is the exit the fifth and sixth are the x and y coords within the exit the seventh eighth and ninth are the exit location for the storage hall If field seven is then it uses the same exit map as for the guild hall itself filelist py has a list of which files to process for each guild hall convert py takes all the files in filelist py and customises them to the specific guild then outputs them into a in the same order that they are listed in guilds py convertall py reads the lines from guilds py and runs line by line
Definition: README.txt:12
filter.parameters
parameters
Definition: filter.py:41
generator
static std::mt19937 generator
Definition: cf_random.cpp:3
startx
int startx
Definition: land.c:34
MediumWater
@ MediumWater
Definition: land.c:39
given
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 given
Definition: stats.txt:127
autojail.value
value
Definition: autojail.py:6
board.author
author
Definition: board.py:59
Beach
@ Beach
Definition: land.c:59
zero
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 zero
Definition: survival-guide.txt:25
HighMountain
@ HighMountain
Definition: land.c:57
Tree2
@ Tree2
Definition: land.c:49
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
diamondslots.y
y
Definition: diamondslots.py:16
sunnista.affect
string affect
Definition: sunnista.py:15
made
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 etc FLAG_IS_HILLY needed by the mountaineer skill Should be set on all mountainous terrain FLAG_READY_WEAPON Code needs this for both players and and its use differs for each FLAG_READY_SKILL Code needs this for both players and and its use differs for each New Structures A couple of changes to the object structure where made
Definition: arch-handbook.txt:570
create-tower.tile
tile
Definition: create-tower.py:8
altitude
int altitude[MAX_SIZE][MAX_SIZE]
Definition: land.c:10
MAP_FORMAT
#define MAP_FORMAT
Definition: land.c:17
map
based on the size of the map(overall spaces)
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
Woods3
@ Woods3
Definition: land.c:52
NUM_PASSES
#define NUM_PASSES
MAP_SIZE
#define MAP_SIZE
Definition: land.c:21
VeryHighMountain
@ VeryHighMountain
Definition: land.c:60
sent
same as sound ncom command like but with extra the client want tick commands so it knows animation timing the client wants to be informed of pickup mode changes Mode will be sent when the player successfully logs and afterward any time the value is but over many options have become defaults This documents those now obsolete client can handle the bit exp values that are now used values are sent as bit Setting this flag also means that skill exp will be sent
Definition: protocol.txt:427
it
if you malloc the data for the make sure to free it when done There is also the newclient h file which is shared between the client and server This file contains the definition of the as well as many defined values for constants of varying you will need to grab these constant values for yourself Many of the constants in this file are used in the protocol to denote types Image Caching ~ Image caching has been implemented on the with necessary server support to handle it This section will briefly describe how image caching works on the protocol as well as how the current client does it the client checks for an option denoting the image caching is desired If we initialize all the images to a default value this means we don t need to put special checks into the drawing code to see if we have an image we just draw the default we know what filename to store it as we request the server to do image caching This is done by or ing the cache directive to the image mode we want C when the server finds an image number that it has not send to the it sends us a name command information us the number to name and there is no space between that the and the name Such formating is difficult but the above example illustrates the data is sent The client then checks for the existence of the image locally It is up to the client to organize images and then splits them into sub directories based on the first letters in the above the file would be crossfire images CS CSword If the client does not have the image or otherwise needs a copy from the it then requests it
Definition: protocol.txt:2158
None
@ None
Definition: land.c:37
Swamp
@ Swamp
Definition: land.c:41
example
if you malloc the data for the make sure to free it when done There is also the newclient h file which is shared between the client and server This file contains the definition of the as well as many defined values for constants of varying you will need to grab these constant values for yourself Many of the constants in this file are used in the protocol to denote types Image Caching ~ Image caching has been implemented on the with necessary server support to handle it This section will briefly describe how image caching works on the protocol as well as how the current client does it the client checks for an option denoting the image caching is desired If we initialize all the images to a default value this means we don t need to put special checks into the drawing code to see if we have an image we just draw the default we know what filename to store it as we request the server to do image caching This is done by or ing the cache directive to the image mode we want C when the server finds an image number that it has not send to the it sends us a name command information us the number to name and there is no space between that the and the name Such formating is difficult but the above example illustrates the data is sent The client then checks for the existence of the image locally It is up to the client to organize images and then splits them into sub directories based on the first letters in the above example
Definition: protocol.txt:2146
each
in that case they will be relative to whatever the PWD of the crossfire server process is You probably shouldn though Notes on Specific and settings file datadir Usually usr share crossfire Contains data that the server does not need to modify while such as the etc A default install will pack the and treasurelist definitions into a single or trs file each
Definition: server-directories.txt:48
still
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 pull Load to join em up The maps still need some work and there are probably more little functions here and buy add new pay dues administrate also the plain text format allows for ease of editing I m thinking about adding a Guild foundings and other python scripts Update Added in scripts for guild and removing player who quit form the guilds they belong to Renamed guildmember_say to guildoracle py and fixed some bugs here and there Made guild board script that displays the points of the guilds in decending order *more to clean up still
Definition: README.txt:149
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
Mountain
@ Mountain
Definition: land.c:56
ring_occidental_mages.r
r
Definition: ring_occidental_mages.py:6
variation
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 it will make make steep cliffs and the like something like l n will still have a lot of variation
Definition: land.6.txt:27
is_valid_types_gen.type
list type
Definition: is_valid_types_gen.py:25
Conversely
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 it will make make steep cliffs and the like Conversely
Definition: land.6.txt:26
EverGreens
@ EverGreens
Definition: land.c:46
Desert
@ Desert
Definition: land.c:44
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