Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP US)

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
User avatar
Y|yukichigai
UNATCO
Posts: 144
Joined: Thu Aug 24, 2006 11:49 pm
Location: Middle of Nowhere, Nevada
Contact:

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Y|yukichigai »

Lork wrote:So here's an interesting one: As you all know, your accuracy is determined by how long you've been standing still. What some of you may have noticed is that after your accuracy is at its highest value, you can keep standing to gain a "grace period" wherein moving doesn't reduce your accuracy for a while. What seemingly none of us have noticed until now is that there's no upper limit to that. If you really wanted to, you could leave the game on overnight and build up 12+ hours worth of "standing time" with which to run around shooting things with perfect accuracy.

To fix, change the code that updates the standing timer:

DeusExWeapon.Tick()

Code: Select all

	// if were standing still, increase the timer
	if (VSize(Owner.Velocity) < 10)
		standingTimer += deltaTime;
To something like this:

Code: Select all

	// if were standing still, increase the timer
	if (VSize(Owner.Velocity) < 10 && standingTimer <= 15.0)
		standingTimer += deltaTime;
Note that 15 is just a number that I pulled out of my ass. For the real fix, you'd probably want to calculate the limit of the time to maximum accuracy with respect to the base accuracy of a weapon, and then add a few seconds onto that. Calculus was never one of my strong points, so I leave that part up to you guys.
Actually as it turns out, 15 is the maximum value at which the standing timer is relevant, sort of:

Code: Select all

		if (standingTimer > 0)
		{
			// higher skill makes standing bonus greater
			div = Max(15.0 + 29.0 * weapskill, 0.0);
			accuracy -= FClamp(standingTimer/div, 0.0, 0.6);
	
			// don't go too low
			if ((accuracy < 0.1) && (tempacc > 0.1))
				accuracy = 0.1;
		}
I should point out that weapskill is a negative number between 0 and -1. The higher your skill in a weapon class the lower the number.

Of course, with that Fclamp thrown in the max is closer to 9, but the math appears to be geared for a maximum of 15. Yes, you'd get SOME wiggle room when it came to moving after standing still for a while, but not too much, maybe a second's worth.
User avatar
Y|yukichigai
UNATCO
Posts: 144
Joined: Thu Aug 24, 2006 11:49 pm
Location: Middle of Nowhere, Nevada
Contact:

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Y|yukichigai »

Lork wrote:Players can't be blinded by grenades they don't own.

The problem - in ThrownProjectile.Explode()

Code: Select all

// flash the screen white based on how far away the explosion is
                //              player = DeusExPlayer(GetPlayerPawn());
                //              MBCODE: Reference projectile owner to get player
                //              because sever fails to get it the old way
                player = DeusExPlayer(Owner);
If you want to solve it in multiplayer you'll have to loop through every player on the map, but for singleplayer there's a quick and easy fix:

Code: Select all

if(Level.NetMode == NM_StandAlone) //Justice: If we're in singleplayer, we don't have to worry about that
			player = DeusExPlayer(GetPlayerPawn());
		else
			player = DeusExPlayer(Owner);
Oddly enough, ThrownProjectile already loops through every player on the map... in Tick, of all places. Yes, Tick. Not Timer. TICK. Good lord, and we wonder why this game is a bit underperforming sometimes.

Considering that the game is doing that on such an intensive scan every damn Tick, I think adding similar code to the one-time Explode won't bog things down much.

And here's my fix:

Code: Select all

        // flash the screen white based on how far away the explosion is
           //== Y|y: we need to do this really complicated to make it work in both single and multiplayer, and to work with EVERYONE's grenades
        //==  Thanks to Lork for pointing out that this was a problem
        if(Level.NetMode == NM_Standalone)
            curPawn = GetPlayerPawn();
        else if (( Level.NetMode == NM_DedicatedServer) || ( Level.NetMode == NM_ListenServer))
            curPawn = Level.PawnList;
        

        while(curPawn != None)
        {
            player = DeusExPlayer(curPawn);

            dist = Abs(VSize(player.Location - Location));
    
            // if you are at the same location, blind the player
            if (dist ~= 0)
                dist = 10.0;
            else
                dist = 2.0 * FClamp(blastRadius/dist, 0.0, 4.0);
    
            if (damageType == 'EMP')
                player.ClientFlash(dist, vect(0,200,1000));
            else if (damageType == 'TearGas')
                player.ClientFlash(dist, vect(0,1000,100));
            else
                player.ClientFlash(dist, vect(1000,1000,900));


            if(Level.NetMode == NM_Standalone) //== Only one player in singleplayer, so halt the loop
                curPawn = None;
            else //== Cycle through all the remaining players in Multiplayer
                curPawn = curPawn.nextPawn;
        }
User avatar
Y|yukichigai
UNATCO
Posts: 144
Joined: Thu Aug 24, 2006 11:49 pm
Location: Middle of Nowhere, Nevada
Contact:

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Y|yukichigai »

nerdenstein wrote:I've just come across this on the steam forums.

http://www.dxm.be/navigator.php5?lang=en&content=202

I know you guys have fixed the Missing Music Bug but I didn't realise there were other bugs like that.
Might come in handy to the patch if it still happening.
Ideally this would be how the patch addresses those issues. The Game of the Year edition uses just plain BAD versions of the maps. The problem is that I'm not sure on the legality of the patch including those full versions of the maps; at what point does it cross the line into piracy? Of course, we're talking about a 10-year-old game here, but it's still an issue.

What would be nice is if someone whose other works have used this technique before (Jonas, DDL, etc., hint hint) could make part of the patch actually PATCH the affected maps, i.e. with an incremental/difference update instead of replacing the entire file. That way it would be useless to anybody who didn't already have the maps and legal, but still would fix the issue. Unfortunately that's not something I'm experienced in, though I'm sure I could figure it out given time. It would be a lot easier if someone pointed me in the right direction though.
User avatar
Y|yukichigai
UNATCO
Posts: 144
Joined: Thu Aug 24, 2006 11:49 pm
Location: Middle of Nowhere, Nevada
Contact:

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Y|yukichigai »

nerdenstein wrote:
Lork wrote:*Above Post*
I pretty much agree with everything you said just there. :mrgreen:
So all those things you mentioned before are included in BioMod?
I have played Liberty Island using BioMod and I was very impressed.

And I see your point about the ADS,
Yeah maybe removing the fact it targets Grenades all together then.
Thrown Grenades will still be detonated before they reach you presumably?
On this, for now, I will make a sort of executive decision (though for the love of god nobody get the idea that I'm in charge of this thing, please) and stop Aggressive Defense from reacting to stationary grenades. Again, for now. Certainly the way it works as is is just maddening and illogical, and not in keeping with the description of the aug.

Plus, it's an easy-as-hell fix.

P.S. Here's a thought: as it is, the Aggressive Defense aug has no maximum range and is always constantly scanning for threats throughout the whole map. If there's a projectile flying, Aggressive Defense knows about it. Should perhaps that range be limited somewhat?
User avatar
Jaedar
Illuminati
Posts: 3937
Joined: Fri Mar 20, 2009 3:01 pm
Location: Terra, Sweden, Uppsala.

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Jaedar »

Y|yukichigai wrote: P.S. Here's a thought: as it is, the Aggressive Defense aug has no maximum range and is always constantly scanning for threats throughout the whole map. If there's a projectile flying, Aggressive Defense knows about it. Should perhaps that range be limited somewhat?
No point in having it know about projectiles outside its maximum detonation(and 'identification') range imho. Alternatively limited by what JC can see, depending on which is easier to implement I guess.
"Delays are temporary; mediocrity is forever."
odio ergo sum
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Jonas »

Y|yukichigai wrote:What would be nice is if someone whose other works have used this technique before (Jonas, DDL, etc., hint hint) could make part of the patch actually PATCH the affected maps, i.e. with an incremental/difference update instead of replacing the entire file. That way it would be useless to anybody who didn't already have the maps and legal, but still would fix the issue. Unfortunately that's not something I'm experienced in, though I'm sure I could figure it out given time. It would be a lot easier if someone pointed me in the right direction though.
You should talk to Trestkon about that, he made the NSIS installers for both TNM and HDTP, and that's where the patching functionality is.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
EER
Illuminati
Posts: 2486
Joined: Sat Oct 22, 2005 7:52 pm
Location: NL

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by EER »

I vaguely remember trying to diff two unreal maps where only a single bool had been changed (or something simple like that), but unfortunately there are a LOT of changes to the file that seem to be unrelated to the change. Given the filesize of the patches, and the unavailability of patches that are specific to versions, I think that the TNM patches only replace files, and not 'patch' them, in the developers way of the word.
Another Visitor ... Stay a while ... Stay forever!
User avatar
Lork
NSF
Posts: 58
Joined: Wed Mar 25, 2009 6:33 pm
Location: The Great White North

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Lork »

Y|yukichigai wrote:Also, I've gotten exactly zero requests to have write access to the google code project, and I KNOW some of you are quite handy with code. I really, really want this to be more than just a "me" project, if for no reason other than the fact that I am, after all, occasionally a flake.
A lot of the fixes are beyond my abilities, but I'd be willing to help out with all the ones that I can deal with. It would take some of the load off your back, at least.
User avatar
Hassat Hunter
Illuminati
Posts: 2182
Joined: Fri Apr 10, 2009 1:20 pm

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Hassat Hunter »

Well, I suck, so don't ask me.

But I am pretty sure the TNM patches replace map files, not "update" them, so I don't think that's possible for you to do.
Can somebody tell me how I can get a custom avatar?
Oh wait, I already got one...
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Jonas »

I think you're right.

But I also think it shouldn't be a big deal :)
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
User avatar
Y|yukichigai
UNATCO
Posts: 144
Joined: Thu Aug 24, 2006 11:49 pm
Location: Middle of Nowhere, Nevada
Contact:

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Y|yukichigai »

Lork wrote:
Y|yukichigai wrote:Also, I've gotten exactly zero requests to have write access to the google code project, and I KNOW some of you are quite handy with code. I really, really want this to be more than just a "me" project, if for no reason other than the fact that I am, after all, occasionally a flake.
A lot of the fixes are beyond my abilities, but I'd be willing to help out with all the ones that I can deal with. It would take some of the load off your back, at least.
I think you understate your skills; you've caught a lot of things I missed.

Send me a PM with your Google account info and I'll add you to the project over at Google Code. (And yes, unfortunately you HAVE to have a Google account to get write access to the project)
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by DDL »

I'd be in, if I thought I could actually commit to contributing...well, any time whatsoever.

But my life is fucking stupid right now, so I really can't. :(
User avatar
Lork
NSF
Posts: 58
Joined: Wed Mar 25, 2009 6:33 pm
Location: The Great White North

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Lork »

OK, so, things that I'm looking at implementing soon:
? Hazmat suit doesn't protect against fire/electricity/etc. (description says it does)
I think this one's a no brainer. It makes sense that it would protect you from those things, and making the hazmat more useful could hardly hurt the game balance.
-NPCs don't use the full range of "pain" sounds, resulting in exclamations of "OOF!" when drowning, breathing in poison gas, and so on.
A possible reason not to do this is that most of the sounds to be added are also used by the player character. On the other hand, they're all generic enough to sound right for everyone, and the one sound they already use is also used by the player.
-Speed Enhancement exploit (crouchwalk silently as fast as you can run normally).
This makes Run Silent, which is supposed to be the alternative completely superfluous, so it's clearly going against the designer's intentions. Of course, if we're going down that road we might as well talk about regen making aqualung obsolete as well.
-Unconscious NPCs can't be killed
I think it has generally been agreed upon that this should be in the patch. The only discussion to be had is about the particulars of the implementation.

And finally, I'd like to add an autosave feature to the game. Yeah, it's a new feature and all that, but people expect this in every game nowadays, and for very good reasons. If I had a dollar for every forum post I've read about someone shelving Deus Ex because they died on the second mission and forgot to save, I'd be able to fund my own game development studio.

Aside from that, while testing the patch a bug that I could've sworn was fixed in Shifter reared its ugly head: My inventory carried over into a new game. I wouldn't know how to fix this one, but if my memory is correct and Shifter fixed it, Yuki should be able to deal with it pretty easily.
User avatar
DDentonas
UNATCO
Posts: 164
Joined: Mon Jun 07, 2010 1:38 am

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by DDentonas »

-Regeneration augmentation making aqualung obsolete.

It could be done like this. The longer you stay without breath, the more damage you would take. So the first time you make the drowning sound you would take 10 damage, the second time 20 damage, etc. So the 5th time even with a fully upgraded regeneration augmentation you would still be 10 hp down. 6th time you would be 30, 7th 60 and 8th time you would be dead. Even if you spam medkits on the 10th you would take 100 damage and you would die instantly.
YK: And you... you... are a bad actress.
(unknown sound)
MC: And you have one less finger...
User avatar
Jaedar
Illuminati
Posts: 3937
Joined: Fri Mar 20, 2009 3:01 pm
Location: Terra, Sweden, Uppsala.

Re: Deus Ex v2.0 - An unofficial fan patch for Deus Ex (HELP

Post by Jaedar »

Then again, regeneration is much more expensive biocell-wise isn't it?

I'd prefer something like the oxygen meter going into negative and when it reaches -(starting value) you die regardless of circumstances. Increasing damage exponentially could work as well though.
"Delays are temporary; mediocrity is forever."
odio ergo sum
Post Reply