COB Tutorial Lesson 4: Fertility infusion It has come to my attention that I skipped over a very important type of COB: an infusion. Basically, an infusion object isn't an object at all; it's just a script that tells the game to do something, in this case to pump chemicals into the currently selected creature. The important thing to know about infusions and similar scripts is that they require no class number. You're not actually creating an object, but just giving a few commands to the game. So don't worry about family, genus, and class; they're irrelevant in this case. Since the process is pretty easy, I'm going to make a more complicated kind of infusion: A fertility infusion. This should increase fertility of a male Norn or a non-pregnant female by boosting both sex drive and testosterone or estrogen. Step 1: The installation script Before you do anything, start CobCom and click on the word "" in the Scripts list. Go to the Scripts menu and select Delete Script. I forgot to mention this previously, but it's important. I'm going to skip ahead of planning, which is usually the first step. I know what I want this infusion to do, so I'm just going to go ahead and do it. As ever, the first step (well, the second in this case) is to click the list box marked "Installation Scripts" ("Imports" in CobCom 1.02 or earlier) and enter in a script there. In the edit box, type in the following: inst targ norn doif gnus ne 1 stop endi doif spcs eq 1 stim writ norn 0 255 0 0 29 255 64 255 0 0 0 0 else doif baby ne 0 stop endi doif chem 66 gt 0 stop endi stim writ norn 0 255 0 0 29 255 63 255 0 0 0 0 endi endm Now, let's look through the lines particular to this script. targ norn Sets the currently selected creature as the target. This is probably redundant, but it makes good sense to put it in anyway. doif gnus ne 1 stop endi If this isn't a Norn, then don't go any further. doif spcs eq 1 The next code only applies to male creatures. (Male creatures are species 1, females are 2.) stim writ norn 0 255 0 0 29 255 64 255 0 0 0 0 Since we know we're dealing with a male, and there's not really anything else to check for, raise sex drive (chemical 29) and testosterone (chemical 64) to their highest levels. else The next stuff applies to female Norns. This statement goes with the DOIF statement above that checks for male creatures. If the creature didn't turn out to be male, the code would jump here. doif baby ne 0 stop endi If the Norn is already pregnant, we may as well quit now. doif chem 66 gt 0 stop endi This code tests for progesterone (chemical 66), a sign of recent pregnancy. If the Norn is still recovering from a past pregnancy, she won't be able to conceive anyway. stim writ norn 0 255 0 0 29 255 63 255 0 0 0 0 Here's where we finally add in the chemicals for this Norn. Again, sex drive (chemical 29) is maxed out, and this time estrogen (chemical 63) is increased. endi All good things must come to an end, and this male/female test is over. This, too, goes with the DOIF statement that does the sex check. endm Many of our COBs so far have ended with EDIT, since that's used for placing an object in the hand. In this case, there's no object to place--just code to run. So we've run the code, and it's done. Step 2: Using the infusion To try out this object once it's done, all you have to do is select whichever Norn you want to use, then inject the object. The script will do the rest. Once a Norn's testosterone or estrogen levels start to fall, fertility should increase. Thus, the infusion won't take effect right away, except on their behavior; sex drive increases immediately. Also, since sex drive is raised as high as possible, your Norn will probably want to stick around near its mate and keep trying for a while. There are a couple of catches, though. For one thing, I may have missed some male hormones. There are other chemicals involved in this, and I'm unsure of their effects. Furthermore, I can't test this COB on a female, since I don't have any in my world at this time. (My Albia is currently rigged for experimentation, not a breeding program.) Any help testing this would be appreciated.