Cyphesis development for self starters
Steps to get to know Cyphesis
Follow the steps in this guide to get to know Cyphesis.
- Clone the Cyphesis sources from Git.
- Build and install.
- Run a Cyphesis server, and note the database error message.
- Make sure you have PostgreSQL installed.
- Create a database user and database for cyphesis. (See README)
- Run cyloadrules to copy your rules into the database
- Re-start Cyphesis using the database.
- Connect using Ember to see your world.
Administration with cycmd
- Run cycmd to get the admin command line.
- Use the stat command to see the servers status.
- Use the monitor/unmonitor commands to see internal operations.
- Use query to see an in-game entity. (Try "query 0")
- Use add_agent to create an admin avatar.
- Use find_by_type to find an entity.
- Use find_by_name to find a know entity. (Try "find_by_name moraf")
- Use flush to purge some entities. (Try "flush oak")
- Use find_by_type to show there are no entities of that type left.
- Use creator_create to create a new one.
- Use find_by_type to see the details for the entity you created.
- 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
- Connect with cycmd, and add an admin avatar as above.
- Use creator_create to try and create an entity of a type which does not exist. ("creator_create chestnut")
- Use install to add a new temporary type.
- Use creator_create again to create an instance of this new type.
- Use find_by_type to show it is there.
- Look at data/plants.xml in the source tree and find the definition for oak.
- Run cyaddrules to see how an updated set of rules can be pushed to the server.
- Add a new definition to data/plants.xml to define a new type of tree.
- Install your modified file, and run cyaddrules. Check in the output to see that the new rule has been updated.
- Use cycmd to try out your new rule.
Has the cyphesis configuration file: cyphesis.vconf
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.
Holds python rules as defined in cyphesis.vconf.
[cyphesis] ruleset="deeds" [deeds] ruleset="basic"
With the corresponding folders:
Contains some basic python scripts.
Holds the world objects, entities, and minds definition as referenced in cyphesis.vconfig.
see Map Format for more about the world map.