Author Topic: do Ships have inventory when they're flying around  (Read 1894 times)

loudent

  • Full Member
  • ***
  • Posts: 141
    • View Profile
do Ships have inventory when they're flying around
« 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?


ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1317
    • View Profile
Re: do Ships have inventory when they're flying around
« Reply #1 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!

loudent

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: do Ships have inventory when they're flying around
« Reply #2 on: April 24, 2015, 12:18:09 am »
I see, so my ship scanner is not useful for anything except MP. hmm...pity

jeeplaw

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: do Ships have inventory when they're flying around
« Reply #3 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.

loudent

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: do Ships have inventory when they're flying around
« Reply #4 on: April 24, 2015, 09:05:20 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