Mutator to prevent dropping lockpicks/multitools in DXMP?

Talk about any Deus Ex game modification here, e.g. maps, package or a total conversion.

Moderator: Forum Guards

Mutator to prevent dropping lockpicks/multitools in DXMP?

Postby WeeCrab » Thu Jan 28, 10 9:52 am

My friend is making a co-op map (no co-op mod though, just works in DXMP), and the spawn system is exploitable if you throw your pick/tool on the ground and reconnect and keep collecting them to get 5 of each.

Is it possible to make a mutator that prevents you from throwing your lockpick/tool (maybe medkit too), the same way you can't throw your nanokeyring?

I found this in DeusExPlayer

Code: Select all
exec function bool DropItem(optional Inventory inv, optional bool bDrop)
{
   local Inventory item;
   local Inventory previousItemInHand;
   local Vector X, Y, Z, dropVect;
   local float size, mult;
   local DeusExCarcass carc;
   local class<DeusExCarcass> carcClass;
   local bool bDropped;
   local bool bRemovedFromSlots;
   local int  itemPosX, itemPosY;

   bDropped = True;

..........

      // don't let us throw away the nanokeyring
      if (item.IsA('NanoKeyRing'))
        {
         return False;
        }
WeeCrab
Newbie
 
Posts: 43
Joined: Wed Jul 29, 09 6:10 am

Postby ~DJ~ » Thu Jan 28, 10 10:01 am

Simply adding

Code: Select all
Function DropFrom(vector X)
{
}


To any of the class will prevent it from dropping it. You can just create new classes of medkit, multitool and lockpick, then add that to it. Then replace those with the original by a mutator.
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby MainMan » Thu Jan 28, 10 10:21 am

Or if you want to do it a different (less "hax" way) - create a new player class and gametype, and in the playerclass just add the checks for the required items in the DropFrom fuction as so:

Code: Select all
      if (item.IsA('NanoKeyRing'))
        {
         return False;
        }

      else if (item.IsA('Medkit'))
        {
         return False;
        }

      else if (item.IsA('Multitool'))
        {
         return False;
        }


etc.

This is cleaner, using less cycles as it doesn't pass the command onto the items :)
Last edited by MainMan on Thu Jan 28, 10 10:22 am, edited 2 times in total.
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby ~ô¿ô~Nobody~ » Wed Feb 03, 10 6:50 pm

Except the fact that the player class doesn't have DropFrom...

It's just one more function call, originating from DeusExPlayer.DropItem
I think it was coded in that way just for the reason to enable you to block dropping or add additional code without the need
of creating the whole load of a new gametype and player class..


Thus.. I would vote for the "hax" way. :)
Nobody is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby ~DJ~ » Wed Feb 03, 10 7:13 pm

MAET. He meant in the DropItem function at playa

lololololol
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby ~ô¿ô~Nobody~ » Wed Feb 03, 10 7:19 pm

Well that with drop from was just a side note and doesn't effect my point at all. LOLOLOLOL
Nobody is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby ~DJ~ » Wed Feb 03, 10 9:01 pm

damn. I've been beaten.. damn.. LOLOLOLOL
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby ~ô¿ô~Nobody~ » Thu Feb 04, 10 12:58 pm

As always LOLOLOLOL

Now back on topic, you spamz0r. :!:
Nobody is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby WeeCrab » Fri Feb 12, 10 5:05 am

Hey, been busy, haven't tried it yet but will soon. I'm assuming it'll work - Thanks for the help.!
WeeCrab
Newbie
 
Posts: 43
Joined: Wed Jul 29, 09 6:10 am


Return to Modifications

Who is online

Users browsing this forum: No registered users and 18 guests
cron