Gah - a solution with more questions. – EntropicLqd

Difference between revisions of "User:Crusha/UltimateMappingTools/VIPlayerEventGate"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
(Updated to newest version.)
 
Line 1: Line 1:
 +
=VIPlayerEventGate=
 
by Crusha K. Rool
 
by Crusha K. Rool
 
{{infobox class
 
{{infobox class
| class   = VIPlayerEventGate
+
| class = VIPlayerEventGate
 +
| game = UT2004
 +
| engine = UE2
 +
| package = UltimateMappingTools
 
| customparent1 = EventGate
 
| customparent1 = EventGate
 
| parent2 = Triggers
 
| parent2 = Triggers
 
| parent3 = Actor
 
| parent3 = Actor
 
| parent4 = Object
 
| parent4 = Object
| game    = UT2004
+
| custom = yes
| engine  = UE2
+
| custom = yes
+
 
}}
 
}}
  
This receives an incoming (Un)TriggerEvent and performs several checks about the Instigator of this Event. It will (un)trigger the next Event, depending on what the result of the check is.
+
This receives an incoming (Un)TriggerEvent and performs several checks about
 
+
the Instigator of this Event. It will (un)trigger the next Event, depending on
 
+
what the result of the check is.
==Variables==
+
  
 +
==Properties==
 
===Property group 'Events'===
 
===Property group 'Events'===
====Event====
 
'''Type:''' [[name]]
 
 
This Event is (un)triggered if the Instigator matches a set of criteria from the Whitelist.
 
 
 
====BlacklistEvent====
 
====BlacklistEvent====
 
'''Type:''' [[name]]
 
'''Type:''' [[name]]
  
This Event is (un)triggered if the Instigator matches a set of criteria from the Blacklist and not from the Whitelist.
+
The optional event that is (un)triggered if the Instigator is in the BlackList.
  
 
====NoMatchEvent====
 
====NoMatchEvent====
 
'''Type:''' [[name]]
 
'''Type:''' [[name]]
  
This Event is (un)triggered if the Instigator does neither match a set of criteria from the Whitelist nor from the Blacklist.
+
The optional event that is (un)triggered if the Instigator is not in the WhiteList.
 
+
 
+
  
 
===Property group 'VIPlayerEventGate'===
 
===Property group 'VIPlayerEventGate'===
Line 38: Line 33:
 
'''Type:''' [[bool]]
 
'''Type:''' [[bool]]
  
Kill the Instigator immediately, if he's using a demo CD-key. Otherwise nothing happens, none of the above Events will be triggered for demo key players.
+
Kill the Instigator immediately, if he's using a demo CD-key. Otherwise nothing happens, no Event will be triggered at all.
 
+
====Whitelist====
+
'''Type:''' [[array]]<'''_PlayerProperties'''>
+
 
+
The Instigators with these criteria trigger the default Event.
+
  
 
====Blacklist====
 
====Blacklist====
'''Type:''' [[array]]<'''_PlayerProperties'''>
+
'''Type:''' [[array]]<{{tl|_PlayerProperties}}>
  
The Instigators with these criteria trigger the BlacklistEvent.
+
'''[[Variables#Modifiers|Modifiers]]:''' private
  
 +
The normal event will not be called for players matching these criteria. Instead will the BlacklistEvent be called.
  
===Struct 'SpawnedVehicleProperties'===
+
====Whitelist====
====PlayerName====
+
'''Type:''' [[array]]<{{tl|_PlayerProperties}}>
'''Type:''' [[String]]
+
  
This string must be contained in (i.e. can also be just a part of) the Instigator's name. Leaving this blank disables the criteria.
+
'''[[Variables#Modifiers|Modifiers]]:''' private
  
====bCheckExactName====
+
The Instigators with these criteria trigger the default Event.
'''Type:''' [[bool]]
+
  
Instigator's name must be EXACTLY the one entered in the PlayerName-field. (Unless the field is blank)
+
===Internal variables===
 +
====WAREZ_ID====
 +
'''Type:''' [[string]]
  
====MustBeAdmin====
+
'''[[Variables#Modifiers|Modifiers]]:''' const
'''Type:''' '''ECheckResult'''
+
  
Instigator needs to be logged in as Admin
+
The hash of the demo key.
  
====MustBeBot====
+
'''Default value:''' "238c7dd4ec4a065e2314c1c8b4d41ca6"
'''Type:''' '''ECheckResult'''
+
  
Instigator needs to be a bot
+
==Enums==
 +
====ECheckResult====
 +
What the result of the check can/must be to be valid.
  
====bVehicleCheck====
+
==Structs==
'''Type:''' [[bool]]
+
===_PlayerProperties===
 +
All these criteria per array entry have to be valid at once.
 +
; [[string]] PlayerName : This string must be contained in the Instigator's name. Leaving this blank disables the criterium.
 +
; [[bool]] bCheckExactName : Instigator's name must be EXACTLY the one entered in the PlayerName-field. (Unless the field is blank)
 +
; {{tl|ECheckResult}} MustBeAdmin : Player must be logged in with server admin rights.
 +
; {{tl|ECheckResult}} MustBeBot : Player must be a bot.
 +
; [[bool]] bVehicleCheck : True to check whether the Instigator is in the RequiredVehicle, False to ignore this criteria.
 +
; [[class]]<[[UE2:Vehicle (UT2004)|Vehicle]]> RequiredVehicle : The Instigator must be in this vehicle. None = must go by foot ;  Vehicle = can be any vehicle.
 +
; [[string]] PlayerID : Instigator needs to have this exact sequence of characters somewhere in his hash ID. The longer the sequence, the less the chance of a false-positive, but you should never ever put your full ID there. It's really hard if not nearly impossible to bruteforce the MD5 hash back into the original key but who knows what people do when they have too much time and bad intentions.
 +
; [[int]] MinimumRequiredScore : Instigator needs to have at least this much points. Enter a very low value to let everyone pass this check. ;)
 +
; [[int]] TeamIndex : Instigator needs to be in this specific team. 0= red, 1= blue, 255= disable check
  
True to check whether the Instigator is in the RequiredVehicle, False to ignore this criterion.
+
==Functions==
 +
===Events===
 +
====Trigger====
 +
{{code|event '''Trigger''' ([[UE2:Actor (UT2004)|Actor]]&nbsp;'''Other''', [[UE2:Pawn (UT2004)|Pawn]]&nbsp;'''EventInstigator''')}}
  
====RequiredVehicle====
+
'''Overrides:''' [[UE2:Actor events (UT2004)#Trigger|Actor.Trigger]]
'''Type:''' [[class]]<[[UE2:Vehicle (UT2004)|Vehicle]]>
+
  
The Instigator must be in this vehicle. None = must go by foot ;  Vehicle = can be any vehicle (but still must be in a vehicle).
+
Let's call the check.
  
====PlayerID====
+
====UnTrigger====
'''Type:''' [[String]]
+
{{code|event '''UnTrigger''' ([[UE2:Actor (UT2004)|Actor]]&nbsp;'''Other''', [[UE2:Pawn (UT2004)|Pawn]]&nbsp;'''EventInstigator''')}}
  
Instigator needs to have this exact sequence of characters somewhere in his ID.
+
'''Overrides:''' [[UE2:Actor events (UT2004)#UnTrigger|Actor.UnTrigger]]
  
The ID is a unique string that is a hash representation of your CD-key. It can be seen in the ingame settings. It's pretty impossible to calculate someone's CD-key from the hash, but for paranoid people (like me), I created this criterion in a way that it's enough to enter only a part of the ID. The function will only check if the Instigator's ID contains this specified sequence somewhere in it. The longer the sequence, the less the chance of a false-positive, but a player should be unique identifiable also without entering the full sequence here. Only give as much away as you can afford.
+
Let's call the Check.
Of course it's pretty useless if you use different parts of your ID in different maps of yours, right? Stick with one, if you use this at all. ;)
+
 
+
====MinimumRequiredScore====
+
'''Type:''' [[int]]
+
 
+
Instigator needs to have at least this much points. Enter a very low value to let everyone pass this check without problems, i.e. disable it by entering -100 or something like that. Unless you want to restrict suicidal noobs. ;)
+
 
+
====TeamIndex====
+
'''Type:''' [[int]]
+
 
+
Instigator needs to be in this specific team. 0= red, 1= blue, 255= disable check
+
 
+
The team number will be switched on Reset if required in ONS.
+
 
+
 
+
===Enums===
+
====ECheckResult====
+
'''ECR_Any:''' Ignore this criteria
+
  
'''ECR_True:''' Result must be true to be considered a match
+
===Other instance functions===
 +
====PerformCheck====
 +
{{code|function [[bool]]&nbsp;'''PerformCheck''' ([[UE2:Pawn (UT2004)|Pawn]]&nbsp;'''Instigator''', [[bool]]&nbsp;'''bBlacklist''')}}
  
'''ECR_False:''' Result must be false to be considered a match.
+
Run all the criteria checks on the Instigator.
  
  
  
==Author comments==
+
=Author comments=
 
This actor is supposed to allow authorized personnel like Admins, clan members or the mapper himself to cause certain Events in the map, what can become pretty handy in conjunction with other actors of my tool set.
 
This actor is supposed to allow authorized personnel like Admins, clan members or the mapper himself to cause certain Events in the map, what can become pretty handy in conjunction with other actors of my tool set.
  

Latest revision as of 07:16, 13 October 2011

VIPlayerEventGate

by Crusha K. Rool

UT2004 Object >> Actor >> Triggers >> EventGate >> VIPlayerEventGate (custom)
Package: 
UltimateMappingTools

This receives an incoming (Un)TriggerEvent and performs several checks about the Instigator of this Event. It will (un)trigger the next Event, depending on what the result of the check is.

Properties

Property group 'Events'

BlacklistEvent

Type: name

The optional event that is (un)triggered if the Instigator is in the BlackList.

NoMatchEvent

Type: name

The optional event that is (un)triggered if the Instigator is not in the WhiteList.

Property group 'VIPlayerEventGate'

bKillWarezPlayers

Type: bool

Kill the Instigator immediately, if he's using a demo CD-key. Otherwise nothing happens, no Event will be triggered at all.

Blacklist

Type: array<_PlayerProperties>

Modifiers: private

The normal event will not be called for players matching these criteria. Instead will the BlacklistEvent be called.

Whitelist

Type: array<_PlayerProperties>

Modifiers: private

The Instigators with these criteria trigger the default Event.

Internal variables

WAREZ_ID

Type: string

Modifiers: const

The hash of the demo key.

Default value: "238c7dd4ec4a065e2314c1c8b4d41ca6"

Enums

ECheckResult

What the result of the check can/must be to be valid.

Structs

_PlayerProperties

All these criteria per array entry have to be valid at once.

string PlayerName 
This string must be contained in the Instigator's name. Leaving this blank disables the criterium.
bool bCheckExactName 
Instigator's name must be EXACTLY the one entered in the PlayerName-field. (Unless the field is blank)
ECheckResult MustBeAdmin 
Player must be logged in with server admin rights.
ECheckResult MustBeBot 
Player must be a bot.
bool bVehicleCheck 
True to check whether the Instigator is in the RequiredVehicle, False to ignore this criteria.
class<Vehicle> RequiredVehicle 
The Instigator must be in this vehicle. None = must go by foot ; Vehicle = can be any vehicle.
string PlayerID 
Instigator needs to have this exact sequence of characters somewhere in his hash ID. The longer the sequence, the less the chance of a false-positive, but you should never ever put your full ID there. It's really hard if not nearly impossible to bruteforce the MD5 hash back into the original key but who knows what people do when they have too much time and bad intentions.
int MinimumRequiredScore 
Instigator needs to have at least this much points. Enter a very low value to let everyone pass this check. ;)
int TeamIndex 
Instigator needs to be in this specific team. 0= red, 1= blue, 255= disable check

Functions

Events

Trigger

event Trigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.Trigger

Let's call the check.

UnTrigger

event UnTrigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.UnTrigger

Let's call the Check.

Other instance functions

PerformCheck

function bool PerformCheck (Pawn Instigator, bool bBlacklist)

Run all the criteria checks on the Instigator.


Author comments

This actor is supposed to allow authorized personnel like Admins, clan members or the mapper himself to cause certain Events in the map, what can become pretty handy in conjunction with other actors of my tool set.

However, this actor is basically also a way to let the mapper do certain things to certain players which might not be fair, for example healing one kind of players and keeping the other kind of players from using a certain door, etc.

There are many ways how such a thing can be abused, but I follow the rule that I just offer you the tools and it's about you what you do with them. Keep in mind that players won't play your map if they feel like you give certain players advantages over the others and there is nothing they can do about it. No Admin will put such a map up in which you abuse this tool, unless he can bear to become a pretty empty server quickly.


I also added the restriction to distinguish players with the demo CD-key. Ok, killing them might be too hard, that's why I integrated it optionally, but I somehow found that it would be fair that those who paid for the game has the right to play it in it's full spectrum while the other guys have exceeded their testing time and shouldn't get all the features. Seriously, just buy the game if you haven't done yet.