Mod Idea (I Failed).

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

Moderator: Forum Guards

Mod Idea (I Failed).

Postby Raiiiny » Fri Apr 03, 09 2:54 pm

the laser on guns in DX was a fail, absolutely no purpose.
can anyone mod the laser so that its viewable by other players when you toggel it, or so that it stays on?

i had it working, but couldn't get it to aim right from my gun to the crosshairs :[

:smt067 --------------------------------------------------------

something like this ^
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Postby MainMan » Fri Apr 03, 09 3:18 pm

Are you trying to get this to work in multi or single player?
<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 Baleout » Fri Apr 03, 09 3:25 pm

viewable by other players
User avatar
Baleout
Master
 
Posts: 1606
Joined: Mon Feb 19, 07 1:28 pm
Location: Greater London

Postby Raiiiny » Fri Apr 03, 09 8:32 pm

DXMP.

also, have another idea i've been wanting to try. would it be
possible to make a DT_Sprite npc that can walk an turn? would need
some way to sence what side of the npc the player is looking at to change
the sequence of textures accordingly... something like doom64.
or possibly make a square mesh an add a texture to each side that
changes if its walking or standing still, not sure how that'd look though.



http://www.youtube.com/watch?v=ut9oWWI0mWM
i want to make the zombies in this vid for my dxmp co-op horror map^
Last edited by Raiiiny on Fri Apr 03, 09 10:45 pm, edited 7 times in total.
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Re: Mod Idea (I Failed).

Postby Raiiiny » Fri Oct 09, 09 11:22 am

Raiiiny wrote:the laser on guns in DX was a fail, absolutely no purpose.
can anyone mod the laser so that its viewable by other players when you toggel it, or so that it stays on?

i had it working, but couldn't get it to aim right from my gun to the crosshairs :[

:smt067 --------------------------------------------------------

something like this ^


awe, come on. is this really to much of a challange for alpha?
nobody, allan or alex should be able to have this whipped together in 10min. :shock:

just need to add a laser emitter an adjust the vectors :/
think an actual "Laser" (austin powers came to mind, sorry lol.) would look great in foggy/dark maps.

On another note, anyone have the code for dual pistols or a mod?
need the script for a new weapon on my mp server.
Last edited by Raiiiny on Fri Oct 09, 09 11:25 am, edited 2 times in total.
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Postby ~DJ~ » Fri Oct 09, 09 11:36 am

Overwriting the function ToggleLaser and adding ForEach AllActors while showing it might work.

That's just my opinion...
Last edited by ~DJ~ on Fri Oct 09, 09 11:38 am, edited 1 time in total.
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby Raiiiny » Fri Oct 09, 09 12:09 pm

I had it working. i just couldn't get it to aim right, from my gun to where i was pointing :/
deleted the old code i think. just starting to play again. may look for it or start from scratch if no one goods up to the task? im like moderate at best when it comes to coding, still learning.
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Postby Aidan » Fri Oct 09, 09 1:54 pm

Well.. The point of lasers in Single Player was to create a challenge for yourself if you were to turn your crosshairs off. Doing so, you would need the laser modification to create that crosshair for that weapon.

In MP, well..... That's another story.

You want to be able to see the whole laser trail, and not just where it points to, correct?
Psychokiller, spelled incorrectly.
User avatar
Aidan
CandyMan
 
Posts: 6270
Joined: Wed Aug 02, 06 8:57 am
Location: True North Strong & Free

Postby Raiiiny » Fri Oct 09, 09 2:06 pm

exactly :D
i love mp. really wanted to make a creepy co-op map, but i need the laser
an i need to finish afew other mods before i start.
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Postby ~DJ~ » Fri Oct 09, 09 2:37 pm

I am not that sure.. but there's a class called LaserEmitter, you might see that stuff, very useful imo.
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby Raiiiny » Fri Oct 09, 09 2:56 pm

yeah, thats what i used. its the vectors that got me stumped.
if someone wants to give it a go, i used Deadalus08's 'weaponlasergun' for refrence to get it working.

Code: Select all
var LaserEmitter emitter;
var float zapTimer;
var vector GunLocation;
var vector lastHitLocation;

// force Fire damage
function name WeaponDamageType()
{
   return 'Flamed';
}

function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
   Super.ProcessTraceHit(Other, HitLocation, HitNormal, X, Y, Z);

   //in cases of successive firing, it may happen that a new emitter is created before the previous one
   //is destroyed. This corrects the problem.
   if (emitter!=None)
      emitter.Destroy();
   
   //creates a laser beam
   emitter = Spawn(class'LaserEmitter',Self);
   if (emitter != None)
      emitter.Instigator = Pawn(Owner);
   
   //it keeps firing for 0.3 seconds
   zapTimer = 0.3;
}

// intercept the hit and turn on the emitter
function NewTrace()
{
   local vector HitLocation, HitNormal, StartTrace, EndTrace, X,Y,Z;
   local actor Other;
   local Pawn PawnOwner;

   //old - taken from the original Trace() function
   
   PawnOwner = Pawn(Owner);

   Owner.MakeNoise(PawnOwner.SoundDampening);
   GetAxes(PawnOwner.ViewRotation,X,Y,Z);
   StartTrace = Owner.Location + CalcDrawOffset() + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
   AdjustedAim = PawnOwner.AdjustAim(1000000, StartTrace, 2*AimError, False, False);   
   
   EndTrace = StartTrace;
   X = vector(AdjustedAim);
   EndTrace += (1000000 * X);
   Other = PawnOwner.TraceShot(HitLocation,HitNormal,EndTrace,StartTrace);

   //new - upgrades the origin and destination of the beam   
   if (emitter != None)
   {
      GunLocation=Owner.Location + CalcDrawOffset() + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
      emitter.SetLocation(GunLocation);
      emitter.SetRotation(Rotator(HitLocation - emitter.Location));
      emitter.TurnOn();
      emitter.SetBase(Owner);
      lastHitLocation = HitLocation;
   }
}

function Tick(float deltaTime)
{
   Super.Tick(deltaTime);

   if (zapTimer > 0)
   {
      zapTimer -= deltaTime;

      // updates the rotation of the emitter
      NewTrace();

      if (zapTimer < 0)
      {
         zapTimer = 0;
         emitter.Destroy();
      }
   }
}

function Destroyed()
{
   if (emitter != None)
   {
      emitter.Destroy();
      emitter = None;
   }
   Super.Destroyed();
}
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Postby Allan » Fri Oct 09, 09 2:58 pm

Drawing the whole laser trail would be a replication/FPS drop nightmare, and making it move would be worse still.
Making a moving dot is the lesser of two evils, however it still requires frequent Trace operations during something like Tick, a global variable for your dot, and enough replication jiggery-pokery to make Baby Jesus cry.

That, and you have to bare in mind that using the laser sight is hard-coded to give weapons 100% accuracy while in use.
Last edited by Allan on Fri Oct 09, 09 2:59 pm, edited 1 time in total.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Raiiiny » Fri Oct 09, 09 3:18 pm

I honestly don't think it'd effect the fps too much. i wouldn't get rid of the
original laser either. was simply thinking of having the laser emitter spawned, an tick updating the tracers vectors.

Something like this

Code: Select all
simulated function PreBeginPlay()
{
   Super.PreBeginPlay();

   {
   emitter = Spawn(class'LaserEmitter',Self);
   if (emitter != None)
      emitter.Instigator = Pawn(Owner);
   }
}

function Tick(float deltaTime)
{
   Super.Tick(deltaTime);
}


just not sure how to adjust the vectors, hmm. you really don't think it'd work?
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Postby Allan » Fri Oct 09, 09 4:45 pm

It won't. The beam on LaserEmitters doesn't replicate. :(

Mind you, I have managed to make a laser dot that (should) move in MP.

Code: Select all
var LaserSpot LX;

replication
{
   Reliable if(Role==ROLE_Authority)
      LX;
   Unreliable if (Role==ROLE_Authority)
      MoveLaserSpot;
}

function MoveLaserSpot()
{
   local Rotator PR,V;
   local Vector HL, HN, TStart, TEnd;
   local vector X,Y,Z;
   local Pawn POwner;
   local Actor A;

   POwner=Pawn(Owner);

   if(POwner==None)
   {
      return;
   }
   if(!bLasing)
   {
      return;
   }

   GetAxes(POwner.ViewRotation,X,Y,Z);

   TStart = ComputeProjectileStart(X, Y, Z);
   V = POwner.AdjustAim(1000000,TStart, 0, False, False);
    TEnd = TStart + 0.0 * (FRand()-0.5)*Y*1000 + 0.0 * (FRand()-0.5)*Z*1000;
    TEnd += MaxRange * vector(V);
   A=Trace(HL,HN,TEnd,TStart,True);

   if(LX==None)
   {
      LX=spawn(class'LaserSpot',POwner,,HL,POwner.ViewRotation);
   }
   else
   {
      LX.SetLocation(HL);
      LX.SetRotation(POwner.ViewRotation);
      if(LX.bHidden)
      {
         LX.bHidden=False;
      }
   }
}


// Maaaan, I can't believe I have to dump all of this in, JUST TO REPLACE THE LASER!
simulated function Tick(float deltaTime)
{
   local vector loc;
   local rotator rot;
   local float beepspeed, recoil;
   local DeusExPlayer player;
   local Actor RealTarget;
   local Pawn pawn;

   player = DeusExPlayer(Owner);
   pawn = Pawn(Owner);

   Super(Weapon).Tick(deltaTime);

   // don't do any of this if this weapon isn't currently in use
   if (pawn == None)
   {
      LockMode = LOCK_None;
      MaintainLockTimer = 0;
      LockTarget = None;
      LockTimer = 0;
      return;
   }

   if (pawn.Weapon != self)
   {
      LockMode = LOCK_None;
      MaintainLockTimer = 0;
      LockTarget = None;
      LockTimer = 0;
      return;
   }

   // all this should only happen IF you have ammo loaded
   if (ClipCount < ReloadCount)
   {
      // check for LAM or other placed mine placement
      if (bHandToHand && (ProjectileClass != None) && (!Self.IsA('WeaponShuriken')))
      {
         if (NearWallCheck())
         {
            if (( Level.NetMode != NM_Standalone ) && IsAnimating() && (AnimSequence == 'Select'))
            {
            }
            else
            {
               if (!bNearWall || (AnimSequence == 'Select'))
               {
                  PlayAnim('PlaceBegin',, 0.1);
                  bNearWall = True;
               }
            }
         }
         else
         {
            if (bNearWall)
            {
               PlayAnim('PlaceEnd',, 0.1);
               bNearWall = False;
            }
         }
      }


      SoundTimer += deltaTime;

      if ( (Level.Netmode == NM_Standalone) || ( (Player != None) && (Player.PlayerIsClient()) ) )
      {
         if (bCanTrack)
         {
            Target = AcquireTarget();
            RealTarget = Target;
           
            // calculate the range
            if (Target != None)
               TargetRange = Abs(VSize(Target.Location - Location));
           
            // update our timers
            //SoundTimer += deltaTime;
            MaintainLockTimer -= deltaTime;
           
            // check target and range info to see what our mode is
            if ((Target == None) || IsInState('Reload'))
            {
               if (MaintainLockTimer <= 0)
               {            
                  SetLockMode(LOCK_None);
                  MaintainLockTimer = 0;
                  LockTarget = None;
               }
               else if (LockMode == LOCK_Locked)
               {
                  Target = LockTarget;
               }
            }
            else if ((Target != LockTarget) && (Target.IsA('Pawn')) && (LockMode == LOCK_Locked))
            {
               SetLockMode(LOCK_None);
               LockTarget = None;
            }
            else if (!Target.IsA('Pawn'))
            {
               if (MaintainLockTimer <0> MaxRange)
               {
                  SetLockMode(LOCK_Range);
               }
               else
               {
                  // change LockTime based on skill
                  // -0.7 = max skill
                  // DEUS_EX AMSD Only do weaponskill check here when first checking.
                  if (LockTimer == 0)
                  {
                     LockTime = FMax(Default.LockTime + 3.0 * GetWeaponSkill(), 0.0);
                     if ((Level.Netmode != NM_Standalone) && (LockTime <0>= LockTime)
                  {
                     SetLockMode(LOCK_Locked);
                  }
                  else
                  {
                     SetLockMode(LOCK_Acquire);
                  }
               }
            }
           
            // act on the lock mode
            switch (LockMode)
            {
            case LOCK_None:
               TargetMessage = msgNone;
               LockTimer -= deltaTime;
               break;
               
            case LOCK_Invalid:
               TargetMessage = msgLockInvalid;
               LockTimer -= deltaTime;
               break;
               
            case LOCK_Range:
               TargetMessage = msgLockRange @ Int(TargetRange/16) @ msgRangeUnit;
               LockTimer -= deltaTime;
               break;
               
            case LOCK_Acquire:
               TargetMessage = msgLockAcquire @ Left(String(LockTime-LockTimer), 4) @ msgTimeUnit;
               beepspeed = FClamp((LockTime - LockTimer) / Default.LockTime, 0.2, 1.0);
               if (SoundTimer > beepspeed)
               {
                  Owner.PlaySound(TrackingSound, SLOT_None);
                  SoundTimer = 0;
               }
               break;
               
            case LOCK_Locked:
               // If maintaining a lock, or getting a new one, increment maintainlocktimer
               if ((RealTarget != None) && ((RealTarget == LockTarget) || (LockTarget == None)))
               {
                  if (Level.NetMode != NM_Standalone)
                     MaintainLockTimer = default.MaintainLockTimer;
                  else
                     MaintainLockTimer = 0;
                  LockTarget = Target;
               }
               TargetMessage = msgLockLocked @ Int(TargetRange/16) @ msgRangeUnit;
               // DEUS_EX AMSD Moved out so server can play it so that client knows for sure when locked.
               /*if (SoundTimer > 0.1)
               {
                  Owner.PlaySound(LockedSound, SLOT_None);
                  SoundTimer = 0;
               }*/
               break;
            }
         }
         else
         {
            LockMode = LOCK_None;
            TargetMessage = msgNone;
            LockTimer = 0;
            MaintainLockTimer = 0;
            LockTarget = None;
         }
         
         if (LockTimer <0> 0.1) && (Role == ROLE_Authority))
   {
      PlayLockSound();
      SoundTimer = 0;
   }

   currentAccuracy = CalculateAccuracy();

   if (player != None)
   {
      // reduce the recoil based on skill
      recoil = recoilStrength + GetWeaponSkill() * 2.0;
      if (recoil <0> 0.0))
      {
         player.ViewRotation.Yaw += deltaTime * (Rand(4096) - 2048) * recoil;
         player.ViewRotation.Pitch += deltaTime * (Rand(4096) + 4096) * recoil;
         if ((player.ViewRotation.Pitch > 16384) && (player.ViewRotation.Pitch < 32768))
            player.ViewRotation.Pitch = 16384;
      }
   }

   // if were standing still, increase the timer
   if (VSize(Owner.Velocity) <10> 0.25)
      {
         ShakeYaw = currentAccuracy * (Rand(4096) - 2048);
         ShakePitch = currentAccuracy * (Rand(4096) - 2048);
         ShakeTimer -= 0.25;
      }

      ShakeTimer += deltaTime;

      if (bLasing)
      {
         MoveLaserSpot();
      }

      if ((player != None) && bZoomed)
      {
         player.ViewRotation.Yaw += deltaTime * ShakeYaw;
         player.ViewRotation.Pitch += deltaTime * ShakePitch;
      }
   }
}

function LaserOn()
{
   if (bHasLaser && !bLasing)
   {
      MoveLaserSpot();
      bLasing = True;
   }
}

function LaserOff()
{
   if (bHasLaser && bLasing)
   {
      bLasing = False;
      LX.bHidden=True;
   }
}


Just stick that at the start of the code of any weapon you want to have use the MP laser dot.
Last edited by Allan on Fri Oct 09, 09 4:46 pm, edited 1 time in total.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Raiiiny » Sat Oct 10, 09 12:39 am

ah thanks bro, your awsome!

Edit: It keeps saying unexpected error at end of script. :(
no matter what i do its always the same line as 'defaultproperties', could just be conflicting with my code. i'll try it on a regular weapon later.
Last edited by Raiiiny on Sat Oct 10, 09 1:36 am, edited 1 time in total.
Our greatest glory
is not in never falling, but in rising
every time we fall.
User avatar
Raiiiny
Wannabe
 
Posts: 117
Joined: Tue Sep 11, 07 2:39 am

Postby ~DJ~ » Sat Oct 10, 09 7:45 am

Just add } before default properties..
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby ~ô¿ô~Nobody~ » Sat Oct 17, 09 8:06 pm

I created a MP working laser emitter.. with the effect being drawn on the client and the other stuff being performed on the server..
It's part of SG_MOD153 but it's still not finalized, though.
Last edited by ~ô¿ô~Nobody~ on Sat Oct 17, 09 8:06 pm, edited 1 time in total.
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~ » Sat Oct 17, 09 11:46 pm

Omg, I never knew that, sneaky!

I can't wait :oops:
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby Vexus » Sat Oct 17, 09 11:53 pm

What about those laser trip wires that make the alarmunits go crazy?

maybe do something with those, like adding an invisible one on the gun or something.
ShadowRunner wrote:lol, the mayhem of this thread is huge...

~][FGS][Nobody~ wrote:Is there anything I can put in your mouth to make you stop talking rubbish? :-s

anax wrote:wow you are amazing. like this woman
http://www.youtube.com/watch?v=bl4B9NA-NLE

[FGS]Kalman wrote:Lol I thought for 2-3 months everybody talks like a sir here, then I realised it's the forum's censorship
User avatar
Vexus
Wannabe
 
Posts: 84
Joined: Wed Oct 14, 09 5:12 am
Location: California

Postby ~DJ~ » Sat Oct 17, 09 11:54 pm

that, my friend.. is called Laser Emitter.
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby ~ô¿ô~Nobody~ » Sun Oct 18, 09 12:16 am

..the thing we were talking about the past few posts.
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 Vexus » Sun Oct 18, 09 12:35 am

rofl, sorry, I didn't really take the time to read that whole
Code: Select all
code
part.
ShadowRunner wrote:lol, the mayhem of this thread is huge...

~][FGS][Nobody~ wrote:Is there anything I can put in your mouth to make you stop talking rubbish? :-s

anax wrote:wow you are amazing. like this woman
http://www.youtube.com/watch?v=bl4B9NA-NLE

[FGS]Kalman wrote:Lol I thought for 2-3 months everybody talks like a sir here, then I realised it's the forum's censorship
User avatar
Vexus
Wannabe
 
Posts: 84
Joined: Wed Oct 14, 09 5:12 am
Location: California

Postby ~ô¿ô~Nobody~ » Sun Oct 18, 09 12:37 am

Me neither, tbh. :lol:
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 Allan » Sun Oct 18, 09 11:03 pm

Most of it is default DeusExWeapon Tick copy-pasta.

Can't blame ya.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.


Return to Modifications

Who is online

Users browsing this forum: No registered users and 91 guests