The `Crew` and the `Hold` are loaded if the captain is given a ship to sail. (A ship need not be specified if one named `default` exists in the given configuration.)
`Args` values are loaded at runtime by arguments passed on the command line in addition to the quest and ship.
That is:
`ncpt <quest> <ship> <Args.Arg0> <Args.Arg1> ...`
And for example:
`ncpt lookup enterprise Search+Term`
Will take the ship `enterprise` and go on the `lookup` quest providing:
*`Args.Arg0` = `Search+Term`
On the other hand, if `enterprise` is not the name of a defined ship, then you will go on the `lookup` quest providing:
*`Args.Arg0` = `enterprise`
*`Args.Arg1` = `Search+Term`
In this second case, if a `default` ship exists, it will be sailed, whether it contains anything to be used or not.
Quests can be easily edited in whatever editor you have defined in `EDITOR` by issuing:
`ncpt -e <quest>`
And quests can be validated (just run through the the parser without executing it) by issuing:
`ncpt -c <quest>`
And all available quests can be listed by issuing:
`ncpt -l`
### Ship - A Crew, and rules for Plunder and Delivery
Held in the `ships` directory under the given config directory, a ship will look something like this:
```
{
"crew": {
"BaseURL": "http://192.168.86.197:8080"
},
"plunder": {
"auth": {
"token": "token"
},
"ddg-search": {
"image": "Image",
"result": "Abstract"
}
}
}
```
Here we have a `Crew` some rules for `Plunder`, and a rule for `Deliver`.
The `Crew` is simple, we have a single Crew Member: `BaseURL`. Looking at the first Quest up above (`auth`):
So, when we pursue the `auth` quest using this `ship`, the `BaseURL` variable will be replaced with the given Crew member: `http://192.168.86.197:8080`)
The `Plunder` takes a little more explanation. Here we have defined a rule for plundering the `auth``Quest`. It's basically saying "Upon completing the `auth` quest, I expect to receive `json` that contains, at the first level of the response, a `token` value. Store that value in the `Hold` under the name `token`."
The second `Plunder` rule will trigger on a Quest named `ddg-search`. It's going to pull a couple of values out of the top level of the response:
*`Image` stored in the ship `Hold` as `image` and
*`Abstract` stored in the ship `Hold` as `result`
Currently, only top-level values in JSON responses can be plundered.