creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Coding help! Fixing The Hideout   
Uzag

Uzag
Sweden  

 visit Uzag's website: DeviantArt
  3/18/2017  1

So.
About 10 years ago, main I and Liam created a metaroom together.
This one;
http://creaturescaves.com/downloads.php?section=Metarooms&view=63

As a surprise or... something, we made a mosquito-like creature not only spawn in the metaroom but also in the Grendel Jungle. Unfortunately, these critter seem to go BESERK in the Jungle and multiply at an insane rate. It's so bad that it's nearly impossible have both the Hideout and the Jungle injected at the same time. And that's no fun. So I wish to correct this issue and make these critter stop spawn in the Jungle all together.

I know a tad bit of CAOS but not nearly enough to figure out how Liam did this. Now, I have tried for a few hours but I just cannot figure it out. A few things I've figured out so far:

> I found the chunk that creates the critters but when I removed it, both the critters and the C3 mosquitoes stopped spawning.
> If removing the mosquito.cos from the C3 folder, the critter still works and still spawn in both the Hideout & the Jungle.
> If removing the "grendel seed bank.cos", the critter still works and still spawn in both the Hideout & the Jungle.
> There seem to be no coordinates that match the Jungle in the Hideout script. This bamboozles me!

Could someone help me out here?
I'll add the part of the code that I think contain the "flaw" in the a follow up post in a moment.

 
Uzag

Uzag


 visit Uzag's website: DeviantArt
  3/18/2017

*Nest
scrp 2 17 20170 9
esee 2 14 20163
doif totl 2 14 20163 > 15
kill targ
endi
next

doif ov00 = 1
setv ov00 0
doif totl 2 14 20163 < 1
inst
reps rand 2 5
new: simp 2 14 20163 "b1-bite" 24 0 300
attr 66

bhvr 49
tick 5

setv ov61 40

mvsf 9789 295
setv ov10 rand 0 1
doif ov10 eq 0
setv ov10 -1
endi
setv ov11 rand 0 1
doif ov11 eq 0
setv ov11 -1
endi
repe
endi
endi
endm

scrp 2 14 20163 1001
attr 194
accg 4
velo 0 0
tick 0
elas 0
perm 100
anim [0]
loop
setv vely 10
untl fall = 0
wait rand 50 100
kill ownr

endm

scrp 2 14 20163 9


addv ov01 1

doif rtyp room targ eq 8 or rtyp room targ eq 9
setv vely -5
stop
endi

setv va00 0
setv va01 0


doif prop room targ 5 gt 0.2
setv vely -10
stop
endi


doif ov01 ge 100
inst
setv va00 posl
setv va01 post
rnge 1000

doif totl 2 14 20163 < 5
new: simp 2 14 20163 "b1-bite" 24 0 300
attr 66
doif tmvt va00 va01 <> 1
kill targ
stop
endi

bhvr 49
tick 5

setv ov61 40

mvsf va00 va01
setv ov10 rand 0 1
doif ov10 eq 0
setv ov10 -1
endi
setv ov11 rand 0 1
doif ov11 eq 0
setv ov11 -1
endi
endi
endi
targ ownr





doif ov00 eq 0

setv ov14 5
setv ov15 5

subv ov90 1

gsub wall

doif ov90 le 0

doif va00 ne 1
doif rand 0 2 eq 0

negv ov10
endi
addv ov90 rand 1 3
endi

doif va01 ne 1


negv ov11

addv ov90 rand 2 5
endi
endi

gsub velo
gsub anim


doif ov91 le 0
gsub hunt

else
subv ov91 1
endi

endi


doif ov00 eq 1
gsub hunt
doif posx lt ov70 and ov10 lt 0
setv ov10 1
endi
doif posx gt ov70 and ov10 gt 0
setv ov10 -1
endi
doif posy lt ov71 and ov11 lt 0
setv ov11 1
endi
doif posy gt ov71 and ov11 gt 0
setv ov11 -1
endi
setv ov14 4
setv ov15 4

gsub velo
gsub wall
gsub anim
endi







subr hunt
rnge 200
setv va99 0
esee 2 1 1
setv va99 1
setv va00 posx
setv va01 posy
targ ownr
setv ov00 1
setv ov70 va00
setv ov71 va01
next
doif va99 eq 0
setv ov00 0
endi
retn



subr velo
doif ov10 lt 0

negv ov14
doif ov12 gt ov14
subv ov12 2
endi
negv ov14
else

doif ov12 lt ov14
addv ov12 2
endi
endi

doif ov11 lt 0

negv ov15
doif ov13 gt ov15
subv ov13 2
endi
negv ov15
else

doif ov13 lt ov15
addv ov13 2
endi
endi

setv velx ov12
setv vely ov13
retn


subr wall

doif obst 0 lt 100 and ov10 lt 0
negv ov10
setv va00 1
endi

doif obst 1 lt 100 and ov10 gt 0
negv ov10
setv va00 1
endi

doif obst 2 lt 50 and ov11 lt 0
negv ov11
setv va01 1
endi

doif obst 3 lt 100 and ov11 gt 0
negv ov11
setv va01 1
endi
retn


subr anim

doif ov12 gt 0
anim [2 3 255]
elif ov12 lt 0
anim [8 9 255]
endi
retn

endm

scrp 2 14 20163 1
setv vely -20
targ from
doif fmly eq 4
stim writ targ 88 1
endi
endm

scrp 2 14 20163 4
targ from
doif fmly eq 4
stim writ targ 88 1
endi
mesg writ targ 5
endm

scrp 2 14 20163 12
targ from
doif fmly eq 4
stim writ targ 88 1
endi
kill ownr
endm


scrp 2 18 20 9
inst
setv va00 posl
setv va01 post
rnge 700
setv va66 0
esee 2 14 5
addv va66 1
next
doif va66 < 6

new: simp 2 14 20163 "b1-bite" 24 0 300
attr 66
doif tmvt va00 va01 <> 1
kill targ
stop
endi

bhvr 49
tick 5

setv ov61 40

mvsf va00 va01
setv ov10 rand 0 1
doif ov10 eq 0
setv ov10 -1
endi
setv ov11 rand 0 1
doif ov11 eq 0
setv ov11 -1
endi
endi
endm

 
RisenAngel
Sanely Insane

RisenAngel

Manager


 visit RisenAngel's website: The Realm
  3/18/2017

Wow, it's been 10 years? Man, time flies.

Anyway, the issue is that there's a bit of code that overrides the mossie fly egg script, so that the invisible eggs the mossie fly lays instead hatch into the Grendel Hideout bug. The population check on the egg also doesn't look for the Grendel Hideout bug; it looks for mossie flies. The result is a whole lot of mosquitoes in the Jungle Terrarium.

To get rid of it entirely, here's the bit of code to remove:
scrp 2 18 20 9
inst
setv va00 posl
setv va01 post
rnge 700
setv va66 0
esee 2 14 5
addv va66 1
next
doif va66 < 6

new: simp 2 14 20163 "b1-bite" 24 0 300
attr 66
doif tmvt va00 va01 <> 1
kill targ
stop
endi

bhvr 49
tick 5

setv ov61 40

mvsf va00 va01
setv ov10 rand 0 1
doif ov10 eq 0
setv ov10 -1
endi
setv ov11 rand 0 1
doif ov11 eq 0
setv ov11 -1
endi
endi
endm


~ The Realm ~
Risen Angel's Creatures Blog


 
Uzag

Uzag


 visit Uzag's website: DeviantArt
  3/18/2017  2

That's splendid, thank you so much! I did the alteration and got things up and running with exactly the results I had hoped for. I wonder if you would like to be added into the credits?

I'm looking into doing some small graphical tweaks too, but then it's ready for use.

I am also slightly weirded out it was about ten years since the room was created o_O;;

 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki