Thursday 14 January 2016

More Plants in C3 and DS

So we're going to look at creating more Pinky Plants to decorate our worlds.

First things first, open the starplant.cos file in your Creatures 3 bootstrap.

As you can see, it's a fairly simple plant.  Five of them (reps 5) get moved to random locations in the Norn Terrarium, (mvto rand 1740 2740 674) and then if they're not fully grown (scrp 2 4 5 9), they grow one step, at a rate of between 1 growth step per second and 1 growth step every 4 seconds.  (tick rand 20 80) If they're pushed, they give the stimulus 62, which is... reached peak of starch smell.  Perhaps this should be changed to 84, which is played with a friendly plant.  

But, moving on, we're only going to concentrate on the installation script.  We will assume that our players will not have a modified starplant.cos file, and thus all the other scripts can be found in our players' games already.  The first thing we're going to do is get rid of the reps 5 .. repe loop.  It is essential that we have the ATTR and the BHVR the same as the original starplants.

inst
reps 5
    new: simp 2 4 5 "starplant" 10 0 100
    attr 192
*act1
    bhvr 1
    tick rand 20 80
    mvto rand 1740 2740 674
    elas 0
repe

Now for the MVTO and RAND sections, (mvto rand 1740 2740 674) which govern where the starplants grow.  In a normal MVTO command, the first number is the X-dimension, lengthways across the floor, and the second is how high.  This has three numbers because of the RAND command.  In this case, it should be read as 'move to a random x-location between 1740 and 2740, and always at the 674 y-location'.  The Ctrl-Shift-X keyboard shortcut in Docking Station can be used to make the fingertip of the hand point at what XY location it's at.  MVTO moves the top left corner of the agent to that position, even if the player can't see it.  You can see that my hand is in line with the beehives, etc. to give the rest of the pinky plant space to exist if the top leftmost part of the pinky plant is created there.  If you take the time to put the attr value through Amaikokonut's ATTR Calculator, you'll notice that it collides with floors and suffers physics, so the plant will simply fall to the ground, in a lot of locations that should all be valid.


When choosing where to put your new starplants, it's a good idea to have a notion of how big the starplant is going to grow.  Open starplant.c16 in SpriteBuilder or similar and check the dimensions of the image.  The starplant will grow to a maximum size of 64 pixels wide and 80 pixels high.


If you want precision placement as opposed to letting it fall to the floor, then it will be harder. In the grendel jungle's lift shaft, there is less space to fall about aimlessly, but it still can be done.
So, from the above, we can create a new cos file and have it contain the following:
 
inst
    new: simp 2 4 5 "starplant" 10 0 100
    attr 192
*act1
    bhvr 1
    tick rand 20 80
    mvto 1336 2457
    elas 0

Installation scripts, unlike other scripts, don't necessarily have to end with endm.

Save it into your C3 bootstrap (I called mine extrastarplant.cos) and then use the caos command line to inject it into your world.

You can keep adding different starplants at different locations in the same cos file - it has distinct possibilities for enhancing your worlds through plants.

Monday 11 January 2016

Playing with Hippies

I took Delambri from the Hippy Norn's Hangout, added in some Forest Norn genes, LummoxJR's active antibody genes, and a couple of genes for homeostasis (hot and cold cancelling each other out, same with loneliness and crowdedness). I added in the 'die of old age gene' (only present in the Forest and Ron norns) but left the IV antioxidant capable of extending the norns' lifespan. 

As Lis suggested, I installed the Grendel Friendly cob, along with several toys, food items, etc. 


The norn tangle was intense.

Spreading out now.
I hatched eight norns in the beginning, and I think this was a bit of a mistake - the norn tangle was intense, and even though some norns escaped it, some remained pretty much stationary in the kitchen for a long time.  Luckily, hotness is one of the drives which the hippy norn does not use its life force to reduce - an explanation that Lis gives is that they are just too "blissed out" to be bothered moving. 

My first death occurred at 5 hours and 35 minutes, of old age.  I'm not sure why Hans prematurely aged, but I suspect it was something to do with how the Purple Mountain genes for stress interacted with his hippy nature, or a deleterious mutation.  After this, I kept a more watchful eye on the 'ageing toxin', which controls life stage and life span in C1 norns. 

It was difficult for me to help these norns in time - if I was alerted by a slightly lower life force (commonly, hippy life force can be at 99 or 100%), for example, something in the 70s, 60s, or even 40s and 20s, by the time I looked in the health kit, their metabolism had often reduced the drive enough so that I didn't know what was wrong.  Often, a quick push of the ball, or a go on the Encyclopaedia Nornica would solve their woes, but sometimes it wouldn't.  Then I would follow Lis's advice to spank them a bit and then tickle them, so that they would be explicitly having a drive reduced.  (I wonder if the half-life of a drive might have something to do with it?)

If you'd like to try out some hippy norns in your world, why not try one of mine?
Download Edelweiss at TCR!