Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

''lil riddle concerning my player loot mod

The general place to discuss MOD''ing Freelancer!

Post Sun Jun 04, 2006 1:26 pm

''lil riddle concerning my player loot mod

What I have here is a player loot mod that lets players keep their bots, bats and ammo, but dumps everything else into space for others to pick up. Everything is working fine, except one thing: NPC vs NPC combats. When the Outcasts in front of Planet Malta are whacking wave after wave of Bounty Hunters, the area is becoming more and more filled with the remnants of these fights: ammo of various sorts.

Inside the fuse.ini, I have an explosion set up at the end of the loot fuse that kills unwanted loot. At least it does so for the player controlled ships, but unfortunately won't for NPC controlled ships. I also tried to add an explosion via the explosions.ini file, but this doesn't work either, not even on players. What can I do to prevent these mass drops from NPC ships?


The fuse.ini entry:

[fuse
name = drop_cargo_fuse
lifetime = 1.0
death_fuse = true

[impulse
at_t = 1.000000
hardpoint = HpMount
pos_offset = 1, 1, 1
lifetime = 1.000000, 7.000000
radius = 2000
force = 0
damage = 20


the explosions.ini entry as an example for the other ships:

[explosion
nickname = explosion_cv_fighter
lifetime = 0.000000, 0.150000
process = shatter
num_child_pieces = 20
debris_type = debris_small_ship, 0.330000
debris_type = debris_small_ship_short, 0.330000
debris_type = debris_small_ship_long, 0.330000
innards_debris_start_time = 0.000000
debris_impulse = 7000
effect = explosion_cv_fighter, 0.000000
hull_damage = 20

Any help would be greatly appreciated.

Edited by - Preacher0815 on 6/4/2006 2:27:47 PM

Post Sun Jun 04, 2006 4:05 pm

The simple (tho lengthy) solution is to make seperate ships for players and npcs. Then only the player ships have the loot drop fuse

+++ out of cheese error - redo from start +++

Post Sun Jun 04, 2006 11:17 pm

Yep, that's what I had in mind, too, but how can this be made possible without the use of a clientside mod?

Post Tue Jun 06, 2006 11:40 am

There is a built-in loot drop, besides whatever fuses you use, that drops ammo and cargo after fuses are activated. This only affects NPCs.

Post Tue Jun 06, 2006 2:45 pm

To be honest, if when you die all of your expensive equipment is lost then a few bots, batts and ammo isn't going to be a real comfort.
Maybe remove some weapons from loot_props and give the npcs only those weapons. Not sure if it would work, or if its what you would wanted, but it might work.
Not sure how you could get it to dump all of the weapons and cargo but leave the ammo and bots. I think it would have to be all or nothing.
There is the "death penalty =" statement in freelancer.ini, that affects only unmounted cargo.

Can you make changes to fuses for a server side mod? I would have thought that that would be read from the client instead.

Post Wed Jun 07, 2006 7:00 am

@ Louva-Deus
Which one is it? Or is it hardcoded?

@ Mace_166
Not all of your equipment is gone, althou from what I've seen it's moddable in a way that mounted stuff can be dumped as loot, too. You "only" lose everything that would normally be destroyed by the death_penalty = 100 entry in the freelancer.ini file anyway.

All of the weapons the NPCs use is also mountable on playerships, except shields. So making stuff usable exclusively by NPCs is a no-go. Sure, there's a lot of unused equipment floating in the INIs that could be rewritten to work as the NPC only counterpart of equipment available to human players, but having a battleship missile turret work as a Wasp Cruise Disruptor, althou possible serverside, looks kinda silly, because that turret is almost as big as, say, a Defender.

Taking the ammo for the mines and missiles out of the NPCs loadouts and setting those weapons to use_ammo = false is also not possible, because that too would affect players. For example in a fight you used some Lancer missiles. After the fight you're trying to scoop up the loot. Some of that loot happens to be Lancer missiles. Because the lancer missile was set to use_ammo = false in the INI, you cannot pick up the ammo, althou your HUd shows it's ammo is halfway empty. The tractorbeam just locks onto the ammo crate and won't let go until you manually deactivate it or increase range to the loot. However as soon as you rejoin the server, your stock of ammo is full again, as if it was never used.

The best way to maneuver around all these problems IMHO is to have a clientside mod that doubles ships flown by both players and NPCs, so the playerships get the deathfuse and are able to be looted, while the NPC ships remain as they were and only drop loot when destroyed by human players and not in NPC vs NPC fights.


>> Not sure how you could get it to dump all of the weapons and cargo but leave the ammo and bots. I think it would have to be all or nothing. <<

It still is all or nothing, it just required a little bit of out-of-the-box thinking, something that doesn't happen a lot to me, so you might call this my lucky strike. Fuses, at least the death fuse I'm using, is serverside.

PS: Is it somehow possible to make NPCs use the tractor beam?

Edited by - Preacher0815 on 6/7/2006 8:05:58 AM

Post Thu Jun 08, 2006 1:34 pm

Well, I definately know that it's possible for your NPCs to be able to tractor loot, because I've seen it in the void mod.

Post Thu Jun 08, 2006 2:15 pm

>What I have here is a player loot mod that lets players keep their bots, bats and ammo, but dumps everything else into space for others to pick up.

How does that work??

>Inside the fuse.ini, I have an explosion set up at the end of the loot fuse that kills unwanted loot. At least it does so for the player controlled ships, but unfortunately won't for NPC controlled ships. I also tried to add an explosion via the explosions.ini file, but this doesn't work either, not even on players. What can I do to prevent these mass drops from NPC ships?

Well, you posted an impulse and explosion with a damage of 20.
You should consider that most of the LootCrates have more than 200 hitpoints!
Maybe thats the reasen why they are not being destroyed.
(btw. why is the impulse-radius 2k?)

Post Thu Jun 08, 2006 9:20 pm

>> You should consider that most of the LootCrates have more than 200 hitpoints!<<

That's why I have reduced hitpoints of those "unwanted" crates to 10, but I think reducing those to 1 and having an explosion that does a damage of 2 might do the trick as well, with much less danger to playerships that are barely kept together after a tough fight. After all, concerning the destruction of unwanted loot, I have to consider hitpoints of all the ships down to the Starflier. That's why I chose this method over having an explosion that does 200 and more damage.



>>(btw. why is the impulse-radius 2k?)<<

This is because I still need to figure out some stuff. For example in asteroid or junk fields, it happens from time to time that unwanted loot is not destroyed, but the cause for this might also be the... well, not so well fitting hardware I'm forced to run this on.

BTW, w0dk4, would it be possible for your FLHook team to implement something that prevents the drops of ammo crates, bats & bots from playerships? That would make very sure that this unwanted cargo never ever appears as loot.

Post Fri Jun 09, 2006 3:30 am

I can ask mc_horst to inlcude such a feature in FLHook, yea..

At the moment, horst still has issues with death fuses while detecting playerkills.. I think when he is looking after that issue he can also take a closer look at the fuses, I'll tell him

Post Fri Jun 09, 2006 9:25 am

Thanks w0dk4
Off Topic:

Death fuses... good idea. I had reports from players a few days back that althou they were killed in PVPs, reports read they were killed by NPCs. Of course the loot mod was active (it still is).

Another thing concerning death messages: would it be possible to include an option that outputs those messages not only on the clients screen, but into a textfile on the server as well? That could then be parsed (via xsl or whatever) and the results made available on the server's page as PVP statistics. Maybe a simplified output format for the textfile only, something like:

Player_A > Player_B ; missile/torp

meaning Player_A killed Player_B using a missile or torpedo.



On Topic:

The reason I didn't make this advanced loot mod available yet simply lies in the issues I postet about in my previous posts. I just don't feel comfortable releasing it with those ends untied.

Edited by - Preacher0815 on 6/9/2006 10:25:50 AM

Post Fri Jun 09, 2006 10:30 am

If you really want to disable all extra/bonus loot other than what you define through fuses then you can open up RMLootInfo.ini in the RandomMissions folder and under Global set BonusLootDropChance to 0.000000. See if that works.

Post Fri Jun 09, 2006 12:01 pm

This doesn't work the way I hoped. In NPC vs NPC fights, the cargo the NPC ships have on board (bats, bots, ammo for missiles, mines, CMs and torpedos) is still dropped by the fuse. So this wouldn't affect the mass loot drops in NPC vs NPC fights.

On the other hand, having the NPCs drop loot even in NPC vs NPC fights might make it feel a bit more real than it is in vanilla FL. Thinking about this, I actually start to like it. What are your opinions on this matter?

Post Fri Jun 09, 2006 12:15 pm

Well that would propably fell a bit more real, but on the other hand you can just watch the npcs battle and loot their stuff until you are rich

>Another thing concerning death messages: would it be possible to include an option that outputs those messages not only on the clients screen, but into a textfile on the server as well? That could then be parsed (via xsl or whatever) and the results made available on the server's page as PVP statistics.

This is already possible, FLHook sends a lot of info concerning the players actions on the server (including kill-death messages) to the "eventmode" connected socket connections.

If you are running an flserver with flhook, connect to flhook via putty or some other telnet client and type in "eventmode".
You can then easily write a program that listens to the socket connections and logs all kill/deaths to a .txt file.

Post Fri Jun 09, 2006 8:17 pm

You would want NPCs to also tractor in loot, otherwise your server could get bogged down.

Return to Freelancer General Editing Forum