Page 1 of 1

scoopable items, how to specify their contents?

Posted: Sun Dec 10, 2006 3:39 pm
by Griff
Hi, in celebration of Father Christmases brief visit to the forum (see outworld) lolwhites had the great idea of adding a santa to the game so us players could blast him out of space and pirate away all the presents thus dissapointing all the small children of the ooniverse.

Anyway, i've had a go at writing an .oxp for this, but i've hit a snag - scooping up the presents santa leaves behind amongst the firey wrekage of his sleigh always gives me slaves!

in the shipdata.plist entries for the presents i've done the following:-

Code: Select all

<key>prezzie1</key>
	<dict>
		<key>like_ship</key>
		<key>barrel</key>

<key>cargo_type</key> 
<string>CARGO_CARRIED</string> 
<key>cargo_carried</key> 
<string>1 Gold</string>

		<key>model</key>
		<string>prezzie1.dat</string>
		<key>name</key>
		<string>Prezzie!</string>
		<key>roles</key>
		<string>prezzie</string>
	<key>scanClass</key>
	<string>CLASS_CARGO</string>
	</dict>
what have i missed out or done wrong or are slaves an acceptable gift at christmas in the ooniverse, beats socks or a tie i guess.

Posted: Sun Dec 10, 2006 4:02 pm
by LittleBear
If you gave Santa:-

Code: Select all

<key>likely_cargo</key>
<integer>0</integer>
<key>max_cargo</key>
<integer>0</integer>

in shipdata, then he shouldn't drop any randomly generated native cargo barrels. If you added as his death_actions:-

Code: Select all


<key>death_actions</key>
<array>
<string>spawn: prezzie 3</string>
</array>		
</dict>

then he should spawn some scoopable presents when he dies.

8)

Posted: Sun Dec 10, 2006 5:29 pm
by Griff
Heh, cheers LittleBear,
I made the changes you suggested and now santa is only leaving behind prezzies when he explodes instead of ditching cargo pods all over the place, the trouble is every prezzie i scoop contains slaves or a randomly generated escape pod character - slaves have got to be must have present this year in the ooniverse, their equivalent of a playstation3!

I was hoping that the 'cargo_carried' key let you specify a cargo pods contents, in my example i was hoping for 1t of Gold inside prezzie1 instead i get slaves. i wonder if this <key> actually means that if you destroyed prezzie1 it would leave behind 1t of gold in a cargo pod?

Posted: Sun Dec 10, 2006 6:01 pm
by LittleBear
Suspect it would. Perhaps the like_ship to cargo-canniser is randomising what is contained in the presszie or Oolite thinks the pressize is a Character but with no piolt entry. Perhaps if you removed the key it would just be a random item inside? Or maybe put the key in Santa's shipdata without the 1 would make all his presszies contain gold?

Or mabey give the pressizes piolt entries and bounties and the player could scoop up some Evil Elves to hand into GalCop.

Posted: Sun Dec 10, 2006 6:26 pm
by Griff
Hi
just found this posted by arexack_heretic on page 11 of the 'space junk...' thread in this subforum
...spawned, addShip-ed or otherwise custom placed cargo, does not register as cargo.

you can scoop them, if you enter an additional scanclass=ClassCargo entry.
but CARGO_RANDOM does not work. Nor any other cargotype. They just don't show up in the hold. (exception maybe for valuables)

Cargo ejected or created by destroyed ships is normally scoopable and contains stuff.
they're discussing the fuel pod .oxp. I've got that on disk somewhere so i'll install it and have a look through the code.

in the meantime, i've changed the prezzies to cargo_scripted items, so when you scoop them you get "Prezzie scooped" appear on the screen. and then have alook at whats possible with script actions in the shipdata.plist.
I'm going to try your sugestions about adding pilot entries to the prezzies, a cargo hold full of evil elves sounds appealing!

Posted: Sun Dec 10, 2006 8:40 pm
by Griff
LB, thanks for your help
I've solved the problem by cribbing the code from the cloaking-device mision, modified it a bit to check if the player has a fuel scoop rather than a cloaking device and changed the award to food, cash etc.