helpc2cobtut2.zip

helpc2cobtut2.zip thumbnail image
Fact Value
Original File helpc2cobtut2.zip
Game
  • Creatures 1
Wiki Link Search "helpc2cobtut2" on creatures.wiki
Tags
File Size: 4 KB

Archive has been repacked for EemFoo. Click to here

Description(Generated)

helpc2cobtut2 for Creatures 1, contains sprite files

Text File Composite

::----- Cobtut2.rtf -----::
Cob tutorial Two 
  
    Introduction: 
   Here we will make a drink cob. This one will be a bit more interesting than a cheese clone. This one will have it’ s own picture *crowd gasps* and an extra-activate script. For this project I’  ll use my red cordial cob. I’ ll stick all the files you need for this tutorial (ie. the picture file) into the zip that this tutorial comes in. BTW, with these tutorials I always assume you’ ve read the ones before.  
  
    Installation: 
    inst 
 new: simp hcrd 1 0 3500 0 
 setv cls2 2 7 31501 
 setv attr 195 
 bhvr 0 64 
 slim 
 edit 
 endm 
  
  inst 
 Our good friend this inst command from the last tutorial. From now on, lines I leave will be the ones with nothing I’ ve not explained before. 
   
 new: simp hcrd 1 0 3500 0 
 Ah! Here’ s how this one is different from the last thing we made. It’  s got a sprite file (picture) that we made ourselves. Before you go about making new pictures for your cob files, there are a few things you need to know. Firstly, the sprite files ne ed to be in 16 bit colour. Secondly, the sprite file must be in bitmap format (.bmp) and converted to sprite format (.s16) using the sprite editor in BoBCoB. The sprite file must be named something original (or it’  ll overwrite and sprite files of the same  name already in the Creatures 2 directory) and distinctive (to stop someone else accidentally naming their sprite file the same name. An example of this is I always begin my sprite filenames with a h (for Helen) and make it as cryptic as possible. The sp rite file for this cob is named hcrd which is my shortening of Helen’ s CoRDial.   
 Hmmm I think that’  s all you need. Before going any further embed this sprite file into the cob by clicking on the embedded files button in BoBCoB, clicking add file and selecting the hcrd file. You need to always remember to do this before testing your co b or Albia is likely to crash when you install the object.  
 Now lets look at the numbers in this command:  new: simp hcrd 1 0 3500 0. The 1 after the hcrd means there is one pict ure in this sprite file. This is important because you can have as many bitmap pictures as you like in an individual sprite file and Creatures needs to know how many are in this particular file. The 0 in this command means the first picture we want to use  in this sprite file is picture zero. This is the first picture in the file. It’ s picture zero because creatures counts from zero instead of one because it’  s a computer game, not a human. If you had 20 sprites in the file and wanted to start at sprite 19 you’ d write  new: simp hcrd 20 19 3500 0  instead. The 3500 is just how far into Albia the object lies (or the plane). This number can be anywhere between zero and 9000. Zero is behind the backdrop of Albia (the hand won’  t be able to see it) and 9000 is in front of all objects in Albia. 3500 is usually a good number for most objects.   
  
 setv cls2 2 7 31501 
 Same as before, only with a different genus number (it’ s a drink, not a food) and a different species number.  
  
 setv attr 195 
 bhvr 0 64 
 If your wondering why the behaviour is still 64 even though this is a drink, not a food, it’ s because the Norns use the « eat»  command to drink the drinks in Albia.  
  
 slim 
 edit 
 endm 
  
 Well that sprite thing is the hardest thing you’ ll learn in this tutorial. It’ s the only thing that’  ll take up that much writing, and the only really new thing. You can now inject your object and have a pretty red bottle appear in Albia. It doesn’ t do anything yet though because we’ ve not written the eat script 
  
    Removal script 
   This is the same as in the last object except the object number has changed. 
  inst 
 enum 2 7 31501 
 <...truncated>