Page 1 of 1

Do NPCs use primable equipment?

Posted: Fri Feb 10, 2017 5:58 pm
by QCS
Hi,

NPCs seem to buy equipment "available_to_NPCs", that's at least what I get from reading.
But somehow I can't get my head around NPCs and primable equipment. What do NPCs do with it?

I would guess that they buy it but if the equipment needs priming to work at all, they can not use it. Right?

If so, how should equipment be made available to all? Should something be built that if the equipment script detects that it is an NPC ship using it, do some guesswork using roles etc. on how the equipment would be used in a typical case?

I did not find anything related to this topic in general, although I would expect something regarding that in the Wiki.

Thanks!

Re: Do NPCs use primable equipment?

Posted: Fri Feb 10, 2017 9:27 pm
by MCO
i'm pretty sure you would have to implement all the functions two times: once for the player and once for NPCs. because every primable equipment we use refers to variables such as player.ship (which ofc isnt accesible on an entity ship) or display options, which would most likely not work at all.
so, for example, if you want to implement a scanner that displays the enemys kill count (bad example, but, whatever), you would need to add a function that detects if it's an NPC ship, followed by some code preventing it from attacking higher-ranked players. so you would end up with two completely different functions for the NPC and the player.
but those are just the thoughts of a beginning coder.

Re: Do NPCs use primable equipment?

Posted: Fri Feb 10, 2017 10:08 pm
by Smivs
Just out of interest, what primable equipment might NPCs use (in a way that the player could notice)?

Re: Do NPCs use primable equipment?

Posted: Fri Feb 10, 2017 11:37 pm
by Norby
Perhaps Manifest Scanner. If player install this oxp then priates could attack more often when player hold valuable cargo, while receive a message like: Hey, I see 10000kg gold in your cargo, eject it and I will leave you alone!

In this case players will think before install it: whether want or not want to play in a galaxy where all doors of cargo bays are made from glass, including your own ship. ;)

Re: Do NPCs use primable equipment?

Posted: Sat Feb 11, 2017 8:34 am
by QCS
Smivs wrote: Fri Feb 10, 2017 10:08 pm
Just out of interest, what primable equipment might NPCs use (in a way that the player could notice)?
I was thinking about [EliteWiki] QTHI_Auxiliary_Energy_Generators_OXP.
The light equipment variant interferes with other equipment (Witchspace drive), so does not do anything as default and needs some priming to work. But if the NPC would use it, it would probably be visible to the player (needs one more laser burst to kill, or something like that, given the efficiency of this kit :-) )

Regarding the Manifest scanner, I was already thinking about this one long time ago, and I believe the idea itself is not too bad, but the "cargo bay made of glass" issue is of course a no-go. I thought that best would be if all ships save their (official) cargo list upon leaving an official station into an official database, and usually you don't have access to this database, but of course you will probably find someone who can give you (illegal) access to it. It would then not reflect current cargo, but "cargo this ship should have", e.g. if you dump cargo, or scoop cargo, it won't be reflected in this list. And of course GalCop ships would have access to this database.

Re: Do NPCs use primable equipment?

Posted: Sun Feb 12, 2017 4:55 pm
by Stormrider
QCS wrote:
I thought that best would be if all ships save their (official) cargo list upon leaving an official station into an official database, and usually you don't have access to this database
The manifest scanner hacks your ship's computer, which updates itself as soon as you scoop a pod, check your f5f5 screen. The way I see it your ship communicates the contents of the cargo hold to the station as soon as you dock or when you exit the station. The scanner simply uses the same system to scan your cargo as the Galcop.
Norby wrote:
If player install this oxp then priates could attack more often when player hold valuable cargo, while receive a message like: Hey, I see 10000kg gold in your cargo, eject it and I will leave you alone!
Norby I would have liked to implement this sort of behavior but AI scripting is still a bit beyond my current ability and unfortunately I don't have time to learn right now. I thought about having the Galcop do scans of ships too but that would require a different illegal goods system.