CoopTranslocator

Search, find and discuss about Mutators!
Buggie
Adept
Posts: 412
Joined: Sat Mar 21, 2020 5:32 am

Re: CoopTranslocator

Post by Buggie » Thu Aug 20, 2020 1:32 am

5 version.

- Support extends Translocaltor for reorder like Barbie server does.
CoopTranslocator5.zip
You do not have the required permissions to view the files attached to this post.

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

Re: CoopTranslocator

Post by Barbie » Thu Aug 20, 2020 11:10 am

Thanks for V5.
I stumbled over these lines:

Code: Select all

// remove old CoopTranslocator if already have
...
if (Inv.isA('CoopTranslocator')) {
	if (Inv.class != class'CoopTranslocator')
		Inv.Destroy();
This means that you destroy all sub classes of class'CoopTranslocator'.

The question raises what happens if you have Actors with the same name from different packages. Can you keep apart them? Is the usage of the package name in "IsA()" valid? Like "IsA('Packagename.Actorname')".
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Adept
Posts: 412
Joined: Sat Mar 21, 2020 5:32 am

Re: CoopTranslocator

Post by Buggie » Thu Aug 20, 2020 1:31 pm

Barbie wrote:
Thu Aug 20, 2020 11:10 am
This means that you destroy all sub classes of class'CoopTranslocator'.
No. This means destroy all CoopTranslocator and its subclasses except current. Which it is CoopTranslocator5.CoopTranslocator.

It is happens because linker expand class'CoopTranslocator' to first matched loaded package. Which currently CoopTranslocator5.
But if I specify in EditPackages
EditPackage=CoopTranslocator
EditPackage=CoopTranslocator5

Then class'CoopTranslocator' == class'CoopTranslocator.CoopTranslocator' and class'CoopTranslocator' != class'CoopTranslocator5.CoopTranslocator'.
Barbie wrote:
Thu Aug 20, 2020 11:10 am
The question raises what happens if you have Actors with the same name from different packages. Can you keep apart them? Is the usage of the package name in "IsA()" valid? Like "IsA('Packagename.Actorname')".
class'Packagename.Actorname' is 100% work.

native(303) final function bool IsA( name ClassName );

isA require name as param. So you can not use double quotes here (which produce string). You need single quotes.
When you use single quotes it is name. Name can not contain dot. So no, you can not specify package in isA call.

But you can get class and check is it subclass of your desired class via:
native(258) static final function bool ClassIsChildOf( class TestClass, class ParentClass );
if (ClassIsChildOf(actor.class, class'Packagename.Actorname'))

-----
I choose this behavior (delete all other CoopTranslocators) because CoopTranslocator can be embedded into MH and can not be switched off.
I do not think exists any other CoopTranslocator which not CoopTranslocator at all and something else AND server admin want them both (this one and another).

Eternity
Average
Posts: 48
Joined: Sat Nov 30, 2019 10:56 pm

Re: CoopTranslocator

Post by Eternity » Thu Aug 20, 2020 1:59 pm

There once was the same problem with 'B_MonsterSpawner' class that comes from packages named differently. For this reason related code (of the counter that counts not spawned Scripted Pawns) worked properly only for the class that comes from the one package - that one which the code was compiled with. (?..) The function IsA('B_MonsterSpawner') was returning 'True' only for the class loaded from that one package (?..)
Last edited by Eternity on Wed Aug 26, 2020 8:31 pm, edited 1 time in total.

Buggie
Adept
Posts: 412
Joined: Sat Mar 21, 2020 5:32 am

Re: CoopTranslocator

Post by Buggie » Thu Aug 20, 2020 2:22 pm

I show how to do such check above. Nobody change IsA implementation and break A LOT of exists code.

Code do what do. Not what you want or mean when write code.

Eternity
Average
Posts: 48
Joined: Sat Nov 30, 2019 10:56 pm

Re: CoopTranslocator

Post by Eternity » Fri Aug 21, 2020 12:47 am

Thank you for info.
I have done a little test to understand 'IsA()' behavior for myself... (pastebin.com/xcAxdHaX)
No this question anymore.

Buggie
Adept
Posts: 412
Joined: Sat Mar 21, 2020 5:32 am

Re: CoopTranslocator

Post by Buggie » Sat Dec 26, 2020 9:21 am

6 version.

- Can not use tele for hacks anymore.
- Can not tele to players when they move up. Usually it break jump and destroy traectory, so target can fall in lava or die by this fall.
- The player can temporarily disable teleportation to himself via the "mutate cooptrans disable" command. The administrator can disable this behavior in UnrealTournament.ini.

If a player has disabled teleportation to himself, then he himself cannot teleport to other players.
The disable time is set separately. If you specify zero time, the function will be disabled.

Code: Select all

[CoopTranslocator6.CoopTranslocator]
DisableTargetTime=30
DisableUseTime=30
CoopTranslocator6.zip
You do not have the required permissions to view the files attached to this post.

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

Re: CoopTranslocator

Post by Barbie » Sat Dec 26, 2020 2:22 pm

Very nice that you improve existing stuff. :tu:
Buggie wrote:
Sat Dec 26, 2020 9:21 am
If a player has disabled teleportation to himself, then he himself cannot teleport to other players.
The disable time is set separately. If you specify zero time, the function will be disabled.
If I've understood it correctly, the CoopTranslocator activates itself after *DisableUseTime* seconds? Is it possible that you can make it just toggling between on/off? Of course there should be a fixed delay after activation to avoid nut picking (disable it while you are in a good position and enable it only if you want to get to a player with a better position).
Also messages on activating/deactivating would be nice.
To make it fully configurable, you could add the following INI values:

Code: Select all

[CoopTranslocatorX.CoopTranslocator]
;Mutate command. Use empty string to disable mutate function.
CoopTranslocatorMutateCommand="CoopTranslocator"
;Number of characters from left that must match the command string ("0" means "all").
;E.g. "5" means that "CoopT" to "CoopTranslocator" will result in the same command
CoopTranslocatorMutateCommandMinMatchChars=5
CoopTranslocatorMutateCommandEnable="enable"
CoopTranslocatorMutateCommandDisable="disable"
Ofc all strings case insensitive. 8)

Examples:
________________________________________
mutate CoopTranslocator enable
>Your CoopTranslocator will be usable in xy seconds.
________________________________________
mutate coopt disable [disable seconds time]
>Your CoopTranslocator is switched off now and you cannot be reached by team mates. Use "mutate CoopTranslocator enable" to activate it.
>Your CoopTranslocator is switched off now for xy seconds.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Adept
Posts: 412
Joined: Sat Mar 21, 2020 5:32 am

Re: CoopTranslocator

Post by Buggie » Sat Dec 26, 2020 2:54 pm

Initially, I was going to do it just on / off. But you just said it wasn't very good. Therefore, such a scheme was implemented.
Perhaps I misunderstood your idea.

In general, both approaches have the right to life. we just need to understand what problems we are going to solve with them.

It may be necessary to make a 3 second invulnerability after teleportation to solve some problem.

It all depends on the essence of the problem.

At the moment I see problems like this:
1. Chasing the player using teleports. (For example, to cure Miro :lol: )
2. Inexperienced teleportation which leads to a team kill.
3. Teleportation to the player, which results in a sharp deterioration in the situation. For example, it teleports and collects very strong monsters on you, which kill you immediately.

It is necessary to determine which problems will be solved and in what ways.
---
Also, the chosen solution should not allow malicious or selfish use.
---
Why make a fully customizable command system? To hide this possibility and leave only the knowledgeable?

Eternity
Average
Posts: 48
Joined: Sat Nov 30, 2019 10:56 pm

Re: CoopTranslocator

Post by Eternity » Sat Dec 26, 2020 3:36 pm

Nice idea, fixes old bad problem...
But it must be easy to use... Normally players don't [like to] use console commands, especially if they contain more than a few symbols...
Player would rather prefer to select an item 'Translocator disabled' in the list of targets than to write a command or to have a hotkey assigned for this command.

Buggie
Adept
Posts: 412
Joined: Sat Mar 21, 2020 5:32 am

Re: CoopTranslocator

Post by Buggie » Sat Dec 26, 2020 4:23 pm

Only two buttons use for weapons. So do not much choices. Users can bind any mutate command for any key if they want.

Buggie
Adept
Posts: 412
Joined: Sat Mar 21, 2020 5:32 am

Re: CoopTranslocator

Post by Buggie » Sun Jan 03, 2021 6:13 pm

Version 7.

- Fix disable translocator by user.
- Different scheme for disable translocator.

Read ReadMe.txt inside zip for details.
11. The player can disable teleportation to himself via the "mutate cooptrans disable" command. The administrator can disable this behavior in server UnrealTournament.ini.
If a player has disabled teleportation to himself, then he himself cannot teleport to other players.
To enable, use the command "mutate cooptrans enable". After the delay, the translocator will be turned on, and you will receive a corresponding message.
[CoopTranslocator7.CoopTranslocator]
;Mutate command. Use empty string to turn off disable feature.
Command=cooptrans
;Delay for use after enable.
DisableUseTime=30
CoopTranslocator7.zip
You do not have the required permissions to view the files attached to this post.