FOnline Development > Questions and Answers

Private server| Keep inventory?

(1/1)

Bwuljqh:
Hello,

I'm hosting a private server with friends of FOnline Reloaded, 2nd season. We play a very casual way (thus the private server) and I was wondering if there are ways to make us keep our stuff after we die. We use commands to give our stuff back anyway so it would only make the process a lot less tedious.

I'm guessing I need to make our body non lootable (or make so the ennemies don't loot our bodies) and deactivate the inventory reset or something, I really don't know where to start and I found no one with the issue on this forum.

Thanks in advance for the help!

Bwuljqh:
Update time, posting it here motivated me to look for it further and I made it work!

What I did so you can do it yourself:

You need a notepad to open the files in italic

The player will not drop items on death anymore:
-Go to replication.fos, line 458
-Delete or comment out lines 458 to 462

Npcs will not loot the dead players anymore:
-Go to main.fos, line 2374
-Replace
--- Code: ---(cr.IsPlayer() || IsHumanoid(cr))
--- End code ---
by
--- Code: ---(!cr.IsPlayer() && IsHumanoid(cr))
--- End code ---

(Not tested in game but the server launch at least)
Brutal deaths will not destroy armor, helmet or trophies anymore (npcs included):
-Go to main.fos, line 2297
-Delete or comment out line 2297 and 2298 (armor), 2302 and 2303 (helmet), 2308 and 2309 (trophies)

Brutal deaths will not drops all items on the ground anymore (npcs included):
-Go to main.fos, line 2354
- Delete or comment out line 2354 and 2355

There are for sure cleaner methods to do so but it will work for us for the time being, if you've got any questions I may try to answer them.

Edit: I can't guarantee anything against unforseen side effects

Navigation

[0] Message Index

Go to full version