User Tools

Site Tools


getting_started

Getting Started with CobraMUSH

FIXME This guide is nowhere near complete. People add on & explain this better as you can. And fix discrepancies in this if you notice them to help make perfect this wiki howto. :)

First you must retrieve a copy of CobraMUSH which is explained in Getting CobraMUSH.

Depending on how you retrieved CobraMUSH, if it was via the git RCS system. Then a simple step of switching to that directory would be in order skipping steps 1 & 2. If you retrieved a released or snapshot off of the ftp server then you will still need to 'untarball' the copy you have. This tutorial will assume that is the method you will be retrieving your copy of CobraMUSH, and for the purposes of this tutorial we will assume you retrieving CobraMUSH 0.72 patch level 3.

Get CobraMUSH

Retrieve CobraMUSH from ftp server

wget http://ftp.cobramush.org/cobramush/current/cobramush-0.72p3.tar.gz

Extract CobraMUSH from ftp server and switch to working directory

tar -xzf cobramush-0.72p3.tar.gz
cd cobramush

Configure and Compile CobraMUSH

Configure CobraMUSH for your server

./Configure -d

This will automatically detect the best options suitable for your server when supplying the -d option. The most common error here, will be a file not found. In particular changes.txt, in that instance this would be a case of retrieving CobraMUSH from darcs. Simply goto the txt directory and run genchanges.rb script.

cd game/txt/
ruby genchanges.rb
cd ../..

That will succesfully generate you changes.txt file for use with the distribution. After that re-run the Configure script as previously described and everything should pass just fine.

Run make update

This script will go through several customizeable compile options specific to a certain behavior how you would like your particular CobraMUSH server to run. In many cases, the defaults work just fine and you can just press enter all the way through. Though some may wish to customize the particular behavior of the server more to their likings, just follow through the questions as it states in that case and pick the appropriates answers.

make update

Run make install

This step finishes the particular compile options you may wish to go through. From here type make install and sit back and watch your machine compile CobraMUSH. Or try playing some mine sweeper to pass the time and play some white & nerdie like Ari does! :)

make install
.....wait.....

Database Setup

The actual precise database setup, as to what dbref is this, and what dbref is that doesn't matter. However CobraMUSH comes stock with a database setup in this manner.

Dbref Description
#0 The room every new player is created in , connects in, and their first home location is set to.
#1 The 'God' character so to say. Level 30, has absolute Yes power in everything and generally the MAN.. Stricly a maintenance work player though, it is recommended against using this character, and/or this level for anything 'on the regular' type of stuff.
#2 The 'master room'. Any object set in this room is treated as global and a player from anywhere in the database regardless or location can queue commands from this object.
#3 The 'master division'. The root division god & everything in your generated database is assigned to. All divisions are normally created under this division.

#0 is generally the value for the starting_room in your mush.cnf configuration file, and #2 is generally the value for your master_room in your mush.cnf as should be.

Readying your Master Division For Use

In order for people to be able to achieve a level normally in CobraMUSH, receives powers, powergroups etc.. Your Division's must be setup properely. Your Master Division being the most important, as everything should be possible from the Master Division. A few simple steps will be required as there of once your onnected to your God Character.

@level #3=29
@empower #3=powers(me)

Do not follow these exacts steps for your other divisions, we're just doing this for the Master Division as everything should be possible from it. Instead assign particular powergroups to its child divisions, or assign a select set of powers you wish for objects in that division to have. And of course the level set as appropriate, the max level you would like to exist in that division.

Create the Powerless Object

Along with these pre-generated objects in your database you will need to create one extra object strictly for security purposes in the CobraMUSH model. What is denotated as the 'Powerless' object, make this object a player for good measures.

@pcreate Powerless=SomeRandomPassword

Then open up your mush.cnf configuration file and search for the powerless configuration option and set it to whatever dbref is assosciated with that newly created player.

Setup your first System Director

This is pretty straight forward. This is like setting up your first Wizard character in PennMUSH, though the term for the CobraMUSH equivalent is the System Director.

So Create Your guy

@pcreate DirectorGuy=tikibar

Assign him to the Master Division

@division *DirectorGuy=#3

Assign him to the System Director level.. Do not use level 30 for this guy.

@level *DirectorGuy=29

Then grant him the Director powergroup.

@powergroup *DirectorGuy=Director

Although the @powergroup command automatically assigns powers, it doesn't assign the max values allowed for that powergroup. Since this System Director guy is gonna be our main one, make sure he has maxpowers using the following command.

@empower *DirectorGuy=[pgpowers(Director,max)]

At this point. Your System Director Should be ready to use by this point. @su into him.

@su DirectorGuy

Porting PennMUSH Softcode to CobraMUSH

Porting PennMUSH Softcode to CobraMUSH is easy. The other way around, not so however. Porting PennMUSH softcode is a much simpler process though than most people think. The only major compatibility difference between CobraMUSH softcode in comparision to PennMUSH softcode is the fact that there is no Wizard or Royaly flags.. So getting PennMUSH softcode to work on a purely CobraMUSH type setup(not emulate a Wiz/Roy flags) is as simple as search where hasflag(*,Wizard), hasflag(*,Royalty), orlags(*,Wr).. type stuff exists. Those are the most common forms of standard PennMUSH security checks.
CobraMUSH on the other hand does its security checks by powers, levels and what not. A common quick replacement of the hasflag(*,Wizard) check is a simple level check, or possibly a powergroup check.

Director Level Check
gte(level(<object>),29)

Thats a common cheap was to check, as that is the standard level assigned to 'System Directors' in CobraMUSH

Director Powergroup Check
haspowergroup(<object>,Director)

This would probably be a more precise way to check it accurately. As some people at level 29 may just be guys that are like royalties as level 29 but not wizard like players. Even though Director powergroup can be fine tuned even more by cutting down powers… At the end of the day though, its how you prefer to check it on your particular game. The Game “ Yesterday's Voyage” in particular uses the Greather Than or Equal to level 29 for its system Director check.


A way we usually replace royalty type checks in code of the type hasflag(*,Royalty), would be a simlar method however. We're checking make sure they're at least level 28 or higher, or for the powergroup check we may be checking the Admin powergroup.

Other Tips on Coding

To really fine tune your code, you'll take advantage of the massive powers allowed to hold in CobraMUSH and assign a particular power for use with that system. For example for a Softcoded Combat System you may use the Combat power. Assign that power to players who are allowed to administrate that system, and check and make sure they have that power.
First such way we'll give an example is the simple check to make sure they have the power.. Sameway as in PennMUSH.

haspower(<object>,<power>)

However CobraMUSH brings powers to a whole new level. Of allowing 3 scopes of a power. YES, YESLTE, YESLT, and NO. So, one might be able to check if they can use the power over another particular object. For that use the powover() function.

powover(<object1>,<object2>,<power>)

getting_started.txt · Last modified: 2018/06/23 00:30 by 127.0.0.1