ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/alchemy.doc
Revision: 1.1
Committed: Fri Feb 3 07:11:48 2006 UTC (18 years, 3 months ago) by root
Content type: application/msword
Branch: MAIN
Branch point for: UPSTREAM
Log Message:
Initial revision

File Contents

# User Rev Content
1 root 1.1
2    
3     This document is a brief description of the ALCHEMY hack.
4    
5     --------------
6     Introduction -
7     --------------
8    
9     As always, the general intention is to enhance the enjoyability and
10     playability of CF. In this code, I have created a system whereby
11     players may assemble various ingredients to make artifacts.
12    
13     The amount of work I put into this was substantial; other than
14     new code -- I created new archetypes, revised archetypes, altered the
15     treasures file and created 2 new object types and a flag.
16    
17     It therefore may be enjoyable to install this patch (incl code)
18     and *not* define ALCHEMY in define.h. In particular, this patch
19     does the following things:
20    
21     1) more varieties of potions are available in shops.
22    
23     2) new gems and types of food.
24    
25     3) monsters will now leave behind body parts when you kill them.
26    
27     4) if ALCHEMY is defined players may make potions/artifacts.
28    
29     I have included instructions for installation, an install script
30     and a brief document for using the code (pretty simple).
31    
32     Finally, as always, feedback is appreciated.
33    
34     b.t.
35     thomas@astro.psu.edu
36    
37     ------------------------
38     Instructions to Players - how to use this code.
39     ------------------------
40    
41     Using the alchemy code (to make artifacts) is easy. You need
42     the following things: 1) be able to cast alchemy spell, 2)
43     have access to a cauldron and 3) have the right ingredients.
44    
45     To create an artifact, put ingredients in the cauldron, then
46     cast 'alchemy' spell. You might make something :) Backfire
47     effects are possible. In order to get better at making stuff,
48     you will need to learn the alchemy skill. Books found in shops
49     (and elsewhere) will give you formulae for making stuff.
50     Of course , you can always 'experiment' on your own, but this
51     may be dangerous.
52    
53    
54     ---------------------
55     Description of code -
56     ---------------------
57    
58     The bulk fo the alchemy code resides in 2 files - recipe.c
59     and alchemy.c. The basic features of the code are:
60    
61     1- allow players to make artifacts from formulae. As players
62     gain xp and levels, their ability to create stuff improves
63    
64     2- fast lookup of formulae. Lookup is randomized so that the
65     list is attempted for a match based on # levels the player
66     has. Obviously, higher level players get more attempts
67     to match the list--and thereby have a grater chance of
68     successfully completing a formula.
69    
70     3- There are ~80 formulae in this version. You can dump
71     the formulalists using the crossfire -m7 option.
72    
73     Basically, a simple linked list, ordered by the
74     number of different archs in a formulae, is used to
75     lookup 'recipe' matches. An indexed value for each formulae
76     allows a quick comparison for a match with the cauldron
77     contents. When a player casts alchemy on a cauldron, we
78     first determine # archs inside the cauldron, pick the
79     correct formulalist, randomly match against that list to
80     see if we got a match. If matched, we remove the ingredients,
81     and insert the artifact into the cauldron. Exp is awarded
82     to the players alchemy skill (if they have it).
83    
84