creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Multi-Vend X-1000 development   
Horstj

Horstj
Germany  


  11/17/2011

***The Idea / Introducion***
Quite some time ago I had the idea to create an all-in-one-vendor-agent that can make several different objects and is using only a small range of species-numbers (I was thinking of two and indeed it seems to work yustfine) and distinguishes those objects by using OVxx. So I turned once again into creating graphics with the computer, the results where most, well let's say "not perfect jet" (I'm already planning to make new sprites, but curently I'm focusing on other stuff). The real problem was CAOS, where I totally faild. The vendor I tried to create did not even appear when I tried to inject it and I had no idea why. But thanks to the great Forums here at CreaturesCaves (especially Papriko and Ghosthande) and lots of try and (even more) error this problem is almost gone.
But more than making multiple diffrent objects, the Multi-Vend is also able to make the selected object multiple times at once.

***Current state***
The current version is still early (0.3) but I'm developing stuff for the next releases...
And it can be downloaded here at CreaturesCaves in the C3/DS Misc section.
Version history:
V 0.1:
huge mess that allways got autokilled on injection, not really worth to mention...

V 0.2
first working version
create between 1 and 99 pices of the selected product at once
toggle steps between 1 and 10
create all (well, I hope I didn't forgett any*) C3/DS tool and utility agents (the necessary files are not included**)
create all (I really hope so*) C3/DS toys agents (the necessary files are not included**)
first "own" product: the Energy-pellet (gives 1000 Energy when recycled)
V 0.3
new soundfile system: all files start with MV (or mv / Mv / mV) and end with xx where x can be a number from 0 to 9 or a letter small or caps from a to z
make the Multi-Vend float with the GUI
drop all created products into the inventory (a feature originally developed by AquaShee for the great CAOSchaos tutorials)
make the Multi-Vend (almost***) invisible
new Products:
Stasispod (frezzes any creature and can be moved around by the hand)
5 simple Minecraft toys (creeper, zombie, cow, pig and chicken)

***Planned***
A camera system with as many cameras as you want, hide- and floatable screen and of cause remote-controolable and most likely captable of using the APS
The APS, a device that allowes you to set any place in the world as a "favorite" and get there from anywhere
A better wolfingvendorlike empaticvendor that searches for any hungry creatures all over the world and serves them food (I think I'll find a way to restrikt it to the metarooms of your coice) maybe a variant for toxic norns
some more toys (maybe even captable of teaching norns to fight back grendels)
a nornshaped bread like fooditem (nornbread)
a pickupable and enhaced version of the floating platform from the norn terrarium
If you have any ideas what else I should add just tell me, I'd also like to hear (or rather read) all kinds of critic on the inteface, bugs (I really hope there are none) and any kind of questions.
Of cause you are free to decompile the Multi-Vend to have a look at how it works and gain knowledge (and maybe even inspiration) to create agents yourselfes. And if you want to use some of my code, feel free to do so.

***footnotes***
* In case I forgott any, please tell me, so I can add.
** C3 is copyrighted so it would be illegal; DS is free so you can get it yourself.
*** there is still this anoying pixelline at the bottom where nothing should be. If anyone knowes how to get rid of it, please tell me.

 
Papriko
Peppery One

Papriko



  11/17/2011

You could work quit classifier-saving when you recycle the same over and over again. Simply make them different types. As long as family and/or genus are different, the same unique identifier can be used for both objects. Let's say your vendor has as classifier 2 23 10000 and it vends seeds with the classifier 2 3 10000 and toys with 2 21 10000. Those are all different classifiers which do not overlap.
This way you can save classifiers and reduce the usage to 1-2 per project.

The big disadvantage is that you lose a bit your view about which object is related in which way to another since you muse use family and genus to recognize.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Horstj

Horstj



  11/18/2011

Diffrent classifiers are one part of it, but it is also possible to have diffrent agents with exactly the same classifier and still the script is captable of distinguishing between them: OV82 is diffrent for every diffrent agent (so it is similar to a 4th classifier integer) with it all I have do is having some DOIF and ELIF conditions in my script. Unfortunately there is no DOIF and ELIF in catalogue files as far as I know.
Btw: does anyone know how to make a catalogue file to distinguish between the diffrent PAT:s of an agent?

 
Papriko
Peppery One

Papriko



  11/18/2011

Of course you can work with OVs too. Actually you're even able to make several objects of the same type that way. The commands CATA, CATI, CATO and CATX might be interesting for you.

For the tooltips I got no idea. You could try to decompile an agent which has em and see how the catalogue file is structured.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Liam

Liam


 visit Liam's website: Spellhold Studios
  11/18/2011

You can't distinguish between agents with the same classifier; I don't think you can get tooltips for different parts, either, but I'm not the most knowledgeable on those.

- Liam / K'aeloree

Spellhold Studios, a Baldur's Gate II, Neverwinter Nights and Oblivion Modding Community

 
Wiimeiser

Wiimeiser



  11/19/2011

I think you can get tooltips for different parts, that's how the buttons on the empathic vendor work.

Hashikin ko Tyni Kong Taria Haju'Rumia'an Klodz'Proddi. Terdish oxen saur yessi atai Kongo Dolpik!
 
Papriko
Peppery One

Papriko



  11/19/2011

Liam wrote:
You can't distinguish between agents with the same classifier

enum # # #
doif ovxx = 0
(stuff)
elif ovxx = 1
(other stuff)
elif ovxx = 2
(and so on)
...
else
(last possible thing)
endi
next
When I understood it right, something like this was his plan.



Liam wrote:
I don't think you can get tooltips for different parts, either, but I'm not the most knowledgeable on those.

I believe in this case those small blue text windows which pop up when you just hover the hand above a certain button are meant with "tooltip".


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  11/19/2011

Catalogues can't distinguish between agents with the same classifier, is what I believe Liam was saying.


 
Papriko
Peppery One

Papriko



  11/19/2011

Okay, then I misunderstood it. In that case I have to agree.

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Horstj

Horstj



  12/2/2011

Horstj wrote:
A camera system with as many cameras as you want, hide- and floatable screen and of cause remote-controolable and most likely captable of using the APS


The cameras are almost working, only two mayor bugs are left:
1. All cameras seem to link to the first screen that got created.
2. getting the moveto position out of the doors .cos-file doesn't work (the camera does not move AND does not send a sound telling that it cannot move).
So here is the complete script, for viewing it you should copy it into a texteditor:

inst
setv va00 0
*testnesstart
setv va10 game "CreatorX"
setv va11 game "CreatorY"
doif va10 eq 0 and va11 eq 0
setv va10 5440
setv va11 3580
endi
*testnesend
*reps ov83
addv va00 1
inst
new: simp 2 42 10852 "multivend_camsprites" 1 3 5000
setv ov16 va00
setv ov82 36
*Attributes: 1 2 16 64 128
attr 211
rnge 90
accg 0
elas 100
aero 10
perm 40
* doif va79 eq 0
* mvsf va10 va11
* elif va79 eq 1
seta va09 targ
enum 1 2 11
spas targ va09
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next
* endi

new: comp 1 101 10852 "multivend_camsprites" 21 0 6000
setv ov82 36
setv ov16 va00
seta ov17 null
setv name "multivend_camera_nothidden" 1
setv name "multivend_camera_beingcarried" 0
*Attributes: 1 2 4 16
attr 23
**parts
pat: cmra 1 "multivend_camoverlay" 0 10 10 1 360 260 180 130
*hide-button
pat: butt 2 "multivend_camsprites" 6 2 5 1 3 [1] 1002 1
part 2
anim [1 0]
*carry-button
pat: butt 3 "multivend_camsprites" 4 2 17 1 3 [1] 1003 1
part 3
anim [1 0]
*up-button
pat: butt 4 "multivend_camsprites" 12 2 176 115 3 [1] 1004 1
part 4
anim [1 0]
*right-button
pat: butt 5 "multivend_camsprites" 14 2 188 126 3 [1] 1005 1
part 5
anim [1 0]
*down-button
pat: butt 6 "multivend_camsprites" 8 2 176 138 3 [1] 1006 1
part 6
anim [1 0]
*left-button
pat: butt 7 "multivend_camsprites" 10 2 164 126 3 [1] 1007 1
part 7
anim [1 0]
*door-button
pat: butt 8 "multivend_camsprites" 16 2 176 126 3 [1] 1008 1
part 8
anim [1 0]
*mask the cam
pat: dull 9 "multivend_camsprites" 20 10 10 2
tick 1
mvsf va10 va11
slow
*repe

scrp 1 101 10852 9
doif name "multivend_camera_nothidden" eq 1
doif ov17 eq null
enum 2 42 10852
doif ov16 eq mv16
seta mv17 targ
seta ov17 ownr
setv mv16 0
setv ov16 0
targ ownr
*MAKEDISPLAYLOOKATCAM
scam ownr 1
trck ov17 20 20 2 0
endi
next
else
*MAKEDISPLAYLOOKATCAM
scam ownr 1
trck ov17 20 20 2 0
endi
endi
endm

***button scripts***
*hide-button
scrp 1 101 10852 1002
doif name "multivend_camera_nothidden" eq 1
pat: kill 1
pat: kill 3
pat: kill 4
pat: kill 5
pat: kill 6
pat: kill 7
pat: kill 8
pat: kill 9
part 0
pose 1
setv name "multivend_camera_nothidden" 0
elif name "multivend_camera_nothidden" eq 0
pat: cmra 1 "multivend_camoverlay" 0 10 10 1 360 260 180 130
*carry-button
pat: butt 3 "multivend_camsprites" 4 2 17 1 3 [1] 1003 1
doif name "multivend_camera_beingcarried" eq 1
part 3
anim [0 1]
elif name "multivend_camera_beingcarried" eq 0
part 3
anim [1 0]
endi
*up-button
pat: butt 4 "multivend_camsprites" 12 2 176 115 3 [1] 1004 1
part 4
anim [1 0]
*right-button
pat: butt 5 "multivend_camsprites" 14 2 188 126 3 [1] 1005 1
part 5
anim [1 0]
*down-button
pat: butt 6 "multivend_camsprites" 8 2 176 138 3 [1] 1006 1
part 6
anim [1 0]
*left-button
pat: butt 7 "multivend_camsprites" 10 2 164 126 3 [1] 1007 1
part 7
anim [1 0]
*door-button
pat: butt 8 "multivend_camsprites" 16 2 176 126 3 [1] 1008 1
part 8
anim [1 0]
*mask the cam
pat: dull 9 "multivend_camsprites" 20 10 10 2
part 0
pose 0
setv name "multivend_camera_nothidden" 1
endi
endm

*carry-button
scrp 1 101 10852 1003
doif name "multivend_camera_beingcarried" eq 0
attr 52
setv name "multivend_camera_beingcarried" 1
part 3
pose 1
elif name "multivend_camera_beingcarried" eq 1
attr 23
setv name "multivend_camera_beingcarried" 0
part 3
pose 0
endi
endm

*up-button
scrp 1 101 10852 1004
part 4
anim [1 0]
targ ov17
inst
setv va00 velx
setv va01 vely
addv va01 -5
velo va00 va01
slow
targ ownr
endm

*right-button
scrp 1 101 10852 1005
part 5
anim [1 0]
targ ov17
inst
setv va00 velx
setv va01 vely
addv va00 5
velo va00 va01
slow
targ ownr
endm

*down-button
scrp 1 101 10852 1006
part 6
anim [1 0]
targ ov17
inst
setv va00 velx
setv va01 vely
addv va01 5
velo va00 va01
slow
targ ownr
endm

*left-button
scrp 1 101 10852 1007
part 7
anim [1 0]
targ ov17
inst
setv va00 velx
setv va01 vely
addv va00 -5
velo va00 va01
slow
targ ownr
endm

*door-button
*original only leads to door getting auto killed so I had to remove
*now there is a new one
scrp 1 101 10852 1008
part 8
anim [1 0]
mesg writ ov17 1001
endm

*hey the door button has been pushed!
scrp 2 42 10852 1001
***cambot interact door protoscript***
*let NOONE interupt you
inst
*enumerate doors that cam can see
esee 2 2 0
*set a var to the species of the door
setv va00 spcs
next
doif va00 le 0
*we got a bad position change to chek the scriptorium
targ ov17
snde "MV01"
else
*get the pushscript of that doot into a var
sets va01 sorc 2 2 va00 1
*now find the ``marker´´ M V T F
sets va10 va01
sets va01 lowa va10
setv va02 sins va01 1 "mvft"
*chek weather we have a working one somehow turns out that there is no M V T F in the entire script due to the fact that it is M V F T
doif va02 ne -1
*now we don't need the remaining parts of the initial string anymore
sets va03 subs va01 va02 -1
*now we get the first number (aka x-coordinate)
setv va51 stoi va03
*now we have to put it back into a string (sounds weird but it's necessary)
sets va04 vtos va51
*cause now we can find out how long we are
setv va05 strl va04
*add 5 because the comand and the space take that lenght
addv va05 5
*now we remove the first V A 0 5 letters from the string...
sets va06 subs va03 va05 -1
*... so we get the second number (aka y-coordinate)
setv va52 stoi va06
*and finally: test weather we have good coordinates
doif tmvt va51 va52 eq 1
*we got good coordinates, so move there
*posible learning script goes here (and at the start of cause)
mvsf va51 va52
elif tmvt va51 va52 eq 0
*we got bad coordintes, so annoy us further with a sound
targ ov17
snde "MV01"
endi
elif va02 eq -1
targ ov17
snde "MV01"
endi
endi
*were done you may now be disturebed
slow
endm

rscr
enum 2 42 10852 kill next
enum 1 101 10852 kill next
scrx 1 101 10852 1002
scrx 1 101 10852 1003
scrx 1 101 10852 1004
scrx 1 101 10852 1005
scrx 1 101 10852 1006
scrx 1 101 10852 1007
scrx 1 101 10852 1008
scrx 2 42 10852 1001

 
Horstj

Horstj



  12/21/2011

I sommehow have the feeling that moving the cam-to-display part to the installscript would fix all cams linking to the fitst screen. But I have no idea at all why I get NOTHING from the grab-goto-pos-from-door.cos part: there really happens nothing: no cam is moved to new position, no sound telling me that I've got bad coordintes, no autokill, no crash. And I have no idea why. Please help me!
 
Horstj

Horstj



  4/10/2012

Well, it's been quite a long time, but finally the cambots are in a more or les working state:
cam to display is working, so vou can have unlimited controolable camereas (and they do not get pushed around by norns); aligning a camera to a new screen doesn't work and like allways I have no idea why...
I havent looked again into the use-door thing, in theory it schould do something, at least crash the game but in fact: nothing.
Tryed to make a lable-thing: Guess it? right, it doesn't work! So I'll have a look at other agents with space where the user can type in stuff and thn I' mght get it to work (or at least I can test weather SPIN workes the way I think).

One more thing: has anyone tryed it jet? I'd really like to read some opinions on this project.

 


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