Cyphesis development for self starters

From WorldForgeWiki
Jump to: navigation, search

Steps to get to know Cyphesis

Follow the steps in this guide to get to know Cyphesis.

Installation

  1. Clone the Cyphesis sources from Git.
  2. Build and install.
  3. Run a Cyphesis server, and note the database error message.
  4. Make sure you have PostgreSQL installed.
  5. Create a database user and database for cyphesis. (See README)
  6. Run cyloadrules to copy your rules into the database
  7. Re-start Cyphesis using the database.
  8. Connect using Ember to see your world.

Administration with cycmd

  1. Run cycmd to get the admin command line.
  2. Use the stat command to see the servers status.
  3. Use the monitor/unmonitor commands to see internal operations.
  4. Use query to see an in-game entity. (Try "query 0")
  5. Use add_agent to create an admin avatar.
  6. Use find_by_type to find an entity.
  7. Use find_by_name to find a know entity. (Try "find_by_name moraf")
  8. Use flush to purge some entities. (Try "flush oak")
  9. Use find_by_type to show there are no entities of that type left.
  10. Use creator_create to create a new one.
  11. Use find_by_type to see the details for the entity you created.
  12. Use help and try out the rest of the commands.

If you have now broken your server, see if you can fix it.

Working with types

  1. Connect with cycmd, and add an admin avatar as above.
  2. Use creator_create to try and create an entity of a type which does not exist. ("creator_create chestnut")
  3. Use install to add a new temporary type.
  4. Use creator_create again to create an instance of this new type.
  5. Use find_by_type to show it is there.
  6. Look at data/plants.xml in the source tree and find the definition for oak.
  7. Run cyaddrules to see how an updated set of rules can be pushed to the server.
  8. Add a new definition to data/plants.xml to define a new type of tree.
  9. Install your modified file, and run cyaddrules. Check in the output to see that the new rule has been updated.
  10. Use cycmd to try out your new rule.

Cyphesis Folders

etc/cyphesis/

Has the cyphesis configuration file: cyphesis.vconf

etc/cyphesis/deeds.d/

Has the core rule configuration attribute files in xml format. For the deeds rule set, the directory is etc/cyphesis/deeds.d/. Basic attributes of the rule set are e.g. defined in etc/cyphesis/deeds.d/basic.xml Rules can be viewed from cycmd, e.g. to see the mass attribute type:

# get mass
Info( 
 id: "mass" 
 objtype: "type" 
 parent: "float" 
)

The deeds.d folder is determined by the following entry in cyphesis.vconf.

[cyphesis]
ruleset="deeds"


share/cyphesis/rulesets/

Holds python rules as defined in cyphesis.vconf.

[cyphesis]
ruleset="deeds"

[deeds]
ruleset="basic"

With the corresponding folders:

share/cyphesis/rulesets/basic/
share/cyphesis/rulesets/deeds/


share/cyphesis/scripts/cyphesis/

Contains some basic python scripts.


share/worldforge/worlds/

Holds the world objects, entities, and minds definition as referenced in cyphesis.vconfig.

autoimport="/WorldForge/share/worldforge/worlds/deeds/braga/world.xml"

see Map Format for more about the world map.