Dropping a phantomloot cargo from an NPC
-
Hi Guys,
Is it possible to set some good, to be dropped from every NPC with some percentage? Both in Random mission and free flight.
I know that IF I put this commodity to all loadouts (enemies) that I want to drop this loot, they will drop it after they die, but I want it to be invisible to players during scanning (phantomloot).
The reason for this is. I’ve created an escape pod commodity, all BUY/SALE is properly set but now I want an NPC faction to have a chance to drop this (no matter whether it’s during free roam or from a random mission) but it has to be invisible.
IT doesnt make sense for a player to scan a pirate and see an escape pod in his cargo
THANKS!
-
Lootprops and Phantomloot is a bit tricky, my understanding is
[PhantomLoot]
entries only kick in during missions.We had a similar problem crop up working on BMOD and ended up writing an FLHook plugin specifically to handle this. However the merged version for 4.0 is a bit buggy at the moment and this is of course, multiplayer only. It’ll be rewritten and fixed for 5.0, but that might be a little way off.
-
@IrateRedKite Yeah, it’s very tricky. What I found out is that [PhantomLoot] is like a drop for everyone, everywhere, sort of like a Global drop. I tested it out and am 99% sure that if you put a 100% chance to drop, then every ship you destroy will drop that item, which is awesome but won’t help in my case.
In the end, I had to switch from Escape Pods to classic “pilot” commodities in everyone’s loadout and set mLootProps to 50% so the pilot is dropped in 1 out of 2 destructions (more or less )
Maybe it would be possible with some FL Hook, but I am totally stupid when it comes to codding -
IrateRedKite Administrators Historic Supporter Wiki Contributorreplied to CommanderArgelo global:last_edited_by,
@CommanderArgelo said in Dropping a phantomloot cargo from an NPC:
@IrateRedKite Yeah, it’s very tricky. What I found out is that [PhantomLoot] is like a drop for everyone, everywhere, sort of like a Global drop.
Thinking about if, you could restrict the drops by toughness if you’re not dealing with too many NPCs.
On the FLHook stuff, once the plugin is rewritten for the new version, it’ll be available and open for anyone to use and is relatively straightforward to just set up and use. I’d quite like to make a client-side version of this as well, which will hopefully be made more straightforward by the upcoming FLUF project from @Laz, as I kind of want this stuff to work in singleplayer as well.
-
@IrateRedKite Sounds good, I will be looking forward to it creating currently my very first mod so I am learning every stuff out there. Quite tricky with the old Starport being gone and most of the URLs are not working
But thanks for your reply Irate!