[Misc/Other] [Misc/Other] Albian Snails and Albian Glow Worms

An organized, ideally complete bank of released Garden Box agents. Find some new life to add to your world, or submit your own! Be sure to read the guidelines before submitting.

[Misc/Other] [Misc/Other] [Misc/Other] Albian Snails and Albian Glow Worms

Postby malkin » Mon Dec 02, 2013 5:43 pm

The Albian Snail, Cepaea helenii, only appears during the day, hatching in the early hours of the dawn and dying in the early evening. In its single day of life, it crawls around, leaving a snail trail of moisture behind. The snails do not consume any food themselves, but creatures seem to enjoy pushing, pulling, hitting or eating the slow-moving snails. An Albian Snail egg is invisible to creatures' eyes.

The Albian Glow Worm, Solarvermes alimaggsii, only appears during the night, hatching in the early hours of the evening and dying in the early hours of the dawn. In its single night of life, it crawls around, emitting a soft glowing light. The glow worms do not consume any food themselves, but creatures seem to enjoy chasing, pushing, pulling, hitting or eating the speedy glow worms. An Albian Glow Worm egg is invisible to creatures' eyes.

The egg sprites were created by Mea of Caos of the Creatures Realm.

Notes:
*The Albian Snails and Albian Glow Worms will appear in the "Patch Plant" section of your Garden Box. This is so that they can use the "patch" infrastructure to function.
*The eggs are sensitive to the time of day - the snails are diurnal, and the glow worms are nocturnal. This means that the eggs can take up to 10 in-game minutes to hatch.
*They will die if they are placed in an underwater position.
Attachments
gb_pp_albiansnail.agent
(19.15 KiB) Downloaded 1017 times
gb_pp_albianglowworm.agent
(16.24 KiB) Downloaded 1030 times
Albian Snails and Glow Worms.png
Albian Snails and Glow Worms.png (201.91 KiB) Viewed 11093 times
malkin
 
Posts: 131
Joined: Sat Feb 11, 2012 3:55 am

Re: Albian Snails and Albian Glow Worms

Postby malkin » Mon Dec 02, 2013 5:46 pm

Code for Albian Snails:
Code: Select all
*GB Template
*# Pray-File "gb_pp_albiansnail.agent"
*# DSGB-Name "Albian Snail"

*# Depend albiansnail.c16

*# Attach albiansnail.c16

*# Depend albiansnailegg.c16

*# Attach albiansnailegg.c16

*# Depend gb_pp_albiansnail.c16

*# Attach gb_pp_albiansnail.c16

*# Depend gb_Albian_Snail.catalogue

*# Attach gb_Albian_Snail.catalogue

*# Depend spnk.wav

*# Depend chwp.wav

*# desc = "The Albian Snail only appears during the day."
*# Agent Animation File = "gb_pp_albiansnail.c16"
*# Agent Animation Gallery = "gb_pp_albiansnail"
*# Agent Sprite First Image = 0
*# GB_Category = 1
*# Agent Author = "Malkin"


new: simp 1 205 10855 "blnk" 0 0 9000
setv name "spawn_script" 1000
sets name "sprite_file" "albiansnail"
setv name "sprite_pose" 9

setv name "prod_fmly" 2
setv name "prod_gnus" 18
setv name "prod_spcs" 10856

seta va00 targ
enum 1 1 22929
   mesg wrt+ targ 1000 va00 0 0
next

*spawn
scrp 1 205 10855 1000
   inst
   new: simp 2 18 10856 "albiansnailegg" 1 0 name "patch_plane"
   attr 210
   elas 90
   fric 50
   perm rand 45 55
   accg 2
   aero 1
   mvto _p1_ _p2_
*The patch ID is important-- if you don't copy it over, the patch won't realize that
*the egg is there, and it will spawn another one, and continue spawning FOREVER.
   setv name "patch_id" mame "patch_id"
*making sure that the patch will spawn regularly
   tick rand mame "tickfrom" mame "tickto"
   doif tick eq 0
      tick 200
   endi
endm


***********
*EGG TIMER*
***********
scrp 2 18 10856 9
**If you've been hanging around for a bit
doif ov00 ge 5
**go die now
gsub diee
**if it's not dawn or morning
elif time ne 0 or time ne 1
**go be dormant for a bit
gsub dorm
**if you're being carried
elif carr ne null
**go be dormant for a bit
gsub dorm
**if your egg is fresh and it's dawn or morning and you're not being carried
else
**go hatch
gsub hatch

endi

**die subroutine
subr diee

kill ownr

retn

**dormancy subroutine
subr dorm

wait rand 50 700

addv ov00 1

doif time = 0 or time = 1 and carr eq null

gsub hatch

elif ov00 ge 5

gsub diee

endi

retn

**hatch subroutine
subr hatch
doif carr ne null
gsub dorm
stop
endi
rnge 200
setv va66 0
esee 2 13 10855
addv va66 1
next
doif va66 le 30 and fall = 0
**set the place you're going to hatch from
setv va00 posl
setv va01 post
inst
new: simp 2 13 10855 "albiansnail" 16 0 name "patch_plane"
attr 198
bhvr 57
elas 4
perm 60
accg 2
aero 2
fric 50
emit 3 0.001
mvsf va00 va01
***movement counter
setv va20 rand 1 2
doif va20 = 1
setv ov00 51
*both need a tick to start the timer
tick 1
else
setv ov00 0
*both need a tick to start the timer
tick 1
endi
**the egg should be destroyed now
targ ownr
kill ownr
endi
retn

endm

**********************
***   Push Script  ***
**********************
scrp 2 13 10855 1
   targ from
   stim writ targ 85 1
   targ ownr
      setv va00 rand -10 10
   setv velx va00
   setv va00 rand -10 -1
   setv vely va00
endm

**********************
***   Pull Script  ***
**********************
scrp 2 13 10855 2
   targ from
   stim writ targ 85 1
   targ ownr
      setv va00 rand -10 10
   setv velx va00
   setv va00 rand -10 -1
   setv vely va00
endm

**********************
***   Hit Script   ***
**********************
scrp 2 13 10855 3
      inst
      snde "spnk"
   doif from <> null
      targ from
      doif crea targ = 1
* REDUCE Pain, Fear and Anger!
         driv 0 -0.45
         driv 10 -0.35
         driv 12 -0.35
      endi
   endi
   kill ownr
endm

**********************
*** Pick Up Script ***
**********************
scrp 2 13 10855 4
   targ from
   stim writ targ 18 1
   targ ownr
   frat 2
      doif ov00 lt 50
         anim [0 1 2 3 4 5 6 7 255]
      else
         anim [8 9 10 11 12 13 14 15 255]
      endi
      over
endm

**********************
***Collision Script***
**********************
scrp 2 13 10855 6
   doif wall eq rght
      velo -3 0
      setv ov00 0
   elif wall eq left
      velo 3 0
      setv ov00 50
   endi
endm



******************
***Timer Script***
******************
scrp 2 13 10855 9

***time to die?
   doif time eq 3 or time eq 4
      
      gsub die
   
   endi
   
***drown in water.
   doif rtyp room targ = 8 or rtyp room targ = 9
      gsub die
   endi

   addv ov00 rand 1 2

***decide if walk right
   doif ov00 ge 0 and ov00 lt 50
      gsub wlkr
   endi

***decide if walk left
   doif ov00 ge 50 and ov00 lt 100
      gsub wlkl
   endi

***moved left enough so now set it up to move right
   doif ov00 ge 100
      setv ov00 0
   endi

***walking right
   subr wlkr
      velo -3 -2
      frat 2
      anim [8 9 10 11 12 13 14 15 14 13 12 11 10 9 8]
      over
   retn

***walking left
   subr wlkl
      velo 3 -2
      frat 2
      anim [0 1 2 3 4 5 6 7 6 5 4 3 2 1 0]
      over
   retn
   
***die
   
   subr die
      kill ownr
   retn

endm

**********************
***   Eat Script   ***
**********************
scrp 2 13 10855 12
   snde "chwp"
   stim writ from 80 1
   kill ownr
endm

**************
****REMOVE****
**************
rscr
enum 1 205 10855
   kill targ
next
enum 2 18 10856
   kill targ
next
enum 2 13 10855
   kill targ
next

scrx 1 205 10855 1000
scrx 2 18 10856 9
scrx 2 13 10855 1
scrx 2 13 10855 2
scrx 2 13 10855 3
scrx 2 13 10855 4
scrx 2 13 10855 6
scrx 2 13 10855 9
scrx 2 13 10855 12


Code for Glow Worms:
Code: Select all
*GB Template
*# Pray-File "gb_pp_albianglowworm.agent"
*# DSGB-Name "Albian Glow Worm"

*# Depend albianglowworm.c16

*# Attach albianglowworm.c16

*# Depend albianglowwormegg.c16

*# Attach albianglowwormegg.c16

*# Depend gb_pp_glowworm.c16

*# Attach gb_pp_glowworm.c16

*# Depend gb_albian_glow_worm.catalogue

*# Attach gb_albian_glow_worm.catalogue

*# Depend spnk.wav

*# Depend chwp.wav

*# desc = "The Albian Glow Worm only appears at night."
*# Agent Animation File = "gb_pp_glowworm.c16"
*# Agent Animation Gallery = "gb_pp_glowworm"
*# Agent Sprite First Image = 0
*# GB_Category = 1
*# Agent Author = "Malkin"


new: simp 1 205 10854 "blnk" 0 0 9000
setv name "spawn_script" 1000
sets name "sprite_file" "albianglowworm"
setv name "sprite_pose" 9

setv name "prod_fmly" 2
setv name "prod_gnus" 18
setv name "prod_spcs" 10854

seta va00 targ
enum 1 1 22929
   mesg wrt+ targ 1000 va00 0 0
next

*spawn
scrp 1 205 10854 1000
   inst
   new: simp 2 18 10854 "albianglowwormegg" 1 0 name "patch_plane"
   attr 210
   elas 90
   fric 50
   perm rand 45 55
   accg 2
   aero 1
   mvto _p1_ _p2_
*The patch ID is important-- if you don't copy it over, the patch won't realize that
*the egg is there, and it will spawn another one, and continue spawning FOREVER.
   setv name "patch_id" mame "patch_id"
*making sure that the patch will spawn regularly
   tick rand mame "tickfrom" mame "tickto"
   doif tick eq 0
      tick 200
   endi
endm


***********
*EGG TIMER*
***********
scrp 2 18 10854 9
**If you've been hanging around for a bit
doif ov00 ge 5
**go die now
gsub diee
**if it's not afternoon or night time
elif time ne 3 or time ne 4
**go be dormant for a bit
gsub dorm
**if you're being carried
elif carr ne null
**go be dormant for a bit
gsub dorm
**if your egg is fresh, and it's afternoon or night time, and you're not being carried
else
**go hatch
gsub hatch

endi

**die subroutine
subr diee

kill ownr

retn

**dormancy subroutine
subr dorm

wait rand 50 700

addv ov00 1

doif time = 3 or time = 4 and carr eq null

gsub hatch

elif ov00 ge 5

gsub diee

endi

retn

**hatch subroutine
subr hatch
doif carr ne null
gsub dorm
stop
endi
rnge 200
setv va66 0
esee 2 13 10854
addv va66 1
next
doif va66 le 30 and fall = 0
**set the place you're going to hatch from
setv va00 posl
setv va01 post
inst
new: simp 2 13 10854 "albianglowworm" 12 0 name "patch_plane"
attr 198
bhvr 57
elas 4
perm 60
accg 2
aero 2
fric 50
emit 1 0.001
mvsf va00 va01
***movement counter
setv va20 rand 1 2
doif va20 = 1
setv ov00 51
*both need a tick to start the timer
tick 1
else
setv ov00 0
*both need a tick to start the timer
tick 1
endi
**the egg should be destroyed now
targ ownr
kill ownr
endi
retn

endm

**********************
***   Push Script  ***
**********************
scrp 2 13 10854 1
   targ from
   stim writ targ 85 1
   targ ownr
      setv va00 rand -10 10
   setv velx va00
   setv va00 rand -10 -1
   setv vely va00
endm

**********************
***   Pull Script  ***
**********************
scrp 2 13 10854 2
   targ from
   stim writ targ 85 1
   targ ownr
      setv va00 rand -10 10
   setv velx va00
   setv va00 rand -10 -1
   setv vely va00
endm

**********************
***   Hit Script   ***
**********************
scrp 2 13 10854 3
      inst
      snde "spnk"
   doif from <> null
      targ from
      doif crea targ = 1
* REDUCE Pain, Fear and Anger!
         driv 0 -0.45
         driv 10 -0.35
         driv 12 -0.35
      endi
   endi
   kill ownr
endm

**********************
*** Pick Up Script ***
**********************
scrp 2 13 10854 4
   targ from
   stim writ targ 18 1
   targ ownr
      doif ov00 lt 50
         anim [0 1 2 3 4 5 255]
      else
         anim [6 7 8 9 10 11 255]
      endi
      over
endm

**********************
***Collision Script***
**********************
scrp 2 13 10854 6
   doif wall eq rght
      velo -4 0
      setv ov00 0
   elif wall eq left
      velo 4 0
      setv ov00 50
   endi
endm



******************
***Timer Script***
******************
scrp 2 13 10854 9

***time to die?
   doif time eq 1 or time eq 2
      
      gsub die
   
   endi
   
***drown in water.
   doif rtyp room targ = 8 or rtyp room targ = 9
      gsub die
   endi

   addv ov00 rand 1 2

***decide if walk right
   doif ov00 ge 0 and ov00 lt 50
      gsub wlkr
   endi

***decide if walk left
   doif ov00 ge 50 and ov00 lt 100
      gsub wlkl
   endi

***moved left enough so now set it up to move right
   doif ov00 ge 100
      setv ov00 0
   endi

***walking right
   subr wlkr
      velo -4 -3
      anim [6 7 8 9 10 11 10 9 8 7 6]
      over
   retn

***walking left
   subr wlkl
      velo 4 -3
      anim [0 1 2 3 4 5 4 3 2 1 0]
      over
   retn
   
***die
   
   subr die
      kill ownr
   retn

endm

**********************
***   Eat Script   ***
**********************
scrp 2 13 10854 12
   snde "chwp"
   stim writ from 80 1
   kill ownr
endm

**************
****REMOVE****
**************
rscr
enum 1 205 10854
   kill targ
next
enum 2 18 10854
   kill targ
next
enum 2 13 10854
   kill targ
next

scrx 1 205 10854 1000
scrx 2 18 10854 9
scrx 2 13 10854 1
scrx 2 13 10854 2
scrx 2 13 10854 3
scrx 2 13 10854 4
scrx 2 13 10854 6
scrx 2 13 10854 9
scrx 2 13 10854 12
malkin
 
Posts: 131
Joined: Sat Feb 11, 2012 3:55 am


Return to Agents Collective

Who is online

Users browsing this forum: No registered users and 1 guest