User Tools

Site Tools


making_archetypes

Information and Tips

Commenting .arc Files

* The number sign (#) may be used as a comment character in .arc files.

Making Archetypes

Monsters, walls, tiles, and practically everything else in Crossfire are Archetypes. Archetype is often abbreviated to “arch”.

To make and test your own archetype, you will need:

  • if you are under Linux {FIXME other architectures}, you need to have the server built
  • a working Crossfire server
  • the archetypes collection
  • Perl.
  • It is highly recommended that you also have the crossfire editor

Items

Potions

Making a New Potion

Some may find it easier to take an existing potion and tweak all the stats on it to ultimately create a “new potion.”

  • If you want it to show up in shops, the shop file needs to be updated. This file is located in the archetypes directory at: shop/Floors/shop_potion.trs
    • Be sure to follow this format:
  more
  arch potion_<foo>
   chance <number>
  • If you want players to be able to create the potion through alchemy, you will need to update the alchemy formula file. This file is located in the server directory at: lib/formula
    • Be sure to follow this format or syntax:
  # -- <comment or brief summary>
  Object <as found in the archetype file>
  arch <graphic_name>
  chance <number>
  diff <number>
  exp <number>
  yield <number>
  skill alchemy
  cauldron cauldron
  ingred <ingredient1,ingredient2,etc>
  • If you want players to be able to find the potion in dungeons or through random chance, you will need to update the treasure generation file. This is located in the server directory at: lib/treasures
    • Be sure to follow this format:
  more
  arch potion_<foo>
   chance <number>

Modify Existing Potion

FIXME – Modify Existing Potion section is a draft and work in progress

  1. Locate the object name of the potion in question. You can find this while in game and in DM mode by using the dump command on an existing potion id number.
  2. Locate or search for the object name in the archetype files. You can use the grep command or search for text in the Archetype files that contains a key word in the potion name, this will probably require some trial and error.
  3. Edit the .arc file with the changes you want to make. Examples include changing the name, modifying the potion duration, the potion appearance (aka graphic), and so on.
  4. Save the file with your changes.
If the potion name changed
  • You will need to update the shop file. This file is located in the archetypes directory at: shop/Floors/shop_potion.trs
    • FIXME - where is the shop_potion.trs file in branch?
  • You will need to update the alchemy formula file. This file is located in the server directory at: lib/formulae
  • You will need to update the treasure generation file. This is located in the server directory at: lib/treasures
  • You will need to search through all the map files and update any references to the old (object) name as well.
  • Let the developers on the Gridarta (map editor) project know about the change so they can update the pickmap (ex: trunk/crossfire/resource/pickmaps/treasure)

Map Features

Buildings

FIXME describe multi-tile building special requirements and address how to specify which tile is the “head”, and what/where attributes are placed. Some note s describing object types seem to imply that it is not necessary to replicate properties on parts other than the “head”.

Monsters

Modify Existing Monster (Example)

We will create a new goblin called “Goblin War Lord”.

  1. cd into your base arch directory
  2. Then go under: monsters/goblin/
  3. Copy the file goblin.arc to goblinwarlord.arc
  4. Open goblinwarlord.arc file
  5. Change the file to this:
Object goblinwarlord
name Goblin War Lord
randomitems goblin
race goblin
face goblin.111
color_fg green
anim
goblin.111
goblin.112
mina
monster 1
sleep 1
Wis 13
no_pick 1
alive 1
exp 140
ac 10
wc 14
dam 5
hp 20
maxhp 20
level 3
speed 0.1
weight 50000
run_away 10
will_apply 2
pick_up 24
can_apply 25
can_use_wand 1
can_use_bow 1
can_use_ring 1
can_use_shield 1
can_use_armour 1
can_use_weapon 1
editable 1
body_finger 2
body_torso 1
body_head 1
body_shulder 1
body_foot 2
body_wrist 2
body_hand 2
body_waist 1
body_arm 2
body_range 1
end

Testing Archetypes

  1. If you have compiled before,
    1. go into the crossfire/lib directory
    2. type, “rm archetypes”
    3. and then “make archetypes”
  2. If you have not compiled before
    1. just compile like you normally would. :)
  3. install the server

FIXME describe more in detail, explain about the manual perl collect.pl method then make install, stuff like that :)

To see what you have made, either put it in a map, or create it using a Dungeon Master command.

making_archetypes.txt · Last modified: 2014/08/31 09:55 (external edit)