|
Development Forum |
 |
| Two .cos Files, One PRAY File? | |
|
 Tea Queen
Laura
    

|
10/1/2014 | |
Please could somebody post an example of how a DS PRAY file would be written if there were two .cos files involved?
One .cos file contains a modified script with some additions, while the other .cos file contains a remove script for the additions, as well as the original, un-modified script (so the player can revert back to the old version upon removal). I hope to Shee that this makes sense! |
 Sanely Insane
RisenAngel
     Manager

|
10/1/2014 | |
Here's the PRAY file for Terra, which does use multiple .cos files. This many is probably overkill, but hopefully it'll give you an idea of what the PRAY file would look like.
Unfortunately I'm not that well versed in PRAY, so I really can't do much beyond this.
~ The Realm ~
Risen Angel's Creatures Blog
|
 Tea Queen
Laura
    

|
10/1/2014 | |
Thanks, Grendel Man. I think that example will be of some help! I notice that they didn't include the remove script in the PRAY file, though? This confuses me a little. |
 Sanely Insane
RisenAngel
     Manager

|
10/1/2014 | |
I don't think Terra has a proper remove script, actually. It is a metaroom, which are known to be a pain to remove completely.
Either way, I don't think a multi-.cos PRAY file with a remove script would differ that much from a single-.cos PRAY file with a remove script. Let me repeat that I'm not that good with PRAY, though, so I might be wrong.
~ The Realm ~
Risen Angel's Creatures Blog
|
 Tea Queen
Laura
    

|
10/1/2014 | |
Hoping someone knows... With this PRAY file, the agent successfully injects, but then it does nothing:
"en-GB"
group DSAG "Stinger Nest Honeycomb"
"Agent Type" 0
"Agent Description" "Now you can get something for your sting! This agent makes stinger nests produce delicious honeycomb when they are disturbed by the Hand."
"Agent Animation File" "honeycomb.c16"
"Agent Animation Gallery" "honeycomb"
"Agent Animation String" "0"
"Agent Sprite First Image" 0
"Script Count" 2
"Script 1" @ "honeycomb.cos"
"Script 2" @ "honeycombremove.cos"
"Remove script" "enum 2 11 14853 kill targ next scrx 2 11 14853 4 scrx 2 11 14853 5 scrx 2 11 14853 6 scrx 2 11 14853 12 scrx 2 11 14853 9"
"Dependency Count" 5
"Dependency 1" "honeycomb.c16"
"Dependency 2" "chwp.wav"
"Dependency 3" "smit.wav"
"Dependency 4" "spnk.wav"
"Dependency 5" "honeycomb.catalogue"
"Dependency Category 1" 2
"Dependency Category 2" 1
"Dependency Category 3" 1
"Dependency Category 4" 1
"Dependency Category 5" 7
inline FILE "honeycomb.c16" "honeycomb.c16"
inline FILE "chwp.wav" "chwp.wav"
inline FILE "smit.wav" "smit.wav"
inline FILE "spnk.wav" "spnk.wav"
inline FILE "honeycomb.catalogue" "honeycomb.catalogue"
|
Am I right in thinking it may have something to do with the remove script? As in, the agent injects, but then automatically removes itself? I'm absolutely stumped. What am I doing wrong? I bet it's something obvious. |
 Sanely Insane
RisenAngel
     Manager

|
10/1/2014 | |
What I think is happening is that the second .cos file is overwriting the first. Since the second's apparently meant to be a removal agent it's undoing the changes done by the first.
Generally speaking, if you're making an agent that requires a more intricate removal than just what you'd throw under "rscr," then you should probably separate them into two agents.
~ The Realm ~
Risen Angel's Creatures Blog
|

the1whoscreams
  
|
10/1/2014 | |
You do realize that the stinger-related agent you talked about has been completely spoiled,right? ![[nlaugh] [nlaugh]](/images/smilies/emot_laugh.gif) |
 Tea Queen
Laura
    

|
10/1/2014 | |
Well, it wasn't really a surprise to begin with and need's must, I guess.
Okay, so could someone talk me through how to create two agents with one classifier again, please? I'm tired and in need of more tea, but let's do this! |
 Sanely Insane
RisenAngel
     Manager

|
10/1/2014 | |
You should be able to just take the remove .cos file and turn that into an agent without the need for any additional CAOs, unless I'm misunderstanding what you're trying to do here?
~ The Realm ~
Risen Angel's Creatures Blog
|
 Tea Queen
Laura
    

|
10/1/2014 | |
I'm just confused about whether I can use the same classifer, and do I need a separate PRAY file for the remover agent? What would a PRAY file for a remover agent look like? |
 Sanely Insane
RisenAngel
     Manager

|
10/1/2014 | |
Here's the PRAY file for the Metallophagus Grendels V2 pack, which demonstrates both how to put a remover agent in a PRAY file and how to put multiple agents in the same PRAY file.
Generally speaking, as long as you remove all previous instances of the agent with the same classifier before injecting the changed scripts you should be fine.
~ The Realm ~
Risen Angel's Creatures Blog
|
 Tea Queen
Laura
    

|
10/1/2014 | |
I've only gone and done it!!! Thank you so much, Grendel Man. |
 Tea Queen
Laura
    

|
10/5/2014 | 1 |
I didn't create a separate remover agent in the end. In case anyone is interested in the knowing for future reference, all I did was include a standard remove script in the .cos file with a JECT command stuck on the end. For example:
** remove honeycomb
rscr
enum 2 11 14853
kill targ
next
scrx 2 11 14853 4
scrx 2 11 14853 5
scrx 2 11 14853 6
scrx 2 11 14853 12
scrx 2 11 14853 9
ject "stinger pod.cos" 7
|
It just seemed more straightward, cleaner and equally stable. Thanks to Ghosthande for the tip! |