creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Agent injection position   
Horstj

Horstj
Germany  


  4/25/2011

I'm curently trying to make a special
agent captable of creating more agents (and even multiple at once) but my prototype doesn't inject corectly (well it doesn't inject at all, so I can't even test any part of it) :'(
I only used comands found in the documentation C3 created for me and the sprite is 400 by 200 (length by hight), so here is the injectionscript:

***Multi-Vend V1***

*make metavendor
inst
new: comp 2 23 10853 "multivend01" 2 0 6000
* physics:128, collisions:64, invisible:16, activateable:4, mouseable:2, carryable:1
attr 23
* no creature actions
bhvr 0

***Variables***
*state on or off
setv ov80 0
*category
setv ov81 0
*item number
setv ov82 0
*PA
setv ov83 1
*stepwidth
setv ov84 1

***parts***
* Part 1 - powerbutton
pat: butt 1 "multivend01" 28 2 378 162 1 [1] 1001 1
part 1
pose [0]

* Part 2 - okbutton
pat: butt 2 "multivend01" 26 2 378 121 1 [1] 1002 1
part 2
pose [0]

* Part 3 - categoryupbutton
pat: butt 3 "multivend01" 24 2 378 82 1 [1] 1003 1
part 3
pose [0]

* Part 4 - priorbutton
pat: butt 4 "multivend01" 22 2 376 47 1 [1] 1004 1
part 4
pose [0]

* Part 5 - nextbutton
pat: butt 5 "multivend01" 20 2 376 13 1 [1] 1005 1
part 5
pose [0]

* Part 6 - stepsbutton
pat: butt 6 "multivend01" 18 2 6 144 1 [1] 1006 1
part 6
pose [0]

* Part 7 - backtoonebutton
pat: butt 7 "multivend01" 16 2 6 110 1 [1] 1007 1
part 7
pose [0]

* Part 8 - lessbutton
pat: butt 8 "multivend01" 14 2 6 73 1 [1] 1008 1
part 8
pose [0]

* Part 9 - morebutton
pat: butt 9 "multivend01" 12 2 6 37 1 [1] 1009 1
part 9
pose [0]

* Part 10 - PA display ones
pat: dull 10 "numericaldisplay" 0 15 7 1

* Part 11 - PA display tens
pat: dull 11 "numericaldisplay" 0 3 7 1

* Part 12 - maindisplay
*use diffrent c16-file low numbers reserved for products high ones for categories
pat: dull 12 "multiscreenv01" 0 31 6 1

*moveit
part 0
mvto 5800 3520
slow

note: there is more of course, but I didn't want to put the remaining 420 lines of code here.

 
Papriko
Peppery One

Papriko



  4/25/2011

* physics:128, collisions:64, invisible:16, activateable:4, mouseable:2, carryable:1

^ I hope that is a single line? ^



And what is much more important: when you try to inject it, what happens? Does simply nothing happen or do you get errors? If no errors, did you already turn off autokill?


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

Horstj



  4/25/2011

of curse it's a single line, and no I don't get errors (at least no mesages).
When I try to inject it, simply nothing happens, and how do I turn off autokill???

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  4/25/2011

Ctrl-Shift-A toggles autokill.

(Ctrl-Shift-W toggles Wolfing control, which will let you see if autokill is currently on or off.)



 
Papriko
Peppery One

Papriko



  4/25/2011

@Ghsothande: Don't you need to have the Wolf Control window open to toggle Autokill?

@Horstj: Try to inject it once more after Autokill is off. Probably you get an error message. If you can't interpret it yourself, simply copy and paste it 1:1 into this topic.


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

Ghosthande


 visit Ghosthande's website: Breeders Beware
  4/25/2011

No. I toggle it all the time without ever opening Wolf Control. It's only useful in that it shows you if it is toggled on or off.


 
Horstj

Horstj



  4/26/2011

When I swiched autokill off, and tried to inject (using the creator thing as usual) nothing happens and I did get no kind of feedback. :( so I copied the .cos to bootsrap and ject ... 7 and got this:

> ject "multivendv01.cos" 7
D:\Programm Files\Creatures Exodus\Creatures 3\Bootstrap\001 World/multivendv01.cos
2 23 10853 1001
Expected numeric rvalue at token "
... "hi__" part 1 pose @ [1] part 12 pose [10] else set ...

(I made every second line red for better readability)
it seem to refer to one of the scripts but I have no idea what it means, btw the "hi__" is part of a SNDE comand and should make the agent play the hi__.wav sound.

 
Papriko
Peppery One

Papriko



  4/26/2011

That is a classic error. Look at your second red line.

Expected numeric rvalue at token ""

The error says it wants to have a numeric rvalue (= a normal number). In the next line it tells you with an @ where the script wants to have it.

pose @ [1]

My diagnosis is that it can not understand the [1].
[ ] is only used for animation commands like ANIM (duno if there are others too). POSE needs a simple number. Remove from all POSE commands the [ ]. Example:

pose [1] ==> pose 1


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

Horstj



  4/26/2011

Well, POSE was one problem, some others I could fix myself (like SET instead of SETV). Now I got this:

> ject "multivendv01.cos" 7
D: \Program Files\Creatures Exodus\Creatures 3\Bootstrap\001 World/multivendv01.cos
Invalid TARG [ @ doif ov80 eq 0 stop endi ]

This code shall make pushing the buttons having no effect when the machine is turned off. So I replaced ENDI with ELSE and added an ENDI at the end of the script (for every script) and got a "Microsoft Visual C++ Runtime Libary" error saying:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's suport team for more information.

 
Papriko
Peppery One

Papriko



  4/26/2011

How you mean? Can you paste example code?

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

Horstj



  4/26/2011

I changed:

scrp 2 23 10853 100x
doif ov80 eq 0
stop
endi
rest of script
endm

to:

scrp 2 23 10853 100x
doif ov80 eq 0
stop
elif
rest of script
endi
endm

in all the scripts, copied the new cosfile to bootstrap, started Cretures ject7ed and it crashed. Shall I email you the cosfile (and the sprites etc.)?

 
Papriko
Peppery One

Papriko



  4/27/2011

I am not sure if you can use STOP like that. Actually I never used it. Maybe better try restructuring your scripts, a bit like this:

scrp 2 23 10853 100x
doif ov80 <> 0
(code you want to do when it is on)
endi
endm


Like this it works exactly like your code. When OV80 is 0, then it aborts without any further request. When it is not 0, then it does whatever you tell it to.

When your machine has different modes, you even can expand the code easily:

scrp 2 23 10853 100x
doif ov80 = 1
(action 1)

elif ov80 = 2
(action 2)

elif ov80 = 94
(action 94)

endi
endm


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

Horstj



  4/27/2011

Arrrrggghhh!!!!!!!!!!!!!!!!!!!!!!!!
I changed:

scrp 2 23 10853 100x
doif ov80 eq 0
stop
elif
rest of script
endi
endm

to:

scrp 2 23 10853 100x
doif ov80 eq 1
rest of script
endi
endm

and still, it crashes.
I am desperate.

Update:
I tried to fix it by PAT: KILLing all the componets one by one in the removescript. Still I get the same (unsatisfiing) result.

 
Horstj

Horstj



  4/30/2011

I'm not sure if it is linked to the crash when triing to inject the agent, but when I try to start C3 I now get this strange massage:

Catalogue Error: CLE0012: Index 3 out of range 0 to 0 for tag app_insufficient_disk_space

Windows NT/2000 6.0 build 6002 (Service Pack 2)
OriginalDisplay DirectX (no modules)
Sat Apr 30 15:01:19 2011 - ***** - 2.296

 
Papriko
Peppery One

Papriko



  4/30/2011

That looks like an odd crossover of a normal catalogue error and something Microsoft-specific. Sorry, I can't really help with this, I'm on Linux...

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

Horstj



  4/30/2011

DS states that there is not enough disc space too. It sais it needs some mb but I have some gb of free space. DS startes without more problems, but C3 only gives a windowed black screen, when I pressed alt-enter (I think that was howw to get to full screen) I got this:

CSE0001: Caught C-style structured exception at 0x0055377D

EXCEPTION_ACCESS_VIOLATION
The thread attempted to read from or write to a virtual address for which it does not have the appropriate access.
Attempt was to read from address 0x00007AC8

Error opening map file

Windows NT/2000 6.0 build 6002 (Service Pack 2)
OriginalDisplay DirectX (no modules)
Sat Apr 30 15:23:51 2011 - ***** - 2.296


Edit:
For some strange reason it (starting C3) is working again, but don't ask me why.

 
Horstj

Horstj



  5/10/2011

Still not working, not even a real error reporting just a total crash...
So if anyone here thinks he/she can help me, please send me a pm and I'll e-mail you the cos-, c16- and soundfiles.

 
Horstj

Horstj



  5/13/2011

I heard a strange song on the radio and thought it could be the soundfiles. It where not the soundfiles, it still crashes C3 when trying to inject saying this:

Microsoft Visual C++ Runtime Library

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


So let's see what DS sais about this...
DS (docked to C3) sais exactly the same as C3. I really dislike that!

 
Horstj

Horstj



  6/12/2011

This is going to be a reeeeely long post with almost no content. I'm posting a .cos file in code-tags so to make it readable you'll need to copy and past it into a texteditor. So here we go:


***Multi-Vend V1***

*make metavendor
inst
new: comp 2 23 10853 "multivend01" 2 0 6000
*no physics:128,no collisions:64, invisible:16, activateable:4, mouseable:2, carryable:1
attr 23
* no creature actions
bhvr 0

***Variables***
*state on or off
setv ov80 0
*category
setv ov81 0
*item number
setv ov82 0
*PA
setv ov83 1
*stepwidth
setv ov84 1

***parts***
* Part 1 - powerbutton
pat: butt 1 "multivend01" 28 2 378 162 1 [1] 1001 1
part 1
pose 0

* Part 2 - okbutton
pat: butt 2 "multivend01" 26 2 378 121 1 [1] 1002 1
part 2
pose 0

* Part 3 - categoryupbutton
pat: butt 3 "multivend01" 24 2 378 82 1 [1] 1003 1
part 3
pose 0

* Part 4 - priorbutton
pat: butt 4 "multivend01" 22 2 376 47 1 [1] 1004 1
part 4
pose 0

* Part 5 - nextbutton
pat: butt 5 "multivend01" 20 2 376 13 1 [1] 1005 1
part 5
pose 0

* Part 6 - stepsbutton
pat: butt 6 "multivend01" 18 2 6 144 1 [1] 1006 1
part 6
pose 0

* Part 7 - backtoonebutton
pat: butt 7 "multivend01" 16 2 6 110 1 [1] 1007 1
part 7
pose 0

* Part 8 - lessbutton
pat: butt 8 "multivend01" 14 2 6 73 1 [1] 1008 1
part 8
pose 0

* Part 9 - morebutton
pat: butt 9 "multivend01" 12 2 6 37 1 [1] 1009 1
part 9
pose 0

* Part 10 - PA display ones
pat: dull 10 "numericaldisplay" 0 15 7 1

* Part 11 - PA display tens
pat: dull 11 "numericaldisplay" 0 3 7 1

* Part 12 - maindisplay, zero for startingscreen, low numbers for objects, high numbers for categorys
pat: dull 12 "multiscreenv01" 0 31 6 1

*moveit
part 0
mvto 5800 3520
slow

***scripts***
*switch me on or off
scrp 2 23 10853 1001
doif ov80 eq 0
setv ov80 1
snde "hi__"
*make the button shine
part 1
pose 1
*show the staring screen
part 12
pose 10
else
setv ov80 0
setv ov81 0
setv ov82 0
setv ov83 1
setv ov84 1
snde "bye_"
*turn the lights off
part 1
pose 0
part 2
pose 0
part 3
pose 0
part 4
pose 0
part 5
pose 0
part 6
pose 0
part 7
pose 0
part 8
pose 0
part 9
pose 0
part 10
pose 0
part 11
pose 0
part 12
pose 0
endi
endm

*the allmighty OK-button
scrp 2 23 10853 1002
doif ov80 eq 1
part 2
anim [1 0]
doif ov82 eq 0
doif ov81 eq 1
setv ov82 1
part 12
pose 1
elif ov81 eq 2
setv ov82 3
part 12
pose 3
endi
else
setv va10 posx
setv va11 posy
doif ov82 eq 1
reps ov83
new: simp 2 10 10854 "products" 1 0 5000
attr 195
bhvr 0
elas 0
fric 100
accg 4
aero 10
perm 100
setv ov61 1000
mvto va10 va11
repe
elif ov82 eq 2
snde "nope"
elif ov82 eq 3
part 0
pose 1
endi
endi
endi
endm

*category up
scrp 2 23 10853 1003
doif ov80 eq 1
part 3
anim [1 0]
doif ov82 ne 0
setv ov82 0
part 12
setv va01 10
addv va01 ov81
pose va01
elif ov82 eq 0 and ov81 ne 0
setv ov81 0
part 12
pose 10
endi
endi
endm

*next product/category
scrp 2 23 10853 1004
doif ov80 eq 1
part 4
anim [1 0]
doif ov82 eq 0
addv ov81 1
doif ov81 gt 3
setv ov81 1
endi
setv va01 10
addv va01 ov81
part 12
pose va01
else
addv ov82 1
doif ov81 eq 1
doif ov82 gt 2
setv ov82 1
endi
part 12
pose ov82
elif ov81 eq 2
snde "nope"
endi
endi
endi
endm

*prior product/category
scrp 2 23 10853 1005
doif ov80 eq 1
part 5
anim [1 0]
doif ov82 eq 0
addv ov81 -1
doif ov81 lt 1
setv ov81 3
endi
setv va01 10
addv va01 ov81
part 12
pose va01
else
addv ov82 -1
doif ov81 eq 1
doif ov82 lt 1
setv ov82 2
endi
part 12
pose ov82
elif ov81 eq 2
snde "nope"
endi
endi
endi
endm

*switch between PA steps of 10 and 1
scrp 2 23 10853 1006
doif ov80 eq 1
doif ov84 eq 1
setv ov84 10
part 6
pose 1
else
setv ov84 1
part 6
pose 0
endi
endi
endm

*reset PA back to 1
doif ov80 eq 1
scrp 2 23 10853 1007
setv ov83 1
part 7
anim [1 0]
endi
endm

***both PA's need the display to be triggert
*reduce PA
scrp 2 23 10853 1008
doif ov80 eq 1
setv va01 ov84
negv va01
addv ov83 va01
doif ov83 lt 1
setv ov83 1
part 10
pose 1
part 11
pose 10
endi
doif ov83 ge 90
setv va02 ov83
addv va02 -90
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 9
elif ov83 ge 80 and ov83 lt 90
setv va02 ov83
addv va02 -80
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 8
elif ov83 ge 70 and ov83 lt 80
setv va02 ov83
addv va02 -70
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 7
elif ov83 ge 60 and ov83 lt 70
setv va02 ov83
addv va02 -60
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 6
elif ov83 ge 50 and ov83 lt 60
setv va02 ov83
addv va02 -50
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 5
elif ov83 ge 40 and ov83 lt 50
setv va02 ov83
addv va02 -40
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 4
elif ov83 ge 30 and ov83 lt 40
setv va02 ov83
addv va02 -30
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 3
elif ov83 ge 20 and ov83 lt 30
setv va02 ov83
addv va02 -20
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 2
elif ov83 ge 10 and ov83 lt 20
setv va02 ov83
addv va02 -10
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 1
endi
endi
endm

*add PA
scrp 2 23 10853 1009
doif ov80 eq 1
addv ov83 ov84
doif ov83 gt 99
setv ov83 99
part 10
pose 9
part 11
pose 9
endi
doif ov83 ge 90
setv va02 ov83
addv va02 -90
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 9
elif ov83 ge 80 and ov83 lt 90
setv va02 ov83
addv va02 -80
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 8
elif ov83 ge 70 and ov83 lt 80
setv va02 ov83
addv va02 -70
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 7
elif ov83 ge 60 and ov83 lt 70
setv va02 ov83
addv va02 -60
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 6
elif ov83 ge 50 and ov83 lt 60
setv va02 ov83
addv va02 -50
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 5
elif ov83 ge 40 and ov83 lt 50
setv va02 ov83
addv va02 -40
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 4
elif ov83 ge 30 and ov83 lt 40
setv va02 ov83
addv va02 -30
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 3
elif ov83 ge 20 and ov83 lt 30
setv va02 ov83
addv va02 -20
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 2
elif ov83 ge 10 and ov83 lt 20
setv va02 ov83
addv va02 -10
doif va02 eq 0
setv va02 10
endi
part 10
pose va02
part 11
pose 1
endi
endi
endm

***remove script***
rscr
enum 2 23 10853 pat: kill 1 next
enum 2 23 10853 pat: kill 2 next
enum 2 23 10853 pat: kill 3 next
enum 2 23 10853 pat: kill 4 next
enum 2 23 10853 pat: kill 5 next
enum 2 23 10853 pat: kill 6 next
enum 2 23 10853 pat: kill 7 next
enum 2 23 10853 pat: kill 8 next
enum 2 23 10853 pat: kill 9 next
enum 2 23 10853 pat: kill 10 next
enum 2 23 10853 pat: kill 11 next
enum 2 23 10853 pat: kill 12 next
enum 2 23 10853 kill targ next
enum 2 10 10854 kill targ next
scrx 2 23 10853 1001
scrx 2 23 10853 1002
scrx 2 23 10853 1003
scrx 2 23 10853 1004
scrx 2 23 10853 1005
scrx 2 23 10853 1006
scrx 2 23 10853 1007
scrx 2 23 10853 1008
scrx 2 23 10853 1009


509 lines of code! Yay!

 
Papriko
Peppery One

Papriko



  6/13/2011

It doesn't help with your problem, but makes the code a tiny bit shorter: you do not need all the PAT: KILLs in the removal script. KILL TARG and SCRX are enough.

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

Horstj



  6/13/2011

well originally i used KILL TARG but I tried to PAT: KILL every part hoping that would fix the problem. Please, please, please have a deeper look into it and find the problem that's causing the crash.
 
Papriko
Peppery One

Papriko



  6/14/2011

Maybe it is a problem I had with the CRC. Ghosthande gave me a tip.
It might be a problem with the buttons. You only need to do this in the injection script. Instead of
* Part 1 - powerbutton
pat: butt 1 "multivend01" 28 2 378 162 1 [1] 1001 1
part 1
pose 0
You enter
* Part 1 - powerbutton
pat: butt 1 "multivend01" 28 2 378 162 1 [1] 1001 1
part 1
anim [1 0]
This do you do with all PAT:. When you inject the agent, they'll flicker once.
This could be a possible solution.


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

Horstj



  6/14/2011

that did unfortunatley not help.
Still full chrash, telling something of visual C+ or C++ and unusual way.

 
Papriko
Peppery One

Papriko



  6/14/2011

Did you do it with all PAT: in the injection script?

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

Horstj



  6/14/2011

with all PAT: BUTTs since the PAT: DULLs didn't have POSE I didn't change it there. Was that a mistake?
 
Papriko
Peppery One

Papriko



  6/15/2011

Not directly. When I remember right that was a fix for an animation problem I had with the buttons, nothing game crashing...

I want to be honest: right now I can't see anything very suspicious which could cause your errors. Perhaps you could get a syntax highlighter. In theory it should be able to track many mistakes.


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

Ghosthande


 visit Ghosthande's website: Breeders Beware
  6/15/2011

I pasted your code into the CAOS tool and under the caption "*reset PA back to 1" you have a DOIF before script 1007... I assume those two lines were meant to be reversed? That will probably cause you trouble.

The CAOS tool insists that it's best not to put strings like "enum 2 23 10853 kill targ next" all on the same line. Althouh you have to put strings like that on the same line in the command line, so I'm not sure if it is really causing problems; can't hurt to fix it though.

I can't test your code in-game since I'm about to start work but perhaps fixing these two things will help.



 
Papriko
Peppery One

Papriko



  6/15/2011

That with the single line of the ENUMs and KILL TARGs is nothing bad. It doesn't look nice, but should work.
But the wrong placed DOIF line, that seems to cause all the mischief. I am rather sure that's it.

Horstj: if you didn't already find yet, Ghosthande meant this piece of code:
*reset PA back to 1
doif ov80 eq 1
scrp 2 23 10853 1007

setv ov83 1
part 7
anim [1 0]
endi
endm


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

Horstj



  6/15/2011

Jeeeeeehaaaaaaaa!!!! :D :D :D :D :D

That was the cause of the problem! You are so great. I can't really describe how happy I am. Now I'll make new graphics 'cause the current ones are rubbish (thats the polite way to tell). And I'll have another look into the code because some parts aren't working as intended jet.

Wohoho I'm feeling so great!

 
Horstj

Horstj



  7/10/2011

As an aditional object the Multi-Vend can inject I wanted to make a stasispod (doing basicly the same as the cryo hands but leaving the creature in a handy box so you can carry it around (and maybe even add a way so that creatures in stasis don't count as population (so you can have "more" creatures when some are in stasis))).
I wanted to use slightly altered sprites from the midicalpod (bridge of the ark) but whenever I tried to inject the testing version the injection screen tells me that the position is bad. could this be due to the invisible area on the top of the sprites or are they too large?

 


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
1 online
RisenAngel
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