FOnline Development > Questions and Answers

Fonline 2238 SDK Looting in areas

(1/3) > >>

Peter86A:
Hi

How to turn on looting in areas like Brotherhood of Steel bunker or Navarro?

I killed npc and cant loot his corpse etc.



JovankaB:
Most Enclave/BoS soldiers in their bases have guard scripts attached, that's why they can't be looted. You can change it globally in guard.fos module, see line 238 with GuardInit function:


--- Code: ---void GuardInit(Critter& guard)
{
    _CritSetMode(guard, MODE_NO_ENEMY_STACK);
    _CritSetMode(guard, MODE_NO_LOOT);
    _CritSetMode(guard, MODE_NO_STEAL);
    _CritSetMode(guard, MODE_NO_DROP);
    _CritSetMode(guard, MODE_UNLIMITED_AMMO);
    _CritSetExtMode(guard, MODE_EXT_NO_WALL_CHECK);
    _CritSetExtMode(guard, MODE_EXT_GUARD);
}

--- End code ---

By removing or commenting these lines:

--- Code: ---    _CritSetMode(guard, MODE_NO_LOOT);
    _CritSetMode(guard, MODE_NO_STEAL);
    _CritSetMode(guard, MODE_NO_DROP);
--- End code ---

you will make all guards drop items on death and lootable (all guards, not only BoS/Enclave).

It's not enough to just disable MODE_NO_LOOT, because anti-looting scripts are a bit paranoid and if there is any of these 3 flags set (MODE_NO_LOOT, MODE_NO_STEAL, MODE_NO_DROP), critter won't drop items on death and will delete them instead.

Peter86A:
Hello and thx for answer.

I did what u say and npcs are lootable now but enclave/brotherhood folks do not drop their armors.

I changed attribute in object editor in power armors to be dropable. In encounters enclave/brotherhood npcs drops their armors but in bases not.

EDIT. Any npc in town did not drop their armors. Vault city, reno etc. only weapons, ammo etc.

Any idea why?

Wipe:
Other than guards scripts mentioned by Jovanka, there's another one which does almost same thing; see npc_unlootable.fos
Not sure now, but i think most (if not all) non-guards town NPCs uses it.

Peter86A:
And what about armors in guards bags Wipe?

Any guard after death do not drop their armor (in random encouters npcs drops armors).

npc_unlootable.fos How to edit this file without any bad consequences like errors etc?

It looks like this:


--- Quote ---//
// FOnline: 2238
// Rotators
//
// npc_unlootable.fos
//

#include "_macros.fos"

void critter_init(Critter& guard, bool firstTime)
{
    _CritSetMode(guard, MODE_NO_LOOT);
    _CritSetMode(guard, MODE_NO_STEAL);
    _CritSetMode(guard, MODE_NO_DROP);
}
--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version