Detect installed double jump on server

Discussions about Coding and Scripting
Buggie
Godlike
Posts: 1489
Joined: Sat Mar 21, 2020 5:32 am

Detect installed double jump on server

Post by Buggie » Wed Apr 13, 2022 2:51 pm

If there exists common general way for detect installed double jump on server?

I want embed double jump actor in map, but turn it on only if on server not already own double jump.

Is this achievable goal?

OFC I talk about detection by behavior, not by silly list of classes well-known double jump mutators.

User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Detect installed double jump on server

Post by sektor2111 » Wed Apr 13, 2022 3:51 pm

My first try would be a mutator using ModifyPlayer.
Calling a checker with a short life for testing Inventories owned by Player. Whatever is not an armor, weapon and/or ammo, perhaps is other thing - but it might be that old stuff delegated to track NetSpeed which was using an inventory...

User avatar
Barbie
Godlike
Posts: 2394
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Detect installed double jump on server

Post by Barbie » Wed Apr 13, 2022 9:57 pm

sektor2111 wrote:
Wed Apr 13, 2022 3:51 pm
Calling a checker with a short life for testing Inventories owned by Player. Whatever is not an armor, weapon and/or ammo, perhaps is other thing
Do you mean something like this?
Spoiler
Show

Code: Select all

class SmallStatue extends Pickup;

defaultproperties {
	bActivatable=False
	bBlockActors=True
	bBlockPlayers=True
	bBounce=True
	bCollideActors=True
	bCollideWorld=True
	bStatic=False
	Buoyancy=1.000000
	CollisionHeight=22
	CollisionRadius=5
	DrawScale=0.25
	DrawType=DT_Mesh
	ItemName=small Statue
	Mass=20
	Mesh=LodMesh'UnrealShare.MonkStatueM'
	PickupMessage="You picked up a small Statue"
	PickupViewScale=0.25
	RemoteRole=ROLE_DumbProxy
	RespawnTime=300
}
:loool:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Detect installed double jump on server

Post by sektor2111 » Thu Apr 14, 2022 4:47 pm

May I ask something: Why would be needed a PIckup (Inventory) after all ? Why not keypoints, info, etc. ?
If you ask me why, I must reply something simple. A short living pickup might mess up Inventory chain owned by Player (or whatever alien) - is that simple.

Code: Select all

class Pawn extends Actor 
	abstract
	native
	nativereplication;

...
...
function bool AddInventory( inventory NewItem )
{
	// Skip if already in the inventory.
	local inventory Inv;
	
	// The item should not have been destroyed if we get here.
	if (NewItem ==None )
		log("tried to add none inventory to "$self);

	for( Inv=Inventory; Inv!=None; Inv=Inv.Inventory )
		if( Inv == NewItem )
			return false;

	// Add to front of inventory chain.
	NewItem.SetOwner(Self);
	NewItem.Inventory = Inventory;
	Inventory = NewItem;

	return true;
}
...
The thing owned can be used depending on player timer used in game - in first 3-5 seconds and then, no more using it.
But this is what I would try as first stage. If thing is not too productive perhaps it needs re-thinking of strategy.

Buggie
Godlike
Posts: 1489
Joined: Sat Mar 21, 2020 5:32 am

Re: Detect installed double jump on server

Post by Buggie » Thu Apr 14, 2022 5:02 pm

From my observation and dig over Double Jump mutators, there next picture:
1. most mutatos derived from one and use DJ_InventoryItem.
2. Some others use DoubleJumpBoots and DoubleJumpItem.
3. Usually present mutator with DJ in name or DoubleJump.
4. most hard case is NewNet and similar things. There override core classes and use custom jump code inside.
5. It can be UTPure mutator with field bDoubleJump

So for detect need check all Inventory items to some well-know items. After that need check name of core classes and presence UTPure.
Also need check mutators name.

No way for detect by behavior unfortunately.

Eternity
Experienced
Posts: 103
Joined: Sat Nov 30, 2019 10:56 pm

Re: Detect installed double jump on server

Post by Eternity » Thu Apr 14, 2022 8:12 pm

You could call "DoubleJump" command for Player twice-triple and then check changes on Z axis within next 1-2 seconds...

But some DoubleJump inventories probably may use another command string...

Alternatively, could use config file like in the map MH-Kittara, where admin can specify DoubleJump class name being used on the server in case if it is some of non-usual class that was not properly detected, or, if needed, can also disable DoubleJump built-in in the map.

There are some maps that are unplayable without DoubleJump inventory and don't have any similar built-in solution discussed in this thread. So it already has been a headache for admins since a long time ago. Some delete such maps, some enable DoubleJump inventory for all maps, some use mutators that enable DoubleJump only for such maps, or enable DoubleJumps for all maps except those where DoubleJump allows players to cheat (e.g., bypassing locations and locked doors).

Buggie
Godlike
Posts: 1489
Joined: Sat Mar 21, 2020 5:32 am

Re: Detect installed double jump on server

Post by Buggie » Thu Apr 14, 2022 8:50 pm

Well. Mutator can scan local player bind, search all additional commands placed to "Jump" bind, try call each and log changes on velocity, JumpZ. Same for few fast called Jump calls. but it look very awful. And need a lot interaction between client and server parts. Also need do this when player on ground, game started and so on. Jump in air and water not work, jump before game start not work.
And we (ideally) need know this before game start.
Also it look very weird when player start jump by self for detect presence double jump on server.

User avatar
Barbie
Godlike
Posts: 2394
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Detect installed double jump on server

Post by Barbie » Thu Apr 14, 2022 10:11 pm

Buggie wrote:
Thu Apr 14, 2022 8:50 pm
log changes on velocity, JumpZ
At analysing the jump height take into account:
Adrenaline also increases jump height.

Code: Select all

Pawn(Owner).Jumpz = Pawn(Owner).default.Jumpz * 2;
(taken from Adrenaline.u)

Also this one may modify jump hight:

Code: Select all

function float PlayerJumpZScaling() {
	return 1.0;
} 
(taken from class'GameInfo.uc')

Automatically merged

Another idea: use a custom version or an embedded mutator that reads a map specific INI file and gets active if a variable is set. So server admins can modify that to their needs.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
Que
Masterful
Posts: 512
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: Detect installed double jump on server

Post by Que » Thu Apr 14, 2022 11:24 pm

Perhaps we can also get a Double jump actor for use in maps (bot support).
X .. timed delay .. Y
*Join our Discord Here.*
Our most popular mods - MVX , SSB , SmartWFL , UTCmds
Show
~Our Servers~

Buggie
Godlike
Posts: 1489
Joined: Sat Mar 21, 2020 5:32 am

Re: Detect installed double jump on server

Post by Buggie » Thu Apr 14, 2022 11:28 pm

Unfortunately bot support highly depends from navigation network. Which build in really crappy way. In fact UnrealEd not built paths for jump where current bots able go.
So there be no any path and bots not go there, even if able use double jump.