AtomicTorch Studio Forums

VoidExpanse => Help section => Topic started by: loudent on April 24, 2015, 12:10:30 AM

Title: do Ships have inventory when they're flying around
Post by: loudent on April 24, 2015, 12:10:30 AM
So, I'm working on a ship scanner mod and aside from the issue that pirates don't count as ships, there doesn't appear to be any cargo on the ships (I've been scanning miners and freighters).

So, to test this I kill them thinking that maybe the ships I've been scanning just don't have any cargo. However, the last one scanned with nothing but when I killed him there was some cargo to pick up.

Is the cargo generated randomly from a drop list? If so, is it possible to generate the cargo when the NPC is created  and drop it from their inventory on death?

Title: Re: do Ships have inventory when they're flying around
Post by: ai_enabled on April 24, 2015, 12:16:05 AM
>> Is the cargo generated randomly from a drop list?
yes.

The NPCs have inventory, but it's always empty for them. So with scripting you can place something to it and when NPC die you can spawn a drop container with these items.

Regards!
Title: Re: do Ships have inventory when they're flying around
Post by: loudent on April 24, 2015, 12:18:09 AM
I see, so my ship scanner is not useful for anything except MP. hmm...pity
Title: Re: do Ships have inventory when they're flying around
Post by: jeeplaw on April 24, 2015, 07:54:12 AM
It is a pity..or, you can have reverse scanning done..ie- you as the player can get scanned by other ships and if it's contraband...you can pay, give up the goods, or a fight will start.
Title: Re: do Ships have inventory when they're flying around
Post by: loudent on April 24, 2015, 09:05:20 AM
Quote from: jeeplaw on April 24, 2015, 07:54:12 AM
It is a pity..or, you can have reverse scanning done..ie- you as the player can get scanned by other ships and if it's contraband...you can pay, give up the goods, or a fight will start.

True, of course we'd have to create contraband...hmm...should  be simple enough.

Although ai_enabled had a good  idea. I could simply generate goods on a freighter that didn't have any. The act of scanning them would create goods. I could then adapt my player jettison goods on death code to apply to NPCs. Of course that means that sometimes you'd get two creates.....perhaps there is a way to disable the chance to spawn chest on death.

All things to look at