Author Topic: Fonline 2238 Power armor drop, how to turn on?  (Read 2282 times)

Fonline 2238 Power armor drop, how to turn on?
« on: January 24, 2014, 09:05:18 pm »
Hi

How to turn on Enclave, Brotherhood power armor drop after death like other critters like raiders etc?

For now they drop only weapons and PAs dissapears.

I have a fresh Fonline 2238 SDK installation.


« Last Edit: January 24, 2014, 09:23:44 pm by Peter86A »

Re: Fonline 2238 Power armor drop, how to turn on?
« Reply #1 on: January 25, 2014, 03:28:14 am »
I dont know how the normal encounter system works and if 2238 even uses the build in bags function, but basically, each npcs should have some kind of bag that you can define in server/data/bags. You can easily specify these bags in the mapper but for encounters, I don't know. There's probably soem random encoutner script somewhere with an array of all the encounters and heac npcs has a bag specified or smth.

Re: Fonline 2238 Power armor drop, how to turn on?
« Reply #2 on: January 25, 2014, 08:12:17 am »
I'm sure there are armors in their bags but some script destroy those items upon death.

I commented out those code from main.fos:

Quote
    // remove armor/helmet/trophies on following death types
    if((isArmor || isHelmet || isTrophy) &&
       (cr.Anim2Dead == ANIM2_DEAD_FUSED || cr.Anim2Dead == ANIM2_DEAD_PULSE_DUST || cr.Anim2Dead == ANIM2_DEAD_EXPLODE) &&
       _CritCanDropItemsOnDead(cr))
    {
        if(isArmor)
        {
            DeleteItem(armor);
            isArmor = false;
        }
        if(isHelmet)
        {
            DeleteItem(helmet);
            isHelmet = false;
        }
        if(isTrophy && cr.Anim2Dead == ANIM2_DEAD_EXPLODE)
        {
            DeleteItems(trophies);
            isTrophy = false;
        }
    }

and

Quote
    // move all armor items to inventory of npc. delete it if no drop.
    if(cr.Stat[ST_REPLICATION_TIME] < 0 && cr.IsNpc())
    {
        for(uint i = 0, j = items.length(); i < j; i++)
            if(items.GetType() == ITEM_TYPE_ARMOR && items.CritSlot != SLOT_INV)
            {
                if(FLAG(items.Flags, ITEM_NO_STEAL) || FLAG(items.Flags, ITEM_NO_LOOT))
                    DeleteItem(items);
                else

                    cr.MoveItem(items.Id, 1, SLOT_INV);
            }
    }

And now they drop armor (on the ground) only when their body explodes. After "normal" death there is no armors in inventory or ground.

Any idea?
« Last Edit: January 25, 2014, 03:23:12 pm by Peter86A »

Offline Wipe

  • Rotator
  • Random is god
Re: Fonline 2238 Power armor drop, how to turn on?
« Reply #3 on: January 25, 2014, 04:54:02 pm »
Just remove NoLoot and NoSteal flags from items in ObjectEditor. No code changes needed.
Games are meant to be created, not played...

Re: Fonline 2238 Power armor drop, how to turn on?
« Reply #4 on: January 25, 2014, 07:04:35 pm »
It's working!! thanks Mate for answer :)