scoopable items, how to specify their contents?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

scoopable items, how to specify their contents?

Post 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.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post 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)
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post 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?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post 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.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post 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!
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post 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.
Post Reply